A streamlined workflow to review, triage, and patch findings from previous code audits.
Install
mkdir -p .claude/skills/patch && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12324" && unzip -o skill.zip -d .claude/skills/patch && rm skill.zipInstalls to .claude/skills/patch
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Address /review findings on the uncommitted Ensemble diff. Reads the most-recent review output from context, triages (fix-now is the DEFAULT for any finding about this diff — P0/P1/bounded-P2; escalate to Brandon if it needs a decision or is big; backlog only for genuinely new ideas), presents a fix plan, then patches inline — no agent spawn. Re-runs the gates after. Use after /review, before /done. Plan-first.Key capabilities
- →Load findings from the most-recent /review output in context
- →Triage findings into fix-now, escalate, or backlog categories
- →Present a patch plan including fix sketch and validation gates
- →Apply inline patches with a 'Why:' comment for non-obvious fixes
- →Re-run gates like typecheck, lint, and critique tests after patching
- →Report applied patches, escalated findings, backlogged ideas, and gate status
How it works
The skill loads review findings, triages them based on predefined criteria, and then applies inline code patches or creates issues for findings that require escalation or backlogging.
Inputs & outputs
When to use patch
- →Applying review feedback
- →Fixing code bugs
- →Triage review findings
- →Closing the review-to-done loop
About this skill
/patch — address reviewer findings
Goal: close the review→done seam — sort /review's findings and apply inline fixes.
Shared rules in .claude/skills/DOCTRINE.md — read it if not already in context. The triage
below applies §5 (findings get actioned not parked — the finding issue set trends to empty) and
§2 (the finding label); the re-run gates are §4. Patch does not change Status — the story
stays in progress.
Workflow
-
Load findings from the most-recent
/reviewoutput in context (stable ID, severity,file:line, verbatim quote, suggested direction). If not in context (new session), ask Brandon to re-run/review. -
Triage:
Triage Criteria Action Fix now (DEFAULT) Any finding about the diff under review — P0, P1, or a bounded P2 (mechanical, or a small/localized change). This is the default, not the exception. patch inline this turn Escalate to Brandon A real finding that (a) needs a design call (§5 — Track synthand genuinely-subjective musical work (no critique-test oracle for the idiom, the Needs-ear stop), destructive data ops (drops/rewrites persisted sessions, share-URL schema, preset data, or a state-slice migration that breaks saved state), the state contract (a@direct-mutationoutside the sanctioned categories), or any genuinely ambiguous call), or (b) is large / cross-cutting / would balloon the diffstop; surface it; on Brandon's nod open a findingissue (gh issue create --title "<title>" --body "<body>" --label "finding") and/or recommend/implement #<n>with a fix-focused prompt — never silently shelve a real findingNew idea A genuinely new idea/feature surfaced during review — not a flaw in this code note it to Brandon; don't open an issue unprompted Bias to fix now. Deferring a real finding to a list is the thing we're eliminating — the open
findingissues should trend to empty (§2). A fix that's genuinely too big to do in-cycle is an escalation (with Brandon's nod), not a silent defer. -
Present the patch plan (Fix-now / Escalate, each keyed by finding ID with
file:line+ a fix sketch + any directly required companion file and why + the §4 gates) — a status update, not a gate (§5). -
Patch inline immediately in the same turn, with Edit/Write — no "Apply?" wait, unless a finding needed escalation (§5). No spawn: the orchestrator's context already holds the diff and the findings; a subagent would re-derive both and get them subtly wrong. Add a
**Why:**comment at any non-obvious fix site. -
Re-run gates (§4):
npm run typecheck # tsc over public/ and scripts/ (npm run typecheck:tests covers tests/) npm run lint # Biome lint + format check npm test # mutation check + Biome + docs lint + Vitest (node/happy-dom) npm run test:browser # Vitest browser-mode audio guards (real OfflineAudioContext, headless Chromium) npm run build --prefix prototypes/v2 && npm run test:e2e --prefix prototypes/v2 # the app's Playwright suite (laptop + webkit-phone) against the built exportIf a Fix-now patch fails a gate, stop and surface — don't pile on.
-
Report: an outcome table with one row per original finding ID:
fixed,remaining, orescalated, the evidence for that outcome, and every file changed by the patch (including why any companion file was required). Include gate status. The default expectation is that real findings were fixed, not parked — call out anything that wasn't, and why. -
Hand off to
/reviewin finding-closure mode whenever this patch changed the tree./patchnever hands its own repair directly to/done; the closure pass independently checks the original findings and direct patch delta (§5).
Safety
- Never patch an unrelated file. A file not cited by the most-recent
/reviewmay be changed only when it is directly required to resolve a cited finding (for example a regression test, fixture, shared type, or generated artifact), and that additional file + reason must appear in the patch plan before editing. This exception never permits opportunistic cleanup or new ideas. - Never silently downgrade a P0 to avoid escalation; if you think it's overblown, say so and let Brandon decide.
- Don't run reviewers inside
/patch— the mandatory handoff to/reviewowns finding closure.
Edge cases
- No findings: report; the existing clean
/reviewcan proceed to/donebecause no patch changed the tree. - All findings are P0 design calls: patch none; surface the questions; recommend
/implement #<n>. - Findings conflict (one says tighten, one says loosen the same threshold): present both; ask — don't auto-pick.
- Cited line has moved (the diff was edited since
/review): re-Read, relocate by content match, and note the drift. - A finding contradicts a project memory note: this is a §5 always-brake — escalate, don't resolve it here. The memory usually wins, but "usually" is not a license to drop a finding silently: surface both, say which you'd keep and why, and let Brandon call it.
When not to use it
- →When the most-recent /review output is not in context
- →When a finding requires a design call or is large/cross-cutting
- →When a finding contradicts a project memory note
Limitations
- →Cannot patch files not flagged by the most-recent /review
- →Cannot silently downgrade a P0 finding
- →Does not run reviewers; that is /review's job
How it compares
This workflow directly integrates review feedback into the codebase by applying inline patches and managing follow-up actions, unlike a manual process that would involve separate steps for triage, coding, and issue tracking.
Compared to similar skills
patch side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| patch (this skill) | 0 | 3mo | No flags | Intermediate |
| python-testing-patterns | 77 | 4mo | Review | Intermediate |
| dependency-upgrade | 26 | 6mo | Review | Intermediate |
| test-cases | 57 | 8mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
python-testing-patterns
wshobson
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
test-cases
cexll
This skill should be used when generating comprehensive test cases from PRD documents or user requirements. Triggers when users request test case generation, QA planning, test scenario creation, or need structured test documentation. Produces detailed test cases covering functional, edge case, error handling, and state transition scenarios.
reviewing-code
CaptainCrouton89
Systematically evaluate code changes for security, correctness, performance, and spec alignment. Use when reviewing PRs, assessing code quality, or verifying implementation against requirements.
wcag-audit-patterns
wshobson
Conduct WCAG 2.2 accessibility audits with automated testing, manual verification, and remediation guidance. Use when auditing websites for accessibility, fixing WCAG violations, or implementing accessible design patterns.
code-coverage-with-gcov
gadievron
Add gcov code coverage instrumentation to C/C++ projects