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/cookys/autopilot/profilingnpx skills add cookys/autopilot --skill profilinggit clone --depth 1 https://github.com/cookys/autopilotWhat 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.00091 | $0.01150 |
| Opus 5 | $0.00046 | $0.00575 |
| Sonnet 5 | $0.00018 | $0.00230 |
| Haiku 4.5 | $0.00009 | $0.00115 |
Grade B, and why
profiling scanned grade B with 1 finding 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 2d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
!`cat .claude/profiling-config.md 2>/dev/null || echo "_No config — using generic tool selection below._"` How it starts
The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Evidence-First Profiling
Coexistence with Superpowers
This skill is the only methodology entry point for performance investigation in the autopilot + superpowers ecosystem. superpowers does not ship a dedicated profiling skill — CHANGELOG v2.0 acknowledged this explicitly. Whether or not you have superpowers installed, this is the primary skill for performance work.
Use this skill for: performance-only investigation (slow queries, high memory, CPU spikes, latency). For correctness debugging (crashes, logic errors), use autopilot:debug (or superpowers:systematic-debugging if installed).
Project Config (auto-injected)
!cat .claude/profiling-config.md 2>/dev/null || echo "_No config — using generic tool selection below._"
The Rule
Mandatory order — do not skip steps:
1. Collect evidence with tools (profiler, tracer, slow query log)
2. Analyze logs — correlate with tool results to locate the problem
3. Read source code — only after 1+2 provide evidence pointing to specific code
Prohibited: reading code to guess causes, modifying code based on "intuition", concluding without data.
Metric-honesty rule: an LLM reading static source cannot measure a real-world number (LCP, latency, throughput, memory) — it can only reason about likely causes. Label every such finding "potential impact", never as a measurement. A figure that didn't come from a tool run is a hypothesis, not a result; presenting it as measured is fabrication. Field data and lab/synthetic data are not interchangeable — don't quote one as the other. (This is the "verify by artifacts, never self-report" axiom applied to the one place an LLM is most tempted to invent a number.)
Tool Selection Guide
Pick the right tool for the symptom:
| Symptom | First Tool | Why |
|---|---|---|
| CPU 100% or high load | CPU profiler (gperftools, py-spy, node --prof) | Shows which functions consume CPU time |
| Memory growing over time | Heap profiler (gperftools, tracemalloc, heapdump) | Tracks allocation sites and sizes |
| Slow requests / high latency | Slow query log or APM | Most latency comes from DB or external I/O |
| Crash (SIGSEGV, SIGABRT) | Debugger (GDB, lldb) | Get backtrace immediately |
| Unknown I/O bottleneck | strace / dtrace | Shows system call timing and blocking points |
| Need flame graph | perf / async-profiler | Hardware counters + call stacks |
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.
- 2d ago First seen · 101 lines · 91 tokens per session scan B aa28f8017a80
profiling is a skill published in the GitHub repository cookys/autopilot (11 stars, last pushed 2d ago), licensed MIT. It adds 91 tokens to every session and 1,150 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
babysit-pr
Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…