← ClaudeAtlas

perf-doctorlisted

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 "帮我看性能".
whaojie797-design/Novera-AI-skills · ★ 2 · Code & Development · score 58
Install: claude install-skill whaojie797-design/Novera-AI-skills
# 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; on