patch-edit
하는 일
프로그래밍 코드를 한 번에 조금씩 작게 바꾸는 도구입니다. 모든 것을 한꺼번에 바꾸는 대신, 한 번에 작은 수정이나 개선 하나만 적용해 사람들이 변경 사항을 검토하고 이해하기 쉽게 합니다.
사용하는 경우
- ✓코드의 작은 버그를 고쳐야 할 때.
- ✓테스트할 수 있는 작은 새 기능을 추가할 때.
- ✓나머지에 영향을 주지 않고 코드의 특정 부분을 개선할 때.
스킬 링크
https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/patch-edit/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“'utils.js' 파일에 리팩터링 계획의 다음 단계를 적용하고 싶어요. 적용해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 여러 단계가 있는 계획을 받아 각 단계를 하나씩 적용합니다. 각 단계 후에 무엇이 바뀌었는지 기록하여, 진행 상황을 보고 다음 변경을 승인할 수 있게 합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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.
자주 묻는 질문
왜 파일 전체를 한 번에 바꾸지 않나요?
파일 전체를 한꺼번에 바꾸면 검토하기 어렵고 오류를 찾기 힘듭니다. 작은 변경을 하나씩 하면 과정이 더 안전하고 감사하기 쉽습니다.
한 단계가 적용된 후에는 어떻게 되나요?
도구는 어떤 파일이 바뀌었고 왜 바뀌었는지 포함한 변경 기록을 자세히 저장합니다. 이렇게 수정의 이력이 만들어집니다.
단계를 건너뛸 수 있나요?
네, 하지만 건너뛴 이유를 기록해야 합니다. 그래야 모든 결정이 문서로 남습니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 101k
- 순위
- #987
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
sample-plugin
101k에이전트가 테스트용 메타데이터 파일을 만들도록 합니다. 코드가 다양한 상황에서 올바르게 작동하도록 돕습니다.
aster-atelier
101k클래식한 느낌의 예술 웹사이트를 만들도록 에이전트를 돕습니다. 우아한 이미지, 푸른 하늘, 세리프 글꼴로 영화 같은 분위기를 냅니다.
audio-jingle
101k징글(jingle)과 효과음 같은 오디오를 에이전트가 생성하도록 합니다. 음악과 음성을 만들고 결과를 오디오 파일로 저장할 수 있습니다.
blog-post
101k긴 기사나 블로그 글을 쓰도록 에이전트를 돕습니다. 이미지, 인용문, 작성자 정보를 넣을 공간이 포함됩니다.