Kernel Verification
ZJLi2013/awesome-kernel-skills
5-stage kernel correctness verification protocol for Triton and CUDA kernels.
A skill your agent uses when you need a NEW or optimized MPK CUDA kernel (a per-task .cuh under include/mirage/persistentkernel/tasks/) that must PROVABLY beat a target WITHOUT the kernel-optimizer…
$ npx skills add mirage-project/mirage --skill ferret-kernel-system -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install mirage-project/mirage ferret-kernel-system --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/mirage-project/mirage.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/ferret-kernel-system .claude/skills/ferret-kernel-system && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "ferret-kernel-system" agent skill from https://github.com/mirage-project/mirage/tree/mpk/.claude/skills/ferret-kernel-system into .claude/skills/ferret-kernel-system/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ferret-kernel-system", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/mirage-project/mirage/tree/mpk/.claude/skills/ferret-kernel-systemType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add mirage-project/mirage --skill ferret-kernel-system -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install mirage-project/mirage ferret-kernel-system --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mirage-project/mirage.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/ferret-kernel-system .agents/skills/ferret-kernel-system && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "ferret-kernel-system" agent skill from https://github.com/mirage-project/mirage/tree/mpk/.claude/skills/ferret-kernel-system into .agents/skills/ferret-kernel-system/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ferret-kernel-system", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mirage-project/mirage --skill ferret-kernel-system -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install mirage-project/mirage ferret-kernel-system --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mirage-project/mirage.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/ferret-kernel-system .cursor/skills/ferret-kernel-system && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "ferret-kernel-system" agent skill from https://github.com/mirage-project/mirage/tree/mpk/.claude/skills/ferret-kernel-system into .cursor/skills/ferret-kernel-system/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ferret-kernel-system", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/mirage-project/mirage.git --path .claude/skills/ferret-kernel-system--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add mirage-project/mirage --skill ferret-kernel-system -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install mirage-project/mirage ferret-kernel-system --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mirage-project/mirage.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/ferret-kernel-system .gemini/skills/ferret-kernel-system && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "ferret-kernel-system" agent skill from https://github.com/mirage-project/mirage/tree/mpk/.claude/skills/ferret-kernel-system into .gemini/skills/ferret-kernel-system/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ferret-kernel-system", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install mirage-project/mirage ferret-kernel-systemInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add mirage-project/mirage --skill ferret-kernel-system -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/mirage-project/mirage.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/ferret-kernel-system .github/skills/ferret-kernel-system && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "ferret-kernel-system" agent skill from https://github.com/mirage-project/mirage/tree/mpk/.claude/skills/ferret-kernel-system into .github/skills/ferret-kernel-system/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ferret-kernel-system", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mirage-project/mirage --skill ferret-kernel-system -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install mirage-project/mirage ferret-kernel-system --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mirage-project/mirage.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/ferret-kernel-system .opencode/skills/ferret-kernel-system && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "ferret-kernel-system" agent skill from https://github.com/mirage-project/mirage/tree/mpk/.claude/skills/ferret-kernel-system into .opencode/skills/ferret-kernel-system/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ferret-kernel-system", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
ferret-kernel-systemA skill your agent uses when you need a NEW or optimized MPK CUDA kernel (a per-task .cuh under include/mirage/persistentkernel/tasks/) that must PROVABLY beat a target WITHOUT the kernel-optimizer…
Ferret Kernel System is an agent skill from mirage-project/mirage. Use when you need a NEW or optimized MPK CUDA kernel (a per-task .cuh under include/mirage/persistentkernel/tasks/) that must PROVABLY beat a target WITHOUT the kernel-optimizer cheating its own correctness test. This is the frozen-gate Ferret system — a 3-agent orchestration (dispatcher → independent test-writer → optimizer) that makes "the optimizer ships a simplified-math kernel and self-reports a passing test" structurally impossible. Triggers — phrasings like "dispatch ferret to optimize a kernel", "have an…
Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `DESIGN.md`).
It sits in Agent Workflows, covering GPU and accelerator computing and Multi-agent orchestration. It works with CUDA. The repository describes itself as: Mirage Persistent Kernel: Compiling LLMs into a MegaKernel. The licence is Apache-2.0.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit f9eb70c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
claudeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Ferret Kernel System loads about 1.3k tokens when it runs. Until then it costs about 202 tokens; SKILL.md has 566 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from mirage-project/mirage at commit f9eb70c, republished under its Apache-2.0 licence (© mirage-project). 566 words, ~1,266 tokens.
.claude/skills/ferret-kernel-system/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.The OLD ferret wrote its OWN correctness test. It once shipped a DeepSeek-V3 attention kernel with SIMPLIFIED math (theta-10000 rope not YaRN, 1/sqrt(576) not the YaRN mscale scale, head-sum o_proj skipping W_UV, no kv_a_layernorm) and self-reported cosine 1.0 — against its own simplified reference. Marking its own homework. The refactor takes judging + constraints OUT of the optimizer.
.claude/agents/)| Agent | Role | You invoke? |
|---|---|---|
| ferret-kernel-agent (L1 dispatcher) | The ENTRY POINT. Pins ALL constraints, freezes the gate via the test-writer, runs the optimizer in-session, drives Codex review each round, does in-MPK faithful acceptance. | YES — this is the only one you invoke directly. |
| ferret-test-writer (L2a) | Writes the FROZEN, hash-locked gate vs a CANONICAL reference (never re-derived), checking INTERMEDIATE tensors. Spawned by L1, before the optimizer. | No (L1 spawns it) |
| ferret-optimizer (L2b) | In-session optimizer (replaces claude -p), judged ONLY by the frozen gate, can't simplify. Spawned by L1 each round. | No (L1 spawns it) |
Invoke the ferret-kernel-agent subagent (via the Agent tool) with a COMPLETE constraint contract — this is where nothing gets missed and no simplification slips in. Give it, explicitly:
-rdc=true / MPK_FORCE_RDC_TRUE=1, arch sm_100a,
single-stream / no-CUDA-graph / no-cta_group::2. State that FINAL acceptance is the
in-MPK faithful build; standalone -rdc=true is diagnostic only.__device__ task_impl signature + NS/NE.first_failing_stage), not washed out.gate/check.py. Codex reviews each round on two
axes — Integrity (did it simplify to pass?) + Plan (is the lever sound?).MPK_FORCE_RDC_TRUE=1, compiled into
the real megakernel). A standalone number never ships.Re-run on the simplified attention: the optimizer (judged by the frozen gate) built a
CORRECT real-DSv3 fused attention in round 1 — GATE_RESULT {pass:true} on all 5
cases / all intermediates, gate untouched, dump provenance verified (W_UV BMM present,
real mscale²/sqrt(192) scale), all 4 simplifications fixed, Codex Integrity+Plan PASS.
The old simplified-kernel failure is now structurally impossible.
Full design + the /cd-mechanics + the hardening rationale: DESIGN.md (bundled
alongside this skill). The ferret runtime itself lives at
~/ferret/ (its CLAUDE.md is the optimizer's methodology). Pre-authored task specs:
~/ferret/tasks/.
© mirage-project, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in .claude/skills/ferret-kernel-system of mirage-project/mirage.
Open the folder on GitHubat commit f9eb70c
Ferret Kernel System next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Ferret Kernel System this skillmirage-project/mirage | 2.5k | — | ~1.3k | Automated safety check: Pass | Apache-2.0 | |
| Kernel VerificationZJLi2013/awesome-kernel-skills | 102 | — | ~702 | Automated safety check: Pass | None | |
| Paddle Design CompilerPaddlePaddle/Paddle | 24k | — | ~3.6k | Automated safety check: Pass | Apache-2.0 | |
| Debug Distributed Hangsgl-project/sglang | 37k | 2 repos | ~2.4k | Automated safety check: Pass | Apache-2.0 | |
| CUTLASS FMHA Incremental Rebuildmicrosoft/onnxruntime | 22k | — | ~1.3k | Automated safety check: Pass | MIT | |
| Cuda Index Widthpytorch/pytorch | 104k | — | ~1.6k | Automated safety check: Pass | Custom licence |
ZJLi2013/awesome-kernel-skills
5-stage kernel correctness verification protocol for Triton and CUDA kernels.
PaddlePaddle/Paddle
A skill your agent uses when working with Paddle 3.0 compiler full pipeline: SOT (Symbolic Opcode Translator) for bytecode-level dy2st graph capture, PIR (Paddle IR) for SSA-based intermediate…
sgl-project/sglang
Debug hanging issues in SGLang distributed inference (TP/PP/DP/EP).
microsoft/onnxruntime
Explains why editing CUTLASS fused-MHA headers in ONNX Runtime can leave stale CUDA kernels after an incremental build, and how to force and verify a real rebuild.
pytorch/pytorch
Choose 32-bit vs 64-bit index math in PyTorch CUDA kernels. An agent skill from pytorch/pytorch.
graphsignal/graphsignal
Profile AI inference workloads (vLLM, SGLang, TensorRT-LLM, PyTorch, any GPU application) with the Graphsignal profiler and read the results from its local /signals JSON endpoint.
mirage-project/mirage
Runtime-V2 performance-iteration workflow. An agent skill from mirage-project/mirage.
mirage-project/mirage
Step-by-step guide for adding a new task implementation to Mirage Persistent Kernel (MPK).
mirage-project/mirage
A skill your agent uses when the user wants to design or extend a FlashAttention-style forward kernel on B200/Blackwell, involving the two MMAs QKᵀ and PV, online softmax, S/P/O in TMEM, warp roles…
mirage-project/mirage
Build or run a FAITHFUL in-MPK per-task latency gate (slowCTA at the production grid + cos) for a DeepSeek-V3 MPK decode kernel or shape.
mirage-project/mirage
A skill your agent uses when a batch of env-gated (ifdef MPKDSV3 / os.environ-controlled, default-OFF) MPK optimization levers needs to be consolidated into a single clean code path for a PR…
mirage-project/mirage
Guide for using MPK test mode to unit-test individual layers or multi-layer pipelines through the full compilation pipeline.
Works with
Categories
A skill your agent uses when you need a NEW or optimized MPK CUDA kernel (a per-task .cuh under include/mirage/persistentkernel/tasks/) that must PROVABLY beat a target WITHOUT the kernel-optimizer…. Ferret Kernel System is an agent skill from mirage-project/mirage.cuh under include/mirage/persistentkernel/tasks/) that must PROVABLY beat a target WITHOUT the kernel-optimizer cheating its own correctness test.
Ferret Kernel System fits situations like: — phrasings like dispatch ferret to optimize a kernel; have an agent write a kernel but guarantee it doesnt simplify the math; generate a kernel the frozen-gate way: the user/main-thread wants a kernel optimized; generated by an agent.
Run `npx skills add mirage-project/mirage --skill ferret-kernel-system -a claude-code`. Or copy the skill folder (.claude/skills/ferret-kernel-system in mirage-project/mirage) into .claude/skills/ferret-kernel-system in your project. Claude Code loads it when a task matches its description.
Run `npx skills add mirage-project/mirage --skill ferret-kernel-system -a codex`. Or copy the skill folder (.claude/skills/ferret-kernel-system in mirage-project/mirage) into .agents/skills/ferret-kernel-system in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mirage-project/mirage --skill ferret-kernel-system -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ferret-kernel-system, .gemini/skills/ferret-kernel-system, .github/skills/ferret-kernel-system and .opencode/skills/ferret-kernel-system in your project.
Going by SKILL.md and its folder, Ferret Kernel System needs the command-line tools its instructions call (claude).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Ferret Kernel System is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Ferret Kernel System: Kernel Verification (ZJLi2013/awesome-kernel-skills, 102 stars), Paddle Design Compiler (PaddlePaddle/Paddle, 24k stars), Debug Distributed Hang (sgl-project/sglang, 37k stars) and CUTLASS FMHA Incremental Rebuild (microsoft/onnxruntime, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
mirage-project (a GitHub organization) maintains it in mirage-project/mirage, which has 2,541 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on October 7, 2026.
Source: mirage-project/mirage on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.