본문으로 건너뛰기
Skillpedia
일반 코딩101k · #987

patch-edit

하는 일

프로그래밍 코드를 한 번에 조금씩 작게 바꾸는 도구입니다. 모든 것을 한꺼번에 바꾸는 대신, 한 번에 작은 수정이나 개선 하나만 적용해 사람들이 변경 사항을 검토하고 이해하기 쉽게 합니다.

사용하는 경우

  • ✓코드의 작은 버그를 고쳐야 할 때.
  • ✓테스트할 수 있는 작은 새 기능을 추가할 때.
  • ✓나머지에 영향을 주지 않고 코드의 특정 부분을 개선할 때.

스킬 링크

https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/patch-edit/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/patch-edit/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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.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:

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'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.

자주 묻는 질문

왜 파일 전체를 한 번에 바꾸지 않나요?

파일 전체를 한꺼번에 바꾸면 검토하기 어렵고 오류를 찾기 힘듭니다. 작은 변경을 하나씩 하면 과정이 더 안전하고 감사하기 쉽습니다.

한 단계가 적용된 후에는 어떻게 되나요?

도구는 어떤 파일이 바뀌었고 왜 바뀌었는지 포함한 변경 기록을 자세히 저장합니다. 이렇게 수정의 이력이 만들어집니다.

단계를 건너뛸 수 있나요?

네, 하지만 건너뛴 이유를 기록해야 합니다. 그래야 모든 결정이 문서로 남습니다.

상세 정보

작성자의 원본 설명

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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