Agent skill

Mpk Development Norms

by mirage-project in mirage-project/mirage

The MPK team's "where does a change belong + what a clean PR looks like" norms, extracted from mirage-project/mpk merged-PR history.

Apache-2.0Auto-check passed

Install Mpk Development Norms

skills CLI
$ npx skills add mirage-project/mirage --skill mpk-development-norms -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mirage-project/mirage mpk-development-norms --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mirage-project/mirage.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/mpk-development-norms .claude/skills/mpk-development-norms && rm -rf skills-src

Use ~/.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/

Facts

Skill name
mpk-development-norms
GitHub stars
2.5k
Token cost
~2.7k tokens
SKILL.md length
1,306 words
Files
3 (incl. references)
Skills in repo
24
Repo updated
First seen
Licence
Apache-2.0

At a glance

The MPK team's "where does a change belong + what a clean PR looks like" norms, extracted from mirage-project/mpk merged-PR history.

  • Works in 3 steps: Where does my change belong? (ownership… → The norms (what a reviewer checks) → PR-shape checklist (run before you…
  • SKILL.md covers 1. Where does my change…, 2. The norms (what a reviewer…, 3. PR-shape checklist (run… and References
  • Calls bash, git and codex

What it does

Mpk Development Norms is an agent skill from mirage-project/mirage. The MPK team's "where does a change belong + what a clean PR looks like" norms, extracted from mirage-project/mpk merged-PR history. Read FIRST — before starting any MPK change, opening/shaping a PR, deciding which file a change goes in, reviewing a diff's shape, or cleaning up a branch that grew messy/off-norm ("改得太乱/不符合开发规范"). Complements add-mpk-model / add-mpk-task / v2-model-support (the HOW) with the WHERE + the PR-shape gate.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/codex-checklist.md` and `references/exemplar-prs.md`).

It works with Python. The repository describes itself as: Mirage Persistent Kernel: Compiling LLMs into a MegaKernel. The licence is Apache-2.0.

Example prompts

  • “where does a change belong + what a clean PR looks like”
  • “s shape, or cleaning up a branch that grew messy/off-norm (”
  • “/mpk-development-norms”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Where does my change belong? (ownership map)
  2. The norms (what a reviewer checks)
  3. PR-shape checklist (run before you open/push)

What it can do on your machine

Read from SKILL.md and the folder at commit f9eb70c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • bash
    • git
    • codex

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mpk Development Norms loads about 2.7k tokens when it runs, and up to ~6.3k if it reads all its reference files. Until then it costs about 115 tokens; SKILL.md has 1,306 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~115
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.3k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from mirage-project/mirage at commit f9eb70c, republished under its Apache-2.0 licence (© mirage-project). 1,306 words, ~2,674 tokens.

Download SKILL.mdSave it as .claude/skills/mpk-development-norms/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
mpk-development-norms
description
The MPK team's "where does a change belong + what a clean PR looks like" norms, extracted from mirage-project/mpk merged-PR history. Read FIRST — before starting any MPK change, opening/shaping a PR, deciding which file a change goes in, reviewing a diff's shape, or cleaning up a branch that grew messy/off-norm ("改得太乱/不符合开发规范"). Complements add-mpk-model / add-mpk-task / v2-model-support (the HOW) with the WHERE + the PR-shape gate.

MPK development norms — right place, minimal surface, clean PR

These are the change-shape norms the maintainers actually enforce, reverse-engineered from merged PRs on mirage-project/mpk (see references/exemplar-prs.md for the cited commits and per-category file-touch tables). The sibling skills tell you HOW to add a task/model/kernel; this one tells you WHERE the change belongs and what a landable PR looks like. When in doubt, find the closest recent merged PR of the same category and mirror its footprint.

The rule underneath all of them: put a change in the file that OWNS that concern, at the smallest generic surface — not in the file that is convenient to reach from where you already are. A diff that sprawls into shared runtime/python files to serve one model is the smell this skill exists to prevent.

1. Where does my change belong? (ownership map)

ChangeLives inMust NOT touch
New GPU op / kernelinclude/mirage/persistent_kernel/tasks/<arch>/<op>.cuh + its tests/runtime_python/.../sm100_<op>/ unit test (+ runtime_kernel_wrapper)multigpu.py; a model's builder
Wiring a new task type into the runtimeC++ registration only: runtime_header.h (enum) → src/kernel/{task_register,graph,runtime}.cc → tma.cuh if TMA — coherently, all-or-nothing—
A generic Python op-API for that taskone <operation>_layer method in python/mirage/mpk/persistent_kernel.py, named by the operation/algorithm, never by the model (moe_w13_linear_layer, splitk_linear_layer — not qwen3_*/deepseek_*)—
Model bring-uppython/mirage/mpk/models/<model>/builder.py (topology, TP/EP shard rules, layer composition) + demo/<model>/ (demo.py, HF reference, shard loader)persistent_kernel.py beyond generic ops; persistent_kernel.cuh; multigpu.py
Runtime / scheduler changepersistent_kernel.cuh / runtime_header.h / src/kernel/runtime.cc — as its own PRa model dir; unrelated kernels
Multi-GPU / collectivespython/mirage/mpk/multigpu.py — allreduce-runtime-owned (historically one owner PR)model builders

Model composition is data, not shared code: the order and choice of layers, the shard-rule regexes, and the weight-name mapping are all model-specific and belong in models/<model>/builder.py + demo/<model>/. Only a genuinely reusable operation earns a method in persistent_kernel.py, and it is named for the operation.

2. The norms (what a reviewer checks)

  1. Right place, not convenient place. Use the ownership map above. Ownership ≠ exclusivity: a new task type legitimately spans runtime_header.h + src/kernel + wrapper + tma.cuh (that IS its home); a runtime fix may touch a task .cuh when the invariant crosses the worker/task boundary. What's off-norm is reaching into a shared file to serve one model.
  2. Minimal shared-surface diff. A model-support PR does not touch persistent_kernel.cuh or multigpu.py, and touches persistent_kernel.py only to add/fix a generic operation-level primitive. Shared APIs are named by operation/algorithm, never <model>_*. (Counter-smell this catches: deepseek_mla_rope_q_layer, mla_kv_gather_unified_layer, dsv3_router_gate_gemv_layer added to the shared file — those belong behind a generic API called from the model builder.)
  3. No experiment env-vars in landed code. In persistent_kernel.py the only os.environ uses are the 5 build-path/infra vars (MIRAGE_HOME, NVSHMEM_INC_PATH, NVSHMEM_LIB_PATH, MPI_INC_PATH, MPI_LIB_PATH). No MPK_*_DBG / *_PROBE / *_GUARD / FASTFWD / campaign perf toggles survive into a merged PR — a perf lever is either hard-wired to its chosen production value (as a named constant) or absent, and a debug/diagnostic knob is deleted with its code path. (This norm is about landed code; an in-flight exploration branch keeps levers env-gated default-OFF — see mpk-lever-cleanup for the collapse step.) Audit isn't limited to persistent_kernel.py: check the builder, runtime.cc, and C++ getenv debug hooks for the same residue.
  4. Runtime changes are separate, coherent PRs — not bundled inside a model or kernel PR. #411 (Split persistent kernel) touched exactly 2 files. If your model work needs a runtime fix, split it into its own PR so the maintainer can take/defer it independently.
  5. One PR = one coherent topic. PRs are squash-merged (one commit each). A focused bugfix is often a single file (#719). Don't fold a de-cruft, a perf lever, and a new kernel into one diff. Commit granularity mirrors this even pre-squash: each commit is one reviewable idea.
  6. Comments are sparse and functional. ~5% comment lines in kernels, ~10% in a builder — they say what a non-obvious line does, never a perf-campaign diary, a "we tried X" history, or narration of the obvious. No commented-out code.
  7. Tests are part of the change shape. A new kernel/task ships its tests/runtime_python/.../test_*_testmode.py (usually + a pytorch_reference.py and, if needed, a wrapper/setup.py). A PR that adds a kernel with no test is off-norm.
  8. Registration/ABI is coherent. A new task ID updates runtime_header.h, the src/kernel registration, the wrapper, and TMA/runtime glue together — never a dangling enum with no register/graph handler, never a handler for a deleted enum. (Fail-loud: rebuild after any enum edit — a stale enum silently mis-dispatches.)
  9. Format + no artifacts. Run bash scripts/format.sh (clang-format-15, CI-enforced) before pushing. Never stage generated/local material: scratch/, outputs/, _results/, weight caches, generated test.cu/.so, perf logs, PR_DESCRIPTION/campaign notes, .claude/ (except the sanctioned .claude/skills/** + .claude/agents/** on a skills PR).
  10. No gratuitous assertions / error-throwing. Before adding ANY assert / raise / throw / abort / fail-loud check, ask: (a) did upstream have it? (b) is it necessary? (c) does omitting it have a correctness consequence — a silently-wrong result, not merely a later natural error? If (b)/(c) are "no", don't add it — default to not adding. Seemingly-correct defensive throws have caused real breakage: they fire on valid states and mislead debugging (a real case: assert(params.size()==0||3) that rejected the valid 1-param call the reader itself was written to handle). Keep a check only when it guards a real, demonstrated failure or a silently-wrong path (wrong-kernel selection, a BF16/FP8 fork), and even then prefer the existing/upstream idiom over a new fail-loud abort. A check that only pretty-prints an error the very next line would raise anyway (a KeyError, a dtype error) is pure surface — drop it. Config guards that merely restate a predicate the caller already checked are the archetype to delete. Same test for host launch/return-code checks: if upstream launched without the check and omitting it just defers to the next CUDA error, it's surface.
  11. No gratuitous renames / type-descriptors on working code. Don't rename existing symbols (functions, params, enum symbols) or renumber a task-type enum or bolt on type annotations / descriptor fields / "API-parity" wrapper params to code that already runs — unless that change is itself the point. Two distinct breakages: a symbol rename breaks source/API references (external callers, imports); renumbering a task-type enum (changing its integer value) breaks already-serialized task graphs, because task_type is serialized numerically — a surviving TP8-only reducer keeps its upstream id, it is not re-slotted into a deleted variant's number. A mpk: "PersistentKernel" annotation or a TYPE_CHECKING import is inert at runtime and adds a dependency edge for nothing. If it ran upstream without the rename/annotation/wrapper, don't add it. Accepting-then-discarding params (del eps, epsilon # API parity; a group_size arg that only exists to be rejected when != 128) is the same smell — unused surface that only exists to be validated away. Revert to the upstream name/shape.
Show full SKILL.md (220 more words)Show less

3. PR-shape checklist (run before you open/push)

  • Every changed file is the owner of its concern (ownership map). No shared-file reach for a single-model need.
  • git diff --stat <merge-base>..HEAD — is the shared-surface footprint (persistent_kernel.cuh, persistent_kernel.py, multigpu.py, runtime.cc) as small and generic as the closest exemplar PR? Any <model>_* method in persistent_kernel.py?
  • Env-var count in persistent_kernel.py back to the 5 build-path vars (no campaign toggles anywhere in the diff)?
  • Runtime/scheduler changes split into their own commit/PR?
  • Each commit one coherent topic; message states mechanism + (for perf) measured Δ; ends with the required Co-Authored-By line?
  • New kernels/tasks carry their test-mode test + reference?
  • Registration coherent (enum ⇄ register ⇄ graph ⇄ wrapper), rebuilt clean?
  • No added assert/raise/throw/abort that fails the norm-10 test (guards nothing demonstrated or silently-wrong; restates a caller predicate; pretty-prints an immediate natural error)?
  • No rename of an existing symbol / enum name-or-value / task-type ID, and no inert type-annotation / descriptor / API-parity param added to working code (norm 11)?
  • scripts/format.sh clean; no generated/local artifacts staged; sensitive-grep before push?

References

  • references/exemplar-prs.md — the cited merged PRs per category, with their file-touch tables (the empirical basis for every claim above). Mirror the closest one.
  • references/codex-checklist.md — a self-contained, tool-agnostic review checklist (no Claude/skill framing) you can paste into codex exec (or hand a human reviewer) to score a diff against these norms. Feed it the diff + "review against this checklist".

© 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

Files

SKILL.md and 2 other files (references) in .claude/skills/mpk-development-norms of mirage-project/mirage.

  • SKILL.md
  • references/codex-checklist.md
  • references/exemplar-prs.md

Open the folder on GitHubat commit f9eb70c

Compare with similar skills

Mpk Development Norms 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.

Mpk Development Norms compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mpk Development Norms this skillmirage-project/mirage2.5k—~2.7kAutomated safety check: PassApache-2.0
MCP Server Builderanthropics/skills180k63 repos~2.3kAutomated safety check: PassApache-2.0
PDF Processinganthropics/skills180k47 repos~2kAutomated safety check: PassProprietary
NotebookLM Research AssistantPleasePrompto/notebooklm-skill7.8k14 repos~2.4kAutomated safety check: NotesMIT
Manim Video Productionbrowser-use/video-use29k6 repos~3kAutomated safety check: PassMIT
PPT Masterhugohe3/ppt-master59k1 repos~2.5kAutomated safety check: PassMIT

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 63 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • PDF Processing

    anthropics/skills

    Official

    Handles everyday PDF jobs in Python and on the command line: extract text and tables, merge, split, rotate, watermark, fill forms, encrypt and OCR.

    180k GitHub starsUsed in 47 repos~2k tokens
    Documents & OfficeAuto-check passed
  • NotebookLM Research Assistant

    PleasePrompto/notebooklm-skill

    Lets Claude Code ask questions of your Google NotebookLM notebooks through browser automation and return answers grounded in your uploaded sources.

    7.8k GitHub starsUsed in 14 repos~2.4k tokens
    Knowledge ManagementAuto-check: notes
  • Manim Video Production

    browser-use/video-use

    Produces math and technical explainer videos with Manim Community Edition: concept animations, equation derivations, algorithm walkthroughs and data stories.

    29k GitHub starsUsed in 6 repos~3k tokens
    Media & CreativeAuto-check passed
  • PPT Master

    hugohe3/ppt-master

    Generates editable PowerPoint decks, rebuilds slides from images, fills .pptx templates and polishes existing presentations through routed workflows.

    59k GitHub starsUsed in 1 repo~2.5k tokens
    Documents & OfficeAuto-check passed
  • Scikit Learn

    zLanqing/codex-claude-academic-skills

    Machine learning in Python with scikit-learn. An agent skill from zLanqing/codex-claude-academic-skills.

    4.7k GitHub starsUsed in 16 repos~3.9k tokens
    Data & AnalyticsAuto-check passed

More from mirage-project/mirage

All 24 skills in this repo
  • V2 Perf Iteration

    mirage-project/mirage

    Runtime-V2 performance-iteration workflow. An agent skill from mirage-project/mirage.

    2.5k GitHub stars~4k tokensUpdated 2 days ago
    Auto-check passed
  • Add Mpk Task

    mirage-project/mirage

    Step-by-step guide for adding a new task implementation to Mirage Persistent Kernel (MPK).

    2.5k GitHub stars~4.5k tokensUpdated 2 days ago
    Auto-check passed
  • B200 Flash Attention4 Planner

    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…

    2.5k GitHub stars~1.9k tokensUpdated 2 days ago
    Auto-check passed
  • Mpk Faithful Gate

    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.

    2.5k GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check passed
  • Mpk Lever Cleanup

    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…

    2.5k GitHub stars~2.2k tokensUpdated 2 days ago
    Auto-check passed
  • Test Mode

    mirage-project/mirage

    Guide for using MPK test mode to unit-test individual layers or multi-layer pipelines through the full compilation pipeline.

    2.5k GitHub stars~4.6k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Mpk Development Norms

What does Mpk Development Norms do?

The MPK team's "where does a change belong + what a clean PR looks like" norms, extracted from mirage-project/mpk merged-PR history. Mpk Development Norms is an agent skill from mirage-project/mirage. The MPK team's "where does a change belong + what a clean PR looks like" norms, extracted from mirage-project/mpk merged-PR history.

How do I install Mpk Development Norms in Claude Code?

Run `npx skills add mirage-project/mirage --skill mpk-development-norms -a claude-code`. Or copy the skill folder (.claude/skills/mpk-development-norms in mirage-project/mirage) into .claude/skills/mpk-development-norms in your project. Claude Code loads it when a task matches its description.

How do I install Mpk Development Norms in Codex?

Run `npx skills add mirage-project/mirage --skill mpk-development-norms -a codex`. Or copy the skill folder (.claude/skills/mpk-development-norms in mirage-project/mirage) into .agents/skills/mpk-development-norms in your project. Codex loads it when a task matches its description.

Can I use Mpk Development Norms in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mirage-project/mirage --skill mpk-development-norms -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mpk-development-norms, .gemini/skills/mpk-development-norms, .github/skills/mpk-development-norms and .opencode/skills/mpk-development-norms in your project.

What does Mpk Development Norms need to run?

Going by SKILL.md and its folder, Mpk Development Norms needs the command-line tools its instructions call (bash, git and codex). Our summary lists: Python 3.

Does Mpk Development Norms access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Mpk Development Norms safe to install?

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.

What licence does Mpk Development Norms use?

Mpk Development Norms 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.

How many tokens does Mpk Development Norms use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.6k tokens, read only when the agent opens those files.

What are the alternatives to Mpk Development Norms?

Skills that share tags, products or a category with Mpk Development Norms: MCP Server Builder (anthropics/skills, 180k stars), PDF Processing (anthropics/skills, 180k stars), NotebookLM Research Assistant (PleasePrompto/notebooklm-skill, 7.8k stars) and Manim Video Production (browser-use/video-use, 29k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mpk Development Norms?

mirage-project (a GitHub organization) maintains it in mirage-project/mirage, which has 2,545 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.