Agent skill

Performance Profiling

by softspark in softspark/ai-toolkit

Performance: golden signals, p50/p95/p99, flame graphs, load testing.

Apache-2.0Auto-check passedDevelopment

Install Performance Profiling

skills CLI
$ npx skills add softspark/ai-toolkit --skill performance-profiling -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install softspark/ai-toolkit performance-profiling --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/app/skills/performance-profiling .claude/skills/performance-profiling && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
performance-profiling
GitHub stars
179
Token cost
~1.1k tokens
SKILL.md length
474 words
Files
1
Skills in repo
112
Repo updated
First seen
Licence
Apache-2.0

At a glance

Performance: golden signals, p50/p95/p99, flame graphs, load testing.

  • Works in 4 steps: Latency: Time it takes to serve a… → Traffic: Demand on your system (req/sec). → Errors: Rate of requests that fail. → …
  • Tasks that involve Performance optimization
  • SKILL.md covers Optimization Golden Rule, Critical Metrics (The 4 Golden…, Profiling Tools & Techniques and Optimization Hierarchy, plus 5 more sections
  • Calls node

What it does

Performance Profiling is an agent skill from softspark/ai-toolkit. Performance: golden signals, p50/p95/p99, flame graphs, load testing. Triggers: performance, slow, latency, p99, flame graph, bottleneck, memory leak.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Performance optimization. The repository describes itself as: Professional-grade AI coding toolkit: 94 skills, 44 agents, multi-platform (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Antigravity, Codex CLI… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Performance optimization

Example prompts

  • “/performance-profiling”

Requirements

  • Python 3
  • Node.js
  • Pre-approved tools (allowed-tools): Read, Grep

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  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).

What it can do on your machine

Read from SKILL.md and the folder at commit d64db2b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Performance Profiling loads about 1.1k tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 474 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from softspark/ai-toolkit at commit d64db2b, republished under its Apache-2.0 licence (© softspark). 474 words, ~1,135 tokens.

Download SKILL.mdSave it as .claude/skills/performance-profiling/SKILL.md (or your agent's skills folder).
name
performance-profiling
description
Performance: golden signals, p50/p95/p99, flame graphs, load testing. Triggers: performance, slow, latency, p99, flame graph, bottleneck, memory leak.
allowed-tools
Read, Grep
effort
medium
user-invocable
false

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
    bash
    # Record flamegraph
    py-spy record -o profile.svg --pid <pid>
  • Function Profiling: cProfile
    python
    import cProfile
    cProfile.run('main()')
Node.js
  • Flamegraphs: 0x or built-in profiler.
    bash
    node --prof app.js
    node --prof-process isolate-0xnnnnn.log > processed.txt
  • Event Loop: clinic doctor
Database (SQL)
  • Explain Plan: Analyze query cost.
    sql
    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

ExcuseWhy 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

Example

bash
# Capture a 30-second CPU flamegraph from a running Python service
py-spy record -o profile.svg --duration 30 --pid "$(pgrep -f my-service)"

# Identify top 3 hot functions
py-spy top --pid "$(pgrep -f my-service)"

Then, per the optimization hierarchy, start with DB/IO fixes (indexing, batching, caching the right layer) before touching algorithm-level changes.

Rules

  • MUST capture a baseline measurement before proposing any change
  • NEVER optimize code without profiler data pointing at it as the bottleneck
  • CRITICAL: report p95/p99, not just p50 — averages hide real user pain
  • MANDATORY: follow the hierarchy — DB/IO before algorithm before micro-optimization
Show full SKILL.md (186 more words)Show less

Gotchas

  • py-spy needs CAP_SYS_PTRACE on Linux and SIP-disabled codesigning on macOS to attach to another process. Containerized services usually run without ptrace privileges — profiling requires a --cap-add=SYS_PTRACE on the container or an in-process alternative (cProfile, yappi).
  • Production hosts frequently set /proc/sys/kernel/perf_event_paranoid=2 or higher, which disables user-space perf events. Tools that rely on perf (perf, bcc, bpftrace) silently produce empty output — check cat /proc/sys/kernel/perf_event_paranoid first.
  • Node.js --prof output gets interleaved across worker threads and child processes. A single isolate-*.log mixes samples from multiple isolates unless each worker writes its own — filter by PID or use clinic flame which handles the split.
  • Chrome DevTools samples at ~1kHz; operations faster than ~1ms vanish. For microbenchmarks, prefer performance.now() with manual markers, not the Performance tab.
  • EXPLAIN ANALYZE on Postgres executes the query, including INSERT/UPDATE/DELETE — wrap write queries in a transaction that you roll back, or use EXPLAIN (ANALYZE, BUFFERS) ... ; ROLLBACK; in one statement.

When NOT to Use

  • For correctness bugs (wrong output) — use /debug
  • For frontend render bugs without timing data — measure with DevTools first
  • For infrastructure capacity planning — use load testing, not profiling
  • For generic code quality — use /analyze

© softspark, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in app/skills/performance-profiling of softspark/ai-toolkit.

Open the folder on GitHubat commit d64db2b

Compare with similar skills

Performance Profiling next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Performance Profiling compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Performance Profiling this skillsoftspark/ai-toolkit179—~1.1kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
LLM Torch Profiler Analysissgl-project/sglang37k2 repos~6.4kAutomated safety check: PassApache-2.0
Pycrazyguitar/pysheeet8.2k—~886Automated safety check: PassMIT
Cmux Debugging Guidemanaflow-ai/cmux28k1 repos~1.1kAutomated safety check: PassCustom licence
Electron Heap Snapshot Analysiskeybase/client9.3k—~875Automated safety check: PassBSD-3-Clause

Similar skills

  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • LLM Torch Profiler Analysis

    sgl-project/sglang

    Unified LLM torch-profiler triage skill for sglang, vllm, TensorRT-LLM, and TokenSpeed.

    37k GitHub starsUsed in 2 repos~6.4k tokens
    DevelopmentAuto-check passed
  • Py

    crazyguitar/pysheeet

    Comprehensive Python programming reference covering syntax, concurrency, networking, databases, ML/LLM development, and HPC.

    8.2k GitHub stars~886 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Cmux Debugging Guide

    manaflow-ai/cmux

    Covers debug logging, the Debug menu, profiling rules and runtime pitfalls for working on the cmux macOS terminal app.

    28k GitHub starsUsed in 1 repo~1.1k tokens
    DevelopmentAuto-check passed
  • Analyzes V8, Chrome and Electron .heapsnapshot files with Node scripts to find memory leaks, detached DOM nodes and the retainer paths that keep objects alive.

    9.3k GitHub stars~875 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Runs controlled JMH experiments on the Caffeine cache to find shared contention and hot-path waste, then reviews correctness and returns a reviewable patch.

    18k GitHub stars~2.6k tokensUpdated 2 days ago
    DevelopmentAuto-check: notes

More from softspark/ai-toolkit

All 112 skills in this repo
  • Prepare Test Env

    softspark/ai-toolkit

    Prepare or verify a project QA environment with source identity, readiness, browser access, evidence paths and owned cleanup.

    179 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check: notes
  • A11y Validate

    softspark/ai-toolkit

    Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. An agent skill from softspark/ai-toolkit.

    179 GitHub stars~3.8k tokensUpdated yesterday
    Auto-check: notes
  • Analyze

    softspark/ai-toolkit

    Analyzes code quality, complexity, patterns across codebase.

    179 GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Autonomous Dev

    softspark/ai-toolkit

    Drives a brief, specification, issue or existing PR through implementation, review, tests and QA to a ready PR.

    179 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check: notes
  • Brand Voice

    softspark/ai-toolkit

    Direct technical voice for docs, README, user-facing text. An agent skill from softspark/ai-toolkit.

    179 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • CI

    softspark/ai-toolkit

    Detect/generate/debug CI pipeline config (GitHub Actions, GitLab CI).

    179 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check: notes

Categories

Questions about Performance Profiling

What does Performance Profiling do?

Performance: golden signals, p50/p95/p99, flame graphs, load testing. Performance Profiling is an agent skill from softspark/ai-toolkit. Performance: golden signals, p50/p95/p99, flame graphs, load testing.

When should I use Performance Profiling?

Performance Profiling fits situations like: tasks that involve Performance optimization.

How do I install Performance Profiling in Claude Code?

Run `npx skills add softspark/ai-toolkit --skill performance-profiling -a claude-code`. Or copy the skill folder (app/skills/performance-profiling in softspark/ai-toolkit) into .claude/skills/performance-profiling in your project. Claude Code loads it when a task matches its description.

How do I install Performance Profiling in Codex?

Run `npx skills add softspark/ai-toolkit --skill performance-profiling -a codex`. Or copy the skill folder (app/skills/performance-profiling in softspark/ai-toolkit) into .agents/skills/performance-profiling in your project. Codex loads it when a task matches its description.

Can I use Performance Profiling in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add softspark/ai-toolkit --skill performance-profiling -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/performance-profiling, .gemini/skills/performance-profiling, .github/skills/performance-profiling and .opencode/skills/performance-profiling in your project.

What does Performance Profiling need to run?

Going by SKILL.md and its folder, Performance Profiling needs the command-line tools its instructions call (node). Our summary lists: Python 3; Node.js. Its frontmatter pre-approves these tools: Read, Grep.

Does Performance Profiling access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Performance Profiling safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Performance Profiling use?

Performance Profiling is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Performance Profiling use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Performance Profiling?

Skills that share tags, products or a category with Performance Profiling: Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), LLM Torch Profiler Analysis (sgl-project/sglang, 37k stars), Py (crazyguitar/pysheeet, 8.2k stars) and Cmux Debugging Guide (manaflow-ai/cmux, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Performance Profiling?

softspark (a GitHub user) maintains it in softspark/ai-toolkit, which has 179 GitHub stars. The repository holds 112 skills in this directory. The repository was last updated on October 7, 2026.

Source: softspark/ai-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.