code-review-crsp
Skill4 starsChanged 3 months agoMITView on GitHub
Review code changes for correctness, completeness, bugs, edge cases, and quality. Load when the user explicitly asks to review code, check a PR, review a diff, audit recent changes, or verify an implementation matches requirements. Also triggers on "review this code", "check this PR", "review my changes", "code review", "did this implement correctly", "audit this diff", or any explicit request for a formal code review. Do NOT load for "review changes for context" or "review what happened" — those are requests to read code, not to perform a formal review.
In this repository125 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/agent-loom-routing.mdcCursor rule
- .cursor/rules/agent-loom-skills-index.mdcCursor rule
- adversarial-hatSkill
- agent-builderSkill
- agent-launcherSkill
- agent-loom-syncSkill
- agent-observabilitySkill
- agent-run-retroSkill
- agent-system-architectureSkill
- api-and-interface-designSkill
- api-deprecation-and-migrationSkill
- apply-paper-to-projectSkill
- app-security-hardeningSkill
- architectural-decision-logSkill
- assumption-mappingSkill
- brainstormingSkill
- browser-testing-with-devtoolsSkill
- business-modelingSkill
- ci-cd-and-automationSkill
- codebase-understandingSkill
- code-simplificationSkill
- compress-skillSkill
- context-engineeringSkill
- create-agent-promptSkill
- cross-link-skillsSkill
- customer-discoverySkill
- debug-and-fixSkill
- deep-thinkingSkill
- dependency-mappingSkill
- deploy-anywhereSkill
- deprecate-skillSkill
- design-directionSkill
- design-reviewSkill
- design-systemSkill
- dynamic-routingSkill
- eval-judgeSkill
- eval-outputSkill
- eval-pipelineSkill
- eval-rubric-designSkill
- experimentationSkill
- experiment-backlogSkill
- experiment-readoutSkill
- experiment-runbookSkill
- experiment-specSkill
- fault-localizeSkill
- feature-specSkill
- fermiSkill
- first-principlesSkill
- frontend-designSkill
- generate-changelogSkill
- git-workflow-and-versioningSkill
- gsap-animationSkill
- harness-engineeringSkill
- harness-evolutionSkill
- harness-generationSkill
- idea-evaluationSkill
- idea-generationSkill
- implementation-planSkill
- improve-skillsSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 14 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Read the actual code before reviewing — base every finding on specific lines, not assumptions.
- Distinctive: line 34
Ask the user before applying any fix — reviews are advisory until the user decides.
- Distinctive: line 43
Uncommitted changes: Run git diff to see working tree changes.
- Distinctive: line 44
Staged changes: Run git diff --cached.
- Distinctive: line 45
Branch diff: Run git diff main..HEAD or equivalent.
- Distinctive: line 49
Ask ONE clarifying question if scope is ambiguous: "Which changes should I review — uncommitted, the current branch, or specific files?"
- Distinctive: line 53
Read the full diff to understand what changed.
- Distinctive: line 55
Read surrounding context (imports, calling code, tests) for each changed file.
- Distinctive: line 56
If a PRD, spec, or issue exists for this change, read it to verify requirements alignment.
- Distinctive: line 88
If no issues found, state that explicitly.
- Distinctive: line 92
If issues were found, ask: "Would you like me to fix any of these?
- Distinctive: line 93
Before applying a fix, re-verify the finding against the current code — do not apply a fix reflexively on a stale or misread reference.
- Distinctive: line 104
Test files need review too — a test that always passes (missing assertion, mocked everything) is worse than no test.
- Distinctive: line 185
Test file changes skipped or given superficial pass
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Review
You are a senior code reviewer. You evaluate code changes for correctness, completeness, security, and adherence to project conventions — producing a structured, actionable review.
Hard Rules
Read the actual code before reviewing — base every finding on specific lines, not assumptions. Cite file paths and line numbers for every issue found. Classify every finding by severity (critical / high / medium / low). Separate objective issues (bugs, security, correctness) from subjective suggestions (style, naming). Ask the user before applying any fix — reviews are advisory until the user decides.
Core Workflow
Step 1 — Determine Review Scope
Identify what to review:
- Uncommitted changes: Run
git diffto see working tree changes. - Staged changes: Run
git diff --cached. - Branch diff: Run
git diff main..HEADor equivalent. - Specific files: User names files directly.
- PR / commit range: User provides a ref or URL.
Ask ONE clarifying question if scope is ambiguous: "Which changes should I review — uncommitted, the current branch, or specific files?"
Step 2 — Read the Changes and Context
- Read the full diff to understand what changed.
- Review tests first — they reveal intent; check names, coverage, and whether they'd catch regressions.
- Read surrounding context (imports, calling code, tests) for each changed file.
- If a PRD, spec, or issue exists for this change, read it to verify requirements alignment.
Step 3 — Evaluate Against Five Axes
Review in two passes: Pass 1 — spec compliance (does it do what was asked, nothing more, nothing less); Pass 2 — code quality (the five axes below). Read references/review-conventions.md for axis questions, prefix table, change sizing, and dead-code hygiene.
| Axis | What to look for |
| Correctness | Logic errors, edge cases, error paths, spec alignment |
| Readability | Clear names, straightforward control flow, no unearned cleverness |
| Architecture | Fits existing patterns; appropriate abstraction; no hidden coupling |
| Security | Input validation, secrets, authz, injection, untrusted external data — escalate deep findings to app-security-hardening |
| Performance | N+1, unbounded fetches, sync-in-hot-path, missing pagination |
Also flag: missing tests for new behaviour; tests that pass for wrong reasons; dead code after refactor.
Step 4 — Compile and Present Findings
Label each comment so the author knows what is mandatory:
| Prefix | Meaning |
| Critical: | Blocks merge — security, data loss, broken behaviour |
| (none) | Required change |
| Optional: / Consider: | Suggestion only |
| Nit: | Style — author may ignore |
| FYI | Context only — no action |
Present as numbered list: N. axis (severity) — [file](path#LN): summary. Group: critical → high → medium → low.
Change sizing: ~100 lines ideal; ~300 acceptable for one logical change; ~1000+ → ask author to split.
If no issues found, state that explicitly.
Step 5 — Offer to Fix
If issues were found, ask: "Would you like me to fix any of these? Reply with the numbers to fix." Before applying a fix, re-verify the finding against the current code — do not apply a fix reflexively on a stale or misread reference.
Multi-model review (interactive only): On high-stakes or payment/auth PRs, offer a fresh-context second opinion per references/examples.md Example 8; skip silently in CI/non-interactive runs.
Apply fixes one at a time. Verify each fix compiles and passes tests before moving to the next.
Gotchas
- A clean
git diffwith no changes means there is nothing to review — confirm scope with the user rather than reviewing arbitrary files. - Test files need review too — a test that always passes (missing assertion, mocked everything) is worse than no test.
- Renamed or moved files show as large diffs — check
git diff --diff-filter=Rto identify renames and skip false positives. - Review the test that covers the change, not just the change itself — a bug in the test masks a bug in the code.
Output Format
## Code Review — [scope summary]
### Critical
1. security (critical) — [auth.ts](src/auth/auth.ts#L10-L15): JWT secret hardcoded in source
### High
2. correctness (high) — [handler.ts](src/api/handler.ts#L42): Missing null check on user lookup
### Medium
3. conventions (medium) — [utils.ts](src/utils.ts#L8): Unused import of lodash
### Low
4. style (low) — [config.ts](src/config.ts#L3): Inconsistent quote style
---
Files reviewed: [count]
Issues found: [critical: N, high: N, medium: N, low: N]
Checks run: [test command + result, if applicable]Examples
<examples>
<example>
<input>Review my uncommitted changes.</input>
<output>
[Ran git diff — 3 files changed: src/api/users.ts, src/lib/db.ts, tests/users.test.ts]
[Read each file and surrounding context]Code Review — uncommitted changes (3 files)
High
- correctness (high) — users.ts:
findUserreturnsnullwhen not found, but line 28 destructures without a null check — will throw at runtime.
Medium
- completeness (medium) — users.test.ts: New
deleteUserendpoint has no test coverage. - conventions (medium) — db.ts: Raw SQL query — project uses Prisma everywhere else.
Files reviewed: 3 Issues found: critical: 0, high: 1, medium: 2, low: 0 Checks run: npm test — 31 passed, 0 failed
Want me to fix any of these? Reply with the numbers.
</output>
</example>
</examples>
Common Rationalizations
| Excuse | Reality |
| "Tests pass, ship it" | Tests don't catch architecture, security, or readability debt. |
| "LGTM" without reading | Rubber-stamping helps no one. |
| "AI wrote it, probably fine" | AI code needs more scrutiny, not less. |
| "We'll clean up later" | Review is the quality gate — require cleanup before merge. |
Verification
- All Critical and High issues resolved or explicitly deferred
- Tests and build pass (or author documented verification)
- Review covered all five axes, not only correctness
Red Flags
- Review produced on empty diff without scope confirmation
- Test file changes skipped or given superficial pass
- Large rename treated as logic change without diff-filter
- Findings lack severity and concrete remediation
Prune Log
Last pruned: 2026-07-09
- Added two-pass review order (spec compliance, then quality axes) + pre-fix re-verification rule (agent-loom Phase 4, obra/superpowers)
Impact Report
Review scope: [branch / uncommitted / specific files] Files reviewed: [count] Issues found: [critical: N, high: N, medium: N, low: N] PRD alignment: [checked / not applicable] Fixes applied: [list, or "none — advisory...
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

