diffusers: Skill for Claude Code

.ai/skills/model-integration/SKILL.md

model-integration is a skill for Claude Code from huggingface/diffusers. It costs 45 tokens per session (1,861 once invoked), scanned A, original, Apache-2.0.

A guided process for adding a new machine-learning model or pipeline to Diffusers, an open-source library for diffusion models.

In plain words
What is it for?
Setting up model files, converting pipelines or weights, and adding support for new model versions.
Why use it?
It gives the work a defined order and checks that the new implementation matches the original model's results.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin. Also seen: names the AskUserQuestion tool.

This is huggingface/diffusers's own configuration. It tells Claude Code how to work on diffusers 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 diffusers configures →

Part of the diffusers plugin — 4 skills shipped together

About the project

Diffusers is a PyTorch library for running and building diffusion systems that generate images, audio, and 3D molecular structures. Developers use its pretrained models, generation pipelines, and interchangeable noise schedulers for inference or model training. The catalogue add-ons support workflows around the library.

huggingface/diffusers · 34,728 stars · on GitHub · huggingface.co

Reuse

Borrowing it

Nothing to install: this file belongs to huggingface/diffusers. 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/huggingface/diffusers/main/.ai/skills/model-integration/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/huggingface/diffusers

Made for: Claude Code.

Or install diffusers, the plugin that ships this one along with the rest of its 4 skills.

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 model-integration

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/huggingface/diffusers/model-integration"><img src="https://agentmods.dev/badge/skills/huggingface/diffusers/model-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,861 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
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
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.00045 $0.01861
Opus 5.5 $0.00018 $0.00744
Sonnet 5.5 $0.00009 $0.00372
Haiku 4.5 $0.00005 $0.00186

Measured 1mo ago against content hash 16faeacecc0b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 1mo 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.

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.

.ai/skills/model-integration/SKILL.md · 124 lines

How it starts

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

Goal

Integrate a new model into diffusers end-to-end, to full numerical parity with the reference implementation — one workflow at a time.

Setup — gather before starting

Before writing any code, gather info in this order:

  1. Reference repo — ask for the github link. If they've already set it up locally, ask for the path. Otherwise, ask what setup steps are needed (install deps, download checkpoints, set env vars, etc.) and run through them before proceeding.
  2. Inference script — ask for a runnable end-to-end script for a basic workflow first (e.g. T2V). Then ask what other workflows they want to support (I2V, V2V, etc.) and agree on the full implementation order together.
  3. Standard vs modular — default to modular. Modular Diffusers is the preferred implementation for new pipelines; the standard DiffusionPipeline is still supported but no longer the default. We prefer modular especially for models that don't fit a fixed task-based structure (modality baked into the checkpoint) or that are actively evolving.

Ask step 3 as an AskUserQuestion, with modular marked as the recommended default.

Once you have everything, confirm the plan with the user before implementing — state exactly what you'll do, e.g. "I'll integrate model X with pipeline Y based on your script, and verify the model matches the reference before considering it done."

Then work through the Integration checklist below

Integration checklist

A pipeline in Diffusers (be it standard or modular) will have multiple components. These components can be models, schedulers, processors, etc.

  • Transformer model
    • Implement the model with from_pretrained support (conventions: models.md)
    • Convert weights (see Weight / Checkpoint Conversion)
    • Parity test against the reference (internal, not shipped — see Model parity test)
    • Register in the relevant __init__.py files (lazy imports)
    • Model-level tests (see Testing)
  • VAE (if applicable) — reuse an existing AutoencoderKL* if possible; if a new one is needed, follow the same sub-steps as the transformer
  • Scheduler — reuse an existing scheduler, or add a custom one
  • Pipeline
    • Implement the pipeline — see modular.md for modular pipeline, or pipelines.md for standard pipeline
    • Add a LoRA mixin if applicable
    • Register in the relevant __init__.py files (lazy imports)
    • Pipeline-level tests (see Testing)
  • Docs — see File structure
  • Style — make style and make quality

Read the full file on GitHub · 124 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. 1mo ago First seen · 124 lines · 45 tokens per session scan A 16faeacecc0b

Subscribe to this mod's changes

model-integration is a skill published in the GitHub repository huggingface/diffusers (34,728 stars, last pushed today), licensed Apache-2.0. It adds 45 tokens to every session and 1,861 once invoked, about $0.0002 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

Other skills, from other repositories

ml-training-recipes

Battle-tested PyTorch training recipes for all domains — LLMs, vision, diffusion, medical imaging, protein/drug discovery, spatial omics, genomics. Covers training loops, optimizer selection (AdamW, Muon), LR scheduling, mixed precision, debugging, and systematic experimentation. Use when training or fine-tuning…

Orchestra-Research/AI-Research-SKILLs · 88 tokens

physicsnemo-shard-tensor

Official NVIDIA-authored guidance for PhysicsNeMo ShardTensor domain parallelism — integrate domain parallelism into training/inference scripts (new or existing) with DDP or FSDP2, write and register shard patches to enable new layers/ops, and bootstrap multi-GPU correctness tests. Use when working with ShardTensor…

NVIDIA/physicsnemo · 152 tokens

physicsnemo-discover

Official NVIDIA-authored guidance for navigating PhysicsNeMo — pick the model, datapipe, or example for a SciML/AI4Science task (surrogates, forecasting, downscaling, physics-informed, inverse, generative). Points at existing files via live repo search; never writes code. Do NOT use for installation or environment…

NVIDIA/physicsnemo · 124 tokens

deep-learning

Use when training or debugging a neural net in PyTorch — the forward/loss/backward/step loop and its silent bugs, mixed precision (AMP), AdamW/LR schedules, DDP/FSDP/ZeRO, checkpoints and seeds. NOT LoRA/QLoRA on a pretrained LLM (that is finetuning), NOT tabular sklearn/XGBoost (that is machine-learning), NOT…

ericrisco/rsc-harness · 102 tokens

single-cell-multi-omics-analysis-scvi

Probabilistic deep learning framework for single-cell multi-omics data analysis. Use this skill when: (1) Analyzing single-cell RNA-seq data with batch correction, (2) Integrating multi-modal data (CITE-seq, ATAC-seq, multi-omics), (3) Performing cell type annotation with scANVI, (4) Spatial transcriptomics…

PharMolix/OpenBioMed · 94 tokens

ml-for-aec

Computer vision for buildings, image-to-floorplan, generative ML models, performance prediction, structural analysis ML, energy prediction, natural language to design, and point cloud ML for AEC computational design.

Abhinavbwj/Claude-skills-for-Computational-Designers · 39 tokens