Evo patch generate apply

From OpenLAIR/OpenSkill · View interactive version

Evo patch generate apply is an AI agent skill from the GitHub repository OpenLAIR/OpenSkill. Generates git-compatible unified diff patches from original and modified file contents, writes them to numbered patch files, and applies them to the repository using git apply or GNU patch. Use when you need to create code patches, apply fixes to source files, or automate code modifications via diff

How to use this skill

Skill file

Patch Generate & Apply Skill

Generates and applies unified diff patches for code fixes.

When to Use

Workflow

  1. Generate diff using generate_unified_diff() with a/b prefixes
  2. Handle EOF using handle_no_newline_at_eof() for POSIX compliance
  3. Write patch using write_patch_file() to create patch_N.diff
  4. Apply patch using apply_patch() with git apply and fallbacks
  5. Validate using validate_patch_applied() to confirm changes
  6. Batch apply using apply_all_patches() for multiple patches

Key Functions

All functions are in scripts/patch.py:

Important Notes

Reference

See references/domain_reference.md for detailed domain knowledge.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.