cache-dit: Skill for Claude Code

.agents/skills/cache-dit-model-integration/SKILL.md

cache-dit-model-integration is a skill for Claude Code from vipshop/cache-dit. It costs 243 tokens per session (15,853 once invoked), scanned A, original, Apache-2.0.

A guide for adding a new DiT model to cache-dit, a system for running diffusion transformer image or video models with caching and parallel processing. It covers model integration, command-line use, installation, and testing.

In plain words
What is it for?
Adding support for a new diffusion model, adapting its pipeline and transformer code, configuring parallel execution, updating the generate command, and testing the integration.
Why use it?
It provides a defined integration process for connecting a new model to cache-dit's caching, device-parallel, text-encoder, and VAE features.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: installed under .agents/ (shared by several agents).

This is vipshop/cache-dit's own configuration. It tells Claude Code how to work on cache-dit itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cache-dit configures →

About the project

Cache-DiT is a PyTorch inference engine for DiT models, with caching, parallel processing, quantization, and CPU offloading. It is for running diffusion-model pipelines with support for systems and hardware such as Diffusers, SGLang Diffusion, vLLM-Omni, ComfyUI, NVIDIA GPUs, Ascend NPUs, and AMD GPUs.

vipshop/cache-dit · 1,300 stars · on GitHub · cache-dit.readthedocs.io

Reuse

Borrowing it

Nothing to install: this file belongs to vipshop/cache-dit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/vipshop/cache-dit/main/.agents/skills/cache-dit-model-integration/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/vipshop/cache-dit

Made for: Claude Code.

Wrote 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.

