code-reviewer
Skill1 starsChanged 4 months agoMITView on GitHub
Comprehensive code review for Python AI/ML microservices focusing on security, performance, maintainability, and code duplication. Use when explicitly asked to review code, review merge requests (MRs), or provide code feedback. Triggers on "review this code", "review my changes", "review MR", "code review", "check this code for issues", "add comments to MR", "post review comments". Reviews local code changes and GitLab merge requests with existing comments and discussions. Supports interactive comment workflow where each comment is reviewed and approved by user before posting to GitLab. Focuses on medium-severity issues (security vulnerabilities, bugs, performance problems, major maintainability issues) while avoiding minor style nitpicks. Intelligently detects functional code duplication across the monorepo by understanding what code does, not just text matching.
182 other projects use a version of this.
Adopted by
Most recently taken up by
- santiago-migoni/claude-skillstheir own version, first seen Nov 8, 2026
- SaehwanPark/agent-skills-archivetheir own version, first seen Nov 8, 2026
- nainishshafi/developer-productivity-skillstheir own version, first seen Nov 8, 2026
- Flowerf19/agents-skillstheir own version, first seen Nov 8, 2026
- darkweb19/skillstheir own version, first seen Nov 8, 2026
- kazemcodes/skill-treetheir own version, first seen Nov 8, 2026
Used with
Projects with it also use git-doc-updater, git-precommit and 10 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.
u9401066Skillgit-doc-updater
Auto-check and update key documentation before Git commits to keep docs in sync with code. Triggers: docs, 文檔, 更新文檔, sync docs, release, 發布.
Also in 5 projects that use this
u9401066Skillgit-precommit
Orchestrate pre-commit workflow including Memory Bank sync, README/CHANGELOG/ROADMAP updates. Triggers: GIT, gc, push, commit, 提交, 準備 commit, 要提交了, git commit, pre-commit, 推送.
Also in 5 projects that use this
JeffallanSkillshopify-expert
Builds and debugs Shopify themes (.liquid files, theme.json, sections), develops custom Shopify apps (shopify.app.toml, OAuth, webhooks), and implements Storefront API integrations for headless storefronts. Use when building or customizing Shopify themes, creating Hydrogen or custom React storefronts, developing Shopify apps, implementing checkout UI extensions or Shopify Functions, optimizing performance, or integrating third-party services. Invoke for Liquid templating, Storefront API, app development, checkout customization, Shopify Plus features, App Bridge, Polaris, or Shopify CLI workflows.
Also in 5 projects that use this
JeffallanSkillspec-miner
Reverse-engineering specialist that extracts specifications from existing codebases. Use when working with legacy or undocumented systems, inherited projects, or old codebases with no documentation. Invoke to map code dependencies, generate API documentation from source, identify undocumented business logic, figure out what code does, or create architecture documentation from implementation. Trigger phrases: reverse engineer, old codebase, no docs, no documentation, figure out how this works, inherited project, legacy analysis, code archaeology, undocumented features.
Also in 6 projects that use this
- +4 more from u9401066
- +4 more from Jeffallan
Other versions182 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 182
- google-gemini/gemini-cli★ 109ksame name
- NVIDIA/SkillSpector★ 25ksame name
- Jeffallan/claude-skills★ 12ksame name
- jewbetcha/openflight★ 1.2ksame name
- web-infra-dev/rsdoctor★ 1.2ksame name
- zhnnky329/MathModeling-skills★ 1.1ksame name
- MageByte-Zero/spec-superflow★ 875same name
- waybarrios/opencode-power-pack★ 547same name
- Karanjot786/TermUI★ 238same name
- elithrar/dotfiles★ 222same name
172 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.
In this repository5 other files it gives its agents.
- designdoc-creatorSkill
- feature-coderSkill
- project-bootstrapperSkill
- python-async-scalingSkill
- python-tutorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 10 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 155 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 51
For specific files: Read them directly.
- Distinctive: line 61
Read whichever of these files exist.
- Very specific: line 69
Verify dev dependencies ([tool.uv.dev-dependencies] or [project.optional-dependencies] with a dev group) are separate from production …
- Distinctive: line 89
Stop at 3–5 significant issues — don't overwhelm
- Very specific: line 104
Use reasoning, not text matching.
- Very specific: line 107
Search intelligently in packages/data-utils/, packages/data-models/, packages/llm-clients/, packages/logger/, packages/api-services-utils/
- Distinctive: line 108
Read matches — is it functionally the same?
- Very specific: line 112
Check for N+1 queries, missing batching in ML operations, missing caching, memory inefficiencies.
- Very specific: line 115
Check for functions doing too much, poor naming, missing type hints on public APIs, missing docstrings on complex functions, hard-to-test …
- Distinctive: line 121
Before reading test files, locate all conftest files:
- Distinctive: line 127
Read every file found. Understand what fixtures, helpers, and shared setup already exist — then flag any test that reimplements something …
- Very specific: line 143
Read existing comments, check responses to previous feedback, focus on gaps.
- Distinctive: line 219
After generating findings and before presenting them to the user, spawn a subagent with the following strict brief:
- Distinctive: line 226
Add any better alternatives the subagent surfaces
- Distinctive: line 229
Do not show the subagent's raw critique to the user — only the improved final findings.
- Distinctive: line 235
When user asks to "add comments" or "post comments" to an MR:
“Common” is measured: kept by at least 6 in 10 of the 155 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 Reviewer
Provides thorough code reviews for Python AI/ML microservices, focusing on security, performance, maintainability, and avoiding code duplication in a monorepo structure.
Review Philosophy
Focus on what matters:
- Security vulnerabilities, bugs, performance bottlenecks, major maintainability issues
- Code duplication (functional similarity, not just text matching)
- Missing tests for complex logic
- Poor error handling or type safety
- Not: style issues handled by formatters (black, isort, ruff), minor naming nitpicks, personal preferences
Be helpful, not annoying:
- Provide specific, actionable feedback with code examples
- Explain why something matters (security risk, performance impact, etc.)
- Acknowledge good code and improvements
- Suggest alternatives when multiple valid approaches exist
Review Workflow
Step 1: Understand the Context
Determine what's being reviewed:
For local code changes:
git status
git diffFor GitLab MR review:
glab mr view <mr-number>
glab mr diff <mr-number>
glab api projects/<project-path-encoded>/merge_requests/<mr-number>/notesFor GitHub PR review:
gh pr view <pr-number>
gh pr diff <pr-number>
gh api repos/<owner>/<repo>/pulls/<pr-number>/commentsFor specific files: Read them directly.
Step 2: Load Documentation and Relevant References
Always check for and read project documentation first:
ls README.md PLAN.md DESIGN_DOC.md 2>/dev/nullRead whichever of these files exist. Use them as:
- Context — understand intent, architecture decisions, and scope before reviewing code
- Review targets — check whether the docs are accurate, up to date, and consistent with the code changes being reviewed. Flag discrepancies (e.g., PLAN.md describes a feature that was implemented differently, README.md has stale setup steps).
Also check pyproject.toml:
cat pyproject.toml- Verify dev dependencies (
[tool.uv.dev-dependencies]or[project.optional-dependencies]with adevgroup) are separate from production dependencies ([project.dependencies]). Flag test/lint/type-check tools in production deps. - Mind package versions and make sure that your suggestions are valid for the declared versions.
- Look for task runner entries (e.g.,
[tool.taskipy.tasks]for taskipy, or scripts defined under[project.scripts]). If they exist, factor them into the review — the reviewer should use them and flag if they fail or if relevant tasks are missing (e.g., noprecommitscheck or missingopenapischema generation).
Load reference files selectively — read only 1-2 per review based on code type:
- Always load:
references/code-duplication-detection.md - Security-sensitive code (APIs, auth, data handling):
references/security-checklist.md - Performance-critical code (ML pipelines, data processing, async FastAPI services):
references/performance-patterns.md - Code organization:
references/maintainability-patterns.md - GitLab MRs / GitHub PRs:
references/vcs-integration.md
Cross-skill: async/concurrency code. If the diff touches async def, asyncio, FastAPI endpoints/dependencies, background workers, queue consumers (SQS/RabbitMQ/Celery), or anything deployed across multiple instances/pods/replicas, invoke the python-async-scaling skill in addition to this one — it has the deeper checklists for event-loop blocking, cross-instance concurrency limits, idempotency, and graceful shutdown that this skill's own performance-patterns.md only covers at a summary level. Skip it for code that is plainly synchronous (no async/await, no queue or worker involved) — don't pull it in just because a service happens to be a microservice.
Step 3: Analyze the Code
Review scope:
- Small changes (<100 lines): thorough review of all aspects
- Medium (100–500 lines): focus on security, performance, and duplication
- Large (>500 lines): focus on critical issues only
- Stop at 3–5 significant issues — don't overwhelm
Priority order:
3.1 Security
Scan for input validation (SQL/command injection, path traversal), auth problems, secrets in code, sensitive data logging, LLM prompt injection. See references/security-checklist.md.
3.2 Functionality & Correctness
Does the code do what it should? Obvious bugs, logic errors, unhandled edge cases?
Wrapper/facade API contract — when new code calls a method on an existing object, wrapper, or session-state value, grep for other call sites of that object in the codebase and confirm the method actually exists on it. Wrapper classes often expose a narrower API than the underlying type (e.g. a Logger wrapper that only exposes get_logger(), not .warning() directly). A call that looks correct in isolation can raise AttributeError at runtime if it skips a required indirection step that every other caller uses.
Side effects before flow-interrupting calls — if the diff places a side effect (notification, toast, metric write, external API call, cache update) immediately before a call that interrupts or restarts execution flow (a framework rerun, redirect, early return, exception raise, or process exit), verify the side effect will actually be committed before the interruption. Many frameworks discard pending renders or buffered output when execution is redirected. If a utility already exists in the codebase for deferring or queuing such side effects, flag that it should be used here.
3.3 Code Duplication
Use reasoning, not text matching. Follow references/code-duplication-detection.md:
- Understand what the code does — identify semantic keywords based on purpose
- Search intelligently in
packages/data-utils/,packages/data-models/,packages/llm-clients/,packages/logger/,packages/api-services-utils/ - Read matches — is it functionally the same?
- Flag only true duplicates (same purpose, same approach, same logic)
3.4 Performance
Check for N+1 queries, missing batching in ML operations, missing caching, memory inefficiencies. See references/performance-patterns.md. For async code specifically (event loop blocking, cross-instance concurrency), invoke python-async-scaling per the cross-skill note in Step 2 above rather than reviewing it from first principles.
3.5 Maintainability
Check for functions doing too much, poor naming, missing type hints on public APIs, missing docstrings on complex functions, hard-to-test code. See references/maintainability-patterns.md.
3.6 Testing Coverage
Are there tests for complex logic? Are edge cases covered? Can the code be tested easily?
Before reading test files, locate all conftest files:
find tests/ -name conftest.pyRead every file found. Understand what fixtures, helpers, and shared setup already exist — then flag any test that reimplements something already available there.
For every test file in the diff, critically evaluate each test case:
- Mutation resistance — mentally break the implementation in a trivial way (flip a condition, remove a branch, return a hardcoded value) and ask whether this test would catch it. If the test still passes, it adds no value — flag it.
- Tautologies — tests that only assert that a mock returns what you told it to return, or that call the function and assert the result equals itself, add no value. Flag and recommend deletion.
- Improbable scenarios — edge cases so contrived they'll never occur in production waste maintenance time. Flag unless they guard against a known historical bug.
- Flakiness — tests that depend on wall-clock time, ordering of unordered collections, external services, or random seeds without being pinned. Flag the source and suggest a fix.
- Conciseness — if a test is longer than ~30 lines without being a complex integration test, ask whether it can be parameterized or split.
3.7 Naming — Explicit Variable Names
Flag any variable, parameter, or loop binding that uses a single letter or a vague abbreviation: i, j, k, it, el, a, b, tmp, res, obj, val, cfg, fn, cb, ctx (unless ctx is a widely-accepted convention in the framework being used, e.g. FastAPI Request). Suggest an explicit name that conveys the domain meaning (e.g., index → batch_index, el → document, res → search_result). This is a hard style requirement — do not skip it even for short lambdas or comprehensions.
Step 4: MR/PR Context (if applicable)
Read existing comments, check responses to previous feedback, focus on gaps. See references/vcs-integration.md.
Step 4.5: Internal Critic Pass
This is a separate verification step with concrete re-reads — not reflection on what you already read. Write your draft findings first, then do the following for each one before presenting anything to the user.
For each proposed issue:
- Re-read the flagged lines and their surrounding context (10–20 lines around the issue). Confirm the problem is actually there, not a misread.
- Is the input actually user-controlled, or is it an internal value?
- Is the code path actually reachable in production?
- Re-read the proposed fix in the context of the file — paste it mentally into the location and trace through:
- Does it handle the same edge cases as the original (None, empty, exception paths)?
- Does it preserve the original behavior in the non-error path?
- Does it introduce a new problem nearby (e.g., a performance fix that creates a new N+1 elsewhere, a security fix that validates before URL-decoding)?
- Check if the flagged line is a symptom, not the root cause — re-read the caller or the function that produces the flagged value. If the real problem is upstream, flag that instead.
- Verify impact claims — "this is a security vulnerability" or "this causes a performance problem" must be grounded in the actual code path, not a pattern match on the surface shape of the code.
Actions to take based on this pass:
- Drop findings where the problem disappears on re-read
- Revise the suggested fix if it has a bug or a non-obvious trade-off — and if the trade-off is worth the user knowing, say so explicitly
- Escalate or redirect findings where the root cause is elsewhere
Step 5: Present Findings
For local code review:
## Code Review
### 🔴 Critical Issues
[Security vulnerabilities, bugs that will cause failures]
**Location**: file.py:42
**Issue**: [Specific problem]
**Why it matters**: [Impact]
**Fix**:
[Code example]
### 🟡 Important Issues
[Performance problems, maintainability concerns, code duplication]
### 💡 Suggestions
[Optional improvements, alternative approaches]
### ✅ Good Practices
[Acknowledge good code]For GitLab MR review:
## MR Review: <title> (!<number>)
### Summary
- **Status**: [opened/merged/etc]
- **Your previous comments**: [count]
- **Unresolved discussions**: [count]
### Review Findings
#### 🔴 Critical Issues
#### 🟡 Important Issues
#### 💡 Suggestions
#### ✅ Responses to Your Comments
### Recommendation
[Approve / Request Changes / Comment only]See references/examples.md for complete worked examples of each issue type.
Step 6: Independent Subagent Critic Pass
After generating findings and before presenting them to the user, spawn a subagent with the following strict brief:
"You are an adversarial reviewer. Below are proposed code review findings. Your job is NOT to confirm them — your job is to challenge each one. For every finding, answer: (1) Is this actually a problem, or is the reviewer pattern-matching on surface shape? (2) Is the proposed fix correct and complete, or does it introduce a new issue? (3) Is there a simpler or better alternative the reviewer missed? (4) Is this finding actually worth the author's time, given its real-world impact? If a finding survives all four questions, say so. If it doesn't, explain, change or remove it."
Pass the full draft findings to the subagent. Incorporate the subagent's output:
- Drop findings the subagent identifies as false positives or low-value
- Revise suggested fixes the subagent finds incomplete or incorrect
- Add any better alternatives the subagent surfaces
- Present only the reconciled, validated findings to the user
Do not show the subagent's raw critique to the user — only the improved final findings.
Interactive Comment Workflow (GitLab MRs)
When user asks to "add comments" or "post comments" to an MR:
- Review and categorize — perform the standard review above
- Present summary and wait for approval — show all findings grouped by severity, ask "Would you like me to prepare comments?"
- Prepare drafts — write comment files to
.review-comments/mr-<number>/ - Review each comment interactively — show preview, ask
[A]dd / [E]dit / [S]kip / [Q]uit - Final confirmation — list all approved comments, ask
[P]ost / [R]eview again / [C]ancel - Post only after explicit confirmation — never post without user saying "P"
- Confirm success — report which comments posted, provide MR URL
See references/vcs-comments-workflow.md for full bash commands, API calls, file formats, and error handling for both GitLab and GitHub.
Project-Specific Context
Key directories:
packages/data-utils/— Generic cross-package utilitiespackages/data-models/— Shared Pydantic modelspackages/llm-clients/— LLM client wrapperspackages/logger/— Logging utilitiespackages/api-services-utils/— API utilities
Code style:
- Google-style docstrings, PEP8
@staticmethodfor class-specific static methods; top-level functions for generic reusable logic- Logging via
loggerpackage (never print statements) BaseSchemafromdata-modelsfor API contracts
Common patterns: uv for package management, FastAPI for APIs, pytest for testing, structlog for logging
Reference Files
| File | When to load |
references/code-duplication-detection.md | Always — intelligent duplication detection |
references/security-checklist.md | APIs, auth, data handling, external integrations |
references/performance-patterns.md | ML pipelines, data processing, API endpoints |
references/maintainability-patterns.md | Code structure, refactoring, organization |
references/vcs-integration.md | GitLab MR / GitHub PR reviews |
references/vcs-comments-workflow.md | Posting comments to GitLab MRs or GitHub PRs |
references/examples.md | Worked examples: security, duplication, performance |
Related Skills
| Skill | Invoke alongside this one when |
python-async-scaling | The diff touches async/await, FastAPI endpoints, background workers, or queue consumers, or the service runs as multiple instances/pods. Not needed for plainly synchronous code. |
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.

