review-perf
Skill8 starsChanged 49 days agoMITView on GitHub
Deep-dive performance audit of database queries, algorithmic complexity,
3 other projects use a version of this.
Adopted by
Most recently taken up by
- yuri-xyz/skillstheir own version, first seen Nov 8, 2026
- gtrabanco/agentic-workflowtheir own version, first seen Sep 22, 2026
- nielsmadan/skillstheir own version, first seen Sep 5, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- gtrabanco/agentic-workflow★ 23same name
- yuri-xyz/skills★ 2same name
- nielsmadan/skills★ 1same 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 repository53 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-browserSkill
- anything-to-skillSkill
- ci-generateSkill
- ci-localSkill
- clotho-researchSkill
- codex-imagegenSkill
- create-ruleSkill
- create-skillSkill
- db-migrateSkill
- docker-initSkill
- docs-adrSkill
- docs-checkSkill
- docs-diagramSkill
- docs-initSkill
- docs-rfcSkill
- docs-updateSkill
- env-setupSkill
- find-skillsSkill
- fix-bugSkill
- git-commitSkill
- git-create-prSkill
- gitflowSkill
- git-releaseSkill
- git-syncSkill
- i18n-checkSkill
- implement-featureSkill
- improve-skillSkill
- inject-docsSkill
- jira-cliSkill
- motion-studioSkill
- optimize-ai-setupSkill
- orchestrateSkill
- oss-launchSkill
- prd-to-issuesSkill
- product-design-specSkill
- product-design-tokensSkill
- product-prdSkill
- project-illustratorSkill
- project-plannerSkill
- refactorSkill
- renderSkill
- review-codeSkill
- review-depsSkill
- review-designSkill
- review-planSkill
- review-securitySkill
- shipSkill
- stopslopSkill
- test-suiteSkill
- vrt-checkSkill
- wtfSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
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 45
If PR or commit specified, pull the *full diff* - not just the file list - so hunk ranges are available for Phase 2's confinement check:
- Distinctive: line 84
Read each match to verify context (hot path vs.
- Distinctive: line 108
Follow references/report-template.md.
“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
Performance Review
Comprehensive performance analysis targeting database query inefficiencies, algorithmic complexity issues, frontend bottlenecks, and resource leaks. This skill only analyzes: it identifies problems and suggests optimizations without making code changes.
Constraints
| Constraint | Detail |
| Analysis only | Never modifies, fixes, or commits code, even if asked to "also fix these" mid-run; report the findings and stop |
| Static analysis | No runtime profiling, no benchmarking, no load testing |
| Pattern-based | Big O and impact estimates are approximate; may miss context-specific issues a profiler would catch |
| Not exhaustive | Does not guarantee 100% detection; profiling is recommended before acting on critical findings |
| Read before claiming | Never report a finding in a file that has not actually been read; every finding cites the specific file path and line number it came from |
| No invented numbers | Counts, query-multiplication estimates, and Big O claims must trace back to code actually read, not generic examples copied from the report template |
| Diff-scope confinement | For a PR or commit review, never grep or read a file the diff didn't touch, and never let a pre-existing issue in a touched file masquerade as a PR finding; see Phase 0/2 |
Scan Workflow
Phase 0: Determine Scan Scope
Parse arguments:
<pr_number>: scan only files changed in that PR (e.g.123,#123)<commit_sha>: scan only files changed in that commit--allor no args: scan entire codebase--scope [database|algorithm|frontend|resources|backend]: focus on specific categories (backend= database + algorithm + resources, excludes frontend)
If PR or commit specified, pull the full diff - not just the file list - so hunk ranges are available for Phase 2's confinement check:
# For PR
gh pr diff <pr_number>
# For commit
git diff-tree -p <commit_sha>From that diff, extract two things and carry both into Phase 2:
- Changed-file list: the paths after each
+++ b/line. - Hunk ranges per file: each
@@ -a,b +c,d @@header gives the new-file line rangectoc+d-1for that hunk. A file can have multiple hunks.
--all or no args skips this entirely - there's no diff to confine to, the whole codebase is in scope.
Phase 1: Project Technology Discovery
Explore the codebase to identify the stack (language, ORM, framework) - it determines which anti-patterns in references/agent-prompts.md apply and which profiling tools to recommend.
Phase 2: Scan the Codebase
Four scan categories, each with its own grep patterns and reporting format in references/agent-prompts.md:
| Category | Covers |
| Database | N+1 queries, missing indexes, connection management |
| Algorithm | Quadratic+ complexity, inefficient data structures, unnecessary recomputation |
| Frontend | Bundle size, rendering (React re-renders, layout thrashing), network waterfalls |
| Resources | Memory leaks, connection/file-handle leaks, thread/process leaks |
Spawn only the category matching --scope; spawn all 4 for --all, no scope, or --scope backend (database + algorithm + resources).
With subagent tools available: spawn one Explore agent per category in parallel, using the prompts in the reference file, and track progress with TodoWrite. Without subagent tools: run the categories sequentially inline in the same order, one grep pass and read-verify cycle per category.
For a PR or commit review, pass the Phase 0 changed-file list to every category (agent or inline) as the only valid grep/read target - a file the diff didn't touch is out of bounds even if it looks relevant (e.g. a service a changed view calls into). For --all, there's no such restriction.
Each category, agent or inline:
- Grep for the anti-patterns for that category, restricted to the changed-file list on a PR/commit review
- Read each match to verify context (hot path vs. cold path - a slow pattern in init code is not the same finding as one in a request handler)
- On a PR/commit review, check the match's line number against that file's hunk ranges from Phase 0:
- Inside a hunk → a PR finding, goes through steps 4-6 into the main Findings section
- Outside every hunk (pre-existing code in a touched file) → skip steps 4-6's severity/fix writeup and instead route it to the separate "Pre-existing issues" bucket (Phase 4); never mix it into the main findings
- Extract the exact code snippet (5-10 lines)
- Classify severity (Critical/High/Medium/Low) and explain why
- Give 2-3 optimization approaches
- Estimate impact where the code supports it (e.g. "O(n²) → O(n log n)", "101 queries → 2 queries for 100 records")
Phase 3: Consolidate & Prioritize
- Collect findings from all categories scanned; deduplicate anything two categories both flagged
- On a PR/commit review, keep the pre-existing-issues bucket separate from the main findings throughout - it never enters the severity tally below
- Sort by severity:
Severity Criteria Critical N+1 in loops, O(n²+) on large datasets, memory leaks in long-running processes, unbounded resource allocation High Missing indexes, sync blocking in async contexts, large bundle imports, connection pool exhaustion Medium Suboptimal queries, unnecessary re-renders, missing caching, inefficient data structures Low Minor optimizations, marginal-impact style preferences - Group by domain (Database/Algorithm/Frontend/Resources) and compute stats: total issues, by severity, by category, files scanned vs. files with issues
Phase 4: Generate Report
Follow references/report-template.md. Every number in it (finding counts, severity totals, file:line refs) must come from Phase 3's actual tally - never fill in the template's placeholder numbers as if they were real.
On a PR/commit review with a non-empty pre-existing-issues bucket, add a "Pre-existing Issues Noticed in Touched Files (outside this PR's changes)" section after the main Findings section - same file:line/snippet/severity format, clearly separated, excluded from the Severity Breakdown and Performance Impact Summary counts (which cover main findings only). If the bucket is empty, omit the section rather than writing a placeholder.
After writing the Findings sections, recount: count the actual Finding entries present in the report (per category and per severity) and use that recount for the Severity Breakdown and Performance Impact Summary table. Never estimate the summary counts or carry forward Phase 3's tally unreconciled - if a finding was dropped or merged while writing the report, the totals must reflect what's actually written, not what was originally found.
Usage
review-perf 123 # scan PR 123
review-perf #456
review-perf abc123def # scan a commit
review-perf --all # scan entire codebase
review-perf # same as --all
review-perf --all --scope database # codebase-wide, database findings only
review-perf 123 --scope frontend # PR 123, frontend findings onlyAdditional Resources
- references/agent-prompts.md - grep patterns and per-category scan prompts (load in Phase 2)
- references/report-template.md - full markdown report template (load in Phase 4)
Performance References
- Web Vitals - Core Web Vitals metrics and thresholds
- React Performance - React rendering optimization
- Database Query Optimization - SQL indexing and query patterns
- Memory Management Best Practices - memory leak detection
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.

