optimize-gpu-workloads

optimize-gpu-workloads is a skill for Claude Code from zystem-io/zymtrace-skills. It costs 398 tokens per session (2,431 once invoked), scanned A, original, Apache-2.0.

A GPU performance analysis workflow for CUDA programs and GPU-based services such as vLLM, SGLang, NVIDIA Dynamo-Triton, and TensorRT-LLM. It uses GPU and CPU flamegraphs, which show where execution time is spent in a call tree.

In plain words
What is it for?
Finding hot GPU kernels, explaining low GPU use, checking GPU metrics, and investigating training, fine-tuning, inference, or other GPU workloads.
Why use it?
It helps distinguish a slow GPU operation from a bottleneck on the CPU that feeds or controls it.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the zymtrace plugin — 10 skills, 1 agent shipped together

Install

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.

agentmods
npx agentmods add skills/zystem-io/zymtrace-skills/optimize-gpu-workloads
Any agent
npx skills add zystem-io/zymtrace-skills --skill optimize-gpu-workloads
Clone the repo
git clone --depth 1 https://github.com/zystem-io/zymtrace-skills

Made for: Claude Code.

Or install zymtrace, the plugin that ships this one along with the rest of its 10 skills, 1 agent.

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

agentmods badge for optimize-gpu-workloads

README.md
[![agentmods](https://agentmods.dev/badge/skills/zystem-io/zymtrace-skills/optimize-gpu-workloads.svg)](https://agentmods.dev/skills/zystem-io/zymtrace-skills/optimize-gpu-workloads)
Your own site
<a href="https://agentmods.dev/skills/zystem-io/zymtrace-skills/optimize-gpu-workloads"><img src="https://agentmods.dev/badge/skills/zystem-io/zymtrace-skills/optimize-gpu-workloads.svg" alt="Measured on agentmods" height="20"></a>
Per session 398 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,431 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00398 $0.02431
Opus 5 $0.00199 $0.01215
Sonnet 5 $0.00080 $0.00486
Haiku 4.5 $0.00040 $0.00243

Measured 6d ago against content hash 7a4d29ac0396, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

optimize-gpu-workloads 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.

zymtrace/skills/optimize-gpu-workloads/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Optimize GPU Workloads

The MCP fetches the data — GPU metrics, flamegraphs; you analyze. Load-bearing discipline: always pull both the GPU and CPU views with the same filter — half the time a GPU workload's bottleneck is host-side.

The common discipline — data-source policy, pre-flight, rank-first vs. drill-down, scope-to-own-code/ROI, the always-recommend-and-apply-the-fix rule, the output-template skeleton, severity sizing, and security — lives in shared/analysis-conventions.md. Read it. This skill adds the GPU-specific protocol and call-tree rendering on top.

Connection setup lives in configure-zymtrace-mcp; this skill assumes the MCP is connected. CPU-only workload (no GPUs)? Use optimize-cpu-workloads — it skips the GPU view, GPU metrics, and inference-server framing entirely.

Standard starter prompt (for users who don't know what to ask)

"Analyze the GPU flamegraph over the last 1 hour and suggest solutions."

If the user hands you anything close to that (or shorter — "what's slow on my GPU", "investigate my GPU"), interpret it as: scope to the last 1 hour, pull the GPU flamegraph, cross-check the CPU view, follow the template. Variations: "Analyze [vLLM / SGLang / Triton / my training job] over the last [Nh / since deploy]", "Where's the bottleneck right now?", "What's wasting GPU time today?". Default to the last 1 hour and the whole cluster if no workload is named (ask which to narrow if results look noisy).

The cross-view protocol

The MCP pulls the data; you do the analysis and the discipline of asking for both sides. Establish a data path first (pre-flight, in the shared doc).

  1. Pull the workload's GPU metrics first, for context. GPU utilization, memory used/bandwidth, SM efficiency, Tensor-Core activity, temperature, and PCIe throughput — plus CPU utilization — to establish whether the workload is GPU- or host-bound and which view will be informative. If the workload is an inference server, also pull its framework metrics where collected — vLLM, SGLang, and NVIDIA Dynamo-Triton (queue depth / pending requests, running-vs-waiting batch size, tokens/sec, KV-cache utilization, prefix-cache hit rate, time-to-first-token). These tell you whether the GPU is starved, saturated, or memory-bound before you read a single frame. Carry the numbers into the recap; they frame the flamegraph findings. (Interpretation patterns: Inference-server specifics below.)

Read the full file on GitHub · 108 lines

Changes

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.

  1. 6d ago First seen · 108 lines · 398 tokens per session scan A 7a4d29ac0396

Subscribe to this mod's changes

optimize-gpu-workloads is a skill published in the GitHub repository zystem-io/zymtrace-skills (5 stars, last pushed 22d ago), licensed Apache-2.0. It adds 398 tokens to every session and 2,431 once invoked, about $0.0020 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-08-31.

Related

Other skills, from other repositories

debug-cuda-crash

Tutorial for debugging CUDA crashes using API logging.

flashinfer-ai/flashinfer · 14 tokens

test-amplification

Methodical bug-driven test amplification for pygraphistry features. Use when hardening a feature area via user-workflow exploration, 5-Whys retrospectives, bug-taxonomy derivation, concrete test planning, implementation, and safety-gated validation.

graphistry/pygraphistry · 56 tokens

pt2-bug-basher

Debug PyTorch 2 compiler stack failures including Dynamo graph breaks, Inductor codegen errors, AOTAutograd crashes, and accuracy mismatches. Use when encountering torch.compile errors, BackendCompilerFailed exceptions, recompilation issues, Triton kernel failures, FX graph problems, or when the user mentions…

pytorch/pytorch · 81 tokens

aoti-debug

Debug AOTInductor (AOTI) errors and crashes. Use when encountering AOTI segfaults, device mismatch errors, constant loading failures, or runtime errors from aotcompile, aotload, aoticompileandpackage, or aotiloadpackage.

pytorch/pytorch · 60 tokens

fix-issue

Fix bugs reported in PyTorch GitHub issues by reproducing, root-causing, and implementing a fix in the local working tree. Use when the user asks to fix a PyTorch GitHub issue.

pytorch/pytorch · 45 tokens

cuda-kernel-optimizer

Use when optimizing, tuning, diagnosing, or profiling CUDA, CUTLASS, Triton, PyTorch, vLLM, TensorRT-LLM, or another GPU workload; when assessing an NCU, Nsys, or PyTorch Profiler report; or when the test workload, correctness checks, measurement path, or target environment is incomplete.

troycheng/cuda-kernel-optimizer · 77 tokens