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 skills add softspark/ai-toolkit --skill performance-profilinggit clone --depth 1 https://github.com/softspark/ai-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/softspark/ai-toolkit/performance-profiling)<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.
<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>- NVIDIA SkillSpector warn
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.
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.1 | $0.00044 | $0.01178 |
| Opus 5 | $0.00022 | $0.00589 |
| Sonnet 5 | $0.00009 | $0.00236 |
| Haiku 4.5 | $0.00004 | $0.00118 |
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 6d 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 — 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)
- Latency: Time it takes to serve a request. (p50, p95, p99)
- Traffic: Demand on your system (req/sec).
- Errors: Rate of requests that fail.
- 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:
cProfileimport cProfile cProfile.run('main()')
Node.js
- Flamegraphs:
0xor 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
- Database/IO: (Indexing, Caching, Batching) - Biggest Gains
- Algorithm: (O(n²) -> O(n log n))
- Memory: (Allocation churn, GC pressure)
- 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 |
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.
- 6d ago First seen · 104 lines · 44 tokens per session scan A b57a5e642df2
performance-profiling is a skill published in the GitHub repository softspark/ai-toolkit (170 stars, last pushed 2d 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. 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.
Other skills, from other repositories
cline-fix-volatile-msg
Ladder-aware Cline Anthropic caching — verify the rolling read/write ladder on the wire, then add the tools breakpoint and tune TTL. Updated for the 2026-08 AI-SDK monorepo.
cline-pin-timestamp
Cline's system prompt includes a timestamp that may be recomputed per request, invalidating the system-prompt cache.
continue-fix-volatile-msg
Ladder-aware Continue Anthropic caching — verify the rolling ladder on the wire, then enable it by default and add TTL coverage.
opencode-detect-openai-compat
OpenCode's caching detection misses OpenAI-compatible proxies routing to Anthropic/Bedrock. Broaden the predicate.
log-analyzer
Senior-SRE log analysis specialist. Use when investigating incidents from logs, triaging error spikes, extracting timelines, correlating distributed traces, or separating signal from noise across plain-text, JSON (slog/zap), syslog, journald, container, and Kubernetes logs. ALWAYS use when the user asks to "analyze…
incident-postmortem
Incident post-mortem specialist for writing blameless post-mortems, extracting timelines from logs/events, conducting root cause analysis (5-Why, fishbone), classifying severity, and generating tracked action items. ALWAYS use when writing a post-mortem, reviewing an incident, extracting a timeline, performing root…