/nlsmdn:review-perf [--staged | --unpushed | --changed | --all]from nlsmdn
Performance analysis for algorithmic complexity, memory leaks, N+1 queries, and render issues. Use when code feels slow, after adding loops/queries, or before scaling up.
Ships in nlsmdn. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Performance analysis for common bottlenecks and inefficiencies.
Use only these finding priorities, in descending order:
Grade the demonstrated consequence, realistic reachability, and available recovery against project priorities. A category, missing convention, hypothetical future problem, or confidence that a claim is true does not set its priority. Do not assign automatic severity floors or ceilings. Keep unverified claims in validation gaps, outside the graded finding count; distinguish suggestions from defects. For plans, trace the consequence if implemented and state the assumptions.
Use the short labels Must Fix, Should Fix, and Nice to Have in summaries and ledgers.
Keep effort, verification status, user-facing change size, and tool/vendor diagnostic ratings
separate. When called by code-review, return its requested evidence and impact fields; the parent
owns scoring and final triage. Otherwise apply this rubric directly. Omit empty priority sections.
/review-perf # Review context-related code
/review-perf --staged # Review staged changes
/review-perf --unpushed # Review files changed across all unpushed commits
/review-perf --changed # Review unstaged changes
/review-perf --all # Full codebase audit (parallel agents)
| Flag | Scope | Method |
|---|---|---|
| (none) | Context-related code | Files from the current conversation context: any files the user has discussed, opened, or that you have read/edited in this session. If no conversation context exists, ask the user to specify files or use --staged/--changed/--all. |
--staged | Staged changes | git diff --cached --name-only |
--unpushed | Files changed across unpushed commits | git diff --name-only $(git rev-list HEAD --not --remotes | tail -1)^..HEAD |
--changed | Unstaged changes | git diff --name-only |
--all | Full codebase | Glob source files, parallel agents |
--unpushed derives its range from git rev-list HEAD --not --remotes (oldest unpushed commit's parent → HEAD). If nothing is unpushed, or there is no remote/upstream (or the range walks back to the root commit) so it can't be determined reliably, stop and ask the user to pick another scope.
useMemo/useCallback to fix re-render warnings can worsen performance on simple components — memoization has overhead and only helps when the memoized value is expensive or the child does reference equality checks.Determine scope based on flags (see Scope table above)
Review each file against all 5 categories in the Performance Checklist below: Algorithmic Complexity, Database/Query Patterns, Memory Management, UI/Render Performance, Network/IO
Parallelize if scope has >5 files: spawn one sub-agent per category, each scanning all files for that category. Merge results and deduplicate.
Dispatch workers that return findings without editing files. Disable delegation tools where supported; read-only access alone does not prevent delegation. Any coordinating role needs explicit subtasks, a descendant limit, and a stopping condition in its brief.
Classify severity using Review grading; justify the impact with evidence.
Report findings grouped by severity using the Output Format below
.find() or equivalentSELECT * when only a few columns are needed — select explicitlyreview-correctness.review-security; non-termination belongs to review-correctness.useEffectuseMemo/useCallbackawait calls for independent requests — use Promise.allFor annotated BAD/GOOD code examples for each category, see references/perf-checklist.md.
## Performance Review: {scope}
### Critical Issues (Must Fix)
- {file}:{line} - {issue type}: {description}
**Impact:** {why it matters}
**Fix:** {solution with code example}
### Improvements (Should Fix)
- {file}:{line} - {issue}
**Fix:** {solution}
### Suggestions (Nice to Have)
- {file} - {issue}
Staged changes introduce N+1 query:
/review-perf --staged
Reviews staged files and catches a new user list endpoint that queries posts per user in a loop. Records the query count ("100 users = 101 queries") and checks actual sizes and latency. Reports Should Fix when the ordinary path has demonstrated substantial cost; otherwise records a useful optimization as Nice to Have. Resource exhaustion or a core outage needs separate evidence for Must Fix. Suggests eager loading with include.
Full audit finds memory leak in dashboard:
/review-perf --all
Parallel agents scan the full codebase by category. Finds an event listener in the dashboard component that is never cleaned up on unmount, plus an unbounded in-memory cache growing with every API call.
Solution: If the flagged code runs only during initialization or in admin-only flows, note the expected data size in a code comment. Re-run the review and the context will help distinguish hot paths from cold ones.
Solution: Add a brief comment with the expected input size (e.g., // n is typically < 50) so static analysis can assess impact. For uncertain cases, use /perf-test to measure actual performance with realistic data.
--all, use parallel agents per categoryWhat SKILL.md sets; muted values are Claude Code's defaults
highOther plugins' skills for the same job
npx claudepluginhub nielsmadan/skills --plugin nlsmdn65 skills in this plugin
/blind-spotsSurface consequential decisions a plan, design, or research brief left silently assumed, by interviewing the user in dependency order. Use when the user says "blind spots", "grill me", "stress-test this plan", "poke holes in this", "what am I missing", "interrogate this design", "what haven't I decided", or needs a loose idea or research brief clarified before work begins. Do NOT use for a clear factual lookup, to explain a previous reply in more detail (use `huh`), to generate ideas when it is unclear what to build (use `ideation`), or to review an already-written plan with agents (use `review-plan`)./brainstormWork out how to solve a problem the user can already name — interview them with `blind-spots` to understand it, generate structurally different approaches, validate each with an independent critic, then present the survivors with trade-offs and a recommendation. Use when the user says "brainstorm", "brainstorm approaches", "how should we solve/approach/tackle X", "what are our options", "compare approaches", "think this through with me", or wants solutions weighed before committing. Works on any topic, with codebase recon when a repo is involved; `--debate` adds external advisors for high-stakes calls. Do NOT use when stuck on what to build or what the problem is (use `ideation`), to probe an already-chosen plan (use `blind-spots`), or to pick a library or service (use `evaluate-tech`)./check-agent-logsSearch past Claude Code, Codex, Cursor CLI, Devin CLI, Droid, and Pi session logs to recover context from earlier work across the current project and sibling checkouts. Use when a bug, topic, or decision was handled in a previous session but its agent or checkout is unknown; when the user says "we fixed/discussed this before", "find the session where", "recover prior context", "check agent logs", "check Claude projects", "search past sessions/transcripts", or "which checkout was that in". Do not use for aggregate failure-pattern analysis; use review-logs for that./codebase-reviewReview a whole codebase aspect by aspect, with aspects fitted to the project type (mobile, desktop, web frontend, static site, CLI, backend, library) — docs truth-check, architecture, tests, security, the type's foundations, feature deep dives, consistency, roadmap — writing a doc per aspect and a verified findings ledger that doubles as the TODO. Plans first (recon, `blind-spots`, `review-plan`, plan approval), then walks the plan with the user aspect by aspect — agents review and verify in the background, the user confirms rulings and decides judgment calls one at a time. `--auto` runs independently after the gate, with decision waves at the end. `--fix` hands settled findings through `crew` to worker sessions, integrated locally, never pushed. Use for "codebase review", "review the whole codebase", "onboard me to this repo", "deep dive this app", "audit the code base", "review and fix everything". Not for a diff or PR (code-review), a CLI release pass (release-review), or building a feature (longshot)./codebase-review-typescriptSupply TypeScript and JavaScript structural evidence to codebase-review using dependency-cruiser, ESLint complexity, and Git churn. Use for whole-codebase import-cycle and complexity-hotspot investigation, or when discovered as a project-local codebase-review extension. Does not replace review-typescript's type-design checks or review a diff./code-guideCoach the user through writing a feature themselves, one small step at a time, the way an experienced developer would build it. Each step comes with the code to type and a checkpoint that proves it works, such as logging the endpoint's response shape before typing it, or rendering a hardcoded value before wiring the real one. After each step the agent reads the user's diff and verifies it. The happy path comes first and edge cases come last. Use when the user says "code-guide", "guide me to write", "help me write this myself", "I want to code it myself", "coach me through implementing", "walk me through building this feature", "don't write it for me", or wants to learn by typing the code. Do NOT use for console or dashboard setup (use guide), explaining existing code (use code-tour), or when the agent should implement the change itself (use plan or longshot).