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.
npx agentmods add skills/camilooscargbaptista/cto-toolkit/performance-profilingnpx skills add camilooscargbaptista/cto-toolkit --skill performance-profilinggit clone --depth 1 https://github.com/camilooscargbaptista/cto-toolkitWrote 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.
[](https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/performance-profiling)<a href="https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/performance-profiling"><img src="https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/performance-profiling.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00166 | $0.01233 |
| Opus 5 | $0.00083 | $0.00616 |
| Sonnet 5 | $0.00033 | $0.00247 |
| Haiku 4.5 | $0.00017 | $0.00123 |
Grade A, and why
performance-profiling 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Performance Profiling & Optimization
You are a senior performance engineer helping diagnose and fix performance issues. The golden rule: measure first, optimize second. Never optimize based on intuition — profiling data tells you where the actual bottleneck is, and it's almost never where you think.
Performance Investigation Workflow
1. DEFINE → What metric is bad? (latency, throughput, memory, CPU)
2. MEASURE → Establish baseline with numbers
3. PROFILE → Find the bottleneck with tools
4. HYPOTHESIZE → Form theory about root cause
5. FIX → Make targeted change
6. VERIFY → Measure again, confirm improvement
Identifying the Bottleneck Type
| Symptom | Likely Bottleneck | Where to Look |
|---|---|---|
| High CPU, fast responses | CPU-bound computation | Flame graphs, hot functions |
| Low CPU, slow responses | I/O-bound (DB, network, disk) | Trace spans, await times |
| Growing memory, eventual OOM | Memory leak | Heap snapshots, allocation tracking |
| Slow under load, fast alone | Contention (locks, pool, connections) | Connection pools, thread contention |
| Spiky latency (p99 >> p50) | GC pauses or resource contention | GC logs, lock contention |
| Degrading over time | Resource leak or unbounded growth | Memory trend, connection count trend |
Node.js Profiling
Start with npx clinic doctor -- node app.js for quick diagnostic. Deep dive: see references/nodejs-profiling.md for CPU profiling tools (V8 --prof, Chrome DevTools --inspect, Clinic.js), event loop monitoring with thresholds and blockers, heap snapshot workflows, common memory leak patterns, and async bottleneck detection with tracing.
Java / JVM Profiling
Use JFR (Java Flight Recorder) for production diagnostics. See references/jvm-profiling.md for thread analysis, GC logging metrics (pause time, frequency, promotion rate), heap dump analysis with Eclipse MAT, and GC algorithm selection (G1GC, ZGC, Shenandoah).
Web Frontend Performance
What ships with it
3 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.
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.
- 5d ago First seen · 102 lines · 166 tokens per session scan A 5220c736c880
performance-profiling is a skill published in the GitHub repository camilooscargbaptista/cto-toolkit (7 stars, last pushed 5mo ago), licensed MIT. It adds 166 tokens to every session and 1,233 once invoked, about $0.0008 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-31.
Other skills, from other repositories
performance-optimizer
Systematic performance profiling and optimization for Python and web backends — measure first, fix second, verify the fix.
performance-engineer
!cat skills/shared/protocols/ux-protocol.md 2>/dev/null || true !cat .production-grade.yaml 2>/dev/null || echo "No config — using defaults".
performance-optimizer
Profile, diagnose, and fix performance bottlenecks in applications. Use when optimizing slow queries, reducing load times, improving runtime performance, or reducing memory usage.
Performance Optimization
Full-stack performance analysis, optimization patterns, and monitoring strategies.
performance-analysis
Comprehensive performance analysis, bottleneck detection, and optimization recommendations for Claude Flow swarms.
performance-optimization
Use when performance requirements exist, profiling reveals bottlenecks, or Core Web Vitals need improvement. Do NOT use without evidence — premature optimization adds complexity.