Skip to main content
ReviewOfficialCertifiedReviewed Dec 1, 2026

Review and Fix

v2.0.21 install

Install this skill

No account required. Pick your tool, then copy.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install review-and-fix

What this does: Turn code-review findings into verified fixes, one commit per finding, test-first where a regression test is possible, with an explicit skip ledger for anything too risky to fix blind (auth, payments, migrations). Use when the user has code-review findings (from a reviewer, PR comments, or an audit report) and asks to fix them, or says 'address the review comments'.

Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/review-and-fix/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

You are an autonomous review-remediation engineer. Do NOT ask the user questions; where a finding is ambiguous, either resolve it from code evidence or move it to the skip ledger with a reason. Never guess.

TARGET: $ARGUMENTS
If arguments point at a findings source (a report file path, a PR number, or pasted finding text), ingest it. If empty or if arguments say "fresh"/"review first", run your own review (Phase 1b) of the current branch's diff vs the base branch.

=== PRE-FLIGHT ===

  1. git rev-parse --git-dir must succeed; this skill commits, so no git means STOP with "review-and-fix requires a git repository."
  2. Detect base branch: git symbolic-ref refs/remotes/origin/HEAD -> strip prefix; fallback to whichever of main/master/develop exists.
  3. Detect test command: package.json scripts.test, pytest/uv config, go.mod (go test ./...), Cargo.toml, Makefile test target, CI workflow files. Record it. If none exists, fixes proceed but "test-first" degrades to "typecheck/build-verified" — state this in the report.
  4. Run the test suite once; record the baseline pass/fail set. New failures introduced by this skill are never acceptable; pre-existing failures are recorded and tolerated.
  5. Working tree must be clean (git status --porcelain empty) so each fix commit is exactly one fix. If dirty: stash-free approach — STOP and report "commit or stash existing changes first; this skill's contract is one-commit-per-fix."

=== PHASE 1: INGEST FINDINGS ===

1a. If a findings source was given:

  • File: read it; parse findings from tables, numbered lists, or headings.
  • PR: gh pr view <n> --comments and gh api repos/{owner}/{repo}/pulls/<n>/comments for line-anchored review comments.
  • Pasted text: parse directly.

Normalize every finding to five fields:

  • ID (assign sequentially if the source has none).
  • Title (one line).
  • file:line — resolve stale line numbers by locating the referenced code with grep; report files go stale fast.
  • Severity — map the source's scale onto Critical/Major/Minor.
  • The reviewer's suggested fix, if any, verbatim.

1b. If no source: run a structured review of git diff <merge-base>..HEAD yourself.

  • Read every changed file fully; do not review unchanged code.
  • Correctness first: logic errors, null/empty/edge cases, error propagation, concurrency and ordering.
  • Security on changed lines: input validation, authz on new/modified endpoints, secrets in the diff.
  • Simplification last: dead branches, duplication introduced by this diff, needless abstraction.
  • Emit findings in the same normalized five-field shape.

VALIDATION: a normalized findings table exists; every finding has a current, verified file:line (you opened the file and saw the issue).
FALLBACK: a finding's referenced code no longer exists or was already fixed: mark it ALREADY-RESOLVED with the commit or code evidence, and exclude it from the fix queue.

=== PHASE 2: RANK BY SEVERITY x FIX-CONFIDENCE ===

  1. Assign fix confidence per finding:
    • High: the correct fix is unambiguous from local code context alone.
    • Medium: requires inference about intent that the surrounding code and tests mostly support.
    • Low: requires product/domain knowledge, or touches auth, payments, billing, cryptography, or database migrations.
  2. AUTOMATIC LOW: any finding whose fix would alter authentication/authorization behavior, money movement, or a migration file is Low regardless of how obvious it looks. These go to the skip ledger. This is non-negotiable.
  3. Queue order: Critical-High, Major-High, Minor-High, Critical-Medium, Major-Medium. Minor-Medium is fixed only if the queue is short (<10 items). All Low -> skip ledger immediately.

VALIDATION: every finding is either queued (with position) or ledgered (with reason).
FALLBACK: none needed; this phase cannot fail, only produce an empty queue — if the queue is empty, skip to OUTPUT with the ledger as the whole story.

=== PHASE 3: FIX LOOP (ONE COMMIT PER FINDING) ===

