self-review

A review process for checking a Diffusers code change against the project's review rules before opening a pull request.

In plain words
What is it for?
Reviewing an entire branch, tracing changed code paths, and producing a severity-grouped list of fixes.
Why use it?
It finds blocking issues, unused code, and problems a continuous-integration reviewer may report.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/huggingface/diffusers/self-review
Any agent
npx skills add huggingface/diffusers --skill self-review
Clone the repo
git clone --depth 1 https://github.com/huggingface/diffusers

Made for: Claude Code, Codex.

Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 701 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00088 $0.00701
Opus 5 $0.00044 $0.00351
Sonnet 5 $0.00018 $0.00140
Haiku 4.5 $0.00009 $0.00070

Measured yesterday against content hash 3b6e2670c3dd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

self-review 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.

.ai/skills/self-review/SKILL.md · 62 lines

How it starts

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

Self-review

Runs the same rubric as the @claude CI reviewer, so you catch issues before a maintainer does — but over your whole PR diff. (The CI scopes itself to src/diffusers/, tests/, and .ai/; for your own PR, also review your docs and scripts.) You're already on the branch with the conventions loaded, so: get the diff → review it against the rubric → report → iterate with the contributor until it's ready, then remind them to share the final notes on the PR.

1. Get the diff

git diff main...HEAD          # use your target branch if not main

If the branch trails main and the diff looks polluted with unrelated merged files, scope to your own commits: git log main..HEAD --oneline, then git show <commit>.

2. Read the rubric

references/review-rules.md is the canonical rubric (the CI pins it from main) — read it and review against it; don't rely on a remembered copy. For the areas you touched, also read references/code_style.md, references/models.md, references/pipelines.md, references/modular.md, references/testing.md, or references/pitfalls.md.

3. Report

  • Blocking issues — numbered. Each: title → explanation → file.py:line → impact. Cite the rule, e.g. Per references/models.md: "…only keep the inference path."
  • Non-blocking issues — same format, lower severity.
  • Dead code (advisory) — a table: path:line · Likely-dead / Used · reason.
  • Summary — short synthesis and a verdict (READY / NEEDS CHANGES), spelling out:
    • Fix before submitting — all blocking issues, and remove the flagged dead code.
    • Leave for the actual review — non-blocking issues that aren't obviously correct; raise these with the reviewer rather than guessing at them now.

Report only — do not edit files. Be concrete, cite the rule, review the whole diff, and don't invent issues or flag pure style.

4. Iterate until ready, then share

Expect several rounds: the contributor addresses findings, you review again. Keep working with them to fix as much as possible until the verdict is READY — the Leave for the actual review items are the only ones that should reach the reviewer unresolved. End the final round's report by reminding the contributor to share it on the PR (description or a comment) — it saves the reviewer a few rounds of back-and-forth. Never commit the notes as part of the diff.

Read the full file on GitHub · 62 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 First seen · 62 lines · 88 tokens per session scan A 3b6e2670c3dd

Subscribe to this mod's changes

self-review is a skill published in the GitHub repository huggingface/diffusers (34,407 stars, last pushed yesterday), licensed Apache-2.0. It adds 88 tokens to every session and 701 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.

Related

Other skills, from other repositories