Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/huggingface/diffusers/custom-blocksnpx skills add huggingface/diffusers --skill custom-blocksgit clone --depth 1 https://github.com/huggingface/diffusersWhat 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 | $0.00079 | $0.01637 |
| Opus 5 | $0.00039 | $0.00818 |
| Sonnet 5 | $0.00016 | $0.00327 |
| Haiku 4.5 | $0.00008 | $0.00164 |
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 2d 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 — 160 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.
- 2d 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,407 stars, last pushed 2d ago), licensed Apache-2.0. It adds 79 tokens to every session and 1,637 once invoked, about $0.0004 per session on Opus 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.
Other skills, from other repositories
audio-cog
OpenSquilla-compatible audio generation adapter for webpage audio requests. Prefer OpenRouter config/API key in OpenSquilla; preserve the upstream CellCog workflow only as optional ClawHub provenance.
nano-banana-pro-openrouter
Deterministic OpenRouter image generation adapter for Nano Banana Pro / Gemini image models. Use as skillexec when a meta-skill needs local image files and structured IMAGEREADY records without spawning an LLM agent.
founder-meditation
When something goes wrong — build failures, crashes, errors, test failures, deployment issues — generate a short calming meditation with TTS audio to reassure the user that everything will be okay.
music-and-singing-studio
Generate instrumental music, background beds, jingles, or sung songs with lyrics through OpenSquilla audio tools. Use when the user asks for BGM, music generation, 唱歌, 生成歌曲, lyrics to song, or a playable music audio artifact.
api-contrib
Contributing to the Kokoro-FastAPI Python API: module layout, endpoint gating pattern, test expectations. Use when adding or changing endpoints, services, or inference code.
ima2
Use the ima2-gen CLI/server to generate, edit, inspect, and manage local AI image generation jobs.