Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Review changed code for quality, security, and architecture compliance. Use only when the user explicitly requests local review or a PR finding requires it.
.claude/skills/kdlbs-code-review/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 121% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 149% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 117% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 184% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 253% | 0% |
Run this local review only when the user explicitly asks or an actionable PR/CI finding requires it. Do not use it automatically before opening a PR: the two configured PR AI reviewers are the semantic-review gate.
Review the current changes in the codebase (Go backend + Vite/React SPA monorepo). Every finding needs a file_path:line_number reference, an explanation of why it matters, and a concrete fix.
Start from intent and evidence: read the spec/task first when available, then changed tests before production code. Tests reveal the expected behavior and whether the change is actually verified.
/tdd — Recommend when flagging untested logic. The author can use this to add tests.Determine the right diff scope:
git diff --name-only (unstaged) and git diff --cached --name-only (staged)git diff origin/<base_branch>...HEAD --name-only to diff against the base branchFor an existing PR, first confirm the exact head under review. Do not assume the local checkout is current: inspect the PR's base branch and head SHA, fetch the head if needed, and use that immutable SHA in the diff. If the current PR head cannot be fetched, say so rather than reporting a stale checkout as a review of the current PR.
Record the base and head SHA for each review round. A new contributor push starts a new round: reassess prior findings and the verdict against the new head, and verify checks or workflow results for that head rather than relying on a PR number or author summary. From scripts/pr-state --summary, also record pr.base_ref_name, pr.base_head_oid, pr.merge_base_oid, and pr.base_advanced_since_head when available.
For a follow-up round, inspect <previous-reviewed-head>..<current-head> first to isolate the author's response, then re-evaluate <base>...<current-head> for complete PR coverage. Record both immutable heads.
When pr.base_advanced_since_head is true, validate the actual merge result before declaring the PR ready. Record the latest base and immutable head SHAs, create a temporary worktree from that base, merge the head with git merge --no-commit --no-ff <head-sha>, and run focused verification in the merged tree before removing the worktree. GitHub's mergeable: MERGEABLE status proves conflict compatibility, not that the merged result was tested. If an older pr-state helper lacks the base fields, resolve the current base head only as a fallback with gh api repos/{owner}/{repo}/git/ref/heads/{base} and derive/record the merge base before making the same decision; do not try the unsupported gh pr view --json baseRefOid field.
For an existing GitHub PR, inspect both scripts/pr-state --summary <PR> and scripts/pr-resolve list <PR> before treating review feedback as clean. Read the body of any exact-current-head review as well as inline threads: bots can place actionable findings outside the diff. A review's commit_id is the current-head signal; timestamps are only collection order. If pr-state reports hidden unresolved threads, use pr-resolve list to inspect them rather than assuming the filtered list is complete.
Compare the PR description, checklist, and claimed manual validation with that exact head, especially after a major refactor. Report stale claims separately; they are not verification evidence for the current diff.
Read each changed file in full — understand surrounding code, not just the diff. Navigate callers, interfaces, and tests to understand changes end-to-end.
For each file, identify which requirement or intent it serves. Flag any changes that don't map to the task — scope creep is a blocker.
Before reviewing implementation details:
update the same entity, ensure a delayed HTTP response cannot overwrite the newer event. Prefer a narrow mutation response or guard a full merge with an immutable revision/updated_at; cover it with a deferred-response test that applies the newer event first.
transport, and gateway/client delivery. Sequential publishes on separate subscriptions do not establish client order; require a unified stream or sequence-aware buffering, with a transport-boundary test and local-emulator coverage.
Check every changed file for the following layers. Skip layers that don't apply to the change.
Security (blockers if found):
through the applicable sanitizer/redaction boundary; storage-safe values are not automatically presentation-safe.
Architectural fit (highest priority):
@kandev/ui not @/components/ui/*docs/specs/ and docs/decisions/ for the affected subsystem; flag an accepted spec or ADR that the change makes inaccurateData & state modelling:
Logic & correctness:
Performance:
Complexity limits (CI also enforces these, but catch them early to avoid pushing and waiting):
Code quality:
Build and platform boundaries:
target through the shell and platform branches. Distinguish executable naming from recipe-shell syntax; inspect OS, MSYSTEM, and SHELL assumptions.
scripts/check-make-shells. If a manual make -n is necessary, neutralize its parse-time probes as that checker does (NULL_REDIR= BUILD_TIME=simulated) so POSIX does not create NUL artifacts. Compare git status --short with the initial snapshot afterward.
make -n <changed-target> for every affected platform branch that isavailable, and confirm CI invokes the changed target. Include docs or configuration paths when a validator or test reads them.
AI slop detection:
as any or as unknown as X casts used to dodge type errors instead of fixing typesTesting (blocker if missing):
*_test.go tests*.test.tsx coverage and/or E2E. Route responsive user-facing changes through /mobile-parity.finally or equivalent terminal cleanup for success, error, cancellation, and early/no-op returns; require focused tests for those terminal paths./tddWhen the user says not to post or modify the PR, do not make any GitHub mutation: no fixes, comments, review submissions, or thread resolution. When the user asks for a review only, or when reviewing an external contributor's branch, do not edit the checkout or push code; report findings through the channel the user requested. Do not submit or resolve reviews unless explicitly asked.
Before a read-only review ends, compare git status --short with the initial snapshot. Remove only diagnostic artifacts demonstrably created during the review; preserve all pre-existing user changes.
Report findings with a concrete suggested fix. Do not edit the checkout during a review-only request; otherwise remediate in the same primary conversation.
Before drafting or posting a copyable PR comment, map each proposed point against exact-current-head review bodies, top-level discussion comments, and all unresolved or hidden threads. If a point is already raised, omit it from the author-facing comment but retain it in the private review summary; repeat it only when the user explicitly asks for reinforcement. Re-fetch immediately before posting and start a new review round if headRefOid changed.
Use this format:
Security holes, data loss risk, broken logic, crashes, missing tests for new/changed logic
file.go:42Performance problems, poor error handling, architectural concerns
| Severity | Count | |----------|-------| | Blocker | N | | Suggestion | N |
Verdict: Ready to merge / Ready with suggestions / Blocked — fix blockers first
Rules:
Not a finding (skip these):
Other measured skills in the registry, with their headline benchmark lift.