performance-profiling

performance-profiling is a skill for Claude Code from softspark/ai-toolkit. It costs 44 tokens per session (1,178 once invoked), scanned A, original, Apache-2.0.

A performance measurement and optimization guide for software systems. It covers latency percentiles, traffic, errors, resource saturation, flame graphs, database query plans, and browser performance metrics.

In plain words
What is it for?
Use it to investigate latency, bottlenecks, memory leaks, slow database queries, CPU usage, event-loop problems, and web performance.
Why use it?
It helps locate slow or overloaded parts of an application using measurements instead of guesses.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the ai-toolkit plugin — 115 skills, 44 agents, 14 hooks shipped together

Good fit Use it to investigate latency, bottlenecks, memory leaks, slow database queries, CPU usage, event-loop problems, and web performance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/softspark/ai-toolkit/performance-profiling
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 softspark/ai-toolkit --skill performance-profiling
Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 115 skills, 44 agents, 14 hooks.

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-profiling

README.md
[![agentmods](https://agentmods.dev/badge/skills/softspark/ai-toolkit/performance-profiling/github.svg)](https://agentmods.dev/skills/softspark/ai-toolkit/performance-profiling)
Your own site
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/performance-profiling"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/performance-profiling/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-profiling

Your own site · 80×15
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/performance-profiling"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/performance-profiling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,178 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 92
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
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.00044 $0.01178
Opus 5.5 $0.00018 $0.00471
Sonnet 5.5 $0.00009 $0.00236
Haiku 4.5 $0.00004 $0.00118

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

Security

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 2mo 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.

app/skills/performance-profiling/SKILL.md · 104 lines

How it starts

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

Performance Profiling Skill

Optimization Golden Rule

"Don't optimize without a baseline." Always measure -> change -> measure.

Critical Metrics (The 4 Golden Signals)

  1. Latency: Time it takes to serve a request. (p50, p95, p99)
  2. Traffic: Demand on your system (req/sec).
  3. Errors: Rate of requests that fail.
  4. Saturation: How "full" your service is (CPU/Memory usage).

Profiling Tools & Techniques

Python

  • CPU Sampling: py-spy
    # Record flamegraph
    py-spy record -o profile.svg --pid <pid>
    
  • Function Profiling: cProfile
    import cProfile
    cProfile.run('main()')
    

Node.js

  • Flamegraphs: 0x or built-in profiler.
    node --prof app.js
    node --prof-process isolate-0xnnnnn.log > processed.txt
    
  • Event Loop: clinic doctor

Database (SQL)

  • Explain Plan: Analyze query cost.
    EXPLAIN (ANALYZE, BUFFERS) SELECT * FROM users WHERE active = 1;
    
  • N+1 Problem: Look for loop-generated queries.

Frontend (Browser)

  • Lighthouse: Core Web Vitals (LCP, CLS, INP).
  • Chrome Performance Tab: Main thread blocking time.
  • Network Waterfall: Time to First Byte (TTFB).

Optimization Hierarchy

  1. Database/IO: (Indexing, Caching, Batching) - Biggest Gains
  2. Algorithm: (O(n²) -> O(n log n))
  3. Memory: (Allocation churn, GC pressure)
  4. Micro-optimization: (Loop unrolling, etc.) - Smallest Gains

Common Rationalizations

Excuse Why It's Wrong
"It feels slow, let me optimize this function" Feelings aren't data — profile first, then optimize the actual bottleneck
"We should optimize everything" Premature optimization is the root of all evil — focus on the critical path
"Caching will fix it" Caching masks problems and adds complexity — fix the root cause first
"It's fast enough in dev" Dev has 1 user — production has thousands and cold caches
"We'll optimize later" Performance debt compounds — a 100ms regression per sprint = 5s in a year

Read the full file on GitHub · 104 lines

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 First seen · 104 lines · 44 tokens per session scan A b57a5e642df2

Subscribe to this mod's changes

performance-profiling is a skill published in the GitHub repository softspark/ai-toolkit (180 stars, last pushed 13d ago), licensed Apache-2.0. It adds 44 tokens to every session and 1,178 once invoked, about $0.0002 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-09-03.

Related

performance-profiling compared with skills from other repositories

performance-profiling next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
performance-profilingsoftspark/ai-toolkitSkill18013d agoApache-2.0A44Claude Code
cline-fix-volatile-msgOnlyTerp/prompt-cache-skillsSkill1183mo agononeA50Claude Code, Codex
continue-fix-volatile-msgOnlyTerp/prompt-cache-skillsSkill1183mo agononeA33Claude Code, Codex
opencode-detect-openai-compatOnlyTerp/prompt-cache-skillsSkill1183mo agononeA32Claude Code, Codex
cline-pin-timestampOnlyTerp/prompt-cache-skillsSkill1183mo agononeA29Claude Code, Codex
bugsweepellmos-ai/skillsSkill10todayMITA41Claude Code, Codex
mermaid-lintellmos-ai/skillsSkill10todayMITA116Claude Code, Codex