Skip to content

Latest commit

 

History

History
84 lines (56 loc) · 4.01 KB

File metadata and controls

84 lines (56 loc) · 4.01 KB

Diffusers — Agent Guide

Setup

We recommend developing in a virtual environment managed by uv:

uv venv && source .venv/bin/activate
uv pip install -e .                       # provides diffusers-cli

List the available skills, and what each one is for, with:

diffusers-cli skills list

Install them with:

diffusers-cli skills add <skill name>      # install one, or --all for every skill
                                          # --claude / --codex / --cursor to pick one target

diffusers-cli skills update refreshes what you installed.

Skills used to be installed through the Makefile, which symlinked the project-level .claude/skills and .agents/skills at .ai/skills in this repo. Remove those links if they exist — otherwise the install writes through them into .ai/ itself:

rm -f .claude/skills .agents/skills

At the start of a session, confirm the setup and tell the user what you find:

python utils/check_ai.py                  # guides and skills are consistent
diffusers-cli skills list                 # which skills are installed

Claude Code and Codex can also install via plugins

claude plugin marketplace add huggingface/diffusers
claude plugin install diffusers@diffusers-skills --scope project

codex plugin marketplace add huggingface/diffusers    # then install from the Plugins Directory

Human in the loop

Everything a PR reviewer sees must come from a human, or be approved by one for the exact wording. That includes commit messages, code comments and docstrings, PR titles and descriptions, and any PR or issue comment, review, or reply. Ask whether the user wants you to draft that text or will write it themselves. Keep drafts short and easy to understand. When you hand one over, remind them to read it for real and check that it reads well for other humans.

  • Don't commit unless the user approved the exact commit message, and never push or open a PR on your own. The user decides when anything is published, each time.
  • Don't post to GitHub directly — no comments, reviews, or replies. Draft when asked and hand the text to the user.

Code formatting

  • make style and make fix-copies should be run before opening a PR

Reference guides

  • Coding style — see code_style.md for how code should read, and the # Copied from rules.
  • Models — see models.md for model conventions, attention pattern, implementation rules, dependencies, and gotchas. For adding or converting a model, use the model-integration skill.
  • Pipelines — see pipelines.md for pipeline conventions, patterns, and gotchas.
  • Modular pipelines — see modular.md for modular pipeline conventions, patterns, and gotchas.
  • Tests — see testing.md for test conventions: required test layers, tester mixins, and dummy-component rules.
  • Reporting — see reporting.md for how to write bug reports (what a reproduction is) and performance claims (end-to-end numbers first).

Skills

Task-specific guides live in .ai/skills/ and are loaded on demand by AI agents. Available skills include:

Self-review before a PR

Before opening a PR, run self-review against review-rules.md. The self-review skill runs this as the same pass the @claude CI reviewer uses. Share the final report on the PR (description or comment) — see the skill for details.