perf-profiler

perf-profiler is a skill for Claude Code, Codex from laolaoshiren/claude-code-skills-zh. It costs 78 tokens per session (960 once invoked), scanned A, original, MIT.

A performance investigation guide that uses repeatable measurements and profiling evidence to find where software spends time or resources. Profiling records runtime activity such as CPU use, memory use, database work, or network delays.

In plain words
What is it for?
Use it to investigate slow endpoints, tasks, database queries, memory use, network delays, or package size. It helps establish a baseline, locate measured bottlenecks, suggest small changes, and verify them with a second measurement.
Why use it?
It prevents guesses about what is slow from being treated as facts and makes it possible to compare results before and after a change under the same conditions.

Skill for Claude CodeCodex

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

Good fit Use it to investigate slow endpoints, tasks, database queries, memory use, network delays, or package size. It helps establish a baseline, locate measured bottlenecks, suggest small changes, and verify them with a second measurement.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/laolaoshiren/claude-code-skills-zh/perf-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 laolaoshiren/claude-code-skills-zh --skill perf-profiler
Clone the repo
git clone --depth 1 https://github.com/laolaoshiren/claude-code-skills-zh

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 perf-profiler

README.md
[![agentmods](https://agentmods.dev/badge/skills/laolaoshiren/claude-code-skills-zh/perf-profiler/github.svg)](https://agentmods.dev/skills/laolaoshiren/claude-code-skills-zh/perf-profiler)
Your own site
<a href="https://agentmods.dev/skills/laolaoshiren/claude-code-skills-zh/perf-profiler"><img src="https://agentmods.dev/badge/skills/laolaoshiren/claude-code-skills-zh/perf-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 perf-profiler

Your own site · 80×15
<a href="https://agentmods.dev/skills/laolaoshiren/claude-code-skills-zh/perf-profiler"><img src="https://agentmods.dev/badge/skills/laolaoshiren/claude-code-skills-zh/perf-profiler.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 960 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00078 $0.00960
Opus 5 $0.00039 $0.00480
Sonnet 5 $0.00016 $0.00192
Haiku 4.5 $0.00008 $0.00096

Measured 12d ago against content hash d21507472702, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

perf-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 12d ago.

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.

skills/perf-profiler/SKILL.md · 90 lines

What it actually says

性能分析助手

工作流程

1. 明确目标与边界

先确认或从项目中核实:

  • 目标指标,如延迟、吞吐量、CPU、内存、查询次数或包体积。
  • 可复现的场景、数据规模、运行环境、版本和关键配置。
  • 用户允许分析和修改的范围,以及是否可以运行负载或 profiler。

没有明确目标时,先用现有监控、benchmark 或用户现象缩小范围,不把“代码看起来慢”当成瓶颈结论。

2. 建立基线

优先复用项目已有的启动、benchmark、trace 和 profiling 配置。在相同环境、数据和负载下记录:

  • 预热方式、并发度、重复次数和统计口径。
  • 代码版本、依赖版本及影响结果的配置。
  • 原始测量值和波动范围;条件允许时保留机器可读结果。

无法运行项目时,只能进行静态分析,并把发现标为“待验证候选”。

3. 收集证据

按技术栈选择 profiler、trace、火焰图、查询计划、网络时序或内存快照,定位时间或资源实际消耗的位置。常见维度包括:

  • 代码:算法复杂度、重复计算、分配热点、同步阻塞和并发争用。
  • 数据库:N+1 查询、扫描量、索引使用、锁等待和连接池状态。
  • 网络:请求瀑布、有效载荷、压缩、缓存命中和外部服务延迟。

复杂度分析和代码审查只能证明风险,不能单独证明运行时影响。

4. 提出最小改动

  • 将建议绑定到具体证据、文件或调用链。
  • 说明正确性、内存、吞吐量、维护成本和兼容性方面的权衡。
  • 优先处理证据最强、影响最大的热点;不同时改动多个无法独立归因的因素。
  • 为代码、配置和数据结构变更准备验证与回滚方式。

5. 同条件复测

修改后使用与基线一致的环境、数据、负载、预热和统计口径复测,并运行受影响功能的正确性测试。报告原始结果、波动、差异和尚未控制的变量。

只有真实完成同条件测量后,才能写耗时、百分比或“已改善”等确定性结论。

证据等级

  • 已测量:有可复现基线、profiling 证据和实际结果。
  • 静态推断:由复杂度、调用关系或配置推导出的候选问题,尚未实测。
  • 待验证:缺少环境、数据或权限,当前无法判断影响。

安全与授权边界

  • 默认只在本地或用户明确指定的测试环境进行只读分析。
  • 生产环境 profiling、压测、EXPLAIN ANALYZE 及索引、缓存、连接池、CDN 或外部服务配置变更必须获得明确授权。
  • 不在报告中暴露生产数据、凭据或含敏感信息的 profiling 产物。
  • 不为得到漂亮数字而删除正确性检查、降低数据规模或改变统计口径。
  • Windows 与 Linux 优先使用项目已有工具;平台特定命令需说明适用范围或提供等价方法。

输出

## 性能分析结果

- 目标指标与场景:
- 环境、版本与数据规模:
- 基线与测量方法:

## 发现

| 证据等级 | 位置 | 证据 | 影响与限制 |
|----------|------|------|------------|

## 改动与权衡

## 同条件复测

- 正确性验证:
- 性能结果:
- 未控制变量与待验证项:
- 回滚方式:
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. 12d ago First seen · 90 lines · 78 tokens per session scan A d21507472702

Subscribe to this mod's changes

perf-profiler is a skill published in the GitHub repository laolaoshiren/claude-code-skills-zh (836 stars, last pushed 2d ago), licensed MIT. It adds 78 tokens to every session and 960 once invoked, about $0.0004 per session on Opus 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-30.

Related

Other skills, from other repositories

postmortem-solo

Run a lightweight, blame-free postmortem after an incident, failed launch, or missed deadline — for one person. Use when the user says "that didn't go well", "the launch flopped", "we had an outage", "I missed my deadline", or wants to learn from a recent failure.

rockscy/solo-skills · 68 tokens

bug-from-user

Convert a vague user complaint into a reproducible bug report a solo dev can act on. Use when the user pastes a confusing customer message, says "user says it's broken but I can't repro", "this email makes no sense", or wants to triage a bug report.

rockscy/solo-skills · 60 tokens

tool-calling-tutor

Use when a tool-calling agent does not call a tool, sends wrong arguments, loops without stopping, or needs a function schema. Guides a four-branch diagnosis and five-step schema repair. Do not use for framework-specific, MCP-server, or production-observability questions.

WenyuChiou/awesome-agentic-ai-zh · 62 tokens

investigate

Systematically investigate bugs, test failures, build errors, performance issues, or unexpected behavior by cycling through characterize-isolate-hypothesize-test steps. Use when the user asks to "investigate this bug", "debug this", "figure out why this fails", "find the root cause", "why is this broken"…

tobihagemann/turbo · 107 tokens

audit

Project-wide health audit pipeline that fans out to all analysis skills in parallel, evaluates findings, and produces a unified report at .turbo/audit.md. Use when the user asks to "audit the project", "run a full audit", "project health check", "audit my code", "codebase audit", or "comprehensive review".

tobihagemann/turbo · 71 tokens

consult-oracle

Consult ChatGPT Pro via ChatGPT browser automation for problems that resist standard approaches. Use when stuck on a very hard problem, when standard approaches have failed, when multiple debugging attempts haven't worked, or when the user says "ask the oracle", "consult oracle", "consult chatgpt", "I'm completely…

tobihagemann/turbo · 78 tokens