implement-patch skill
✓ 인증됨불변성 수준의 수정을 구현하고, 회귀 테스트를 작성하며, 구조화된 패치 기록을 생성하여 확인된 로컬 버그를 해결합니다.
- GitHub 스타
- 8,136
- 파일
- 1
- 마지막 커밋
- 2026년 11월 11일
- 라이선스
- CC-BY-SA-4.0
- 허용된 도구
- —
implement-patch skill은 무엇을 하나요?
implement-patch은(는) agent skill입니다. 불변성 수준의 수정을 구현하고, 회귀 테스트를 작성하며, 구조화된 패치 기록을 생성하여 확인된 로컬 버그를 해결합니다.
skill의 SKILL.md에서 생성된 요약입니다.
implement-patch skill 정보
불변성 수준의 수정과 회귀 테스트를 통해 확인된 로컬 버그를 수리하는 것이 이 SKILL의 주요 기능입니다. 개발자는 버그가 이미 독립적으로 검증되었으며, 추측성 탐색이 아닌 구조화된 수리 프로세스가 필요한 경우에 이를 사용합니다. 에이전트는 uv run을 사용하여 레코드 검증기로 체크를 실행함으로써 수리 범위와 케이스 플랜을 사용할 수 있는지 확인하는 엄격한 절차를 따릅니다.
손상된 불변성이 식별되면 에이전트는 해당 경계 내에서 위반 사례를 모두 검색합니다. 그 후 베이스라인에서 실패하는 회귀 테스트를 작성하고, 불변성을 수정하기 위해 검토 가능한 최소한의 변경 사항을 적용합니다. 프로세스는 patch 디렉토리 내에 fix.patch와 tests.patch라는 두 개의 특정 파일을 생성하며 마무리됩니다. 마지막으로 에이전트는 커밋 SHA, 파일 통계 및 테스트 스위트 결과가 포함된 patch.json 레코드를 생성하며, 이는 manifest 명령을 통해 구현되고 레코드 검증기로 검증됩니다.
agent가 수행할 수 있는 작업
- 1검증된 로컬 버그 수정독립적인 검증을 통해 이미 확인된 버그에 대해 불변성 수준의 수리를 적용합니다.
- 2회귀 테스트 생성버그와 그 변형 사례가 해결되었는지 확인하기 위해 현재 베이스라인에서 실패하는 새로운 테스트를 개발합니다.
- 3구조화된 패치 기록 생성커밋 세부 정보, 변경된 라인 수 및 테스트 스위트 결과가 포함된 patch.json 파일을 생성합니다.
- 4불변성 위반 사례 검색손상된 불변성의 경계 내에서 특정 위반이 발생하는 모든 사례를 식별합니다.
skill의 SKILL.md를 기반으로 작성되었습니다. 모든 사용 사례는 해당 문서의 인용구와 대조 확인되었습니다.
implement-patch skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.플러그인에 implement-patch skill 설치
/plugin marketplace add trailofbits/skills /plugin install patching-bugs@trailofbits
Claude Code에 implement-patch skill 설치
~/.claude/skills/implement-patch/SKILL.md
$ npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch ~/.claude/skills/implement-patchClaude Code (project)에 implement-patch skill 설치
.claude/skills/implement-patch/SKILL.md
$ npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch .claude/skills/implement-patchCodex에 implement-patch skill 설치
~/.agents/skills/implement-patch/SKILL.md
$ npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch ~/.agents/skills/implement-patchGemini CLI에 implement-patch skill 설치
~/.gemini/skills/implement-patch/SKILL.md
$ npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch ~/.gemini/skills/implement-patchClaude.ai에 implement-patch skill 설치
npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch implement-patch && zip -r implement-patch.zip implement-patch # claude.ai → Customize → Skills → + → Create skill → Upload a skill → implement-patch.zip
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 보안 감사는 아닙니다. 에이전트가 실행하기 전에 스크립트를 읽어 보세요. 검사 방식
- 소스 저장소 연결 및 접근 가능trailofbits/skills/plugins/patching-bugs/skills/implement-patch is public and reachablegithub.com/trailofbits/skills/tree/HEAD/plugins/patching-bug ↗통과
- 오픈 소스 라이선스 (OSI)CC-BY-SA-4.0 is not OSI-approvedspdx.org/licenses/CC-BY-SA-4.0.html ↗결함 발견
- 최근 1년 내 커밋 또는 릴리스Last commit 2026-11-11github.com/trailofbits/skills/commits ↗통과
- 스크립트에 다운로드 후 실행이나 자격 증명 탈취가 없음No scripts in the skill folder통과
- SKILL.md에 숨겨진 지침 없음No override phrases, safeguard switches, credential requests or hidden charactersgithub.com/trailofbits/skills/blob/HEAD/plugins/patching-bug ↗통과
- 사전 허용 도구가 제한됨No pre-approved tools; the agent asks before using onegithub.com/trailofbits/skills/blob/HEAD/plugins/patching-bug ↗통과
SKILL.md
GitHub에서 보기Implement Patch
When to Use
Use after independent validation confirms one claim. Read the record contract. Before target commands, follow its project guidance.
When NOT to Use
Do not use for speculative bug hunting, proof of a completed patch, or a change that cannot be exercised by the local compiler or runtime.
Procedure
-
Before editing, run
uv run --no-project <script> check --before-repair <run-dir>with the record validator. If this check fails, stop and return its errors for an INCONCLUSIVE report. The gate requiresfinding.repair_scopewith a usable case plan and a consistent attempt count. Use the declared scope as the repair brief. Identify the broken invariant and search within its boundary for every instance of the same violation. Read the threat model only to preserve intended behavior; it is not a gate. -
Run the project's existing suite and record its results. Write a regression test that fails on the baseline for the named bug and any fixed variant. Observe the failure. Fix the invariant within the repair brief with the smallest reviewable change.
-
Run the regression test and full existing suite again. Compare before and after failures. Fix new failures or explain a pre-existing one from receipts.
-
Record every variant as
fixedornot_fixedwith a reason. Produce exactly one local commit. Never push or open a PR. From the baseline, writefix.patchfor production changes andtests.patchfor test changes inpatch/attempt-N/. -
Write
patch.jsonwith the two commit SHAs, changed-file and line counts, variants, suite results, and your agent identity. If the attempt produced no commit, recordpatch_commit: nulland return it as failed. Manifest the entire attempt directory, including both patch files and the record, usinguv run --no-project <script> manifest <patch-attempt-dir>. Check it with the record validator.
{
"schema_version": 1,
"attempt": 1,
"baseline_commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"patch_commit": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"files_changed": 2,
"lines_added": 3,
"lines_removed": 1,
"variants": [],
"suite_before": {"command": "pytest", "passed": 9, "failed": 1, "skipped": 0},
"suite_after": {"command": "pytest", "passed": 10, "failed": 0, "skipped": 0},
"agent": "patcher-1"
}
Rationalizations to Reject
| Shortcut | Required action |
|---|---|
| Only the reported line matters. | Search for the same invariant violation. |
| Minimal means the fewest lines. | Make the smallest reviewable invariant-level fix. |
| Tests pass after the patch. | Show the regression test failed before it. |
이 스킬의 파일
1implement-patch skill 질문
Claude Code에 implement-patch skill을 어떻게 설치하나요?
npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch ~/.claude/skills/implement-patch를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
implement-patch skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.
implement-patch SKILL은 언제 사용해야 하나요?
독립적인 검증을 통해 버그가 확인되었고, 불변성 수준의 수정, 변형 사례 탐색 및 로컬 커밋 생성이 필요한 경우에 이 SKILL을 사용합니다.
추측성 버그 탐색에 이 SKILL을 사용할 수 있나요?
아니요, 이 SKILL은 추측성 버그 탐색이나 패치 완료 여부를 증명하는 용도로 사용해서는 안 됩니다.
초기 레코드 검증기(record validator) 체크에 실패하면 어떻게 해야 하나요?
체크에 실패하면 작업을 중단하고 오류를 INCONCLUSIVE 보고서로 반환해야 합니다.
변경 사항을 원격 저장소에 푸시해야 하나요?
아니요, 정확히 하나의 로컬 커밋만 생성해야 하며, 푸시하거나 pull request를 열어서는 안 됩니다.