code-review
Skill8 starsChanged 7 months agoMITView on GitHub
Code review combining language strictness rules, security auditing, and performance analysis. Use when a user says /code-review or asks to review a branch, PR, or set of changes. Auto-detects languages and applies the relevant rule sets from typescript-strict, rust-strict, swift-strict, go-strict, javascript-strict, security-audit-standard, performance-audit-standard, and github-standards.
- Reads credentials
188 other projects use a version of this.
Adopted by
Most recently taken up by
- github/spec-kittheir own version, first seen Nov 23, 2026
- microsoft/vscodetheir own version, first seen Nov 12, 2026
- mattpocock/skillstheir own version, first seen Oct 8, 2026
- rafaelob/pragmatic-agent-skillstheir own version, first seen Oct 5, 2026
- Kangentic/kangentictheir own version, first seen Oct 5, 2026
- dzhng/skillstheir own version, first seen Oct 4, 2026
Used with
Projects with it also use starter, media-processing 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.
ww-w-aiSkillstarter
Static web development guide for beginners. Covers HTML/CSS/JavaScript and Next.js App Router basics. Project initialization with "init starter". Triggers: static website, portfolio, landing page, HTML CSS, beginner, 정적 웹, 포트폴리오, 초보자, 静的サイト, 初心者, 静态网站, 初学者, sitio web estático, site statique, statische Website, sito web statico Do NOT use for: fullstack apps (use $dynamic), enterprise (use $enterprise).
Also in 4 projects that use this
mrgoonieSkillmedia-processing
Process multimedia files with FFmpeg (video/audio encoding, conversion, streaming, filtering, hardware acceleration) and ImageMagick (image manipulation, format conversion, batch processing, effects, composition). Use when converting media formats, encoding videos with specific codecs (H.264, H.265, VP9), resizing/cropping images, extracting audio from video, applying filters and effects, optimizing file sizes, creating streaming manifests (HLS/DASH), generating thumbnails, batch processing images, creating composite images, or implementing media processing pipelines. Supports 100+ formats, hardware acceleration (NVENC, QSV), and complex filtergraphs.
Also in 5 projects that use this
loulanyueSkillsetup-ts-deep-modules
Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.
Also in 15 projects that use this
mrgoonieSkillaesthetic
Create aesthetically beautiful interfaces following proven design principles. Use when building UI/UX, analyzing designs from inspiration sites, generating design images with ai-multimodal, implementing visual hierarchy and color theory, adding micro-interactions, or creating design documentation. Includes workflows for capturing and analyzing inspiration screenshots with chrome-devtools and ai-multimodal, iterative design image generation until aesthetic standards are met, and comprehensive design system guidance covering BEAUTIFUL (aesthetic principles), RIGHT (functionality/accessibility), SATISFYING (micro-interactions), and PEAK (storytelling) stages. Integrates with chrome-devtools, ai-multimodal, media-processing, ui-styling, and web-frameworks skills.
Also in 4 projects that use this
AWSSkillask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
Also in 32 projects that use this
AWSSkillresolving-merge-conflicts
Use when you need to resolve an in-progress git merge/rebase conflict.
Also in 48 projects that use this
- +1 more from mrgoonie
- +2 more from aws
Other versions188 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 188
- mattpocock/skills★ 335ksame name
- microsoft/vscode★ 196ksame name
- github/spec-kit★ 153ksame name
- shareAI-lab/learn-claude-code★ 78ksame name
- github/awesome-copilot★ 40ksame name
- langchain-ai/deepagents★ 30ksame name
- microsoft/vcpkg★ 28ksame name
- anthropics/knowledge-work-plugins★ 26ksame name
- Donchitos/Claude-Code-Game-Studios★ 26ksame name
- microsoft/onnxruntime★ 22ksame name
178 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 repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- Git CommitSkill
- github-standardsSkill
- go-strictSkill
- javascript-strictSkill
- performance-audit-standardSkill
- postgres-strictSkill
- rust-strictSkill
- security-audit-standardSkill
- swift-strictSkill
- testing-patternsSkill
- typescript-strictSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Run a structured review of branch changes covering security, language strictness, performance, and conventions.
- Very specific: line 32
Use $MERGE_BASE..HEAD for ALL diffs.
- Distinctive: line 46
Only apply rules for languages present in the diff.
- Distinctive: line 50
Run in this order. For each finding, record file, line number, description, and rule ID.
- Distinctive: line 68
Look for these anti-patterns in the diff:
- Very specific: line 81
Commit messages follow type(scope): subject format
- Distinctive: line 83
No commented-out code blocks
- Distinctive: line 84
No TODO/FIXME without a ticket reference
- Very specific: line 213
Use gh pr diff output as the diff source instead of git diff.
“Common” is measured: kept by at least 6 in 10 of the 175 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
Run a structured review of branch changes covering security, language strictness, performance, and conventions.
Workflow
Step 1: Detect changes
# Default base branch is main. User can override: /code-review --base staging
BASE=${1:-main}
git fetch origin "$BASE" --quiet 2>/dev/null || true
MERGE_BASE=$(git merge-base "origin/$BASE" HEAD)
BRANCH=$(git rev-parse --abbrev-ref HEAD)
# Changed files and stats
git diff --name-status "$MERGE_BASE"..HEAD
git diff --stat "$MERGE_BASE"..HEAD
git log --oneline "$MERGE_BASE"..HEADUse $MERGE_BASE..HEAD for ALL diffs. Never use origin/main..HEAD directly -- it includes changes from other merged branches.
Step 2: Auto-detect languages
Map file extensions to rule sets:
| Extension | Rule set | Skill |
.ts, .tsx | TypeScript | typescript-strict |
.rs | Rust | rust-strict |
.swift | Swift | swift-strict |
.go | Go | go-strict |
.js, .mjs, .cjs | JavaScript | javascript-strict |
Only apply rules for languages present in the diff.
Step 3: Run checks
Run in this order. For each finding, record file, line number, description, and rule ID.
3a. Security scan (security-audit-standard)
Scan the diff output (not the full repo) for:
- Secrets: API keys, tokens, passwords, connection strings (
sk-,ghp_,AKIA,-----BEGIN PRIVATE KEY) - Input validation: unvalidated user input reaching SQL, HTML, shell commands, file paths
- Injection risks: string concatenation in queries,
eval(),innerHTML, unsanitized template literals - Auth issues: missing auth checks on endpoints, weak JWT config, secrets in client-side code
- File patterns:
.env,*.pem,credentials.jsoncommitted
3b. Language strictness checks
Apply the top rules for each detected language (see Quick Reference Tables below). Read the changed lines and flag violations.
3c. Performance scan (performance-audit-standard)
Look for these anti-patterns in the diff:
- O(n) membership checks where Set/Map should be used
- O(n^2) nested loops (
.filter()inside.map(),includes()inside loop) - Sort to find min/max (O(n log n) vs O(n) single pass)
- Sync file I/O in async context (
writeFileSync,std::fs::writeunder async) - Lock held across
.awaitor disk I/O (Rust) - Per-request client/regex creation instead of singleton
- Unbounded caches without capacity or TTL
- Multiple array passes where a single pass works
3d. Style and conventions (github-standards)
- Commit messages follow
type(scope): subjectformat - No
console.log/print/println!debugging left in code - No commented-out code blocks
- No TODO/FIXME without a ticket reference
- Error handling present (no empty catch blocks, no swallowed errors)
- Naming conventions match language idioms
Step 4: Generate review summary
Output Format
## Code Review: [branch-name]
**Base**: [base-branch] | **Files changed**: N | **Commits**: N
### CRITICAL (must fix before merge)
- [file:line] Finding description (RULE-ID)
### HIGH (should fix)
- [file:line] Finding description (RULE-ID)
### MEDIUM (consider fixing)
- [file:line] Finding description (RULE-ID)
### LOW (nitpick)
- [file:line] Finding description (RULE-ID)
### Passed checks
- No secrets detected in diff
- Error handling present
- Input validated at boundaries
- Async operations properly awaited
- Resources cleaned up
- Commit messages follow conventionsOmit empty severity sections. Always show "Passed checks" to confirm what was verified.
Quick Reference: Top 5 Rules Per Language
TypeScript
| ID | Rule | What to flag |
| TS-01 | No any | any type annotation without justification comment |
| TS-02 | No as assertions | as Type without preceding type guard |
| TS-04 | No @ts-ignore | Use @ts-expect-error with explanation instead |
| TS-12 | Narrow catch errors | catch (err) without instanceof Error check |
| TS-13 | No silent catch | Empty catch {} or catch without logging |
Rust
| ID | Rule | What to flag |
| -- | No .unwrap() | .unwrap() in non-test code without // BUG IF: comment |
| -- | No .expect() | .expect() outside static init (LazyLock, OnceLock) |
| -- | SAFETY comments | unsafe block without // SAFETY: comment |
| -- | Lock across await | RwLock/Mutex guard held across .await |
| -- | Bounded caches | HashMap used as cache without capacity limit |
Swift
| ID | Rule | What to flag |
| SW-01 | No force unwrap | ! on optionals in production code |
| SW-03 | No silent try? | try? on critical operations (file creation, auth, data save) |
| SW-09 | @MainActor on VMs | ViewModel missing @MainActor annotation |
| SW-12 | Task cancellation | Task { } without [weak self] or cancellation check |
| SW-15 | [weak self] | Async closures with strong self capture |
Go
| ID | Rule | What to flag |
| GO-01 | Wrap errors | return err without fmt.Errorf("context: %w", err) |
| GO-02 | Check errors | Ignored error return value |
| GO-03 | Drain body | resp.Body.Close() without io.Copy(io.Discard, ...) on error paths |
| GO-07 | RWMutex | Write lock where read lock suffices, or missing double-check |
| GO-17 | No hardcoded secrets | const apiKey = "..." or similar |
JavaScript
| ID | Rule | What to flag |
| JS-01 | No var | var declaration anywhere |
| JS-03 | No silent catch | Empty catch block or catch without action |
| JS-05 | Bounded retries | Recursive retry without max attempt limit |
| JS-08 | Async file I/O | writeFileSync, readFileSync in server code |
| JS-17 | No eval() | eval() or new Function() with dynamic input |
Common Anti-Patterns Checklist
Quick-scan checklist applied to ALL languages:
- No hardcoded secrets or API keys in diff
- All errors handled (not swallowed with empty catch)
- No
console.log/print/println!/NSLogdebugging left - No commented-out code blocks
- No TODO/FIXME without ticket reference
- Input validated at system boundaries
- No force-unwrap / force-cast /
anytype escape - Async operations properly awaited (no fire-and-forget)
- Resources cleaned up (listeners, subscriptions, file handles, DB connections)
- No unbounded collections in hot paths (use bounded cache, Set, or Map)
Branch Comparison Options
Review against a different base branch
/code-review --base staging
/code-review --base developOverride the default main base branch.
Review specific files only
/code-review --files src/auth.ts src/middleware.tsLimits the review to listed files. Use git diff $MERGE_BASE..HEAD -- <file> per file.
Review a PR by number
# Fetch PR metadata and diff
gh pr view <NUMBER> --json title,body,headRefName,baseRefName,files
gh pr diff <NUMBER>Use gh pr diff output as the diff source instead of git diff.
Review a specific commit range
/code-review --range abc123..def456Uses the provided range instead of computing merge-base.
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.

