This skill audits a codebase for common performance anti-patterns (N+1 queries, SELECT *, nested loops, missing LIMIT, sync/blocking calls inside loops) and proposes prioritized fixes. Use it when the user says "性能审计", "perf-doctor", "检查性能", "为什么慢", "performance audit", or "帮我看性能".
Scanned 9/6/2026
Install to Claude Code
npx -y skills add whaojie797-design/Novera-AI-skills --skill perf-doctor --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Perf Doctor?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/whaojie797-design-perf-doctor)More formats (shields.io, HTML) on the badges page.
---
name: perf-doctor
description: This skill audits a codebase for common performance anti-patterns (N+1 queries, SELECT *, nested loops, missing LIMIT, sync/blocking calls inside loops) and proposes prioritized fixes. Use it when the user says "性能审计", "perf-doctor", "检查性能", "为什么慢", "performance audit", or "帮我看性能".
---
# Perf Doctor
## Overview
Give the agent a deterministic, repo-wide performance audit. Instead of only guessing, run `scripts/scan_perf.py` to surface concrete hot spots with file:line, severity, and a fix suggestion, then prioritize by severity (High -> Medium -> Low).
## When to Use
- The user says "性能审计", "perf-doctor", "检查性能", "为什么慢", "performance audit", "帮我看性能".
- After a feature lands and before declaring it done, as a perf gate.
## Procedures
1. **Scan**: run `python scripts/scan_perf.py <project_dir>` (or a single file). The scanner is stdlib-only and needs no install.
2. **Triage**: read the report; start with `High` findings (N+1, sync-in-loop), then `Medium`, then `Low`.
3. **Fix + verify**: apply the suggested fix, then re-run the scanner to confirm the finding is gone. Remind the user: measure before/after (a benchmark or timing), don't optimize blind.
4. **Report**: summarize counts by severity and the top 3 fixes.
## Bundled Resources
- `scripts/scan_perf.py` — heuristic scanner for Python/JS/TS/Java/Go and more. Outputs a table or `--json`; exits non-zero when findings exist (CI-friendly).
- `references/perf-rules.md` — the full rule catalog with fix patterns.
## Guardrails
- Heuristics, not a profiler: findings are candidates, notproof. Confirm with a real benchmark before claiming a win.
- Avoid shotgun "optimizations": fix the High items first; low-severity items may not be worth the churn.
- Do not rewrite working code just to satisfy the scanner; only change when there is a real measured gain.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!