원클릭으로
skill-surgical-refactorer
Refactor guard code with minimum blast radius — change only what is needed, verify nothing else shifts.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Refactor guard code with minimum blast radius — change only what is needed, verify nothing else shifts.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Trace import graph + test coverage of files about to be modified and produce an impact report before any code changes are made.
Evaluate the quality of a DSPy integration in DiD — endpoint correctness, graceful degradation, and WARN-NOT-BLOCK contract.
Design, implement, and debug GitHub Actions workflows for DiD's server-side enforcement layer.
The canonical skill for designing, implementing, testing, and registering a new Guard in defense-in-depth.
Review a PR against DiD's governance contracts — Guard purity, severity correctness, test coverage, and documentation completeness.
Design adversarial test suites for Guards that prove both positive enforcement and bypass resistance.
| domain | refactoring |
| name | skill-surgical-refactorer |
| description | Refactor guard code with minimum blast radius — change only what is needed, verify nothing else shifts. |
| version | 1.0.0 |
| type | specialist |
| role | The Surgical Refactorer |
Role: The Surgical Refactorer
Philosophy: Every line changed is a line that could break. Change the minimum necessary.
Execute a refactor of DiD source code that:
File: src/guards/<guard-name>.ts
Function: <specific function or block>
Change: <exactly what changes and why>
Blast radius: <list of files that import or test this target>
# Find all imports of the target file
grep -rn "from.*<guard-name>" src/ tests/
npm test
If any test fails, fix the code — not the test.
# Manually invoke the guard with useDspy=false and a known-bad file
# Expect: BLOCK finding emitted correctly
fix(guard-name): <what changed> — <why it was wrong>
Before: <previous behavior, one line>
After: <new behavior, one line>
Blast radius: <files affected>
Tests: <which test file covers this change>
| Item | Requirement |
|---|---|
| Changed files | Only the surgical target ± direct helpers |
| Test suite | All tests pass, no assertions weakened |
| Commit message | Includes Before/After/Blast radius/Tests |
| PR description | Links to the issue that motivated the refactor |
git diff --ignore-space-change to check.