Mindmemos CLI
mindscale-noah/MindMemOS
Give an AI agent persistent, cross-session long-term memory through MindMemOS.
Guide for adding a new model (e.g., Llama4, DeepSeek V3) to the MPK persistent kernel.
$ npx skills add mirage-project/mirage --skill add-mpk-model -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install mirage-project/mirage add-mpk-model --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/add-mpk-model .claude/skills/add-mpk-model && 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 "add-mpk-model" agent skill from https://github.com/mirage-project/mirage/tree/mpk/.claude/skills/add-mpk-model into .claude/skills/add-mpk-model/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-mpk-model", 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/add-mpk-modelType 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 add-mpk-model -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install mirage-project/mirage add-mpk-model --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/add-mpk-model .agents/skills/add-mpk-model && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "add-mpk-model" agent skill from https://github.com/mirage-project/mirage/tree/mpk/.claude/skills/add-mpk-model into .agents/skills/add-mpk-model/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-mpk-model", 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 add-mpk-model -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install mirage-project/mirage add-mpk-model --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/add-mpk-model .cursor/skills/add-mpk-model && 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 "add-mpk-model" agent skill from https://github.com/mirage-project/mirage/tree/mpk/.claude/skills/add-mpk-model into .cursor/skills/add-mpk-model/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-mpk-model", 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/add-mpk-model--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 add-mpk-model -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install mirage-project/mirage add-mpk-model --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/add-mpk-model .gemini/skills/add-mpk-model && 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 "add-mpk-model" agent skill from https://github.com/mirage-project/mirage/tree/mpk/.claude/skills/add-mpk-model into .gemini/skills/add-mpk-model/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-mpk-model", 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 add-mpk-modelInstalls 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 add-mpk-model -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/add-mpk-model .github/skills/add-mpk-model && 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 "add-mpk-model" agent skill from https://github.com/mirage-project/mirage/tree/mpk/.claude/skills/add-mpk-model into .github/skills/add-mpk-model/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-mpk-model", 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 add-mpk-model -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 add-mpk-model --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/add-mpk-model .opencode/skills/add-mpk-model && 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 "add-mpk-model" agent skill from https://github.com/mirage-project/mirage/tree/mpk/.claude/skills/add-mpk-model into .opencode/skills/add-mpk-model/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-mpk-model", 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.
add-mpk-modelGuide for adding a new model (e.g., Llama4, DeepSeek V3) to the MPK persistent kernel.
Add Mpk Model is an agent skill from mirage-project/mirage. Guide for adding a new model (e.g., Llama4, DeepSeek V3) to the MPK persistent kernel. Covers prerequisites check, demo structure, layer wiring, and testing.
Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It works with DeepSeek and Python. The repository describes itself as: Mirage Persistent Kernel: Compiling LLMs into a MegaKernel. The licence is Apache-2.0.
5 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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python).
From 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.
Add Mpk Model loads about 1.6k tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 510 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). 510 words, ~1,591 tokens.
.claude/skills/add-mpk-model/SKILL.md (or your agent's skills folder).You are helping the user add a new model to MPK. This is a context + guidelines skill (not a step-by-step recipe) because model implementations vary significantly depending on architecture (dense vs MoE, GQA vs MLA, etc.).
Read
mpk-development-normsFIRST. This skill is the HOW; that one is the WHERE + the PR-shape gate — model code stays inmodels/<model>/builder.py+demo/<model>/, sharedpersistent_kernel.pygets only GENERIC ops named by operation (never<model>_*), no experiment env-vars land, and runtime fixes are separate PRs. A model bring-up that sprawls intopersistent_kernel.cuh/multigpu.py/model-specific shared methods is exactly what it flags.
Before writing any model code, identify what the new model needs:
python/mirage/mpk/persistent_kernel.py. Search for def *_layer methods. Common ones: embed_layer, rmsnorm_layer, linear_layer, silu_mul_layer, paged_attention_layer, moe_topk_softmax_routing_layer, moe_w13_linear_layer, etc./add-mpk-task skill to add them first. Each missing layer requires implementing a CUDA task kernel and Python layer method.mla_prefill_layer/mla_decode_layer. Novel attention variants need new tasks.Model implementations live in demo/<model_name>/, NOT in python/mirage/mpk/models/. The models/ directory holds only base infrastructure (GraphBuilder, MirageModelConfig, model registry).
demo/<model_name>/
demo.py # End-to-end inference demo
models/ # HuggingFace model files
modeling_<model>.py # HF model definition (for reference)
configuration_<model>.py # HF config class
<model>_shard_loader.py # Weight name mapping + sharding (if multi-GPU)Reference implementations:
demo/qwen3/ — Canonical dense transformer modeldemo/deepseek_v3/ — MoE model (DeepSeek V3 with MLA + MoE)The demo script follows this pattern (see demo/qwen3/demo.py):
# 1. Parse args (model path, batching config, profiling flags)
# 2. Load model config from HuggingFace
# 3. Create MPKMetadata with runtime configuration
metadata = MPKMetadata(
mode="offline",
model_name="org/Model-Name",
weight_from_model=True,
max_num_batched_tokens=...,
max_num_batched_requests=...,
page_size=..., max_num_pages=...,
# ...
)
# 4. Create MPK and build the computation graph
mpk = MPK(metadata)
mpk.build() # Calls the model builder to wire layers
# 5. Compile the megakernel
mpk.compile()
# 6. Load request and run inference
mpk.load_new_request("Your prompt here")
mpk()The builder (subclass of GraphBuilder or custom code in the demo) constructs the computation graph by calling layer methods on PersistentKernel:
# Attach weight tensors from state dict
w_norm = pk.attach_input(state_dict["model.layers.0.input_layernorm.weight"], name="layer_0_norm")
w_qkv = pk.attach_input(qkv_weight, name="layer_0_wqkv")
# Create intermediate buffers
norm_out = pk.new_tensor(dims=(...), name="norm_out", io_category="cuda_tensor")
# Chain layer calls
pk.rmsnorm_layer(input=x, weight=w_norm, output=norm_out, grid_dim=(...), block_dim=(...))
pk.linear_layer(input=norm_out, weight=w_qkv, output=qkv_out, grid_dim=(...), block_dim=(...))
pk.paged_attention_layer(...)
# ... etc for each layer in the modelblock_dim: Always (128,1,1) for Ampere, (256,1,1) for Hopper/Blackwell. Use pk.target_cc >= 90 to choose.grid_dim: Depends on the layer. For batch-parallel layers (rmsnorm, embedding): (max_num_batched_tokens, 1, 1). For linear layers, use the grid_for_rmsnorm_linear_layer() helper from the Qwen3 demo.If the model uses tensor parallelism, create a shard loader mapping HuggingFace weight names to MPK names with sharding types:
mapping = {
"q_proj": {"name": "wq", "shard_type": [(ShardType.COL_PARALLEL,)]},
"o_proj": {"name": "wo", "shard_type": [(ShardType.ROW_PARALLEL,)]},
"input_layernorm": {"name": "attn_norm", "shard_type": [(ShardType.NONE,)]},
# ...
}See demo/qwen3/qwen3_shard_loader.py for the complete pattern.
paged_attention_layer or paged_attention_split_kv_layer.mla_prefill_layer / mla_decode_layer./add-mpk-task.For Mixture-of-Experts models, the available layer methods are:
moe_topk_softmax_routing_layer — Router (top-k gating with softmax)moe_sigmoid_topk_routing_layer — Router (sigmoid gating, DeepSeek V3 style)moe_w13_linear_layer / moe_w13_fp8_layer — First expert linear (gate+up fused)moe_silu_mul_layer — SiLU activation between expert linear layersmoe_w2_linear_layer / moe_w2_fp8_layer — Second expert linear (down projection)moe_mul_sum_add_layer — Combine expert outputs with routing weights + residualtests/runtime_python/test_mode/test_qwen3_mlp_testmode.py for the canonical pattern — it tests gate+up linear, silu_mul, and down+residual individually and as a pipeline.mpk.compile(output_dir="./debug_output") to inspect generated CUDA code and task graph JSON.© 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
Just SKILL.md in .claude/skills/add-mpk-model of mirage-project/mirage.
Open the folder on GitHubat commit f9eb70c
Add Mpk Model 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 |
|---|---|---|---|---|---|---|
| Add Mpk Model this skillmirage-project/mirage | 2.5k | — | ~1.6k | Automated safety check: Pass | Apache-2.0 | |
| Mindmemos CLImindscale-noah/MindMemOS | 1k | — | ~3.4k | Automated safety check: Pass | None | |
| Readable Verilog GeneratorEriemon/verilog-generator | 312 | — | ~5.4k | Automated safety check: Pass | Apache-2.0 | |
| Bridgic LLMsbitsky-tech/bridgic | 155 | — | ~839 | Automated safety check: Notes | MIT | |
| K8e Sandboxxiaods/k8e | 500 | — | ~6k | Automated safety check: Pass | Apache-2.0 | |
| Excel Workbookadongwanai/learn-workbuddy | 412 | — | ~597 | Automated safety check: Notes | MIT |
mindscale-noah/MindMemOS
Give an AI agent persistent, cross-session long-term memory through MindMemOS.
Eriemon/verilog-generator
A skill your agent uses when creating, writing, reviewing, annotating, repairing, refactoring, or validating readable Verilog RTL, including synthesizable Verilog-2001 .v files, existing-RTL…
bitsky-tech/bridgic
LLM provider initialization for bridgic projects. An agent skill from bitsky-tech/bridgic.
xiaods/k8e
Run a goal end to end inside an isolated K8E sandbox pod (gVisor / Kata / Firecracker) instead of on the host: exec bash / Python / Node / TypeScript, install packages, move files in and out, reuse…
adongwanai/learn-workbuddy
使用此 Skill 创建、检查、编辑和验证 XLSX 工作簿。用户提到 Excel、xlsx、工作簿、工作表、表格,或要求修改、汇总、检查 Excel 文件时使用。只支持基础 XLSX 操作,不处理宏、VBA、图表、数据透视表或外部工作簿引用。
kwhi6693-web/photo-abstract-editorial
A skill your agent uses when one or more photographs must become adaptive photo-plus-abstraction editorial compositions while source facts, spatial relationships, and strict photo preservation…
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.
Guide for adding a new model (e.g., Llama4, DeepSeek V3) to the MPK persistent kernel. Add Mpk Model is an agent skill from mirage-project/mirage., Llama4, DeepSeek V3) to the MPK persistent kernel.
Run `npx skills add mirage-project/mirage --skill add-mpk-model -a claude-code`. Or copy the skill folder (.claude/skills/add-mpk-model in mirage-project/mirage) into .claude/skills/add-mpk-model in your project. Claude Code loads it when a task matches its description.
Run `npx skills add mirage-project/mirage --skill add-mpk-model -a codex`. Or copy the skill folder (.claude/skills/add-mpk-model in mirage-project/mirage) into .agents/skills/add-mpk-model 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 add-mpk-model -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-mpk-model, .gemini/skills/add-mpk-model, .github/skills/add-mpk-model and .opencode/skills/add-mpk-model in your project.
SKILL.md names no scripts, command-line tools or credentials: Add Mpk Model is instructions for the agent only. Our summary lists: Python 3.
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.
Add Mpk Model 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.6k tokens (SKILL.md is roughly 6.4k 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 Add Mpk Model: Mindmemos CLI (mindscale-noah/MindMemOS, 1k stars), Readable Verilog Generator (Eriemon/verilog-generator, 312 stars), Bridgic LLMs (bitsky-tech/bridgic, 155 stars) and K8e Sandbox (xiaods/k8e, 500 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,543 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.