一键导入
perf-profile
Performance profiling and optimization — identify bottlenecks, measure impact, apply targeted optimizations
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Performance profiling and optimization — identify bottlenecks, measure impact, apply targeted optimizations
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Spawn recursive agent armies — swarms that spawn swarms, sandbox armadas, full lifecycle assault
Full rebuild — tear down broken service, scaffold fresh, migrate data, deploy, verify
Dynamic swarm orchestration — decompose any task into parallel agent waves, execute, merge results
One-command deployment — detect stack, build, ship, verify, report URL
Production incident response — triage, diagnose, fix, restore, document
Generate complete runnable projects from a description — API, CLI, MCP server, full-stack app
| name | perf-profile |
| description | Performance profiling and optimization — identify bottlenecks, measure impact, apply targeted optimizations |
| level | 4 |
| triggers | ["profile","perf","optimize","bottleneck"] |
| user-invocable | true |
| pipeline | ["scientist (measure) → architect (diagnose) → executor (optimize) → scientist (verify)"] |
Systematically identify performance bottlenecks, measure them with real data, apply targeted optimizations, and verify the improvement with before/after benchmarks. No premature optimization — measure first, then fix what matters.
Spawn scientist agent to establish baseline:
cProfile, py-spy, memory_profiler--prof, clinic.js, 0xtime, strace -c, hyperfinetime wrapper, wall clock measurementOutput:
## Baseline Profile
- **Operation**: [what was measured]
- **Median runtime**: X ms (n=3, stddev=Y)
- **Top hotspots**:
1. [function/file:line] — X% of total time
2. [function/file:line] — Y% of total time
3. [function/file:line] — Z% of total time
- **Memory peak**: X MB
Spawn architect agent with baseline data:
Output:
## Optimization Result
- **Before**: X ms median
- **After**: Y ms median
- **Improvement**: Z% (X-Y ms saved)
- **Memory impact**: [same/better/worse]
- **Correctness**: [verified/regression detected]
- **Verdict**: [KEEP/REVERT]
Baseline: API endpoint /leads takes 2.3s median
Hotspot: database query at models/lead.py:47 — 89% of time (N+1 query in loop)
Optimization: Batch query with SELECT ... WHERE id IN (...)
After: 180ms median
Improvement: 92% — KEEP
"Let's optimize all the imports to be lazy-loaded"
→ No baseline measurement. No evidence imports are the bottleneck. REJECT.