performance-profiler

performance-profiler is a skill for Claude Code, Codex from Morningstar202604/awesome-skillkit. It costs 280 tokens per session (1,596 once invoked), scanned A, original, Apache-2.0.

A method for measuring why Node.js, Python, or Go software is slow or uses too many resources. It examines processor time, memory, input/output, database queries, frontend bundle size, and behavior under load.

In plain words
What is it for?
Finding CPU or memory bottlenecks, suspected memory leaks, slow database queries, oversized bundles, and readiness for a traffic increase through load testing.
Why use it?
Performance problems are often hard to locate from symptoms alone. Profiling provides measurements and compares results before and after an optimization.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Finding CPU or memory bottlenecks, suspected memory leaks, slow database queries, oversized bundles, and readiness for a traffic increase through load testing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/morningstar202604/awesome-skillkit/performance-profiler
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Morningstar202604/awesome-skillkit --skill performance-profiler
Clone the repo
git clone --depth 1 https://github.com/Morningstar202604/awesome-skillkit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for performance-profiler

README.md
[![agentmods](https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/performance-profiler/github.svg)](https://agentmods.dev/skills/morningstar202604/awesome-skillkit/performance-profiler)
Your own site
<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/performance-profiler"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/performance-profiler/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for performance-profiler

Your own site · 80×15
<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/performance-profiler"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/performance-profiler.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 280 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,596 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00280 $0.01596
Opus 5.5 $0.00112 $0.00638
Sonnet 5.5 $0.00056 $0.00319
Haiku 4.5 $0.00028 $0.00160

Measured 2mo ago against content hash 0d8726d35234, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

performance-profiler scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

The scan reads SKILL.md. This mod also ships 4 executable files (examples/sample-codebase/legacy.py, examples/sample-codebase/util.py, scripts/performance_profiler.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

expert-teams/skills/performance-profiler/SKILL.md · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Performance Profiler

系统性性能剖析:定位瓶颈、量化前后差异、给出优化方向。

核心能力

  • CPU 剖析 — Node.js 火焰图、Python py-spy、Go pprof
  • 内存剖析 — 堆快照、泄漏检测、GC 压力
  • 包体积分析 — webpack-bundle-analyzer、Next.js bundle analyzer
  • 数据库优化 — EXPLAIN ANALYZE、慢查询日志、N+1 检测
  • 压测 — k6 脚本、Artillery 场景、阶梯加压
  • 前后对比 — 先建基线,再剖析、优化、复测验证

输入清单

输入 必需 说明
project_path 是 待剖析项目根目录路径
format 否 text / json(用 --json)
large_file_threshold_kb 否 大文件告警阈值(KB)

缺失时一次性问齐:「请提供:① project_path(项目根目录)。输出格式与阈值我按默认处理。」

前置自检

python3 --version
test -f scripts/performance_profiler.py && echo "OK script present"
  • 预期:版本号输出;脚本存在打印 OK script present。
  • 若失败:脚本缺失 → STOP 回报;非 Python 项目剖析时还需对应运行时(node/py-spy/go)与 k6/artillery 按需安装。

工作流

步骤 1:扫描风险指标(基线)

python3 scripts/performance_profiler.py examples/sample-codebase   # 随包样例代码库;你的真实项目换成项目根
python3 scripts/performance_profiler.py examples/sample-codebase --json
python3 scripts/performance_profiler.py examples/sample-codebase --large-file-threshold-kb 256
  • 动作:扫描项目,输出性能风险指标(大文件、可疑模式等)。
  • 预期:终端打印风险清单;--json 时输出结构化 JSON;--large-file-threshold-kb 覆盖阈值。
  • 若失败:No such file or directory → project_path 错;非预期退出 → 去掉 --json 看文本报错。

步骤 2:建立前后测量基线

  • 动作:在任意优化前记录 P50/P95/P99 延迟、RPS、错误率、内存占用。
  • 预期:得到可对比的数字基线。
  • 若失败:无监控数据 → 先用步骤 1 扫描 + 运行时 profiler 取数,禁止凭感觉优化。

步骤 3:按语言剖析并优化

  • 动作:对照 references/profiling-recipes.md 取对应命令生成火焰图/堆快照;按 references/optimization-playbook.md 的清单做优化。
  • 预期:定位到具体热点(函数/查询/依赖)。
  • 若失败:无热点 → 回到基线确认瓶颈假设是否成立。

步骤 4:复测验证

  • 动作:优化后重复步骤 1–2,对比基线确认改善。
  • 预期:关键指标较基线下降(延迟)或资源占用减少。
  • 若失败:无改善甚至回退 → 回滚变更,重读 recipes 选其他路径。

快速优化清单

  • 数据库:为高频查询列加索引;连接池(pgBouncer/HikariCP);结果缓存(Redis);把 N+1 合并为批量查询。
  • 应用:同步 I/O 改异步;大结果集分页;大文件流式处理;缓存昂贵计算(LRU/Redis)。
  • 前端:大包 code-split(动态 import);首屏外图片懒加载;gzip/brotli 压缩;静态资源走 CDN。

失败处置表

现象/错误码 原因 处置
No such file or directory project_path 错误 核对路径后重跑
非预期非零退出 项目含不支持结构 去掉 --json 看文本错误
优化后指标无改善 热点判断错 回滚,重读 profiling-recipes.md
缺运行时工具 node/py-spy/go 未装 安装对应剖析工具后重测

Read the full file on GitHub · 106 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · -168 tokens per session 3ddb4b65bd18
  2. 2mo ago Changed 0d8726d35234
  3. 2mo ago Changed · +26 lines · +200 tokens per session 0230d4a357b6
  4. 3mo ago First seen · 80 lines · 80 tokens per session scan A 09ea8b4b21e3

Subscribe to this mod's changes

performance-profiler is a skill published in the GitHub repository Morningstar202604/awesome-skillkit (0 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 280 tokens to every session and 1,596 once invoked, about $0.0011 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

performance-profiler compared with skills from other repositories

performance-profiler next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
performance-profilerMorningstar202604/awesome-skillkitSkill02mo agoApache-2.0A280Claude Code, Codex
systematic-debuggingNousResearch/hermes-agentSkill267ktodayMITA16Claude Code, Codex
python-debugpyNousResearch/hermes-agentSkill267ktodayMITB17Claude Code, Codex
sglang-diffusion-benchmark-profilesgl-project/sglangSkill39ktodayApache-2.0A26Claude Code, Codex
resolve-handoffomnigent-ai/omnigentSkill12ktodayApache-2.0A23Claude Code, Codex
verify-omnigentomnigent-ai/omnigentSkill12ktodayApache-2.0A100Claude Code, Codex
iterate-implementationhumanlayer/humanlayerSkill13k7d agoApache-2.0A16Claude Code, Codex