performance-profiler
它能做什么
这项技能帮助找出 Node.js、Python 和 Go 应用中的性能问题,例如页面缓慢、内存泄漏和体积过大的代码包。适合希望根据测量结果修复速度问题的开发者。
适用场景
- ✓当某个接口或页面很慢、而你不知道原因的时候。
- ✓当应用的内存占用随时间不断增长时。
- ✓当你添加了软件包后,网页应用的代码包明显变大的时候。
技能链接
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/performance-profiler/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我们的结账接口很慢。请找出瓶颈,并在修复后测量改进效果。”
每周 5 个新技能,1 分钟读完。
工作原理
它会先对应用进行测量,查找常见的慢点,例如复杂查询或 CPU 占用,做出修改后再次测量,以确认改进效果。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Performance Profiler
Tier: POWERFUL
Category: Engineering
Domain: Performance Engineering
Overview
Systematic performance profiling for Node.js, Python, and Go applications. Identifies CPU, memory, and I/O bottlenecks; generates flamegraphs; analyzes bundle sizes; optimizes database queries; detects memory leaks; and runs load tests with k6 and Artillery. Always measures before and after.
Core Capabilities
- CPU profiling — flamegraphs for Node.js, py-spy for Python, pprof for Go
- Memory profiling — heap snapshots, leak detection, GC pressure
- Bundle analysis — webpack-bundle-analyzer, Next.js bundle analyzer
- Database optimization — EXPLAIN ANALYZE, slow query log, N+1 detection
- Load testing — k6 scripts, Artillery scenarios, ramp-up patterns
- Before/after measurement — establish baseline, profile, optimize, verify
When to Use
- App is slow and you don't know where the bottleneck is
- P99 latency exceeds SLA before a release
- Memory usage grows over time (suspected leak)
- Bundle size increased after adding dependencies
- Preparing for a traffic spike (load test before launch)
- Database queries taking >100ms
Quick Start
# Analyze a project for performance risk indicators
python3 scripts/performance_profiler.py /path/to/project
# JSON output for CI integration
python3 scripts/performance_profiler.py /path/to/project --json
# Custom large-file threshold
python3 scripts/performance_profiler.py /path/to/project --large-file-threshold-kb 256
Golden Rule: Measure First
# Establish baseline BEFORE any optimization
# Record: P50, P95, P99 latency | RPS | error rate | memory usage
# Wrong: "I think the N+1 query is slow, let me fix it"
# Right: Profile → confirm bottleneck → fix → measure again → verify improvement
Node.js Profiling
→ See references/profiling-recipes.md for details
References
- references/profiling-recipes.md — Node.js/Python/Go profiling commands, flamegraph generation, heap snapshots
- references/optimization-playbook.md — before/after measurement template, quick-win optimization checklist (DB/Node/bundle/API), common pitfalls, best practices
常见问题
它支持哪些语言?
支持 Node.js、Python 和 Go 应用。
它能测试应用如何应对大量用户吗?
能。它可以使用 k6 和 Artillery 编写并运行负载测试。
它只是猜测问题吗?
不是。它会在每次修改前后进行测量,让你看到真实的效果。
详情
作者的原始描述
Use for a slow endpoint, memory leak, CPU spike, large bundle or performance budget in Node.js, Python or Go, before optimizing. Measures before and after with performance_profiler.py, flamegraphs and k6 load tests.
热度
- GitHub 星标
- 29k
- 排名
- #9595
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-launcher-orchestrator
29k帮你的智能体从一个清晰的目标出发,逐步规划、构建、测试并定时运行你自己账户中的 Claude 托管智能体。
grade-iterate
29k让你的智能体按评分标准为托管 AI 智能体的工作打分,并在固定的轮次内改进,因此它永远不会无限循环。
interview
29k让你的智能体就一个 AI 智能体的想法对你进行访谈,并在任何上线之前,把你的回答整理成一份简单的构建计划。
run-without-you
29k帮你的智能体设置托管 AI 智能体,使其按计划或在某个事件发生时运行,并在启动前检查定时设置。