Skip to content
Back to skills

Perf Doctor

ASecurity

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 "帮我看性能".

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 6, 2026
ai-agentspythongojavarailsperformance

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 6, 2026

npx -y skills add whaojie797-design/Novera-AI-skills --skill perf-doctor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Perf Doctor?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Perf Doctor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/whaojie797-design-perf-doctor/badge)](https://www.skillsdirectory.com/skills/whaojie797-design-perf-doctor)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.

Files in this skill

  • SKILL.md1.9 KB
  • references/perf-rules.md1.2 KB
  • scripts/scan_perf.py4.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.