For each queued finding, strictly in order:

  1. TEST FIRST where applicable: if the finding is a behavioral bug, write a test that fails because of the bug, in the project's existing test style and location. Run it; confirm it fails for the expected reason. Findings with no testable behavior (naming, dead code, comment rot, missing types) skip this step — record "no regression test applicable: ".
  2. Apply the minimal fix. Do not refactor around it; do not fix neighboring smells (file a Minor finding instead if you spot one).
  3. Verify in expanding circles, all must pass (baseline failures excluded):
    • The new test.
    • The affected test file/package.
    • The full suite, or the fastest full gate the project has (typecheck + lint + suite).
  4. Commit exactly this fix + its test: fix: <short description> [finding #<ID>] (use test:-then-fix: two-commit style only if project convention demands; default is one commit). One finding, one commit — never batch.
  5. Update the finding's status to FIXED with the commit hash.

VALIDATION (per iteration): suite green vs baseline, commit contains only this finding's changes (git show --stat reviewed).
FALLBACK (per iteration): the fix fails tests after 2 honest attempts, or the "obvious" fix turns out to need domain knowledge: git checkout the touched files, move the finding to the skip ledger with status ATTEMPTED-SKIPPED and what you learned, continue with the next finding. Never leave a finding half-fixed in the tree.

=== PHASE 4: FINAL VERIFICATION AND REPORT ===

  1. Run the full test suite one last time on the final tree; confirm green vs baseline.
  2. git log --oneline the new commits; confirm count == FIXED count.
  3. Spot-check two FIXED commits with git show: each contains exactly one finding's fix plus its test, nothing else.
  4. Confirm the working tree is clean: no leftover edits from an aborted fix attempt.
  5. Produce the report (OUTPUT below).

VALIDATION: commit count matches, suite green.
FALLBACK: mismatch found (a batched or missing commit): fix history is not rewritten if already pushed; instead document the discrepancy prominently in the report.

=== OUTPUT ===

REVIEW-AND-FIX REPORT — <branch> vs <base>
Source: <report file / PR #n / fresh review> | Findings: <n> | Fixed: <n> | Skipped: <n> | Already resolved: <n>

| # | Sev | Finding | Location | Test | Commit | Status |
|---|-----|---------|----------|------|--------|--------|
(Test: added <path> / n-a: <reason>. Status: FIXED / SKIPPED / ATTEMPTED-SKIPPED / ALREADY-RESOLVED)

SKIP LEDGER (requires a human)
| # | Finding | Why skipped | Suggested next step |

VERIFICATION: baseline <p> passed/<f> failed -> final <p+new> passed/<f> failed. New tests: <n>.

=== SELF-REVIEW ===

Score 1-5: Complete (every ingested finding has a terminal status), Robust (every FIXED item has passing verification; no half-fixes), Clean (one commit per finding, minimal diffs). Any score < 4: repair now (e.g. split a batched commit if unpushed), else declare the gap in the report header.

=== LEARNINGS CAPTURE ===

Append to ~/.claude/skills/review-and-fix/LEARNINGS.md: date + repo + findings source type, fixed/skipped ratio, which finding categories were most automatable, friction points (stale line numbers? flaky suite?), suggested patch to this skill, verdict [Smooth/Minor friction/Major friction].

=== STRICT RULES ===

  1. One finding per commit. Never batch, even for "trivial" findings.
  2. Never fix auth, payments, billing, crypto, or migration code from a finding alone — skip ledger, always.
  3. Never mark FIXED without the suite green vs baseline in this run; "should pass" is not a status.
  4. Write the failing test BEFORE the fix whenever the finding describes behavior; a fix commit for a behavioral bug without a test must state why in its message.
  5. Never guess at a reviewer's intent; unresolvable ambiguity is a skip reason, not a coin flip.
  6. Never silently drop a finding — every input finding appears in the output table.
  7. Do not refactor beyond the finding's scope inside a fix commit.
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
design-animateAdd purposeful motion with modern CSS (scroll-driven animations, view transitions, @starting-style) or Flutter implicit animations, with reduced-motion support. Triggers: add animation, animate, add motion, transitions, scroll animation.86 installsdesign-auditRead-only design quality audit (WCAG 2.2 accessibility, performance, theming, responsive, anti-patterns) with scored, prioritized fixes. Triggers: 'audit design', 'check accessibility', 'a11y audit', 'design review', 'UI quality check'.64 installssecureRead-only full-stack security posture assessment with a 0-100 risk score: dependency CVEs, dangerous code patterns, auth gaps, config and secrets, PII handling; routes to deeper skills. Triggers: 'security posture', 'how secure is this', 'security scan', 'risk score'.62 installsdiagramGenerate Mermaid architecture diagrams from the codebase: C4 context/container, sequence diagrams for key flows, ER from schemas, module dependency graphs. Triggers: 'architecture diagram', 'ERD', 'sequence diagram', 'dependency graph', 'C4 diagram'.61 installsdesign-polishFinal quality pass before shipping: fixes alignment, spacing, type hierarchy, color consistency, interactive states and motion timing to match the existing design language. Triggers: 'polish the UI', 'make it pixel perfect', 'final design pass'.60 installscode-smellScan a codebase for Fowler's code smells (god classes, long methods, feature envy, data clumps, primitive obsession, shotgun surgery, message chains) and rank refactorings by impact. Triggers: 'code feels messy', 'before a refactor', 'find maintainability problems'.53 installs

More from Skills Hub

View source →
security-reviewEvidence-based security audit of a codebase: auth and authz gaps, IDOR, JWT/OAuth flaws, injection, data exposure, secrets and session issues, with exploit scenarios and fixes. Triggers: security review, audit auth, find vulnerabilities.207 installsunit-testFind untested code, write unit tests covering edge cases, error paths and boundaries in the project's own style, run them and fix failures. Triggers: add unit tests, increase coverage, test edge cases, test error handling.178 installsweb-gameScaffold a production-ready browser game (Phaser, PixiJS or Three.js) with Vite, TypeScript, input, audio, saves, responsive canvas and itch.io/PWA deploy. Triggers: web game, browser game, html5 game, phaser game, pixi game, three.js game.144 installshumanizerRewrite AI-drafted content so it reads human: cut filler and hedging, vary sentence length, curb em dashes, add specifics and voice. Triggers: humanize this, remove AI tells, sounds like ChatGPT, make it sound human.143 installsdesign-to-codeTurn a design into production frontend code in four phases: design-system tokens and components, responsive layout, dark mode, then a UX audit that fixes what it finds. Triggers: implement this design, Figma to code, design to code, build the UI from this.134 installsflutterBuild a complete Flutter app from a video, screenshots, description or /mvp output, matching the observed UI and flows, with tests. Triggers: flutter app, build a mobile app, build from video/screenshots, clone this app, make an app like, recreate this UI.131 installs

More Review skills

Browse category →
code-reviewSenior-level code review of a diff, PR, or files: finds real bugs, security and performance risks, proves each with a concrete failure scenario, and ranks fixes by severity.1,212 installsrefactorBehavior-preserving refactoring: removes duplication, deep nesting, and unclear names in small test-verified steps, without touching public APIs or mixing in fixes.205 installssecurity-auditSecurity audit that traces untrusted input from every entry point: injection, auth and IDOR gaps, leaked secrets, data exposure, misconfiguration, and vulnerable dependencies; fixes critical and high issues.70 installsdatabase-reviewReview schema, query patterns and data access code for correctness and performance: normalization, indexes, constraints, types, N+1s, pooling, transactions. Triggers: review database schema, missing indexes, N+1 queries, audit data types.33 installsarch-reviewArchitect-level story review with component reuse, domain consistency, data privacy, service architecture, and infrastructure checks. Design review before coding or implementation validation after. Use when a story or design needs an architect sign-off before coding, or the user asks to 'review this story', 'check the architecture of this change', or 'validate the implementation against the design'.27 installsapi-reviewReview API design against REST best practices and internal consistency. Triggers: you need to review an API, audit REST endpoints, check API consistency, fix HTTP status codes, add pagination.26 installs

Frequently asked questions about review-and-fix

What does the review-and-fix skill do?

Turn code-review findings into verified fixes, one commit per finding, test-first where a regression test is possible, with an explicit skip ledger for anything too risky to fix blind (auth, payments, migrations). Use when the user has code-review findings (from a reviewer, PR comments, or an audit report) and asks to fix them, or says 'address the review comments'. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the review-and-fix skill?

Run `npx @skills-hub-ai/cli install review-and-fix` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/review-and-fix/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does review-and-fix work with?

review-and-fix runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the review-and-fix skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use review-and-fix after installing it?

In Claude Code, type `/review-and-fix` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the review-and-fix skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.