code-review
Skill4 starsChanged 7 months agoMITView on GitHub
Systematic code review patterns covering security, performance, maintainability, correctness, and testing — with severity levels, structured feedback guidance, review process, and anti-patterns to avoid. Use when reviewing PRs, establishing review standards, or improving review quality.
We split this skill into the rules it gives an agent
10 rules. 0 are common, 10 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 184 edited versions we read keep these.
10
Distinctive
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 128
Read the PR description and linked issue
- Distinctive: line 130
Check the overall approach — is this the right solution to the problem?
- Distinctive: line 131
Verify the change does not introduce architectural drift
- Distinctive: line 135
Read each file diff top to bottom
- Distinctive: line 136
Check every function change against the checklists above
- Distinctive: line 137
Verify error handling at every I/O boundary
- Distinctive: line 143
Check for missing tests on the code paths you flagged
- Distinctive: line 144
Verify rollback safety — can this change be reverted without data loss?
- Distinctive: line 160
Always prefix your review comment with the severity label.
- Distinctive: line 202
Avoid these common traps that waste time and damage team trust:
“Common” is measured: kept by at least 6 in 10 of the 184 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Review Checklist
Thorough, structured approach to reviewing code. Work through each dimension systematically rather than scanning randomly.
Installation
OpenClaw / Moltbot / Clawbot
npx clawhub@latest install code-reviewReview Dimensions
| Dimension | Focus | Priority |
| Security | Vulnerabilities, auth, data exposure | Critical |
| Performance | Speed, memory, scalability bottlenecks | High |
| Correctness | Logic errors, edge cases, data integrity | High |
| Maintainability | Readability, structure, future-proofing | Medium |
| Testing | Coverage, quality, reliability of tests | Medium |
| Accessibility | WCAG compliance, keyboard nav, screen readers | Medium |
| Documentation | Comments, API docs, changelog entries | Low |
Security Checklist
Review every change for these vulnerabilities:
- SQL Injection — All queries use parameterized statements or an ORM; no string concatenation with user input
- XSS — User-provided content is escaped/sanitized before rendering;
dangerouslySetInnerHTMLor equivalent is justified and safe - CSRF Protection — State-changing requests require valid CSRF tokens; SameSite cookie attributes are set
- Authentication — Every protected endpoint verifies the user is authenticated before processing
- Authorization — Resource access is scoped to the requesting user's permissions; no IDOR vulnerabilities
- Input Validation — All external input (params, headers, body, files) is validated for type, length, format, and range on the server side
- Secrets Management — No API keys, passwords, tokens, or credentials in source code; secrets come from environment variables or a vault
- Dependency Safety — New dependencies are from trusted sources, actively maintained, and free of known CVEs
- Sensitive Data — PII, tokens, and secrets are never logged, included in error messages, or returned in API responses
- Rate Limiting — Public and auth endpoints have rate limits to prevent brute-force and abuse
- File Upload Safety — Uploaded files are validated for type and size, stored outside the webroot, and served with safe Content-Type headers
- HTTP Security Headers — Content-Security-Policy, X-Content-Type-Options, Strict-Transport-Security are set
Performance Checklist
- N+1 Queries — Database access patterns are batched or joined; no loops issuing individual queries
- Unnecessary Re-renders — Components only re-render when their relevant state/props change; memoization is applied where measurable
- Memory Leaks — Event listeners, subscriptions, timers, and intervals are cleaned up on unmount/disposal
- Bundle Size — New dependencies are tree-shakeable; large libraries are loaded dynamically; no full-library imports for a single function
- Lazy Loading — Heavy components, routes, and below-the-fold content use lazy loading / code splitting
- Caching Strategy — Expensive computations and API responses use appropriate caching (memoization, HTTP cache headers, Redis)
- Database Indexing — Queries filter/sort on indexed columns; new queries have been checked with EXPLAIN
- Pagination — List endpoints and queries use pagination or cursor-based fetching; no unbounded SELECT *
- Async Operations — Long-running tasks are offloaded to background jobs or queues rather than blocking request threads
- Image & Asset Optimization — Images are properly sized, use modern formats (WebP/AVIF), and leverage CDN delivery
Correctness Checklist
- Edge Cases — Empty arrays, empty strings, zero values, negative numbers, and maximum values are handled
- Null/Undefined Handling — Nullable values are checked before access; optional chaining or guards prevent runtime errors
- Off-by-One Errors — Loop bounds, array slicing, pagination offsets, and range calculations are verified
- Race Conditions — Concurrent access to shared state uses locks, transactions, or atomic operations
- Timezone Handling — Dates are stored in UTC; display conversion happens at the presentation layer
- Unicode & Encoding — String operations handle multi-byte characters; text encoding is explicit (UTF-8)
- Integer Overflow / Precision — Arithmetic on large numbers or currency uses appropriate types (BigInt, Decimal)
- Error Propagation — Errors from async calls and external services are caught and handled; promises are never silently swallowed
- State Consistency — Multi-step mutations are transactional; partial failures leave the system in a valid state
- Boundary Validation — Values at the boundaries of valid ranges (min, max, exactly-at-limit) are tested
Maintainability Checklist
- Naming Clarity — Variables, functions, and classes have descriptive names that reveal intent
- Single Responsibility — Each function/class/module does one thing; changes to one concern don't ripple through unrelated code
- DRY — Duplicated logic is extracted into shared utilities; copy-pasted blocks are consolidated
- Cyclomatic Complexity — Functions have low branching complexity; deeply nested chains are refactored
- Error Handling — Errors are caught at appropriate boundaries, logged with context, and surfaced meaningfully
- Dead Code Removal — Commented-out code, unused imports, unreachable branches, and obsolete feature flags are removed
- Magic Numbers & Strings — Literal values are extracted into named constants with clear semantics
- Consistent Patterns — New code follows the conventions already established in the codebase
- Function Length — Functions are short enough to understand at a glance; long functions are decomposed
- Dependency Direction — Dependencies point inward (infrastructure to domain); core logic does not import from UI or framework layers
Testing Checklist
- Test Coverage — New logic paths have corresponding tests; critical paths have both happy-path and failure-case tests
- Edge Case Tests — Tests cover boundary values, empty inputs, nulls, and error conditions
- No Flaky Tests — Tests are deterministic; no reliance on timing, external services, or shared mutable state
- Test Independence — Each test sets up its own state and tears it down; test order does not affect results
- Meaningful Assertions — Tests assert on behavior and outcomes, not implementation details
- Test Readability — Tests follow Arrange-Act-Assert; test names describe the scenario and expected outcome
- Mocking Discipline — Only external boundaries (network, DB, filesystem) are mocked
- Regression Tests — Bug fixes include a test that reproduces the original bug and proves it is resolved
Review Process
Work through the code in three passes. Do not try to catch everything in one read.
| Pass | Focus | Time | What to Look For |
| First | High-level structure | 2-5 min | Architecture fit, file organization, API design, overall approach |
| Second | Line-by-line detail | Bulk | Logic errors, security issues, performance problems, edge cases |
| Third | Edge cases & hardening | 5 min | Failure modes, concurrency, boundary values, missing tests |
First Pass (2-5 minutes)
- Read the PR description and linked issue
- Scan the file list — does the change scope make sense?
- Check the overall approach — is this the right solution to the problem?
- Verify the change does not introduce architectural drift
Second Pass (bulk of review time)
- Read each file diff top to bottom
- Check every function change against the checklists above
- Verify error handling at every I/O boundary
- Flag anything that makes you pause — trust your instincts
Third Pass (5 minutes)
- Think about what could go wrong in production
- Check for missing tests on the code paths you flagged
- Verify rollback safety — can this change be reverted without data loss?
- Confirm documentation and changelog are updated if needed
Severity Levels
Classify every comment by severity so the author knows what blocks merge.
| Level | Label | Meaning | Blocks Merge? |
| Critical | [CRITICAL] | Security vulnerability, data loss, or crash in production | Yes |
| Major | [MAJOR] | Bug, logic error, or significant performance regression | Yes |
| Minor | [MINOR] | Improvement that would reduce future maintenance cost | No |
| Nitpick | [NIT] | Style preference, naming suggestion, or trivial cleanup | No |
Always prefix your review comment with the severity label. This removes ambiguity about what matters.
Giving Feedback
Principles
- Be specific — Point to the exact line and explain the issue, not just "this is wrong"
- Explain why — State the risk or consequence, not just the rule
- Suggest a fix — Offer a concrete alternative or code snippet when possible
- Ask, don't demand — Use questions for subjective points: "What do you think about...?"
- Acknowledge good work — Call out clean solutions, clever optimizations, or thorough tests
- Separate blocking from non-blocking — Use severity labels so the author knows what matters
Example Comments
Bad:
This is wrong. Fix it.
Good:
[MAJOR]This query interpolates user input directly into the SQL string (line 42), which is vulnerable to SQL injection. Consider using a parameterized query:SELECT * FROM users WHERE id = $1
Bad:
Why didn't you add tests?
Good:
[MINOR]The newcalculateDiscount()function has a few branching paths — could we add tests for the zero-quantity and negative-price edge cases to prevent regressions?
Bad:
I would have done this differently.
Good:
[NIT]This works well. An alternative approach could be extracting the retry logic into a sharedwithRetry()wrapper — but that's optional and could be a follow-up.
Review Anti-Patterns
Avoid these common traps that waste time and damage team trust:
| Anti-Pattern | Description |
| Rubber-Stamping | Approving without reading. Creates false confidence and lets bugs through. |
| Bikeshedding | Spending 30 minutes debating a variable name while ignoring a race condition. |
| Blocking on Style | Refusing to approve over formatting that a linter should enforce automatically. |
| Gatekeeping | Requiring your personal preferred approach when the submitted one is correct. |
| Drive-by Reviews | Leaving one vague comment and disappearing. Commit to following through. |
| Scope Creep Reviews | Requesting unrelated refactors that should be separate PRs. |
| Stale Reviews | Letting PRs sit for days. Review within 24 hours or hand off to someone else. |
| Emotional Language | "This is terrible" or "obviously wrong." Critique the code, not the person. |
NEVER Do
- NEVER approve without reading every changed line — rubber-stamping is worse than no review
- NEVER block a PR solely for style preferences — use a linter; humans review logic
- NEVER leave feedback without a severity level — ambiguity causes wasted cycles
- NEVER request changes without explaining why — "fix this" teaches nothing
- NEVER review more than 400 lines in one sitting — comprehension drops sharply; break large PRs into sessions
- NEVER skip the security checklist — one missed vulnerability outweighs a hundred style nits
- NEVER make it personal — review the code, never the coder; assume good intent
Other versions198 projects use a version of this.
Word for word · 4
- wpank/ai★ 11100% same
- Jam0731/ParallaxAI★ 2100% same
- sansec-ai/codeclaw-vscode★ 2100% same
- herbert051281/mission-control★ 0100% same
Edited · 0
None found.
Wrote their own version · 194
- mattpocock/skills★ 309ksame name
- TheAlgorithms/Python★ 226ksame name
- microsoft/vscode★ 194ksame name
- github/spec-kit★ 145ksame name
- ggml-org/llama.cpp★ 133ksame name
- shareAI-lab/learn-claude-code★ 80ksame name
- shareAI-lab/analysis_claude_code★ 78ksame name
- vectorize-io/hindsight★ 57ksame name
- dbeaver/dbeaver★ 52ksame name
- roboflow/supervision★ 51ksame name
184 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use add-new-model, azsdk-common-sdk-breaking-change and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
PydanticSkilladd-new-model
Add support for a newly-released language or image generation model in pydantic-ai (e.g. openai:gpt-5.6, anthropic:claude-sonnet-5, openai:gpt-image-2). Use when a provider ships a new model id and you need to wire literals, profile flags, adapters, and tests to recognize it. Handles SDK-lag, gateway list conventions, capability probing, and direct image-model geometry.
Also in 9 projects that use this
Microsoft AzureSkillazsdk-common-sdk-breaking-change
Detect and mitigate SDK Breaking changes for an SDK package which is generated from TypeSpec. WHEN: "Detect SDK breaking changes for a service", "Detect SDK breaking changes for an SDK package", "Detect and mitigate SDK breaking changes for a service", "Detect and mitigate SDK breaking changes for an SDK package". INVOKES: skill: azsdk-common-generate-sdk-locally; MCP tools: azure-sdk-mcp:azsdk_customized_code_update, azure-sdk-mcp:azsdk_package_detect_breaking_change.
Also in 4 projects that use this
ww-w-aiSkillbkend-auth
bkend.ai authentication guide. Signup, login, JWT tokens, sessions, role-based access control, and password management with bkend.ai BaaS. Triggers: bkend auth, bkend login, bkend signup, JWT, session, RBAC, password, bkend 인증, 로그인, 회원가입, bkend認証, ログイン, 新規登録, bkend认证, 登录, 注册, autenticacion bkend, authentification bkend, bkend-Auth Do NOT use for: data operations (use $bkend-data), file storage (use $bkend-storage).
Also in 4 projects that use this
ww-w-aiSkillbkend-cookbook
bkend.ai cookbook with step-by-step tutorials and example projects. Build a todo app, blog, e-commerce store, and more with bkend.ai BaaS. Triggers: bkend cookbook, bkend tutorial, bkend example, todo app, blog app, bkend 쿡북, bkend 튜토리얼, 예제 프로젝트, bkendクックブック, チュートリアル, bkend教程, 示例项目, tutorial bkend, tutoriel bkend, bkend-Tutorial, ricettario Do NOT use for: initial setup (use $bkend-quickstart), specific features (use $bkend-data/auth/storage).
Also in 4 projects that use this
dzhngSkillclose-spec
When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).
Also in 4 projects that use this
dzhngSkilldesign-with-images
Explore UI and visual design with image generation, then iterate the real implementation against the user-selected concept. Use when brainstorming visual directions, offering mockup variants, or implementing an approved generated design; do not stop at the mockups or the first code approximation.
Also in 4 projects that use this
- +5 more from ww-w-ai
In this repository112 other files it gives its agents.
- agentic-evalSkill
- agent-memorySkill
- agent-reachSkill
- agent-team-orchestrationSkill
- claude-apiSkill
- context-engineering-collectionSkill
- developer-growth-analysisSkill
- eval-harnessSkill
- exa-searchSkill
- langsmith-fetchSkill
- mcp-builderSkill
- prompt-engineering-patternsSkill
- rag-implementationSkill
- skill-creatorSkill
- subagent-driven-developmentSkill
- api-design-principlesSkill
- architecture-patternsSkill
- artifacts-builderSkill
- backend-patternsSkill
- changelog-generatorSkill
- clean-content-fetchSkill
- coding-standardsSkill
- computer-useSkill
- debug-proSkill
- docker-essentialsSkill
- e2e-testingSkill
- frontend-designSkill
- frontend-patternsSkill
- git-essentialsSkill
- microservices-patternsSkill
- modern-javascript-patternsSkill
- nextjs-app-router-patternsSkill
- postgresql-table-designSkill
- python-design-patternsSkill
- python-performance-optimizationSkill
- python-testing-patternsSkill
- react-state-managementSkill
- security-auditorSkill
- sql-toolkitSkill
- tdd-workflowSkill
- typescript-advanced-typesSkill
- using-git-worktreesSkill
- vue-best-practicesSkill
- webapp-testingSkill
- algorithmic-artSkill
- brand-guidelinesSkill
- canvas-designSkill
- comic-creatorSkill
- cover-imageSkill
- doc-coauthoringSkill
- docxSkill
- fal-ai-mediaSkill
- frontend-slidesSkill
- image-genSkill
- markdown-to-htmlSkill
- pdfSkill
- pptxSkill
- slide-deckSkill
- slidevSkill
- theme-factorySkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

