cuda-auto-tune

cuda-auto-tune is a skill for Claude Code, Codex from Bruce-Lee-LY/cuda_auto_tune. It costs 167 tokens per session (6,005 once invoked), scanned C, original, MIT.

A strict workflow for improving CUDA, CUTLASS, Triton, or CuTe GPU kernel code using NVIDIA Nsight Compute, a GPU performance profiler. It requires profiling before changes and profiling again afterward.

In plain words
What is it for?
Use it to analyze GPU kernels, choose targeted code or launch changes, and compare profiler results after each optimization.
Why use it?
It keeps optimization decisions tied to measured bottlenecks instead of guesses, while checking memory use, processor stalls, occupancy, and other performance factors.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to analyze GPU kernels, choose targeted code or launch changes, and compare profiler results after each optimization.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bruce-lee-ly/cuda_auto_tune/cuda-auto-tune
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.

Any agent
npx skills add Bruce-Lee-LY/cuda_auto_tune --skill cuda-auto-tune
Clone the repo
git clone --depth 1 https://github.com/Bruce-Lee-LY/cuda_auto_tune

Made for: Claude Code, Codex.

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 cuda-auto-tune

README.md
[![agentmods](https://agentmods.dev/badge/skills/bruce-lee-ly/cuda_auto_tune/cuda-auto-tune/github.svg)](https://agentmods.dev/skills/bruce-lee-ly/cuda_auto_tune/cuda-auto-tune)
Your own site
<a href="https://agentmods.dev/skills/bruce-lee-ly/cuda_auto_tune/cuda-auto-tune"><img src="https://agentmods.dev/badge/skills/bruce-lee-ly/cuda_auto_tune/cuda-auto-tune/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.

agentmods 80×15 button for cuda-auto-tune

Your own site · 80×15
<a href="https://agentmods.dev/skills/bruce-lee-ly/cuda_auto_tune/cuda-auto-tune"><img src="https://agentmods.dev/badge/skills/bruce-lee-ly/cuda_auto_tune/cuda-auto-tune.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 167 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,005 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00167 $0.06005
Opus 5.5 $0.00067 $0.02402
Sonnet 5.5 $0.00033 $0.01201
Haiku 4.5 $0.00017 $0.00600

Measured 2mo ago against content hash 2b7f66fff6c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

cuda-auto-tune scanned grade C 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 2mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/ncu_analyse.py, scripts/ncu_profile.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf __pycache__/ .cache/ /tmp/cutlass_cute_cache/
cuda-auto-tune/SKILL.md · 495 lines

How it starts

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

NCU-driven iterative kernel optimization (CUDA / CUTLASS / Triton / CuTe DSL)

GATE CHECK (enforce before any optimization)

STOP — Do you have NCU profile data for this kernel?
  NO  → Go to Step 1. Do NOT touch any kernel code.
  YES → Go to Step 2.

Hard rules — violation of any rule invalidates the entire optimization:

  • NEVER change kernel code, launch config, or template parameters without NCU data.
  • ALL recommendations MUST cite specific NCU metric values as evidence.
  • Each iteration MUST cover at minimum: roofline, memory hierarchy, warp stalls, occupancy.
  • The optimization playbook MUST match the kernel implementation type.
  • After EVERY code change, re-profile and compare with --diff.
  • Stop iterating when improvements plateau or metrics approach hardware ceiling.

Mandatory optimization loop

┌─────────────────────────────────────────────────────────────────────┐
│  Step 1: Profile (NCU --set full)                                   │
│      ↓                                                              │
│  Step 2: Multi-dimensional analysis + identify kernel type          │
│      ↓                                                              │
│  Step 3: Apply type-specific playbook (one change per iteration)    │
│      ↓                                                              │
│  Step 4: Re-profile + diff → improved? → loop or stop               │
│      ↑                                           │                  │
│      └───────────────────────────────────────────┘                  │
└─────────────────────────────────────────────────────────────────────┘

Step 1: Profile with NCU (REQUIRED — no data = no optimization)

Option A: Profiling script (recommended)

# Native CUDA / CUTLASS binaries
bash cuda-auto-tune/scripts/ncu_profile.sh ./kernel report_v1

# Triton / Python
bash cuda-auto-tune/scripts/ncu_profile.sh "python your_kernel.py" report_v1

# CuTe DSL / Python
bash cuda-auto-tune/scripts/ncu_profile.sh "python your_cutedsl_kernel.py" report_v1

Read the full file on GitHub · 495 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago First seen · 495 lines · 167 tokens per session scan C 2b7f66fff6c2

Subscribe to this mod's changes

cuda-auto-tune is a skill published in the GitHub repository Bruce-Lee-LY/cuda_auto_tune (25 stars, last pushed 7mo ago), licensed MIT. It adds 167 tokens to every session and 6,005 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

cuda-auto-tune compared with skills from other repositories

cuda-auto-tune next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cuda-auto-tuneBruce-Lee-LY/cuda_auto_tuneSkill257mo agoMITC167Claude Code, Codex
spark-environment-setupwshobson/agentsSkill42kyesterdayMITA76Claude Code
spark-memory-thermal-opswshobson/agentsSkill42kyesterdayMITA59Claude Code
spark-training-gotchaswshobson/agentsSkill42kyesterdayMITA63Claude Code
terraform-module-librarywshobson/agentsSkill42kyesterdayMITA44Claude Code
auditing-uefi-firmware-with-chipsecadriannoes/awesome-agentic-aiSkill964d agoMITA56Claude Code, Codex
lov-migrate-camera-medialovstudio/skillsSkill723d agoMITA86Claude Code