patch-edit
What it does
This tool helps make small changes to programming code one at a time. Instead of changing everything at once, it applies one small fix or improvement at a time, making it easier for people to review and understand the changes.
When to use it
- βWhen you need to fix a small bug in code.
- βWhen adding a small, testable new feature.
- βTo improve a specific part of the code without affecting the rest.
Skill link
https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/patch-edit/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI want to apply the next step of the refactoring plan to the 'utils.js' file.β
5 new skills a week. 1 minute to read.
How it works
The tool takes a plan with multiple steps and applies each step individually. After each step, it records what was done, allowing you to see the progress and approve the next changes.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Patch edit
Spec Β§20.3 / Β§21.3.2: code-migration / tune-collab cannot ship a trustworthy diff when the agent rewrites whole files in one pass β the reviewer can't audit the change. This atom enforces "one step per turn, smallest possible localised edit".
Inputs
plan/steps.jsonfromrewrite-plan.- The current value of
iterations(the daemon's per-stage counter). code/index.jsonfor the file's known imports + neighbours.
Output
The atom mutates files inside the project cwd via the file-edit tool.
After every iteration, it writes a per-step receipt:
project-cwd/
βββ plan/
βββ steps.json (status updated: 'pending' β 'completed' | 'skipped')
βββ receipts/
βββ step-<id>.json # { files: ['...'], diffSummary, rationale, completedAt }
Convergence
The atom completes when every step in plan/steps.json is in a
terminal state (completed / skipped) OR iterations >= OD_MAX_DEVLOOP_ITERATIONS. Use:
{
"id": "patch-edit-loop",
"atoms": ["patch-edit"],
"repeat": true,
"until": "plan.steps.terminal === plan.steps.total || iterations >= 8"
}
Anti-patterns the prompt fragment forbids
- Rewriting an entire file when the rewrite-plan step is localised.
- Touching a file outside the step's
files[]. - Touching a
shell-tier file when the step'sriskis not'high'or the user hasn't confirmed. - Skipping a step without a receipt + a rationale string.
Status
Implemented by the daemon runner in
apps/daemon/src/plugins/atoms/patch-edit.ts. It validates step ownership and
risk, applies unified diffs with atomic writes, and records receipts and
progress.
FAQ
Why not change the whole file at once?
Changing entire files at once makes them hard to review and identify errors. Making small changes at a time makes the process safer and easier to audit.
What happens after a step is applied?
The tool saves a detailed record of the change made, including which files were altered and why. This creates a history of modifications.
Can I skip a step?
Yes, but you need to record the reason why the step was skipped. This ensures all decisions are documented.
Details
Original description by the author
Apply one rewrite-plan step at a time as small reviewable file edits, never rewriting whole files when a localised change suffices.
repo: nexu-io/open-design
Popularity
- GitHub stars
- 101k
- Ranking position
- #987
- License
- Apache-2.0
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
sample-plugin
101kMakes your agent create a metadata file for tests. It helps ensure code works correctly in different situations.
aster-atelier
101kHelps your agent create an artistic website with a classic look. It uses elegant imagery, blue skies, and serif fonts for a cinematic feel.
audio-jingle
101kMakes your agent generate audio like jingles and sound effects. It can create music and voices, saving the result as an audio file.
blog-post
101kHelps your agent write long articles or blog posts. It includes space for images, quotes, and author information.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.