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.
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.
curl -O https://raw.githubusercontent.com/huggingface/diffusers/main/.ai/skills/custom-blocks/SKILL.mdgit clone --depth 1 https://github.com/huggingface/diffusersWrote 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.
[](https://agentmods.dev/skills/huggingface/diffusers/custom-blocks)<a href="https://agentmods.dev/skills/huggingface/diffusers/custom-blocks"><img src="https://agentmods.dev/badge/skills/huggingface/diffusers/custom-blocks/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.
<a href="https://agentmods.dev/skills/huggingface/diffusers/custom-blocks"><img src="https://agentmods.dev/badge/skills/huggingface/diffusers/custom-blocks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Snyk pass
- NVIDIA SkillSpector warn
SkillSpector: 1 finding, 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 Agent Snooping · line 152 Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00079 | $0.01676 |
| Opus 5.5 | $0.00032 | $0.00670 |
| Sonnet 5.5 | $0.00016 | $0.00335 |
| Haiku 4.5 | $0.00008 | $0.00168 |
Grade A, and why
custom-blocks 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.
How it starts
The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.
What this skill is for
A ModularPipelineBlocks subclass is a unit of pipeline logic — input/output spec plus a __call__ — that
slots into diffusers' modular pipeline composition. Once you have one defined locally, you almost always want to
publish it as a small Hub repo so others can from_pretrained it. diffusers-cli custom_blocks automates the
packaging step: it parses your Python file, instantiates the chosen block class, and writes a
save_pretrained-style directory in your cwd that's ready to push to the Hub.
Use this skill when:
- The user is writing a custom modular block and asks "how do I publish this?" or "package this for the Hub".
- The user has a
block.py(or similar) file with one or moreModularPipelineBlockssubclasses. - You're scaffolding a new modular pipeline repo and need the on-disk layout that
ModularPipelineBlocks.from_pretrainedexpects.
Don't use this skill for: running an existing modular pipeline (diffusers-cli run), introspecting one
(diffusers-cli schema), or writing the block class itself — this skill packages an already-written block.
The end-to-end workflow
[you: write block.py] → diffusers-cli custom_blocks → [packaged dir in cwd]
↓
hf upload <repo> .
↓
consumers: ModularPipeline.from_pretrained(<repo>, trust_remote_code=True)
diffusers-cli schema --model <repo> --trust-remote-code
diffusers-cli run --model <repo> --trust-remote-code ...
The skill covers the middle box. The bookends (writing the block and uploading) are out of scope.
Command surface
diffusers-cli custom_blocks [--block_module_name <file.py>] [--block_class_name <ClassName>]
Flags
--block_module_name <file>— Python file containing the block class. Defaults toblock.pyin the cwd.--block_class_name <name>— Which class in the file to package. Optional: if omitted, the CLI parses the file withast, finds every class that inherits fromModularPipelineBlocks, and uses the first one (with an info log naming the others). Specify explicitly when the file defines more than one block and you want a specific one.
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.
- 1mo ago Changed · +1 lines d71b5ddde113
- 3mo ago First seen · 160 lines · 79 tokens per session scan A becb119c4b27
custom-blocks is a skill published in the GitHub repository huggingface/diffusers (34,987 stars, last pushed yesterday), licensed Apache-2.0. It adds 79 tokens to every session and 1,676 once invoked, about $0.0003 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.
custom-blocks compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| custom-blockshuggingface/diffusers | Skill | 35k | yesterday | Apache-2.0 | A | 79 | Claude Code |
| physicsnemo-shard-tensorNVIDIA/physicsnemo | Skill | 3.5k | 2d ago | Apache-2.0 | A | 152 | Claude Code, Codex |
| physicsnemo-discoverNVIDIA/physicsnemo | Skill | 3.5k | 2d ago | Apache-2.0 | A | 124 | Claude Code, Codex |
| ml-training-recipesOrchestra-Research/AI-Research-SKILLs | Skill | 15k | 1mo ago | MIT | A | 88 | Claude Code |
| deep-learningericrisco/rsc-harness | Skill | 682 | 5d ago | MIT | A | 102 | Claude Code, Codex |
| single-cell-multi-omics-analysis-scviPharMolix/OpenBioMed | Skill | 1.1k | 4mo ago | MIT | A | 94 | Claude Code, Codex |
| graphsignal-profilergraphsignal/graphsignal-profiler | Skill | 245 | 4mo ago | Apache-2.0 | A | 74 | Claude Code, Codex |