/inferencekit:inference-triagefrom inferencekit
Routes inference performance questions to the cheapest useful evidence: latency, throughput, memory, hardware cost, or quality. Use when unsure where to start.
Ships in inferencekit. 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.
Entry point. Turn a vague request into one measurable question, collect the cheapest evidence that answers it, then hand off to exactly one skill. The rules here apply to every other skill in this plugin.
| The request | Skill |
|---|---|
| Current techniques, implementation research, a stalled optimization | researching-optimizations |
| "Make this model fast", "which engine should I use", "fastest config for my model on my GPU", a target (tok/s, TTFT, users per GPU, $/1M tokens) | optimizing-inference: the end-to-end flow |
A speed number: tok/s, TTFT, per-token latency, capacity N*, engine vs engine, before vs after, % of ceiling | benchmarking |
| Where the time goes; why one kernel is slow | profiling |
| Make an engine or kernel faster (custom engine, engine patch, decode or prefill) | optimizing-kernels |
| Is it still the same model; did quality regress | proving-correctness |
| Fit consumer memory while meeting latency and quality | optimizing-inference, affordability |
| Should I quantize; is FP8 / 4-bit / a GGUF quant faster at acceptable quality; which quant; will it fit my GPU; a big model on a small GPU | evaluating-quantization |
| Write up, review or audit a claim | reporting-perf-claims |
| Not sure | stay here: run the workflow below |
Use when the right skill or the question is unclear ("why is it slow", "is X tok/s good", "did my change help"), or a number is about to be quoted unchecked against a ceiling. Not when the request clearly matches a row above (go there), or to rank different models by quality (model evaluation, not equivalence).
GPU work (benchmarks, captures, ceiling bw, --gpu-bw measure, quality runs, renting) runs only with budget.approved: true in intake.yaml or an explicit yes after you stated the cost (GPU, $/h x hours, cap): it occupies shared hardware and spends money. Analysing existing evidence, roofline arithmetic with a numeric bandwidth, and reporting need no approval.
Explicit session authorization persists. An approved finite-deadline run may specify budget.spend_cap: none, stage_timeboxes: false and report_reserve_h: 0; these run-scoped overrides replace the respective defaults without repeated approval questions.
inferencekit doctor reports it (data.profiling_counters.status). If blocked: nsys only with ncu NOT RUN, then the PyTorch profiler (no counters needed) and the person's own profiles (profiling, "Fallbacks").inferencekit doctor, and the price in the intake's hardware.price_usd_h).env -i).runs/ back, destroy the instance after use (not just stop it), and confirm none is left running.NVIDIA is fully supported, and the only hardware inferencekit has been run on so far. On other hardware, the skills guide the same flow, and the CLI does less: references/hardware.md has the table.
bench rounds, bench serve, gates run and quality (they talk HTTP to any OpenAI-compatible server), roofline with a numeric --gpu-bw, and the intake, manifest, ledger and report tools. Treat a first run there as a test.ceiling bw and nsys/ncu captures. doctor records selected AMD DRM/rocminfo and Apple sysctl/system_profiler facts with a vendor profiling route; unknown details remain unknown. On AMD, rocprof capture and rocprof analyze create trace evidence with rocprofv3; device/version support must be checked. Use current official docs for unfamiliar tools and a vendor or STREAM-style bandwidth test. Captures made outside the CLI are vendor evidence files.inferencekit doctor has run on the target machine this session (not NVIDIA: plus the hardware card from references/hardware.md). Why: driver, clocks, counter permissions and engine versions decide which captures are possible.Stop and report the gate instead of continuing when:
inferencekit doctor shows no usable GPU, a mismatched driver/CUDA pair, or an unknown engine version. On AMD, CPU or Apple hardware, empty GPU facts are expected: continue with references/hardware.md instead.Triage:
- [ ] 1. Restate the request as one question + one pre-registered claim
- [ ] 2. End-to-end "make it fast" request? -> optimizing-inference, done
- [ ] 3. inferencekit doctor -> ev_env
- [ ] 4. inferencekit roofline -> bytes/token and ceiling tok/s (no GPU needed with a numeric --gpu-bw)
- [ ] 5. Existing evidence first: inferencekit evidence list; profiles the person already has
- [ ] 6. % of ceiling = measured tok/s / ceiling tok/s (derived), if a measurement exists
- [ ] 7. Pick ONE skill from the symptom table; say why in one line
- [ ] 8. Hand off with: workload sentence, evidence ids, the claim, what is still NOT RUN
| Step | CLI | MCP tool |
|---|---|---|
| Environment card | inferencekit doctor | doctor |
| Ceiling (arithmetic only) | inferencekit roofline --model Qwen/Qwen3-8B-FP8 --dtype fp8 --gpu-bw <measured GB/s or ev_bw> | roofline |
| Existing evidence | inferencekit evidence list / inferencekit evidence show <id> | list_evidence / inspect_evidence |
| Intake for the end-to-end flow | inferencekit intake template / inferencekit intake validate intake.yaml | intake_template / intake_validate |
| Report | inferencekit report <ids...> --format md | report |
| Analyse a profile the person supplied (no GPU) | inferencekit nsys analyze <file> / inferencekit ncu summarize <file> --peak-gbs <ev or GB/s> | analyze_nsys / summarize_ncu |
MCP clients prefix tool names (Claude Code: mcp__plugin_inferencekit_inferencekit__roofline); the arguments are the CLI's. If MCP fails, use the installed CLI. Install or upgrade online with uv tool install --upgrade inferencekit-cli. In OpenCode, long steps (bench rounds, gates run, quality runs, ceiling bw, captures) go through the CLI, detached with a log: it ends an MCP call after the server's timeout (120 s), and the server sends no progress. Bandwidth: your GPU's measured inferencekit ceiling bw (off NVIDIA, the platform's micro-benchmark: references/hardware.md), or say the ceiling is datasheet-based and therefore unreachable.
| Symptom or question | Cheapest first evidence | Hand off to |
|---|---|---|
| "Make it fast", "which engine", a target to hit | intake | optimizing-inference |
| "How fast could this possibly go?" | roofline with a known bandwidth | benchmarking (ceilings) |
| "What tok/s / TTFT do we get?", engine vs engine | doctor + roofline | benchmarking |
| "How many users per GPU?", p95 latency rises under load, cost per token | the SLO and traffic shape | benchmarking (capacity, N*) |
| Below ~85% of the ceiling (bands), cause unknown | one nsys capture of the steady step | profiling |
"I already have a profile" (.nsys-rep, .sqlite, .ncu-rep) | inferencekit nsys analyze <file> / inferencekit ncu summarize <file> (no GPU, no approval) | profiling |
"I have a PyTorch profiler trace" (*.json.gz from vLLM, SGLang or torch.profiler) | read by hand or with profile-analyst: the CLI does not parse it (no GPU, no approval) | profiling |
| GPU idle between kernels, high kernel count | nsys per-step busy/idle | profiling, then optimizing-kernels |
| One kernel or family dominates the step | nsys critical-path shares | profiling (ncu) |
| "Make this engine/kernel faster" with evidence in hand | ceiling + profile | optimizing-kernels |
| TTFT slow (prefill) | TTFT per bucket, first-seen vs repeated length | benchmarking, then optimizing-kernels (prefill) |
| Outputs changed; before any speedup claim | trajectory score vs the noise floor | proving-correctness |
| "Should I quantize?", "is 4-bit faster?", "which quant?", "will it fit?", near the ceiling and only fewer bytes can help | roofline --method headers per checkpoint (no GPU): bytes/token and fit | evaluating-quantization |
| "Did my change help?" / regression hunt | interleaved A/B (bench rounds; compare for bench decode) | benchmarking, then reporting-perf-claims |
| Writing up a result, PR, blog post | the evidence ids | reporting-perf-claims |
One scheme for every skill in this plugin: % of a measured-bandwidth ceiling, for single-user decode. These are heuristics that pick the next measurement, not verdicts.
The table with the next evidence for each band: references/symptom-map.md.
identity, coverage.complete, coverage.missing and limitations before quoting any metric. Why: a record can be valid and still not cover your claim.AGENTS.md).| Fact | Value | Class | Evidence id | Note |
|---|---|---|---|---|
| Workload and goal | e.g. Qwen3-8B FP8 W / BF16 KV, medium bucket, single-user | observed | ev_... | from identity.workload |
| GPU, driver, clocks | observed | ev_... | doctor | |
| Ceiling tok/s | derived | ev_... | bytes/token and bandwidth source | |
| Measured value | ... or NOT RUN | observed | ev_... | statistic, n |
| % of ceiling | derived | (both ids) | formula shown | |
| Next skill | inferred | — | one-line reason |
bench rounds ratio CIs for served engines, inferencekit compare for bench decode), never from eyeballed medians.references/amd-rocm.md (opens in a new tab)references/apple-silicon.md (opens in a new tab)references/cpu.md (opens in a new tab)references/evidence-rules.md (opens in a new tab)references/hardware.md (opens in a new tab)references/other-accelerators.md (opens in a new tab)references/phones.md (opens in a new tab)references/symptom-map.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
9 skills in this plugin
/benchmarkingMeasure end-to-end inference latency, throughput, memory and cost against tuned baselines with balanced rounds and quality evidence. Use for engine/config comparisons and performance claims. Route text, image, audio and video to their own client timers and protocols; isolate device measurements./evaluating-quantizationChoose a compressed model format by measuring memory, complete-request speed and task/perceptual quality on the exact target hardware. Use for quantization, lower precision or fitting a model on cheaper hardware. Respect the chosen quality policy and separate model-change permissions./optimizing-inferenceOptimize a model for faster responses, more requests, less memory or cheaper hardware. Ask simple quality and budget questions, research current implementations, tune the strongest supported baseline, investigate compiler/kernel bottlenecks and prove end-to-end results. Covers text, image, audio and video with modality-specific checks; accepts an intake or written brief./optimizing-kernelsProfile-driven loop for building or patching inference engines and kernels on NVIDIA, AMD, Apple Silicon or CPU. Use after baseline tuning and profiling to close a measured bottleneck with one change, a correctness check and an end-to-end screen. Covers custom engines, fusion, attention, matrix kernels and memory traffic; routes to the hardware's supported tools./profilingFinds where inference time goes and why a kernel is slow on NVIDIA, AMD ROCm, Apple Metal and CPUs, routing to vendor timelines then supported kernel analysis; nsys only or the PyTorch profiler when GPU counters are blocked. Use for "where does the time go", "why is decode/prefill slow", "GPU idle", "launch overhead", "which kernel", "is this kernel memory-bound", "nsys", "ncu", "torch profiler", "profile". Never proves a speedup./proving-correctnessVerify correctness and agreed quality after engine, kernel, precision or model changes. Use before a performance claim and for quick exploration screens. Select exact, task or perceptual checks for text, image, audio, video and other supported tasks; keep missing evidence UNPROVEN.npx claudepluginhub kittenml/inferencekit --plugin inferencekitOther plugins' skills for the same job