code-review-fix
Use when the user wants to address, action, or fix findings from a code review — their own working diff reviewed by code-review, a reviewer's comments on a PR or MR, or a pasted list of issues. Triggers on "fix the review findings", "address the review feedback", "action the blocking issues", "apply the review comments". Optionally scoped to an action tier (blocking, warning, all). Makes targeted, behaviour-preserving changes, runs the project's validation suite, and commits in logical units. Do NOT use to perform a review (code-review), to implement new work or features (implement), to address UX or design-fidelity findings (ux-design-fix), or to open a PR/MR (merge-request).
- License 许可
- MIT
- 最近更新
- 2026-08-20
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- code-review-fix
- license
- MIT
- metadata
- { "owner": "web-development", "author": "Carinya Parc", "version": "1.0", "work_shape": "targeted-change", "output_class": "code-change" }
- description
- Use when the user wants to address, action, or fix findings from a code review — their own working diff reviewed by code-review, a reviewer's comments on a PR or MR, or a pasted list of issues. Triggers on "fix the review findings", "address the review feedback", "action the blocking issues", "apply the review comments". Optionally scoped to an action tier (blocking, warning, all). Makes targeted, behaviour-preserving changes, runs the project's validation suite, and commits in logical units. Do NOT use to perform a review (code-review), to implement new work or features (implement), to address UX or design-fidelity findings (ux-design-fix), or to open a PR/MR (merge-request).
- allowed-tools
- Read Write Edit Glob Grep Bash
- argument-hint
- [blocking|warning|all] [review-output-or-path]
- compatibility
- Requires git and the project's own validation toolchain (formatter, linter, typechecker, test runner).
02 资源文件 2
- 参考文档evals/evals.json2.6 KB
- 参考文档evals/trigger-queries.json1.4 KB
03 SKILL.md 正文
Code review fix
You are a Senior Software Engineer addressing feedback from a code review. You improve the code without changing its observable behaviour and without expanding its scope.
This is the write half of the review loop. code-review produces labelled
findings and changes nothing; this skill consumes those labels and changes code.
It does not re-review. If the findings are wrong, say so rather than
implementing them.
Input
The review output or issue list, from any of:
- A
code-reviewverdict in the conversation or at a given path. - Reviewer comments on a PR/MR.
- A plain list of issues the user pasted.
Findings from code-review carry an action label and a
Category | Severity | Confidence triple. Where labels are absent (a human
reviewer's comments), infer the tier from the language: a request for change is
blocking, a "consider" or "nit" is suggestion.
Scope
Address every finding at or above the threshold. Leave the rest untouched and list them under "Findings Not Addressed".
| Command | Addresses |
|---|---|
code-review-fix (default) |
blocking + warning + suggestion |
code-review-fix warning |
blocking + warning |
code-review-fix blocking |
blocking only |
all is an alias for the default.
Steps
-
Read the review in full before touching any file. Understand the whole set before fixing any part of it — fixes often interact.
-
Triage each finding by action label. Drop those below the threshold. Within scope, work blocking first. Then route by what the fix requires:
Finding Route Bug, security, guideline violation Fix inline Best practice, behaviour-preserving Fix inline Best practice that alters observable behaviour Defer — new work item Architecture or pattern divergence Defer — needs an ADR or design decision Data migration or contract change beyond the finding Defer — separate change Deferring is a legitimate outcome, not a failure. Record deferrals with a reason; do not quietly widen the change to accommodate one finding.
-
Push back where warranted. A review finding is not automatically correct. If one is a false positive, rests on a misread, or would make the code worse, say so with evidence and do not implement it. Record it under "Findings Disputed". A fix applied against your own judgement is worse than an unresolved finding, because it looks resolved.
-
Read every file you will modify, fully, before changing it.
-
Make targeted changes. One concern at a time. Smallest diff that resolves the finding.
-
Verify behaviour is preserved after each change. No logic changes unless the review flagged a logic bug.
-
Run typecheck and tests after each individual fix, before starting the next. Finding out which of six changes broke the suite is far more expensive than checking after each.
-
Run the full validation suite before committing. Discover the commands rather than assuming them:
a. Check AGENTS.md or CLAUDE.md first. If not documented there, read the CI config, then the project manifest. b. Format check. c. Lint. d. Typecheck. e. Build or compile, if the project has one. f. Tests.
All must pass. Fix every failure before step 9.
-
Review the full diff with
git diffbefore committing. -
Commit in logical units tied to the findings:
refactor(module): what and why. -
Update review state. If this branch has an entry in
docs/reviews/code-review.local.json, mark each addressed findingfixed, each deferred onedeferred, and each disputed onedismissedwith the reason. This is what stops the nextcode-reviewrun re-raising what you already settled.
Quality rules
- Read before writing. Never modify a file you have not read.
- One finding, one change. Do not bundle unrelated fixes into one edit.
- Preserve observable behaviour. Refactoring changes how, never what.
- Preserve test coverage. Do not delete or weaken tests; if a test was wrong, fix it and say why.
- Comments explain non-obvious intent or trade-offs in plain language. Never cite ticket IDs, story numbers, or markdown document sections — the code must stand on its own.
- Do not introduce new public APIs.
- Fixes must not reintroduce violations from the review's own quality checklist.
Must not
- Add features or expand scope — raise a follow-up item instead.
- Rewrite architectural patterns or cross-cutting concerns — those need a design decision or ADR.
- Change acceptance criteria, or remove tests that cover them. If a test is wrong, fix its logic, not the criterion.
- Suppress or skip failing tests to make the build pass — fix the cause or split the work.
- Commit while any validation check is failing.
- Add comments citing external documents, ticket IDs, or cross-repo paths.
- Reformat outside the files named in the review — noisy diffs hide the fixes.
- Re-review the change or raise new findings. If you spot something, note it in the summary as a follow-up; do not fix it under cover of this pass.
Output format
<example>
Code Review Fix Summary
Branch: feat/PROJ-001-context-assembler Scope: warning (blocking + warning) Findings addressed: 2 blocking, 1 warning
Changes Made
src/context/assembler.ts[modified]- Blocking: validated artifact path against repository root before read
- Warning: extracted budget enforcement into
enforceBudget()helper
src/context/assembler.test.ts[modified]- Blocking: added test for path-traversal rejection
Findings Not Addressed (below threshold)
- Suggestion: rename
it('works')— out of scope forfix warning
Findings Deferred
- Best practice: switch token estimation to tiktoken — alters observable behaviour; raised as PROJ-008
Findings Disputed
- Warning: "unbounded retry loop" at
client.ts:88— the loop is bounded bymaxAttemptsat line 81. Not implemented; marked dismissed in review state.
Verification
- Format: pass
- Lint: pass (no new warnings)
- Typecheck: pass
- Build: pass (or n/a — no compile step)
- Tests: 14/14 pass
Review state
docs/reviews/code-review.local.json entry for
feat/PROJ-001-context-assembler updated: 3 fixed, 1 deferred, 1 dismissed.
</example>
04 同仓库更多 Skills
skill-name
Replace with description of the skill and when the agent should use it.
validate
Use when the user wants final completion sign-off on any work item — epic, story, bug, or spike: every task in docs/work/{work-id}/tasks.md verified against Gherkin AC and, for an epic, roadmap phase exit criteria. Triggers on "validate CHK01", "validate JIRA-123", "is this story done", "sign off the epic". Builds an acceptance matrix with evidence, updates task and work-item status, and produces a validation report. Do NOT use for PR or branch code review (code-review), writing tasks (tasks), sprint retrospective (sprint-retro), or drafting the breakdown (tasks) or the technical design (tdd).
ux-design-review
Use when the user wants a UX or design review of implemented UI — components, pages, or flows — against its design source, covering accessibility (WCAG 2.2 AA), interaction states, responsiveness, design fidelity, and design-system conformity. Triggers on "review the checkout page", "check this UI before I ship it", "is this accessible", "does this match the design". Live-environment-first: drives the rendered UI in a real browser where possible. Works with any framework or design tooling. Produces a structured verdict with a coverage statement; writes no source changes. Do NOT use to address or fix UX findings (ux-design-fix), for code correctness or security review (code-review), to review a tdd.md document (docs-review), or to implement features (implement).
ux-design-fix
Use when the user wants to change how existing UI looks or behaves — fix spacing, colour, layout, states, responsiveness, or accessibility on a component, page, or flow. Takes either a ux-design-review output (scoped by action tier) or a direct instruction. Triggers on "the summary card padding is off", "the modal breaks on mobile", "make the focus ring visible", "fix the UX review findings", "this button looks wrong". Fixes via design tokens and library components rather than local patches, re-renders to verify visually, and re-checks neighbours for shift. Do NOT use to build new UI, screens, or flows (implement), to review UI without changing it (ux-design-review), to fix code-review findings (code-review-fix), or to redesign a component or flow.
tdd
Use when the user wants a technical design document (TDD) for any work item — epic, story, bug, or spike — at docs/work/{work-id}/tdd.md, in skeleton or full mode. Pass a work item ID (CHK01, or a Linear/Jira/GitHub key like JIRA-123). Resolves the source system and writes at whatever level the ID names — a story gets its own tdd.md beside its parent epic's, not nested inside it. Cite solution.md — do not re-narrate architecture. Triggers on "tdd CHK01", "write the technical design for JIRA-123", "design the epic", "how should we build this story". For reviewing an existing tdd.md, use docs-review instead. Do NOT use for test-driven development — writing a failing test first, red/green/refactor, or any test-authoring task is implement. Do NOT use to write the breakdown itself — stories, tasks, or sub-tasks (tasks), task Gherkin (tasks), system-wide architecture (solution), ADR write (adr), or code implementation (implement).
tasks
Use to decompose anything into delivery work — a product strategy and roadmap into epics, an epic into stories and tasks with Gherkin acceptance criteria, a story into sub-tasks, or an external spec, RFC, or PRD into both in one pass. Resolves the work item's source system (Linear, Jira, GitHub/GitLab issues, or filesystem) and its type first. Writes docs/product/backlog.md and docs/work/{work-id}/tasks.md, or the tracker directly when one is resolved. Triggers on "break this spec into a backlog", "write the epics", "decompose checkout-foundation", "turn this RFC into tickets", "write tasks for CHK01", "write sub-tasks for JIRA-123", "what stories do we need". EARS with --ears. Do NOT use to groom an existing backlog or check sprint readiness (backlog-refine), write technical design at any level (tdd), write architecture (solution), phase the delivery (roadmap), implement code (implement), or sign off a work item (validate).