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.
npx agentmods add skills/tensormux/kernel-skills/debug-cuda-kernel-correctnessnpx skills add tensormux/kernel-skills --skill debug-cuda-kernel-correctnessgit clone --depth 1 https://github.com/tensormux/kernel-skillsWrote 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.
[](https://agentmods.dev/skills/tensormux/kernel-skills/debug-cuda-kernel-correctness)<a href="https://agentmods.dev/skills/tensormux/kernel-skills/debug-cuda-kernel-correctness"><img src="https://agentmods.dev/badge/skills/tensormux/kernel-skills/debug-cuda-kernel-correctness.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.02976 |
| Opus 5 | $0.00000 | $0.01488 |
| Sonnet 5 | $0.00000 | $0.00595 |
| Haiku 4.5 | $0.00000 | $0.00298 |
Grade A, and why
debug-cuda-kernel-correctness 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Skill: Debug CUDA Kernel Correctness
Purpose
Guide the agent through a systematic process of isolating, reproducing, and diagnosing correctness errors in CUDA kernels — covering indexing bugs, layout mismatches, synchronization races, reduction errors, numerical drift, and out-of-bounds memory access.
Use this when
- A CUDA kernel produces wrong output compared to a CPU or high-precision reference.
- The kernel output differs between runs (non-determinism indicating a race condition or uninitialized memory read).
- The kernel produces correct results for small inputs but fails for large inputs or non-power-of-two sizes.
- Correctness errors appear only on specific hardware (sm_80 vs sm_86) or with specific compilation flags.
- The kernel produces NaN, Inf, or suspiciously exact-zero outputs.
- A previously correct kernel starts failing after a layout, dtype, or tiling change.
Do not use this when
- The kernel is numerically close to the reference but not bit-exact — evaluate whether the error is within acceptable floating-point tolerance before treating it as a correctness bug.
- The issue is performance, not correctness (use profiling skills instead).
- The bug is in the host-side launch configuration wiring, not the kernel body itself — check grid/block dimensions, stream assignments, and argument passing before diving into kernel internals.
Inputs the agent should gather first
- Reference implementation: what is the expected correct result? Is there a CPU fp64 reference, a PyTorch equivalent, or a known-correct CUDA baseline?
- Input shapes and dtypes: exact M, N, K (or equivalent dimensions), dtype (fp32, fp16, bf16, int8), memory layout (row-major, column-major, strided, non-contiguous).
- Hardware and driver: CUDA compute capability, CUDA toolkit version, driver version. Some bugs are toolkit-specific (e.g., compiler optimizations that break on certain SM targets).
- Reproducibility: does the error appear on every run with the same inputs, or is it intermittent? Intermittent = likely race condition. Deterministic = likely logic or indexing bug.
- Error characterization: is the error localized (specific output elements wrong), global (all elements wrong by a constant factor), or structured (wrong values along a row/column/diagonal boundary)?
- Last known-good change: what changed between the last correct version and the current buggy version?
What ships with it
1 file 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.
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.
- 4d ago First seen · 129 lines · 0 tokens per session scan A f5df8c37153a
debug-cuda-kernel-correctness is a skill published in the GitHub repository tensormux/kernel-skills (72 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,976 tokens. 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.
Other skills, from other repositories
add-jit-kernel
Step-by-step tutorial for adding a new lightweight JIT CUDA kernel to sglang's jitkernel module.
add-sgl-kernel
Step-by-step tutorial for adding a heavyweight AOT CUDA/C++ kernel to sgl-kernel (including tests & benchmarks).
add-cuda-kernel
Step-by-step tutorial for adding new CUDA kernels to FlashInfer.
readable-cpp
Readable C/C++/Rust/CUDA code rules inspired by The Art of Readable Code. Use when writing, reviewing, or refactoring C, C++, Rust, or CUDA code. Enforces short functions, flat control flow, clear naming, readable structure, and idiomatic patterns.
pull_style_cutedsl_megakernel
This tree vendors the kernel team's SM90 FP8 MegaMoE drop — a fork of the same kernel repo that kernelsrc/cutedslmegamoe vendors (Bangyu's SM100 tree). The SM90 work (Vincent's hoppermegamoe branch) moved the shared runtime forward, so this tree duplicates common/, src/, and moenvfp4swapab/ at its own revision instead…
cpp
Comprehensive C/C++ programming reference covering everything from C11-C23 and C++11-C++23, system programming, CUDA GPU computing, debugging tools, Rust interop, and advanced topics. Use for: C/C++ questions, C/C++ interview preparation, modern language features, RAII/memory management, templates/generics, CUDA…