local-code-review
Skill27 starsChanged 48 days agoMITView on GitHub
Conducts a rigorous, multi-axis local code, documentation, and architecture review in any project (GitHub, Bitbucket, GitLab, or a local directory). Supports both Diff/Change Review Mode (uncommitted changes, branches, commit ranges) and Whole-Codebase Audit Mode (reviewing an entire repository or module without relying on Git diffs). Evaluates correctness, simplicity, architecture, security, performance, test quality, documentation alignment, and visual assets using Dazbo's core review rubric and anti-hallucination guardrails. Use when reviewing uncommitted changes, staged diffs, branches, commit ranges, or auditing an entire repository/module locally.
- Reads credentials
3 other projects use a version of this.
Adopted by
Most recently taken up by
- aditya-deokar/software-factorytheir own version, first seen Nov 8, 2026
- amirbena/code-review-skilltheir own version, first seen Nov 5, 2026
- rdlugs/ai-skillstheir own version, first seen Nov 1, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- amirbena/code-review-skill★ 8same name
- aditya-deokar/software-factory★ 0same name
- rdlugs/ai-skills★ 0same name
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.
In this repository8 other files it gives its agents.
The file
Show its rules and text
We split this skill into the rules it gives an agent
30 rules. 0 are common, 19 are distinctive, and 11 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
19
Distinctive
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 64
Follow the corresponding discovery procedure below (Mode A or Mode B).
- Distinctive: line 68
Always load the repository's rules and architectural intent before judging code:
- Very specific: line 71
Read AGENTS.md, GEMINI.md, or CLAUDE.md (at root or .agents/) to learn repository-specific conventions, coding standards, and architectural …
- Very specific: line 72
Read README.md, ARCHITECTURE.md, DESIGN.md, SPEC.md, TODO.md, and package manifests (pyproject.toml, package.json, go.mod, Cargo.toml, …
- Very specific: line 74
Check for optional repository-specific reviewer guardrails in review-instruction-additions.md, .agents/review-instructions.md, or …
- Distinctive: line 76
Check if any installed workspace or global agent skills apply to the technologies used in the project.
- Very specific: line 77
If the code touches Google Cloud (Cloud Run, GKE, BigQuery, Cloud Logging, IAM), Firebase, Vertex AI, or Gemini SDKs, use the Google …
- Distinctive: line 82
Do tests exist for the critical behaviours and edge cases?
- Distinctive: line 83
Do they test actual behaviour rather than mocking away implementation details?
- Distinctive: line 84
Active Verification: Run the test suite locally if fast and safe.
- Very specific: line 86
Verify that README.md, ARCHITECTURE.md, TODO.md, CLI help text, and deployment/config files accurately reflect the implementation on disk.
- Distinctive: line 96
When reviewing a changeset:
- Very specific: line 99
Run git status --short to identify modified, staged, and untracked (??) files.
- Very specific: line 102
Explicit ref/branch/commit: Run git diff <ref>...HEAD (or git diff <commit>).
- Distinctive: line 106
Read the full current file content of every modified file (not just the diff hunk) plus direct callers/imports so you understand …
- Distinctive: line 116
When reviewing an entire codebase or specific directory without relying on Git diffs:
- Very specific: line 119
If inside a Git repository, run git ls-files to list tracked files cleanly.
- Very specific: line 120
If the user scoped the review to a specific package or directory, restrict the primary inventory to that path while still reading root …
- Distinctive: line 149
Do tests validate actual behaviour rather than implementation details?
- Distinctive: line 178
When flagging a structural or architectural problem, always propose the concrete restructuring move rather than simply stating that code is …
- Distinctive: line 183
Reuse canonical helpers: instead of creating bespoke near-duplicates across modules.
- Distinctive: line 196
Dependency Footprint: Prefer the standard library and existing project dependencies.
- Distinctive: line 198
Check changelogs and migration notes rather than relying blindly on semver.
- Distinctive: line 199
Prefer single-package upgrades over bulk unrelated bumps so regressions are trivial to isolate.
- Distinctive: line 200
Verify with the test suite and inspect lockfile diffs for unintended transitive shifts.
- Distinctive: line 236
Only report verifiable bugs, security risks, architectural smells, test gaps, or concrete improvements.
- Distinctive: line 238
Never make universal assertions (e.g.
- Very specific: line 240
Never suggest downgrading Gemini models (e.g.
- Very specific: line 242
Avoid $(...) or backticks in suggested shell commands to prevent unintended command execution and keep commands prefix-matchable.
- Distinctive: line 244
Write all review commentary in English (UK) unless project rules specify otherwise.
“Common” is measured: kept by at least 6 in 10 of the 3 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
Local Code & Technical Review (local-code-review)
Conducts a high-signal, multi-dimensional review of code, tests, documentation, configuration, and visual diagrams in any local workspace—whether hosted on GitHub, Bitbucket, GitLab, or not yet under version control.
Supports two operating modes:
- Mode A — Diff / Change Review: Reviews uncommitted work, staged diffs, a feature branch, or a specific commit range.
- Mode B — Whole-Codebase / Module Audit: Reviews an entire repository, package, or directory from top to bottom without relying on Git diffs.
Table of Contents
- Triggers
- Review Workflow
- Mode A: Diff / Change Discovery
- Mode B: Whole-Codebase / Module Discovery
- Review Standards & Five-Axis Evaluation
- Structural Remedies & Hygiene
- Change Sizing & Splitting Heuristics
- Critical Anti-Hallucination Guardrails
- Output Format
Triggers
Activate this skill whenever:
- The user asks for a local code review, diff review, branch review, or pre-commit / pre-push review.
- The user asks to review the whole codebase, audit a repository, or review a specific module/directory.
- You or another agent have completed a non-trivial feature, refactor, or bug fix and need a structured quality gate before committing or merging.
- The user pastes a diff inline or asks to review changes in a project that does not use GitHub Actions (e.g. Bitbucket or local repositories).
Review Workflow
Copy and follow this checklist in order:
Local Review Progress:
- [ ] Step 1: Select review mode (Mode A: Diff Review vs Mode B: Whole-Codebase Audit) and gather target files
- [ ] Step 2: Load repository rules, core documentation, and architectural context
- [ ] Step 3: Evaluate tests, documentation alignment, and visual assets
- [ ] Step 4: Perform the Five-Axis Evaluation & check structural remedies
- [ ] Step 5: Verify findings against actual file contents on disk (anti-hallucination pass)
- [ ] Step 6: Present severity-ranked review and offer to apply fixesStep 1: Select Mode & Gather Target Files
Determine whether the user wants a Diff / Change Review (Mode A) or a Whole-Codebase / Module Audit (Mode B):
- Choose Mode B (Whole-Codebase Audit) if the user explicitly asks to review the whole codebase/project/module, if there is no Git repository, or if the working tree is clean on the default branch (
main/master) with no commit range specified. - Choose Mode A (Diff Review) if the user asks to review recent changes, uncommitted work, a branch, or a PR/commit range, or if
git status --short/git diffshows active local work.
Follow the corresponding discovery procedure below (Mode A or Mode B).
Step 2: Assemble Project & Domain Context
Always load the repository's rules and architectural intent before judging code:
- Project Guidelines & Core Docs:
- Read
AGENTS.md,GEMINI.md, orCLAUDE.md(at root or.agents/) to learn repository-specific conventions, coding standards, and architectural rules. - Read
README.md,ARCHITECTURE.md,DESIGN.md,SPEC.md,TODO.md, and package manifests (pyproject.toml,package.json,go.mod,Cargo.toml, etc.) where present.
- Read
- Custom Review Instructions:
- Check for optional repository-specific reviewer guardrails in
review-instruction-additions.md,.agents/review-instructions.md, or.github/review-instruction-additions.md.
- Check for optional repository-specific reviewer guardrails in
- Domain Skills & Official Documentation:
- Check if any installed workspace or global agent skills apply to the technologies used in the project.
- If the code touches Google Cloud (Cloud Run, GKE, BigQuery, Cloud Logging, IAM), Firebase, Vertex AI, or Gemini SDKs, use the Google Developer Knowledge MCP tools (
search_documents,get_documents) to verify current API best practices and model identifiers.
Step 3: Evaluate Tests, Documentation, & Visual Assets
- Review Tests & Verification Coverage:
- Do tests exist for the critical behaviours and edge cases?
- Do they test actual behaviour rather than mocking away implementation details?
- Active Verification: Run the test suite locally if fast and safe. For critical logic changes, check whether inverting a key condition causes a test failure; a condition that can be inverted while the test suite stays green reveals a missing test case.
- Holistic Documentation & Configuration Review:
- Verify that
README.md,ARCHITECTURE.md,TODO.md, CLI help text, and deployment/config files accurately reflect the implementation on disk. Flag documentation drift or stale instructions as concrete findings.
- Verify that
- Multimodal & Visual Inspection:
- Inspect any added, modified, or Markdown-referenced image assets and architectural diagrams (
) using multimodal file viewing. - In Mode A, compare modified images against their baseline (
git show <base>:<path>) to check for visual regressions. - In Mode B, verify that architecture/design diagrams match the actual module structure and data flows in the codebase.
- Inspect any added, modified, or Markdown-referenced image assets and architectural diagrams (
Mode A: Diff / Change Discovery
When reviewing a changeset:
- Inspect Working Tree & Untracked Files:
- Run
git status --shortto identify modified, staged, and untracked (??) files. - Standard
git diffignores untracked files. Always read untracked source, test, and documentation files that are part of the new work.
- Run
- Resolve the Diff Target:
- Explicit ref/branch/commit: Run
git diff <ref>...HEAD(orgit diff <commit>). - Uncommitted working tree changes: Inspect both staged (
git diff --cached) and unstaged (git diff HEAD) changes. - Feature branch with a clean working tree: Compare against the default branch (
git diff main...HEADorgit diff master...HEAD).
- Explicit ref/branch/commit: Run
- Read Full Current Files & Direct Neighbours:
- Read the full current file content of every modified file (not just the diff hunk) plus direct callers/imports so you understand surrounding control flow and line numbers.
- Filter Noise:
- Skip generated lockfiles (
uv.lock,package-lock.json,pnpm-lock.yaml,yarn.lock,cargo.lock,go.sum), binaries, minified bundles (*.min.js), and encrypted secrets (*.enc,.env), except to confirm lockfile synchronisation when manifests change.
- Skip generated lockfiles (
- Diff Scope Discipline:
- Focus inline findings on the changed lines and their direct blast radius (broken callers, missing tests, or doc drift caused by the diff).
Mode B: Whole-Codebase / Module Discovery
When reviewing an entire codebase or specific directory without relying on Git diffs:
- Inventory the Codebase:
- If inside a Git repository, run
git ls-filesto list tracked files cleanly. If not a Git repository, list files recursively while excluding.git/,.venv/,venv/,node_modules/,dist/,build/,__pycache__/, lockfiles, and binary/encrypted files. - If the user scoped the review to a specific package or directory, restrict the primary inventory to that path while still reading root guidelines (
AGENTS.md,README.md,pyproject.toml).
- If inside a Git repository, run
- Systematic Top-Down Traversal:
- Group and inspect files in logical architectural order:
- Manifests, Entrypoints & Configuration (
pyproject.toml, CLI/app entrypoints, config loaders, CI/deployment configs). - Core Domain & Business Logic Modules (data models, schemas, core services, state machines, prompts/agents).
- External Boundaries & Integrations (API clients, database queries, auth, file I/O, shell execution).
- Shared Utilities & Helpers (checking for cross-module duplication, leaky abstractions, or dead helpers).
- Test Suite & Fixtures (assessing coverage gaps, brittle mocks, and missing edge-case tests).
- Documentation & Visual Diagrams (
README.md,ARCHITECTURE.md,docs/*.md, and embedded images).
- Manifests, Entrypoints & Configuration (
- Group and inspect files in logical architectural order:
- Cross-Cutting Synthesis:
- In Whole-Codebase Mode, evaluate systemic patterns across files—such as inconsistent error handling, duplicated logic across modules, circular dependencies, unreferenced dead code across the repo, security boundary gaps, and mismatches between
ARCHITECTURE.mdand the code.
- In Whole-Codebase Mode, evaluate systemic patterns across files—such as inconsistent error handling, duplicated logic across modules, circular dependencies, unreferenced dead code across the repo, security boundary gaps, and mismatches between
Review Standards & Five-Axis Evaluation
Review Philosophy & Approval Bar
- Continuous Code Health Improvement: Approve changes or modules when they maintain or improve overall codebase health, even if not perfect. Do not Nit-pick purely stylistic preferences when project conventions are followed.
- Lead with Leverage: Order findings by impact—correctness and security first, then structural/architectural flaws and missed simplifications, then minor nits last. Never bury a high-conviction structural issue under a long list of cosmetic suggestions.
The Five Quality Axes
Evaluate systematically across five core engineering dimensions:
- Correctness & Verification:
- Does the code accurately fulfil requirements and specifications?
- Are edge cases (
None/null, empty inputs, boundary conditions, network/API timeouts) and error paths handled cleanly? - Are there off-by-one errors, race conditions, resource leaks, or state inconsistencies?
- Do tests validate actual behaviour rather than implementation details?
- Readability & Simplicity:
- Are variable, function, and type names descriptive and consistent with project conventions?
- Is control flow straightforward (avoiding nested ternaries, deep nesting, or clever tricks)?
- Could this be expressed in significantly fewer lines?
- Are abstractions earning their complexity? (Do not generalise until the third use case.)
- Is a conditional bolted onto an unrelated flow? Push it into its own helper, state, or policy rather than tangling an existing path.
- Do repeated conditionals on the same data shape appear? Signals a missing model, polymorphism, or dispatcher.
- Architecture & System Design:
- Does the code maintain clean module boundaries and unidirectional dependencies (no circular imports)?
- Does a refactor or abstraction reduce complexity or merely relocate it? Count the concepts a reader must hold in working memory. Prefer designs that make whole branches, modes, or layers disappear over shifting the same logic around. Prefer deleting an unused abstraction to polishing it.
- Is feature-specific logic leaking into a shared utility module? Keep domain logic in its owning layer and reuse canonical helpers instead of creating bespoke near-duplicates.
- Are type boundaries explicit? Question gratuitous
Any/anycasts or silent fallbacks that paper over broken invariants.
- Security & Data Hardening:
- Is external input (CLI arguments, HTTP payloads, environment/config files, LLM outputs, remote URLs) treated as untrusted and validated/sanitised at system boundaries?
- Are dynamic file paths protected against path traversal (e.g.
os.path.commonpath)? - Are secrets excluded from source code, logs, command-line flags, and version control?
- Are database queries parameterised and rendered outputs safely encoded?
- Performance & Efficiency:
- Are there $O(N^2)$ lookups, N+1 queries, unbounded loops, or unconstrained memory/file reads in hot paths?
- Are synchronous blocking operations avoided in async event loops?
- Are external network/API requests configured with explicit timeouts, retries, and pagination?
Structural Remedies & Hygiene
Named Structural Remedies
When flagging a structural or architectural problem, always propose the concrete restructuring move rather than simply stating that code is "complex":
- Replace conditional chains with a typed model, lookup table, or explicit dispatcher.
- Collapse duplicate branches into a single clear flow.
- Separate orchestration from business logic so each reads and tests independently.
- Move feature-specific logic out of shared modules into the owning package.
- Reuse canonical helpers instead of creating bespoke near-duplicates across modules.
- Make type boundaries explicit at ingress so downstream defensive branching disappears.
- Delete pass-through wrappers that add indirection without clarifying the interface.
- Decompose oversized files into focused modules with clear single responsibilities.
Dead Code Hygiene
Actively identify orphaned code (both after refactors in Mode A and across modules in Mode B):
- Flag unreachable functions, unused helpers/imports/constants, no-op variables (
_unused), obsolete compatibility shims, or commented-out blocks. - List them explicitly with
file:linereferences and ask before deleting: "Safe to remove these unused elements?"
Dependency Discipline & Upgrades
- Dependency Footprint: Prefer the standard library and existing project dependencies. Evaluate any external dependency on necessity, footprint, active maintenance, security vulnerabilities, and licence compatibility.
- Upgrading Dependencies:
- Check changelogs and migration notes rather than relying blindly on semver.
- Prefer single-package upgrades over bulk unrelated bumps so regressions are trivial to isolate.
- Verify with the test suite and inspect lockfile diffs for unintended transitive shifts.
Common Rationalisations to Reject
| Rationalisation | Reality |
| "It works, that's good enough" | Working code that is unreadable, insecure, or architecturally wrong creates compounding debt. |
| "We'll clean it up later" | Deferred cleanup rarely happens. Address structural debt now unless responding to a live outage. |
| "The refactor makes it cleaner" | Relocating complexity is not reducing it. Look for the design where branches or concepts disappear. |
| "It's only a small addition to this file" | Small additions still push large files past healthy boundaries and bolt branches onto unrelated flows. |
| "It's just a version bump" | Dependency upgrades carry behavioural changes you did not write; verify changelogs and tests. |
Change Sizing & Splitting Heuristics
- Diff Size (Mode A):
~100 lines changed: Ideal—reviewable with high confidence in one sitting.~300 lines changed: Acceptable for a single cohesive logical change.~1,000+ lines changed: Too large (unless automated formatting or bulk deletion); recommend splitting.- Separate refactoring from behaviour changes: Reorganising existing code and adding new behaviour should be separate commits/PRs.
- File Size (Mode A & Mode B):
- Around
~1,000 total linesin a single source file is a strong decomposition signal. When a file exceeds or approaches this boundary with multiple responsibilities, recommend extracting focused sub-modules.
- Around
- Splitting Strategies:
- Stack: Foundational change first, dependent change stacked on top.
- Horizontal: Shared models/interfaces first, consumers second.
- Vertical: Smaller end-to-end slices of functionality.
- By File Group: Separate cross-cutting subsystem changes.
Critical Anti-Hallucination Guardrails
- Always Verify Full File Contents on Disk:
- Never report duplicate functions, redundant routes, or missing imports based solely on a partial snippet or diff hunk. In Mode A, a function deleted in one place and added in another is moved, not duplicated. Always verify the actual file on disk and cite exact 1-based line numbers.
- Fact-Based Findings Only:
- Only report verifiable bugs, security risks, architectural smells, test gaps, or concrete improvements. Do not add filler comments that merely explain what the code does or ask the author to "check/verify if X works" without a concrete defect.
- No Sweeping or Universal Claims:
- Never make universal assertions (e.g. "all endpoints validate input" or "all dependencies are pinned") unless every single occurrence across the target scope has been verified. State precisely which files or functions were checked.
- No Version or Model Downgrades:
- Never suggest downgrading Gemini models (e.g.
gemini-3.8-flashtogemini-2.5-flash), SDK versions, or language targets due to training cut-off dates. Treat newer version identifiers as valid.
- Never suggest downgrading Gemini models (e.g.
- No Command Substitution in Suggested Shell Commands:
- Avoid
$(...)or backticks in suggested shell commands to prevent unintended command execution and keep commands prefix-matchable.
- Avoid
- Language & Spelling:
- Write all review commentary in English (UK) unless project rules specify otherwise. Never flag valid US English spelling in code identifiers or third-party APIs as a typo.
Output Format
Format your review in clean GitHub-Flavored Markdown using relative file links (never file:/// URIs):
1. Executive Summary & Verdict
- Mode & Scope Reviewed: State whether Mode A (Diff Review) or Mode B (Whole-Codebase / Module Audit) was executed, the files/branches covered, and whether tests were run.
- Summary: Concise assessment (3–6 sentences) covering overall code health, architecture, test coverage, and documentation/diagram alignment.
- Verdict:
✅ Approve / Healthy,⚠️ Approve with Minor Suggestions, or🔴 Request Changes / Action Required.
2. Architectural & Holistic Observations
- System-level patterns, cross-module design observations, positive engineering highlights, documentation/diagram sync status, and any Dead Code Identified (with
file:linelocations).
3. Findings (Ordered by Leverage & Severity)
Prefix every finding with its severity badge so required vs optional actions are unmistakable:
🔴 Critical: Security vulnerability, data loss, crash, or broken core functionality (must fix).🟠 High: Bug, missing error/edge-case handling, missing test coverage, or significant architectural flaw (should fix).🟡 Medium: Simplification opportunity, structural smell, module boundary leak, or documentation drift.🟢 Low (Nit): Minor readability, naming, or idiomatic polish (optional).
For each finding, provide:
- Location: Clickable relative link with exact line numbers, e.g.
gemini_review/context.py:171-195. - Issue & Structural Remedy: Direct, quantified explanation of the problem and the named remedy.
- Suggested Fix: Clean drop-in replacement code block (without line-number prefixes).
4. Interactive Next Steps
Conclude by asking the user which findings, refactorings, or dead-code removals they would like you to apply directly.
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.

