nexu-io/open-design/plugins/_official/atoms/patch-edit/SKILL.md
patch-edit
Apply one rewrite-plan step at a time as small reviewable file edits, never rewriting whole files when a localised change suffices.
- Source repository stars
- 82,073
- Declared platforms
- 0
- Static risk flags
- 0
- Last source update
- 2026-07-28
- Source checked
- 2026-07-28
Decision brief
What it does—and where it fits
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".
Not for
- Rewriting an entire file when the rewrite-plan step is localised.
- Touching a file outside the step's files[].
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/nexu-io/open-design --skill "plugins/_official/atoms/patch-edit"Inspect the Agent Skill "patch-edit" from https://github.com/nexu-io/open-design/blob/89d6d4ef21baf80f871595abdf6f7de6e941dd44/plugins/_official/atoms/patch-edit/SKILL.md at commit 89d6d4ef21baf80f871595abdf6f7de6e941dd44. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Inputs
plan/steps.json from rewrite-plan.
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. - 02
Output
The atom mutates files inside the project cwd via the file-edit tool. After every iteration, it writes a per-step receipt:
The atom mutates files inside the project cwd via the file-edit tool. After every iteration, it writes a per-step receipt: - 03
Convergence
The atom completes when every step in plan/steps.json is in a terminal state (completed / skipped) OR iterations = ODMAXDEVLOOPITERATIONS. Use:
The atom completes when every step in plan/steps.json is in a terminal state (completed / skipped) OR iterations = ODMAXDEVLOOPITERATIONS. Use: - 04
Anti-patterns the prompt fragment forbids
Rewriting an entire file when the rewrite-plan step is localised.
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
Permission review
Static risk signals and limitations
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 65/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 82,073 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- nexu-io/open-design
- Skill path
- plugins/_official/atoms/patch-edit/SKILL.md
- Commit
- 89d6d4ef21baf80f871595abdf6f7de6e941dd44
- License
- Apache-2.0
- Collected
- 2026-07-28
- Default branch
- main
View the original SKILL.md
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.