benefriches: Command for Claude Code

.claude/commands/adw-qa.md

adw-qa is a command for Claude Code from incubateur-ademe/benefriches. It costs 20 tokens per session (604 once invoked), scanned A, original, MIT.

A browser-based quality check for an ADW specification's scenarios. It uses a real browser and the project's end-to-end test environment, then records the result and screenshots without editing the worktree.

In plain words
What is it for?
Use it to prepare scenario data, walk through each browser flow, verify the expected page results, and save a QA verdict and screenshots.
Why use it?
It checks the finished behavior as a user would see it and distinguishes an application failure from a missing or unavailable test environment.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: model in frontmatter; positional $N argument; mentions AGENTS.md.

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

Reuse

Borrowing it

Nothing to install: this file belongs to incubateur-ademe/benefriches. 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/incubateur-ademe/benefriches/main/.claude/commands/adw-qa.md
Clone the repo
git clone --depth 1 https://github.com/incubateur-ademe/benefriches

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 adw-qa

README.md
[![agentmods](https://agentmods.dev/badge/commands/incubateur-ademe/benefriches/adw-qa/github.svg)](https://agentmods.dev/commands/incubateur-ademe/benefriches/adw-qa)
Your own site
<a href="https://agentmods.dev/commands/incubateur-ademe/benefriches/adw-qa"><img src="https://agentmods.dev/badge/commands/incubateur-ademe/benefriches/adw-qa/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 adw-qa

Your own site · 80×15
<a href="https://agentmods.dev/commands/incubateur-ademe/benefriches/adw-qa"><img src="https://agentmods.dev/badge/commands/incubateur-ademe/benefriches/adw-qa.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 604 The whole file, excluding the scripts and references it only reads on demand.
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.00020 $0.00604
Opus 5.5 $0.00008 $0.00242
Sonnet 5.5 $0.00004 $0.00121
Haiku 4.5 $0.00002 $0.00060

Measured 9d ago against content hash 81d65c9f19a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

adw-qa 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 9d 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.

.claude/commands/adw-qa.md · 39 lines

What it actually says

Walk the Scenarios of the spec at $1 in a real browser against this worktree's e2e stack. Write qa.md in the spec's directory and the screenshots in a qa/ folder beside it. Change no file in the worktree: QA observes the app, it does not fix it.

If Scenarios is None, write qa.md saying so and return a pass.

  1. Read .e2e-stack at the repository root: the app is at BASE_URL, the API at API_URL, the mail catcher at MAILCATCHER_URL, the database at DATABASE_URL. Use only these. If the file is missing or the app does not answer, stop and report an environment failure, not a QA verdict.
  2. Drive the browser with the Playwright MCP tools. If they are missing, stop and say the session must be started with --mcp-config adws/mcp/playwright.json.
  3. Collect the design: images and PDFs in the attachments/ folder beside the spec.
  4. Set up each scenario's starting state the way the e2e fixtures do (apps/e2e-tests/AGENTS.md): a fresh user, sites and projects seeded through the API, the database only for what the API cannot do. Never seed the behaviour the scenario checks.
  5. Walk each scenario as a user would, through the UI, then check its expected result on the page. Take at least one screenshot per scenario, at the expected result, and copy it to qa/<n>-<slug>.png.
  6. A scenario fails when its expected result does not hold, or when you cannot run it (setup impossible, step unclear). Record the steps, expected, observed and the screenshot. Never retry until it passes: a failure seen once is reported.
  7. Compare every screen that has a mockup with it, by eye. Differences (layout, wording, colour, a missing element) are observations, not failures, unless the scenario's expected result requires that element.

Write qa.md: the verdict, one section per scenario (steps, expected, observed, screenshot, pass or fail), then the observations against the mockups.

Pass only when no scenario failed. End your final message with the verdict, alone in a json code block:

{
  "pass": false,
  "failures": [
    {
      "scenario": "...",
      "expected": "...",
      "observed": "...",
      "screenshot": "qa/1-....png"
    }
  ],
  "observations": [
    { "screen": "...", "mockup": "attachments/....png", "difference": "..." }
  ]
}
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. 9d ago First seen · 39 lines · 20 tokens per session scan A 81d65c9f19a9

Subscribe to this mod's changes

adw-qa is a command published in the GitHub repository incubateur-ademe/benefriches (45 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 604 once invoked, about $0.0001 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-10-21.