Guides profiling apps across .NET, Node.js, Python, Java/Kotlin, and Go to identify real hot paths before optimizing. Covers tool selection, capture under load, and flame graph interpretation.
Ships in AI for Developers Toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Find where time and allocations actually go before optimizing anything - pick the right tool for the stack, capture a useful profile under realistic load, and interpret it. Stops premature optimization of cold code.
Works on a target (a project, repo, or GitHub URL) for context, plus the symptom: slow endpoint, high CPU, latency spikes, throughput ceiling, memory growth. If the user already has a profile (flame graph SVG/HTML, .nettrace, .cpuprofile, .jfr, pprof file, py-spy/speedscope output), go straight to interpretation.
| Manifest | Stack | Start with | CPU / wall profile | Memory / heap |
|---|---|---|---|---|
*.csproj | .NET | dotnet-counters | dotnet-trace, PerfView, VS/Rider profiler | dotnet-gcdump, dotnet-dump |
package.json | Node.js | clinic.js doctor | node --cpu-prof, --inspect + DevTools, clinic flame, 0x | heap snapshots, --heap-prof, clinic heapprofiler |
pyproject.toml, requirements*.txt | Python | py-spy top | py-spy record, cProfile, pyinstrument | scalene, memray, tracemalloc |
pom.xml, build.gradle(.kts) | JVM | JFR | async-profiler, JFR + JDK Mission Control | JFR allocation events, heap dump + Eclipse MAT |
go.mod | Go | pprof /debug/pprof | pprof CPU profile, go tool trace | pprof heap/allocs |
Also establish where it runs (local, container, k8s, prod) - it decides whether you attach to a live process, run a sidecar, or reproduce locally.
dotnet-counters - live, low-overhead metrics (CPU, GC, thread pool queue length, exceptions, requests). Start here to see what kind of problem it is.dotnet-trace - sampling/event trace of CPU time; cross-platform; open in Speedscope, PerfView, or Visual Studio.dotnet-gcdump / dotnet-dump - heap snapshots for leaks/retention; dotnet-dump analyze for thread pool starvation and deadlocks.dotnet-counters monitor -p <pid>
dotnet-trace collect -p <pid> --duration 00:00:30 --format Speedscope # open in speedscope.app
dotnet-gcdump collect -p <pid> # heap snapshot
A growing thread pool queue with low CPU = sync-over-async or blocking I/O (see async-await-auditor).
node --cpu-prof app.js # writes a .cpuprofile on exit; open in DevTools or speedscope
node --inspect app.js # attach Chrome DevTools -> Performance / Memory tabs
npx clinic doctor -- node app.js # classifies: event-loop blocking, I/O, GC
npx clinic flame -- node app.js # flame graph
npx autocannon -c 50 -d 30 http://localhost:3000/orders # load while profiling
*Sync calls, regex backtracking, crypto). Fix by moving off the loop or chunking.--enable-source-maps / source maps so TypeScript frames are readable.py-spy top --pid <pid> # live view, no code changes
py-spy record -o profile.svg --pid <pid> --duration 30 # flame graph; --idle to include waiting threads
python -m cProfile -o out.prof app.py && snakeviz out.prof
scalene app.py # per-line CPU (Python vs native) and memory
jcmd <pid> JFR.start duration=60s filename=rec.jfr # open in JDK Mission Control
asprof -d 30 -e cpu -f flame.html <pid> # async-profiler CPU flame graph
asprof -d 30 -e wall -f wall.html <pid> # wall-clock: waiting threads included
asprof -d 30 -e alloc -f alloc.html <pid> # allocation flame graph
(Older async-profiler releases ship the launcher as profiler.sh instead of asprof.)
import _ "net/http/pprof" // exposes /debug/pprof on the default mux (serve it on an internal port)
go tool pprof -http=:8080 http://localhost:6060/debug/pprof/profile?seconds=30 # CPU
go tool pprof -http=:8080 http://localhost:6060/debug/pprof/heap # heap (inuse/alloc)
go test -bench . -cpuprofile cpu.out -memprofile mem.out ./pkg && go tool pprof -http=:8080 cpu.out
curl -o trace.out "http://localhost:6060/debug/pprof/trace?seconds=5" && go tool trace trace.out
runtime.SetBlockProfileRate, runtime.SetMutexProfileFraction) for "slow but CPU is low".go tool trace shows scheduler latency, GC, and goroutine blocking over time.perf record -g -p <pid> plus Brendan Gregg's FlameGraph scripts, or cargo flamegraph for Rust. JIT runtimes need perf map support (e.g. DOTNET_PerfMapEnabled=1, node --perf-basic-prof) for readable frames.
gc-pressure-auditor).## Detected
<stack, runtime, environment, symptom class>
## Capture plan
<exact commands: live metrics, profile type, load to drive, duration>
## Interpretation (when a profile is provided)
1. <frame/function> - <share of time/allocations> - <why it's hot> -> <next step>
## Next
<hand-off: benchmark-setup to lock in a micro-benchmark, memory-allocation-analyzer, gc-pressure-auditor, orm-query-optimizer, async-await-auditor>
"What's slow in my app", "where's the bottleneck in this endpoint", "how do I capture a CPU trace", "profile my Node service under load", "py-spy or cProfile?", "set up async-profiler in our pods", "read this flame graph / pprof / trace". Feeds into benchmark-setup, memory-allocation-analyzer, gc-pressure-auditor.
What SKILL.md sets; muted values are Claude Code's defaults
/ai-dev-toolkit:hotpath-profiler-assistantfrom AI for Developers Toolkit
npx claudepluginhub stefanthecode/ai-for-developers --plugin ai-dev-toolkit45 skills in this plugin
/api-endpoint-scaffolderScaffold HTTP API endpoints in any stack - ASP.NET Core Minimal APIs or controllers, Express, Fastify, NestJS, FastAPI, Django REST Framework, Spring Boot controllers, Go net/http, chi, Gin - one feature per endpoint (REPR style) with request validation, typed responses, route grouping, auth, and OpenAPI metadata. Use this skill whenever the user wants to add an endpoint or route, convert controllers to minimal APIs, structure routes or routers, set up endpoint groups, TypedResults, route handlers, request DTOs/schemas (zod, Pydantic, Bean Validation, binding tags), or asks "how do I add an endpoint / structure my API routes". Always use this skill for endpoint scaffolding; it generates a complete, validated endpoint that matches the project's conventions./architecture-test-generatorGenerate architecture tests / fitness functions that fail the build when architectural rules are violated - layer dependencies, module boundaries, cycles, naming, and visibility conventions - in any stack: NetArchTest or ArchUnitNET (.NET), ArchUnit or Konsist (Java/Kotlin), dependency-cruiser or eslint-plugin-boundaries (TypeScript/JavaScript), import-linter (Python), go-arch-lint or depguard (Go). Use this skill whenever the user wants architecture tests, to enforce layering or the dependency rule, dependency rules as tests, import rules, forbidden imports, no circular dependencies, naming conventions, fitness functions, or asks "how do I stop people breaking the architecture / enforce my layers / keep modules from importing each other". Always use this skill for architecture-test requests; it generates rules matching the project's real structure.Other plugins' skills for the same job