From 1b20b9dae9a189db2f3ebcc78e50e0d18b44d973 Mon Sep 17 00:00:00 2001 From: abdul azeem Date: Tue, 10 Feb 2026 02:20:47 +0530 Subject: [PATCH 1/2] Add Claude Diffusers skill and Claude Code plugin scaffold (#12935) --- .claude/skills/huggingface-diffusers/SKILL.md | 44 +++++++++++++++++++ .../references/navigation-map.md | 41 +++++++++++++++++ .../.claude-plugin/plugin.json | 11 +++++ .../huggingface-diffusers/commands/starter.md | 15 +++++++ .../skills/diffusers-guide/SKILL.md | 27 ++++++++++++ 5 files changed, 138 insertions(+) create mode 100644 .claude/skills/huggingface-diffusers/SKILL.md create mode 100644 .claude/skills/huggingface-diffusers/references/navigation-map.md create mode 100644 claude-plugins/huggingface-diffusers/.claude-plugin/plugin.json create mode 100644 claude-plugins/huggingface-diffusers/commands/starter.md create mode 100644 claude-plugins/huggingface-diffusers/skills/diffusers-guide/SKILL.md diff --git a/.claude/skills/huggingface-diffusers/SKILL.md b/.claude/skills/huggingface-diffusers/SKILL.md new file mode 100644 index 000000000000..972b49bb0f76 --- /dev/null +++ b/.claude/skills/huggingface-diffusers/SKILL.md @@ -0,0 +1,44 @@ +--- +name: huggingface-diffusers +description: Guides users through Hugging Face Diffusers features, examples, and implementation choices. Use when someone needs help choosing pipelines, schedulers, training recipes, optimization strategies, or where to find the right Diffusers docs/examples in this repository. +--- + +Act as a Diffusers navigator for this repository. + +## Operating checklist + +1. Classify the request first: +- Inference: text-to-image, image-to-image, inpainting, ControlNet, video. +- Training/fine-tuning: full training, LoRA, DreamBooth, textual inversion, adapters. +- Performance/production: memory reduction, speed, quantization, deployment/server usage. +- Contribution/development: adding or modifying pipelines/models/schedulers/tests/docs. + +2. Identify the nearest canonical source before proposing code: +- Read [references/navigation-map.md](references/navigation-map.md). +- Prefer docs pages and existing examples in this repo over ad-hoc patterns. +- Reuse current APIs and naming used by existing pipelines and tests. + +3. Return a concrete answer structure: +- Recommendation: best starting path and why. +- Minimal runnable example: a short code snippet or exact command. +- Variants: 1-2 alternatives (for quality, speed, or memory constraints). +- Next file to open: exact repo path(s) to continue. + +4. Guard against common mistakes: +- Verify pipeline/task alignment (for example, do not suggest img2img pipeline for pure text2img). +- Mention required components (prompt, image input, mask, control image, checkpoint type) explicitly. +- Flag hardware assumptions (CUDA/CPU/MPS and dtype implications). + +## Repository navigation rules + +- For API explanations, start from `docs/source/en/` docs. +- For runnable recipes, start from `examples/`. +- For behavior details and edge cases, use `tests/` as ground truth. +- For implementation internals, inspect `src/diffusers/`. + +## Response style + +- Be decisive and specific. +- Use repository-relative file paths. +- Keep suggestions incremental: "start here, then expand". +- If unclear requirements exist, ask at most two targeted questions before coding. diff --git a/.claude/skills/huggingface-diffusers/references/navigation-map.md b/.claude/skills/huggingface-diffusers/references/navigation-map.md new file mode 100644 index 000000000000..0ea87664d80f --- /dev/null +++ b/.claude/skills/huggingface-diffusers/references/navigation-map.md @@ -0,0 +1,41 @@ +# Diffusers Navigation Map + +Use this map to quickly route user requests to relevant docs and examples. + +## Core docs + +- `docs/source/en/index.md`: docs entrypoint. +- `docs/source/en/quicktour.md`: first runnable setup. +- `docs/source/en/using-diffusers/`: practical usage guides. +- `docs/source/en/training/`: training and fine-tuning guides. +- `docs/source/en/optimization/`: performance and memory tuning. +- `docs/source/en/api/`: API reference for pipelines, schedulers, and models. + +## Examples by intent + +- Text-to-image: `examples/text_to_image/`. +- Textual inversion: `examples/textual_inversion/`. +- DreamBooth: `examples/dreambooth/`. +- Control and adapters: `examples/controlnet/`, `examples/t2i_adapter/`. +- Unconditional generation: `examples/unconditional_image_generation/`. +- Services: `examples/server/`, `examples/server-async/`. + +## Source areas + +- Pipelines: `src/diffusers/pipelines/`. +- Schedulers: `src/diffusers/schedulers/`. +- Models: `src/diffusers/models/`. +- Utilities/loaders: `src/diffusers/loaders/`, `src/diffusers/utils/`. + +## Test anchors + +- Pipeline behavior: `tests/pipelines/`. +- Scheduler behavior: `tests/schedulers/`. +- Quantization behavior: `tests/quantization/`. + +## Fast routing heuristics + +- "How do I generate X?" -> start in `docs/source/en/using-diffusers/` and matching pipeline docs, then pull a runnable script from `examples/`. +- "How do I train/fine-tune?" -> start in `docs/source/en/training/`, then map to the nearest folder under `examples/`. +- "Why is this slow/OOM?" -> start in `docs/source/en/optimization/`, then apply knobs to the user's specific pipeline. +- "How do I add support in Diffusers itself?" -> inspect nearest implementation in `src/diffusers/` and mirror expectations from matching `tests/`. diff --git a/claude-plugins/huggingface-diffusers/.claude-plugin/plugin.json b/claude-plugins/huggingface-diffusers/.claude-plugin/plugin.json new file mode 100644 index 000000000000..bde3872c1dd3 --- /dev/null +++ b/claude-plugins/huggingface-diffusers/.claude-plugin/plugin.json @@ -0,0 +1,11 @@ +{ + "name": "huggingface-diffusers", + "version": "1.0.0", + "description": "Claude Code plugin that helps users navigate Diffusers capabilities and generate correct starting recipes.", + "author": { + "name": "Hugging Face Diffusers Community" + }, + "license": "Apache-2.0", + "skills": "./skills/", + "commands": "./commands/" +} diff --git a/claude-plugins/huggingface-diffusers/commands/starter.md b/claude-plugins/huggingface-diffusers/commands/starter.md new file mode 100644 index 000000000000..840d121e9dd1 --- /dev/null +++ b/claude-plugins/huggingface-diffusers/commands/starter.md @@ -0,0 +1,15 @@ +--- +description: Generate a minimal Diffusers starter snippet for a requested task. +argument-hint: [task description] +disable-model-invocation: true +--- + +Generate a concise, runnable Diffusers starter snippet for this request: + +$ARGUMENTS + +Requirements: +1. Choose the correct pipeline for the task. +2. Include imports, model loading, device placement, and one generation call. +3. Add one optional optimization toggle (speed or memory). +4. End with "Next files to open" and list 2-3 relevant paths from this repository. diff --git a/claude-plugins/huggingface-diffusers/skills/diffusers-guide/SKILL.md b/claude-plugins/huggingface-diffusers/skills/diffusers-guide/SKILL.md new file mode 100644 index 000000000000..da2608fece49 --- /dev/null +++ b/claude-plugins/huggingface-diffusers/skills/diffusers-guide/SKILL.md @@ -0,0 +1,27 @@ +--- +name: diffusers-guide +description: Route Diffusers questions to the right pipeline, docs, examples, and next implementation steps. Use when users ask which Diffusers feature to use or where to start in the codebase. +--- + +Guide the user to the correct Diffusers path quickly. + +## Workflow + +1. Determine target outcome and modality (image, video, editing, training, optimization). +2. Recommend one primary route and one fallback route. +3. Provide one minimal runnable snippet or command. +4. Point to exact repo paths for deeper work. + +## Routing map + +- General onboarding: `README.md`, `docs/source/en/quicktour.md`. +- Inference techniques: `docs/source/en/using-diffusers/`. +- Training: `docs/source/en/training/` and related `examples/` folder. +- Optimization: `docs/source/en/optimization/`. +- Internals: `src/diffusers/` plus matching `tests/`. + +## Quality bar + +- Prefer existing examples over inventing new APIs. +- State required inputs explicitly (prompt/image/mask/control image). +- Mention device and dtype assumptions when giving code. From 002f7e51e276775abb33c7e4211a669fb17bbb0e Mon Sep 17 00:00:00 2001 From: abdul azeem Date: Fri, 13 Feb 2026 21:40:23 +0530 Subject: [PATCH 2/2] Fix Claude plugin install for marketplace-based CLI --- .../.claude-plugin/marketplace.json | 17 +++++++++++++++++ .../.claude-plugin/plugin.json | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 claude-plugins/huggingface-diffusers/.claude-plugin/marketplace.json diff --git a/claude-plugins/huggingface-diffusers/.claude-plugin/marketplace.json b/claude-plugins/huggingface-diffusers/.claude-plugin/marketplace.json new file mode 100644 index 000000000000..7246d9183c05 --- /dev/null +++ b/claude-plugins/huggingface-diffusers/.claude-plugin/marketplace.json @@ -0,0 +1,17 @@ +{ + "name": "local-diffusers", + "owner": { + "name": "Hugging Face Diffusers Community" + }, + "plugins": [ + { + "name": "huggingface-diffusers", + "source": "./", + "description": "Claude Code plugin that helps users navigate Diffusers capabilities and generate correct starting recipes.", + "version": "1.0.0", + "author": { + "name": "Hugging Face Diffusers Community" + } + } + ] +} \ No newline at end of file diff --git a/claude-plugins/huggingface-diffusers/.claude-plugin/plugin.json b/claude-plugins/huggingface-diffusers/.claude-plugin/plugin.json index bde3872c1dd3..4f53eaa90b3b 100644 --- a/claude-plugins/huggingface-diffusers/.claude-plugin/plugin.json +++ b/claude-plugins/huggingface-diffusers/.claude-plugin/plugin.json @@ -1,4 +1,4 @@ -{ +{ "name": "huggingface-diffusers", "version": "1.0.0", "description": "Claude Code plugin that helps users navigate Diffusers capabilities and generate correct starting recipes.",