cuda-kernel-optimizer

cuda-kernel-optimizer is a skill for Claude Code, Codex from KernelFlow-ops/cuda-optimized-skill. It costs 37 tokens per session (4,362 once invoked), scanned A, original, MIT.

An iterative performance-tuning workflow for CUDA, CUTLASS, or Triton kernels. A kernel is a small program that runs many times on a graphics processor to perform a computation.

In plain words
What is it for?
Use it to optimise .cu or Triton kernel files, benchmark alternatives, inspect GPU performance reports, and identify which changes improved the result.
Why use it?
It compares candidate implementations against a reference, measures their performance, and checks whether claimed changes appear in the generated machine code.

Skill for Claude CodeCodex

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

Good fit Use it to optimise .cu or Triton kernel files, benchmark alternatives, inspect GPU performance reports, and identify which changes improved the result.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kernelflow-ops/cuda-optimized-skill/cuda-kernel-optimizer
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 KernelFlow-ops/cuda-optimized-skill --skill cuda-kernel-optimizer
Clone the repo
git clone --depth 1 https://github.com/KernelFlow-ops/cuda-optimized-skill

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-kernel-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/kernelflow-ops/cuda-optimized-skill/cuda-kernel-optimizer/github.svg)](https://agentmods.dev/skills/kernelflow-ops/cuda-optimized-skill/cuda-kernel-optimizer)
Your own site
<a href="https://agentmods.dev/skills/kernelflow-ops/cuda-optimized-skill/cuda-kernel-optimizer"><img src="https://agentmods.dev/badge/skills/kernelflow-ops/cuda-optimized-skill/cuda-kernel-optimizer/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-kernel-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/skills/kernelflow-ops/cuda-optimized-skill/cuda-kernel-optimizer"><img src="https://agentmods.dev/badge/skills/kernelflow-ops/cuda-optimized-skill/cuda-kernel-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,362 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium analysis-evasion · line 1
    Suspicious Unicode normalization or mixed-script content
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
How audits are shown
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.00037 $0.04362
Opus 5.5 $0.00015 $0.01745
Sonnet 5.5 $0.00007 $0.00872
Haiku 4.5 $0.00004 $0.00436

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

Security

Grade A, and why

cuda-kernel-optimizer 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 2mo ago.

The scan reads SKILL.md. This mod also ships 21 executable files (scripts/ablate.py, scripts/benchmark.py, scripts/branch_explore.py, …), 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.

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.

skills/cuda-kernel-optimizer/SKILL.md · 392 lines

How it starts

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

CUDA Kernel Iterative Optimizer (v3)

What this skill does

Given:

  • a baseline kernel file (.cu for CUDA / CUTLASS, or .py for Triton),
  • a reference Python file (exposes reference(**kwargs) — same contract as benchmark.py --ref),
  • optional atol/rtol and workload_model(**dims) -> {flops, bytes_min} in the reference,
  • kernel dimension arguments (e.g. --M=4096 --N=4096 --K=4096),
  • optional iteration count N (default 3), ncu_num (default 5), and branches (default 4),
  • optional --compile-jobs auto|N (default auto) and --numerics-mode reference|strict|approximate (default reference),

the skill runs a roofline-guided, branch-and-select iterative optimization loop and produces a timestamped directory of per-iteration artifacts plus a final summary.

Key point

  1. Evidence-driven axis budget: use a real workload roofline when ref.py exposes workload_model; otherwise label the result as a bottleneck-gap heuristic and do not claim near_peak.
  2. Branch-and-Select: each iteration generates K candidate kernels (hyperparameter/implementation variants), benchmarks all, selects champion.
  3. Ablation attribution: after selecting champion, each method is individually ablated to determine its actual contribution.
  4. SASS verification: cuobjdump --dump-sass confirms claimed optimizations actually appear in generated code.
  5. Every iteration produces an adaptive ncu report on the champion kernel; only CPU compilation is parallel.
  6. No evidence, no generation: the requested iteration count is a maximum. Never write candidates until the hardware, correctness, timing, and NCU gates pass.

Inputs the skill expects from the user

Before starting, confirm you have:

  1. Baseline operator file, e.g. ./gemm.cu or ./gemm_triton.py
  2. Reference file, e.g. ./ref.py (required — correctness validation depends on it)
  3. Dimensions — kernel-signature scalars like --M=4096 --N=4096 --K=4096
  4. Iteration count N (default 3)
  5. ncu_num — how many top metrics to extract per axis (default 5)
  6. branches — how many hyperparameter variants per iteration (default 4)

Read the full file on GitHub · 392 lines

Files

What ships with it

49 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 Changed · +18 lines · -6 tokens per session a143c4f8e3d6
  2. 2mo ago Changed · +28 lines · +43 tokens per session c93030c6bd44
  3. 2mo ago First seen · 346 lines · 0 tokens per session scan A 3db640895c97

Subscribe to this mod's changes

cuda-kernel-optimizer is a skill published in the GitHub repository KernelFlow-ops/cuda-optimized-skill (217 stars, last pushed 2mo ago), licensed MIT. It adds 37 tokens to every session and 4,362 once invoked, about $0.0001 per session on Opus 5.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-30.

Related

cuda-kernel-optimizer compared with skills from other repositories

cuda-kernel-optimizer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cuda-kernel-optimizerKernelFlow-ops/cuda-optimized-skillSkill2172mo agoMITA37Claude Code, Codex
imagegenopenai/codexSkill134ktodayApache-2.0A113Codex
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79kyesterdayMITA200Claude Code, Codex
playwright-climicrosoft/playwrightSkill100kyesterdayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill394ktodayMITA36Claude Code
systematic-debuggingobra/superpowersSkill314k4d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143ktodayMITA95Claude Code