FlashInfer is a library and kernel generator that supplies GPU operations used to run large language model inference, including attention, matrix multiplication, and mixture-of-experts computations. It helps engineers build and optimize LLM serving systems across supported GPU hardware and backend implementations. Its catalogue add-ons provide skills and instructions for working with FlashInfer.
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 skills add flashinfer-ai/flashinfer --skill swapab_cutedsl_megakernelgit clone --depth 1 https://github.com/flashinfer-ai/flashinferWrote 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/flashinfer-ai/flashinfer/swapab_cutedsl_megakernel)<a href="https://agentmods.dev/skills/flashinfer-ai/flashinfer/swapab_cutedsl_megakernel"><img src="https://agentmods.dev/badge/skills/flashinfer-ai/flashinfer/swapab_cutedsl_megakernel/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.
<a href="https://agentmods.dev/skills/flashinfer-ai/flashinfer/swapab_cutedsl_megakernel"><img src="https://agentmods.dev/badge/skills/flashinfer-ai/flashinfer/swapab_cutedsl_megakernel.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.1 | $0.00000 | $0.01615 |
| Opus 5 | $0.00000 | $0.00807 |
| Sonnet 5 | $0.00000 | $0.00323 |
| Haiku 4.5 | $0.00000 | $0.00161 |
Grade C, and why
swapab_cutedsl_megakernel 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 7d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf common src moe_sm120_mxfp8_swapab moe_mxfp8_glu moe_nvfp4_swapab How it starts
The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Updating the SM120 swap-AB CuTeDSL MegaMoE kernel src
Layout
kernel_src/sm120/swapab_cutedsl_megakernel/
├── src/ ← VERBATIM kernel-team drop; NEVER edit or add files here
│ ├── common/
│ ├── src/ ← CuTeDSL core src (bootstrap, sym_buffer, token_comm, …)
│ ├── moe_sm120_mxfp8_swapab/ ← the SM120 MXFP8 swap-AB kernel
│ ├── moe_mxfp8_glu/ ← generic MXFP8 torch reference (+ its runner helpers)
│ └── moe_nvfp4_swapab/ ← import dependency of moe_mxfp8_glu's reference
├── __init__.py ← public API for moe_ep; talks ONLY to shim/ (our code)
├── shim/ ← thin adapters over src/ (our code) — ALL adaptation here
│ ├── _paths.py ← adds sibling src/ to sys.path; sibling-tree guard
│ ├── comm.py ← dist bootstrap, sym heap, compile state,
│ │ zero_local_counter_regions (SM120 pre-launch contract)
│ ├── mxfp8.py ← SM120 MXFP8 frontend + symm-buffer/launch wrappers
│ └── kernel_helpers.py ← SINGLE (all-lazy) re-export point for raw-kernel
│ helpers/constants/reference (drop-audit point)
├── VENDOR.md ← provenance + sync state of the current src/ drop
└── SKILL.md ← this file (drop-update workflow)
Core principle: src/ is a verbatim copy of the kernel-team drop — no
injected files, no edits. Every adaptation lives in shim/. A new drop is a
pure replace of src/; the only work is updating shim/ to whatever the new
src/ exposes.
Layer isolation (enforce on every drop — grep before/after): shim/ is the
only layer importing src/ packages; FI backends
(backends/mega/kernel/sm120/mxfp8_mxfp8_bf16_cutedsl/) import ONLY the
package __init__; the tree is process-exclusive with the SM100/SM90 trees
(shared top-level module names — shim/_paths.py raises on collision).
When the kernel team drops a new version of src/
- Replace
src/verbatim with the drop's five kernel packages:
Do NOT copy repo scaffolding (cd flashinfer/moe_ep/kernel_src/sm120/swapab_cutedsl_megakernel/src rm -rf common src moe_sm120_mxfp8_swapab moe_mxfp8_glu moe_nvfp4_swapab cp -r <new_drop>/{common,src,moe_sm120_mxfp8_swapab,moe_mxfp8_glu,moe_nvfp4_swapab} .ci/,tester/,tests/,scripts/,pyproject.toml,dispatch_test.py,README.md,core.python.*). Update VENDOR.md (commit SHA, date, pending local diffs).
What ships with it
60 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.
- __init__.py 2.2 KB runs code
- shim/__init__.py 1.7 KB runs code
- shim/_paths.py 2.8 KB runs code
- shim/comm.py 9.6 KB runs code
- shim/kernel_helpers.py 3.2 KB runs code
- shim/mxfp8.py 55 KB runs code
- src/common/__init__.py 144 B runs code
- src/common/host_utils.py 8.6 KB runs code
- src/common/megamoe_constants.py 948 B runs code
- src/common/moe_utils.py 17 KB runs code
- src/moe_mxfp8_glu/__init__.py 160 B runs code
- src/moe_mxfp8_glu/custom_ext.py 16 KB runs code
- src/moe_mxfp8_glu/epilogue_mxfp8.py 62 KB runs code
- src/moe_mxfp8_glu/kernel_mxfp8_glu_fc12.py 103 KB runs code
- src/moe_mxfp8_glu/mega_reference_mxfp8.py 11 KB runs code
- src/moe_mxfp8_glu/mega_runner.py 39 KB runs code
- src/moe_mxfp8_glu/megamoe_kernel_mxfp8.py 45 KB runs code
- src/moe_mxfp8_glu/run_functional_tests.sh 8.4 KB runs code
- src/moe_mxfp8_glu/run_mega_tests.sh 18 KB runs code
- src/moe_mxfp8_glu/runner_common.py 2.6 KB runs code
- src/moe_mxfp8_glu/runner_fc12.py 17 KB runs code
- src/moe_nvfp4_swapab/__init__.py 58 B runs code
- src/moe_nvfp4_swapab/benchmark_p2p.py 24 KB runs code
- src/moe_nvfp4_swapab/contract.py 16 KB runs code
- src/moe_nvfp4_swapab/custom_ext.py 19 KB runs code
- src/moe_nvfp4_swapab/cute_ref_ops.py 9.6 KB runs code
- src/moe_nvfp4_swapab/dynamic_mainloop.py 13 KB runs code
- src/moe_nvfp4_swapab/epilogue_refactor.py 127 KB runs code
- src/moe_nvfp4_swapab/epilogue.py 144 KB runs code
- src/moe_nvfp4_swapab/fc1_fc2_fuse_sched.py 65 KB runs code
- src/moe_nvfp4_swapab/kernel_fc12.py 103 KB runs code
- src/moe_nvfp4_swapab/mega_reference.py 102 KB runs code
- src/moe_nvfp4_swapab/mega_runner.py 118 KB runs code
- src/moe_nvfp4_swapab/megamoe_kernel.py 65 KB runs code
- src/moe_nvfp4_swapab/moe_persistent_scheduler.py 82 KB runs code
- src/moe_nvfp4_swapab/moe_utils.py 45 KB runs code
- src/moe_nvfp4_swapab/run_functional_tests.sh 12 KB runs code
- src/moe_nvfp4_swapab/run_mega_tests.sh 17 KB runs code
- src/moe_nvfp4_swapab/runner_common.py 20 KB runs code
- src/moe_nvfp4_swapab/runner_fc12_common.py 83 KB runs code
- src/moe_nvfp4_swapab/runner_fc12.py 16 KB runs code
- src/moe_nvfp4_swapab/simulate_fc1_fc2_sched.py 15 KB runs code
- src/moe_nvfp4_swapab/topk_reduce.py 28 KB runs code
- src/moe_sm120_mxfp8_swapab/__init__.py 64 B runs code
- src/moe_sm120_mxfp8_swapab/custom_ext.py 20 KB runs code
- src/moe_sm120_mxfp8_swapab/fc1_fc2_fuse_sched.py 67 KB runs code
- src/moe_sm120_mxfp8_swapab/kernel_fc12.py 210 KB runs code
- src/moe_sm120_mxfp8_swapab/mega_reference.py 5.6 KB runs code
- src/moe_sm120_mxfp8_swapab/mega_runner.py 103 KB runs code
- src/moe_sm120_mxfp8_swapab/megamoe_kernel.py 45 KB runs code
- src/moe_sm120_mxfp8_swapab/moe_persistent_scheduler.py 82 KB runs code
- src/moe_sm120_mxfp8_swapab/moe_utils.py 46 KB runs code
- src/moe_sm120_mxfp8_swapab/run_functional_tests.sh 1.5 KB runs code
- src/moe_sm120_mxfp8_swapab/run_mega_tests.sh 2.3 KB runs code
- src/moe_sm120_mxfp8_swapab/runner_common.py 12 KB runs code
- src/moe_sm120_mxfp8_swapab/runner_fc12_common.py 72 KB runs code
- src/moe_sm120_mxfp8_swapab/runner_fc12.py 9.9 KB runs code
- src/moe_sm120_mxfp8_swapab/sm120_mma.py 12 KB runs code
- src/moe_sm120_mxfp8_swapab/sm120_ptx_helpers.py 1.4 KB runs code
- src/moe_sm120_mxfp8_swapab/token_comm.py 70 KB runs code
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.
- 7d ago First seen · 91 lines · 0 tokens per session scan C e23d3de1d1dc
swapab_cutedsl_megakernel is a skill published in the GitHub repository flashinfer-ai/flashinfer (6,370 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,615 tokens. 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-09-03.
Other skills, from other repositories
cuopt-developer
Modify, build, test, debug, and contribute to NVIDIA cuOpt (C++/CUDA, Python, server, CI). Use for solver internals, PRs, DCO, and code conventions.
transform-model
Add a Hugging Face or local checkpoint to TensorRT-Model-Connect as a self-contained family, or extend the family that already owns it.
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.
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…
write-cuda-reduction-kernel
Guide the agent through designing and implementing a correct, efficient CUDA reduction kernel for a given operator (sum, max, min, or custom binary associative op), covering warp-level primitives, block-level reduction, multi-block strategies, and when to use CUB instead.
debug-cuda-kernel-correctness
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.