agentmods badge for cache-dit-model-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/vipshop/cache-dit/cache-dit-model-integration/github.svg)](https://agentmods.dev/skills/vipshop/cache-dit/cache-dit-model-integration)
Your own site
<a href="https://agentmods.dev/skills/vipshop/cache-dit/cache-dit-model-integration"><img src="https://agentmods.dev/badge/skills/vipshop/cache-dit/cache-dit-model-integration/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.

agentmods 80×15 button for cache-dit-model-integration

Your own site · 80×15
<a href="https://agentmods.dev/skills/vipshop/cache-dit/cache-dit-model-integration"><img src="https://agentmods.dev/badge/skills/vipshop/cache-dit/cache-dit-model-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 243 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 15,853 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Prompt Injection · line 333
    Subtle instructions detected that may alter agent decision-making or introduce hidden biases.
    Fix: Review content for implicit steering or bias. Ensure instructions are explicit and align with the skill's stated purpose.
  • medium Prompt Injection · line 478
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00243 $0.15853
Opus 5.5 $0.00097 $0.06341
Sonnet 5.5 $0.00049 $0.03171
Haiku 4.5 $0.00024 $0.01585

Measured today against content hash ea12d8f6bd31, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cache-dit-model-integration 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 today.

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.

.agents/skills/cache-dit-model-integration/SKILL.md · 652 lines

How it starts

The opening of the file, as written. The whole thing — 652 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ROUTE FIRST — what is the user actually asking for?

Pick one route before reading anything else; the rest of this file is only route 2.

  1. Benchmarking / acceptance of an ALREADY-supported model — the model runs (cdit.generate has an example, cache/CP/TP already work) and the user wants speed + PSNR/SSIM numbers: "跑一遍全量测试矩阵", "4 卡验收", "量化掉多少精度", "和 bf16 比加速比" → read ./references/perf_matrix.md. It owns the row list, command templates, the layout mapping / preflight, and Tier A (1/2 GPUs, default) vs the on-request Tier B (4 GPUs) / Tier C (8 GPUs) extensions (hybrid CP+TP included). Do NOT open Tier B/C unless the user explicitly asks to extend to 4/8 cards. The GATE CHECK, the Hard rules and the §0.6 checklist below do not apply to this route. 量化类型与配置语义(fp8/int8/int4/nvfp4、svdq PTQ vs DQ、precision plan、regional、 per_tensor_fallback、observer)以 cache-dit-quantization 为准;本 route 只负责跑矩阵、 出加速比与 PSNR/SSIM,不负责解释量化后端行为。
  2. Integrating a NEW model — no BlockAdapter, no CLI example, new pipeline/transformer code → continue with the GATE CHECK and §0 below.
  3. A measured speedup looks wrong, or choosing which optimizations can pay off before benchmarking → read ./references/perf_analysis.md (FLOPs budget: attention vs GEMM share).
  4. The model is audio-only (TTS / text-to-audio: it returns a waveform, not frames) → read ./references/audio.md before the Cache chapter. It covers the latent layout and duration semantics, the CP obstacles specific to audio (dataclass return, per-rank RoPE, replicated text, duration mask), the wav output path in the CLI, and the audio metrics + their noise floor — the image PSNR/SSIM gates below do not transfer. The rest of this file (GATE CHECK, phases) still applies — only route 1 skips them.

模型接完只是第一步;下面这些场景不要在本文里找答案:

触发场景 去读
量化相关的模型测试与精度归因:--quantize-type 选哪个、precision plan / regional / per_tensor_fallback、svdq 选 PTQ 还是 DQ、observer 怎么定位掉精度的层、"量化掉多少精度"该归因到哪条路径 cache-dit-quantization
模型里要新增或改动 CUDA 算子、算子注册与构建、从 nunchaku 等上游移植 kernel cache-dit-custom-kernel(迁移方法论在其 references/operator-migration.md)
发版本、构建 cu13 wheel、索引与安装验收 cache-dit-build-release
只要 CUDA/PTX 细节、CUTLASS/CuTe C++ 模板、CuTe DSL Python、NCU 驱动的 kernel 优化 cuda-cpp-kernel / cutlass-cpp-kernel / cute-dsl-kernel / cuda-auto-tune

Read the full file on GitHub · 652 lines

Changes

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.

  1. today Changed · +16 lines ea12d8f6bd31
  2. 6d ago Changed 25108209f042
  3. 7d ago Changed · +54 lines · +161 tokens per session e5eee0e935e9
  4. 8d ago Changed · +35 lines e452d7ce7518
  5. 9d ago Changed · +2 lines 2130b4d97ace
  6. 10d ago Changed · +2 lines 7987cf0d0240
  7. 14d ago Changed · +3 lines 26751e612e9a
  8. 15d ago Changed · +5 lines 9505d7a435e7
  9. 17d ago Changed · +10 lines 1aaca3e86ac5
  10. 2mo ago First seen · 525 lines · 82 tokens per session scan A 79835fd69363

Subscribe to this mod's changes

cache-dit-model-integration is a skill published in the GitHub repository vipshop/cache-dit (1,300 stars, last pushed today), licensed Apache-2.0. It adds 243 tokens to every session and 15,853 once invoked, about $0.0010 per session on Opus 5.5. 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.

Related

cache-dit-model-integration compared with skills from other repositories

cache-dit-model-integration next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cache-dit-model-integrationvipshop/cache-ditSkill1.3ktodayApache-2.0A243Claude Code
agent-platform-model-registrygoogle/skillsSkill22kyesterdayApache-2.0A60Claude Code, Codex
foundry-config-setupmicrosoft/agent-frameworkSkill15kyesterdayMITA65Claude Code, Codex
google-cloud-solution-agentic-analytics-spark-knowledge-cataloggoogle/skillsSkill22kyesterdayApache-2.0A132Claude Code, Codex
training-checkwanshuiyin/Auto-claude-code-research-in-sleepSkill19k3d agoMITA35Claude Code
nemo-automodel-launcher-configNVIDIA/skillsSkill3.9kyesterdayApache-2.0A30Claude Code
finetuningmicrosoft/skillsSkill3.2kyesterdayMITA132Claude Code