diffusers-workflow: Instructions file for Claude Code

CLAUDE.md

diffusers-workflow CLAUDE.md is an instructions file for Claude Code from dkackman/diffusers-workflow. It costs 1,699 tokens per session, scanned A, original, Apache-2.0.

A project guide for Claude Code, an AI coding assistant, working on a JSON-based workflow engine for Hugging Face Diffusers. Diffusers is a library for running image, video, and audio generation models.

In plain words
What is it for?
Use it when building or checking JSON generation workflows, starting the local server, authenticating with Hugging Face, or running tests.
Why use it?
It explains how to install, run, validate, and test the project, so an agent can work within its existing commands and design.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions .claude-plugin; mentions CLAUDE.md; mentions Claude Code.

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

Reuse

Borrowing it

Nothing to install: this file belongs to dkackman/diffusers-workflow. 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/dkackman/diffusers-workflow/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/dkackman/diffusers-workflow

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 diffusers-workflow CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/dkackman/diffusers-workflow/claude-md/github.svg)](https://agentmods.dev/instructions/dkackman/diffusers-workflow/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/dkackman/diffusers-workflow/claude-md"><img src="https://agentmods.dev/badge/instructions/dkackman/diffusers-workflow/claude-md/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 diffusers-workflow CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/dkackman/diffusers-workflow/claude-md"><img src="https://agentmods.dev/badge/instructions/dkackman/diffusers-workflow/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,699 This file is loaded in full into every session.
When invoked 1,699 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.01699 $0.01699
Opus 5.5 $0.00680 $0.00680
Sonnet 5.5 $0.00340 $0.00340
Haiku 4.5 $0.00170 $0.00170

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

Security

Grade A, and why

diffusers-workflow CLAUDE.md 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 yesterday.

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.

CLAUDE.md · 106 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

diffusers-workflow is a declarative workflow engine for HuggingFace Diffusers. Users define AI image/video generation pipelines in JSON — variable substitution, multi-step composition, cross-step data flow, and utility tasks — without writing Python. Supports CUDA (NVIDIA), MPS (Apple Silicon), and CPU.

Common Commands

# Install
bash ./install.sh && source ./activate

# HTTP server + web UI (http://127.0.0.1:8765, API docs at /docs)
python -m dw.serve
dw setup    # service + Claude registrations (docs/INSTALL.md); checkout: venv/bin/dw setup --no-service --no-desktop
dw agent    # Claude Code with the dw-notes channel

# Run a workflow - dw.run only queues it on a running dw.serve. This is the SD 1.5
# smoke test: small and ungated (no HF login); it proves the engine, not the picture
python -m dw.run workflows/templates/text-to-image.json
python -m dw.run workflows/templates/text-to-image.json prompt="a cat" num_images_per_prompt=4

# A picture on the model this server prefers (preference:text_to_image), by tier;
# a gated model (workflows/models/flux-dev.json) needs `hf auth login` first
python -m dw.run workflows/templates/preferred/text-to-image.json prompt="a cat" tier=best

# Validate a workflow against schema
python -m dw.validate workflows/models/z-image.json

# Unit tests - parallel on every core (`-n auto`); naming files runs one process
pytest tests/ -v
pytest tests/test_security.py -v

# System test (the smoke test) - downloads SD 1.5 (a few GB) and generates one image
python -m dw.test

Where things are

docs/ARCHITECTURE.md is the map: concept, owning module, the rule that holds across the seam, and the test or check that enforces it. Open it before grepping - it names the module, and that module's docstring holds the detail.

  • dw.serve runs every job in a persistent spawned worker (one per --devices card) (dw/worker.py, managed by dw/worker_manager.py) that keeps models cached between runs, so a change to engine code needs a server restart before a job sees it.
  • The packaged dw/workflows/ is what a builtin: step names (resolved in dw/library.py); it is not the top-level workflows/ folder of runnable examples.
  • The workflow schema is dw/workflow_schema.json - read it for the full structure.
  • The HTTP server is dw/server/ (see dw/server/CLAUDE.md), the web UI is ui/ (see ui/CLAUDE.md), and the stdio MCP server is dw_mcp/ (see dw_mcp/CLAUDE.md).

Read the full file on GitHub · 106 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. yesterday Changed · -1 lines · +75 tokens per session 20002d3a7058
  2. 7d ago Changed · -1 lines · +40 tokens per session 2d3c5f97bc62
  3. 15d ago First seen · 108 lines · 1,584 tokens per session scan A a264cc0f6b07

Subscribe to this mod's changes

diffusers-workflow CLAUDE.md is an instructions file published in the GitHub repository dkackman/diffusers-workflow (19 stars, last pushed today), licensed Apache-2.0. It adds 1,699 tokens to every session, about $0.0068 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-11-15.

Related

diffusers-workflow CLAUDE.md compared with instructions from other repositories

diffusers-workflow CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
diffusers-workflow CLAUDE.mddkackman/diffusers-workflowInstructions file19todayApache-2.0A1,699Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,887GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA7,230Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150kyesterdayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,303GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file289k2d agoMITA4,393Codex, OpenCode