Agent skill · software engineering · nexu-io
patch-edit
Apply one rewrite-plan step at a time as small reviewable file edits, never rewriting whole files when a localised change suffices.
Why this skill is useful
Adds a specific implementation for applying localized code edits based on a rewrite plan, which the AI wouldn't reliably generate on its own.
What it needs
Requires file-edit installed locally. About 1k tokens when loaded. Last updated 2026-08-07. 84,236 stars on the source repository.
What this skill does
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.json from rewrite-plan. The current value of iterations (the daemon's per-stage counter). code/index.json for 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: Convergence The atom completes when every step in plan/steps.json is in a terminal state (completed / skipped) OR iterations >= ODMAXDEVLOOPITERATIONS. Use: 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's risk is 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.
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills nexu-io/patch-edit