review
Skill0 starsChanged 9 months agoMITView on GitHub
Provide a code review for local changes on the current branch. This skill auto-detects everything: review mode, project conventions, verification commands, and excluded files. Before starting, detect the project environment. Do NOT hardcode anything. Check for a project instruction file in this order (stop at first match): Store as $INSTRUCTION_FILE. If none found, set to empty (skip convention checks that require it). Check for .claude/review-rules.md. If it exists, its contents will be injected into agent prompts as additional domain-specific rules.…
192 other projects use a version of this.
Adopted by
Most recently taken up by
- microsoft/veronatheir own version, first seen Nov 8, 2026
- microsoft/FluidFrameworktheir own version, first seen Nov 8, 2026
- charliee1w/consolidation-memorytheir own version, first seen Nov 8, 2026
- jisuzzzz/haechitheir own version, first seen Nov 8, 2026
- apokamo/kajitheir own version, first seen Nov 8, 2026
- dirien/yet-another-agent-harnesstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use close-spec, design-with-images 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.
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 5 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 5 projects that use this
LambenthanSkilldaily-arxiv
每日从 arXiv 拉取新论文,过滤相关性,auto-ingest 高优先级论文,检测 SOTA 更新
Also in 5 projects that use this
LambenthanSkillexp-eval
实验判决门:Review LLM 独立评判实验结果 → 4 种判决路径 → 自动更新 claims confidence、ideas status、graph edges
Also in 5 projects that use this
- +3 more from dzhng
- +5 more from Lambenthan
Other versions192 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 192
- garrytan/gstack★ 141ksame name
- ansible/ansible★ 71ksame name
- docling-project/docling★ 70ksame name
- traefik/traefik★ 65ksame name
- ClickHouse/ClickHouse★ 51ksame name
- temporalio/temporal★ 24ksame name
- tisfeng/Easydict★ 15ksame name
- juicedata/juicefs★ 15ksame name
- elie222/inbox-zero★ 13ksame name
- gitkraken/vscode-gitlens★ 10ksame name
182 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 repository4 other files it gives its agents.
- commit-pushSkill
- create-issueSkill
- create-prdSkill
- submit-prSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
42 rules. 0 are common, 26 are distinctive, and 16 are very specific to this project.
0
Common
Most of the 157 edited versions we read keep these.
26
Distinctive
This author's own choices. Worth a look.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Before starting, detect the project environment.
- Distinctive: line 18
Check for a project instruction file in this order (stop at first match):
- Very specific: line 30
Check for .claude/review-rules.md.
- Very specific: line 38
package.json: Look for scripts in order: check:ci → check → lint
- Very specific: line 39
Makefile: Look for targets: check → lint → test
- Very specific: line 41
pyproject.toml: Look for ruff or flake8 in dependencies → use appropriate command
- Distinctive: line 49
Always exclude from diffs:
- Very specific: line 64
Check if a PR exists: gh pr view --json number,url,title,headRefName 2>&1
- Very specific: line 65
If a PR exists, look for a previous /review comment:
- Very specific: line 73
If a review exists with unresolved issues, check for commits after submitted_at:
- Distinctive: line 80
If there are commits after the review → RE-REVIEW mode
- Distinctive: line 90
If < 200 lines changed AND < 5 files → SMALL mode (2 agents + inline validation)
- Distinctive: line 102
Check for changes in order:
- Distinctive: line 108
If no changes, inform the user and stop.
- Distinctive: line 191
Task: Check for meaningful deviations from project conventions.
- Very specific: line 195
Read $INSTRUCTION_FILE to understand the project's patterns and conventions
- Very specific: line 196
If .claude/review-rules.md exists, read it for additional rules
- Distinctive: line 214
If no instruction file exists, skip this agent and return zero issues.
- Distinctive: line 241
Task: Check test coverage for modified code AND plan compliance.
- Very specific: line 245
Check if test files exist in the project (look for __tests__/, test/, *_test.*, *.test.*, *.spec.* patterns)
- Distinctive: line 247
If NO tests exist, skip coverage checks
- Distinctive: line 248
If tests exist, check whether modified utility/logic functions have corresponding test updates
- Very specific: line 263
Check if plan files exist (.plans/, docs/plans/, plans/)
- Distinctive: line 264
If plan files exist, read the most recent one and verify compliance
- Distinctive: line 265
If no plans exist, skip
- Distinctive: line 274
After all 4 agents complete, if there are any issues found, launch 1 batch validation agent that receives ALL issues together.
- Very specific: line 298
Remove issues where valid: false.
- Very specific: line 303
Run $VERIFY_CMD if detected.
- Distinctive: line 348
If no PR exists, skip and inform the user.
- Distinctive: line 350
If a PR exists, submit as a review:
- Very specific: line 356
If --request-changes fails (own PR), fall back to --comment.
- Distinctive: line 358
Use a HEREDOC for the body.
- Distinctive: line 387
Remove any issues that fail.
- Very specific: line 391
Run $VERIFY_CMD if detected.
- Distinctive: line 423
If the review was "Code Review ✅" (no issues), inform the user and stop.
- Distinctive: line 432
If no commits since review, inform the user and stop.
- Distinctive: line 440
Read the current state of the file
- Distinctive: line 441
Check if the problem still exists
- Distinctive: line 500
APPROVE: All high/medium fixed, no critical/high regressions
- Distinctive: line 522
All tools are functional. Do not make exploratory or test calls.
- Distinctive: line 523
Only call a tool if required.
- Very specific: line 525
Use the general-purpose subagent_type for all review and validation agents.
“Common” is measured: kept by at least 6 in 10 of the 157 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
Provide a code review for local changes on the current branch. This skill auto-detects everything: review mode, project conventions, verification commands, and excluded files.
Pre-flight: Auto-detect Project Environment
Before starting, detect the project environment. Do NOT hardcode anything.
Step 0.1: Find Instruction File
Check for a project instruction file in this order (stop at first match):
CLAUDE.mdAGENTS.mdCONVENTIONS.mdCONTRIBUTING.md
Store as $INSTRUCTION_FILE. If none found, set to empty (skip convention
checks that require it).
Step 0.2: Find Project-Specific Review Rules
Check for .claude/review-rules.md. If it exists, its contents will be injected
into agent prompts as additional domain-specific rules. This is how projects add
custom review knowledge without modifying this skill.
Step 0.3: Find Verification Command
Detect the verification command to run before finalizing:
- package.json: Look for scripts in order:
check:ci→check→lint - Makefile: Look for targets:
check→lint→test - Cargo.toml: Use
cargo clippy && cargo test - pyproject.toml: Look for
rufforflake8in dependencies → use appropriate command - go.mod: Use
go vet ./...
Store as $VERIFY_CMD. If nothing found, skip verification step.
Step 0.4: Determine Excluded Files
Always exclude from diffs:
package-lock.json,yarn.lock,pnpm-lock.yaml*.pbxproj,Podfile.lockCargo.lock,poetry.lock,go.sum
Additionally, read .gitattributes for files marked linguist-generated and
exclude those too.
Build the git pathspec exclusion string as $EXCLUDE_PATHS.
Phase 1: Auto-detect Review Mode
Step 1.1: Check for Re-review Trigger
- Check if a PR exists:
gh pr view --json number,url,title,headRefName 2>&1 - If a PR exists, look for a previous
/reviewcomment:
REPO=$(gh repo view --json nameWithOwner --jq '.nameWithOwner')
gh api "repos/$REPO/pulls/$PR_NUMBER/reviews" \
--jq '[.[] | select(.body | contains("Review conducted by") and contains("/review"))] | last'- If a review exists with unresolved issues, check for commits after
submitted_at:
git log --after="$REVIEW_SUBMITTED_AT" --format="%H" --reverse HEAD | head -1- If there are commits after the review → RE-REVIEW mode
Step 1.2: Determine Review Depth (if not re-review)
Get the diff stat:
git diff main...HEAD --stat -- . $EXCLUDE_PATHS 2>/dev/null || git diff --cached --stat -- . $EXCLUDE_PATHS- If < 200 lines changed AND < 5 files → SMALL mode (2 agents + inline validation)
- Otherwise → FULL mode (4 agents + batch adversarial validation)
Inform the user which mode was selected and why.
FULL Mode (4 agents + batch validation)
Step F.1: Discover Changes
Check for changes in order:
- Committed changes on current branch vs main:
git log main..HEAD --onelineandgit diff main...HEAD --stat - Staged changes:
git diff --cached --stat
If no changes, inform the user and stop.
Get the full diff excluding generated files:
- Committed:
git diff main...HEAD -- . $EXCLUDE_PATHS - Staged:
git diff --cached -- . $EXCLUDE_PATHS
Step F.2: Launch 4 Review Agents in Parallel
Launch all 4 agents simultaneously using the Task tool. Each agent receives:
- The full diff
- The instruction file contents (if found)
- The review rules contents (if found)
- The project type context
All agents must return issues in this JSON format:
{
"issues": [
{
"title": "Short descriptive title",
"file": "path/to/file.ts",
"lines": "45-50",
"description": "What is wrong and why it matters",
"category": "security|correctness|architecture|performance|test-coverage|plan-compliance",
"severity": "critical|high|medium|low",
"suggestion": "How to fix it"
}
]
}Severity definitions (all agents):
- Critical: Code will crash, lose data, or create a security vulnerability
- High: Code will produce wrong results or violate a core project convention
- Medium: Code works but deviates from best practices in a meaningful way
- Low: Minor improvement that a senior engineer might suggest
Agent 1: Bugs & Security
Task: Scan for bugs, logic errors, and security vulnerabilities in the changed code.
Bug detection — look for:
- Logic errors: Wrong operators, incorrect conditionals, off-by-one
- Null/undefined dereferences on nullable values
- Wrong async patterns: Missing
await, unhandled promise rejections, race conditions - Missing imports, incorrect module paths, undefined variables
- State mutation bugs (framework-specific: React state mutation, etc.)
- Stale closures in hooks/callbacks with incorrect dependency arrays
Security — look for:
- Sensitive data exposure: Secrets, tokens, API keys logged or displayed
- Injection vulnerabilities: SQL injection, XSS, command injection
- Insecure data storage (secrets in plaintext, localStorage for tokens)
- Auth token handling issues (leaked to logs, sent to untrusted endpoints)
- Unvalidated external input used in security-sensitive operations
If review rules exist, also check for domain-specific correctness patterns described there.
Do NOT flag:
- Issues in code not modified by this changeset
- Theoretical attacks requiring physical device access
- Issues a linter or type checker would catch
- Style or formatting issues
Only flag if confident the code will fail, produce wrong results, or create a vulnerability.
Agent 2: Project Conventions
Task: Check for meaningful deviations from project conventions.
Process:
- Read
$INSTRUCTION_FILEto understand the project's patterns and conventions - If
.claude/review-rules.mdexists, read it for additional rules - Review the changed code for violations
Flag only:
- Violations of documented architectural patterns
- Violations of documented naming/path conventions
- Violations of documented anti-patterns
- For each issue, quote the exact rule being violated from the instruction file
Do NOT flag:
- Minor deviations that achieve the same goal
- Code that predates the changeset
- Style preferences not documented in the instruction file
- Issues already caught by other agents
If no instruction file exists, skip this agent and return zero issues.
Agent 3: Performance
Task: Scan for performance issues in the changed code.
Look for (adapt to detected stack):
- N+1 query patterns (database queries or API calls in loops)
- Unnecessary re-computation (missing memoization where expensive)
- Resource leaks (unclosed connections, intervals not cleaned up, event listeners not removed)
- Large inline allocations in hot paths
- Expensive operations in render/request paths
Do NOT flag:
- Micro-optimizations that don't affect user experience
- Missing memoization where re-renders/recomputation is cheap
- Performance issues in code not modified by this changeset
Agent 4: Coverage & Planning
Task: Check test coverage for modified code AND plan compliance.
Test coverage:
- Check if test files exist in the project (look for
__tests__/,test/,*_test.*,*.test.*,*.spec.*patterns) - If NO tests exist, skip coverage checks
- If tests exist, check whether modified utility/logic functions have corresponding test updates
Flag only:
- Modified functions that have existing tests which were NOT updated
- New pure logic/utility functions that should have tests
Do NOT flag:
- Missing tests for UI components, hooks, or config files
- Missing tests when no test infrastructure exists
Plan compliance:
- Check if plan files exist (
.plans/,docs/plans/,plans/) - If plan files exist, read the most recent one and verify compliance
- If no plans exist, skip
Flag only:
- Required plan items not implemented
- Implementation significantly deviating from planned approach
Step F.3: Batch Adversarial Validation
After all 4 agents complete, if there are any issues found, launch 1 batch validation agent that receives ALL issues together.
The validator applies this 5-point skepticism checklist to each issue:
- Is it actually in the diff? — Must be in code introduced or modified by this changeset, not pre-existing
- Is the assessment correct? — Read the actual code and verify the claimed problem exists
- Is there protecting context? — Check surrounding code for guards, type checks, upstream validation
- Would a senior engineer care? — Real problem or pedantic nitpick?
- Is the severity right? — Could this be downgraded?
Validation result format per issue:
{
"valid": true | false,
"adjusted_severity": "critical|high|medium|low",
"reason": "Why the issue stands or why it's a false positive"
}Remove issues where valid: false. Use adjusted_severity for remaining
issues.
Step F.4: Verification
Run $VERIFY_CMD if detected. Note any failures in the report.
Step F.5: Generate Report
If NO issues found:
## Code Review ✅
No issues found. Checked for:
- Security vulnerabilities and bugs
- Project convention compliance
- Performance issues
- Test coverage and plan compliance
Changes look good to proceed.If issues found, group by severity (Critical > High > Medium > Low):
## Code Review
Found {count} issue(s) requiring attention:
### Critical
**{title}** `{file}:{lines}`
{description}
**Suggestion:** {suggestion}
---
### High
...Step F.6: Submit Review to GitHub PR
Check if a PR exists: gh pr view --json number,url,title 2>&1
If no PR exists, skip and inform the user.
If a PR exists, submit as a review:
- APPROVE (
--approve): Zero issues - COMMENT (
--comment): Only low/medium issues - REQUEST_CHANGES (
--request-changes): Any critical/high issues
If --request-changes fails (own PR), fall back to --comment.
Use a HEREDOC for the body. Append signature:
---
_Review conducted by 4-agent review system via `/review` (full mode)_SMALL Mode (2 agents + inline validation)
Step S.1: Discover Changes
Same as Step F.1.
Step S.2: Launch 2 Review Agents in Parallel
Launch Agent 1 (Bugs & Security) and Agent 2 (Project Conventions) only. Same prompts as FULL mode.
Step S.3: Inline Validation
For each issue, apply a quick 3-point skepticism check (no sub-agent):
- Is it actually in the diff? — Not pre-existing code
- Is the assessment correct? — Read the actual code if needed
- Would a senior engineer care? — Real problem vs pedantic nitpick
Remove any issues that fail. Adjust severity if needed.
Step S.4: Verification
Run $VERIFY_CMD if detected.
Step S.5: Generate Report
Same format as FULL mode, but with signature:
---
_Review conducted by 2-agent review system via `/review` (small mode)_Step S.6: Submit to PR
Same logic as Step F.6.
RE-REVIEW Mode (auto-triggered)
Step R.1: Load Context
Parse the original review from the PR (found in Step 1.1). Extract each issue from the review body using the standard format:
### {Severity}
**{title}** `{file}:{lines}`
{description}
**Suggestion:** {suggestion}If the review was "Code Review ✅" (no issues), inform the user and stop.
Step R.2: Get Changes Since Review
FIRST_FIX_COMMIT=$(git log --after="$REVIEW_SUBMITTED_AT" --format="%H" --reverse HEAD | head -1)
git diff ${FIRST_FIX_COMMIT}^..HEAD -- . $EXCLUDE_PATHSIf no commits since review, inform the user and stop.
Step R.3: Launch 2 Verification Agents in Parallel
Agent A: Fix Verification
For each original high/medium issue:
- Read the current state of the file
- Check if the problem still exists
- Classify as: fixed, partially-fixed, or not-fixed
Be generous: different but valid approaches count as fixed.
Agent B: Regression Scan
Quick scan of the post-review diff for new bugs introduced by the fixes. Same checks as Agent 1 (Bugs & Security) but scoped only to the new delta.
Step R.4: Verification
Run $VERIFY_CMD if detected.
Step R.5: Generate Report
If ALL issues fixed and NO regressions:
## Re-Review ✅ - All Issues Resolved
All {count} high/medium issue(s) from the original review have been addressed.
- [x] ~~**{title}** `{file}:{lines}` — {description}~~
No regressions detected.
---
_Re-review conducted by `/review` (re-review mode)_If some issues remain OR regressions found:
## Re-Review - {remaining_count} Issue(s) Remaining
**Original issues:** {total} checked, {fixed} fixed, {partial} partially fixed,
{not_fixed} not fixed
### Fix Status
- [x] ~~**{title}** `{file}:{lines}`~~ **Fixed**
- [ ] **{title}** `{file}:{lines}` **Not Fixed**
> {explanation}
### New Regressions (if any)
**{title}** `{file}:{lines}`
{description}
**Suggestion:** {suggestion}
---
_Re-review conducted by `/review` (re-review mode)_Step R.6: Submit to PR
- APPROVE: All high/medium fixed, no critical/high regressions
- COMMENT: Some remain but no critical/high regressions
- REQUEST_CHANGES: New critical/high regressions (fall back to COMMENT on own PR)
False Positives to Avoid
Do NOT flag these (applies to all modes):
- Pre-existing issues not introduced in this changeset
- Code that appears buggy but is correct given surrounding context
- Pedantic nitpicks a senior engineer wouldn't flag
- Issues a linter or type checker will catch
- Minor code quality concerns not documented in the instruction file
If not certain, do not flag it. False positives waste reviewer time and erode trust.
Agent Behavior Notes
- All tools are functional. Do not make exploratory or test calls.
- Only call a tool if required. Every tool call should have a clear purpose.
- Launch agents in parallel wherever the skill says to.
- Use the
general-purposesubagent_type for all review and validation agents.
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.

