qa-generate

qa-generate is a command for Claude Code from zekiriabd/SDD-Pro. It costs 17 tokens per session (4,047 once invoked), scanned A, original, Apache-2.0.

A quality-assurance command that generates unit tests, checks test coverage, and scans code quality for one feature. Unit tests check small pieces of code, while coverage measures how much code the tests exercise.

In plain words
What is it for?
Use it for a full quality check or for only tests, coverage, or quality scanning, with the selected mode applied to a feature.
Why use it?
It provides one place to check whether the feature works, is sufficiently tested, and has quality issues. The result separates passing work, quality warnings, and blocking failures.

Command for Claude Code

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 commands/zekiriabd/sdd-pro/qa-generate
Clone the repo
git clone --depth 1 https://github.com/zekiriabd/SDD-Pro

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/zekiriabd/sdd-pro/qa-generate.svg)](https://agentmods.dev/commands/zekiriabd/sdd-pro/qa-generate)
Your own site
<a href="https://agentmods.dev/commands/zekiriabd/sdd-pro/qa-generate"><img src="https://agentmods.dev/badge/commands/zekiriabd/sdd-pro/qa-generate.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,047 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.00017 $0.04047
Opus 5 $0.00009 $0.02024
Sonnet 5 $0.00003 $0.00809
Haiku 4.5 $0.00002 $0.00405

Measured 4d ago against content hash bbda3377f44c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

qa-generate 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 4d 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/qa-generate.md · 379 lines

How it starts

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

/qa-generate — Tests unitaires + Coverage + Quality scan

Délègue à l'agent qa (Sonnet 4.6) pour générer les tests unitaires (backend + frontend) d'une FEAT, exécuter le coverage parsing (Python, 0 token) et le quality scan sonar-like (Python, 0 token).

Usage :

  • /qa-generate {n} — pipeline QA complet selon QAMode du Project Config
  • /qa-generate {n} --mode {full|tests-only|tests+coverage|quality-only} — override le QAMode du Project Config pour cette invocation

Décisions possibles (alignées STEP 7 + error-classification.md §1.7 — fix mineur audit 2026-08-30, l'en-tête disait à tort YELLOW sur coverage gap) :

  • 🟢 GREEN : tous tests passent + coverage OK + 0 quality error
  • 🟡 YELLOW : tests passent, coverage OK, mais quality errors
  • 🔴 RED : au moins 1 test échoué OU coverage < CoverageMin ([QA_COVERAGE_GAP] est RED bloquant depuis v6.1)

STEP 1 — Valider l'argument

Argument obligatoire : {n} (entier ≥ 1).

Si absent →

ERROR: /qa-generate — argument manquant
CAUSE: [INVALID_ARG] aucun numéro de FEAT fourni
FIX: relancer /qa-generate {n} (ex. /qa-generate 1)

Si non numérique →

ERROR: /qa-generate — argument invalide
CAUSE: [INVALID_ARG] "{argument}" n'est pas un entier
FIX: relancer /qa-generate {n}

Détecter --mode {value} dans les arguments. Stocker mode_override si présent.


STEP 1.5 — Checkpoint skip (v6.6.3, opt-in)

Si CheckpointMode: resume dans Project Config (défaut off = comportement v6.6.2 strict) :

from sdd_lib.checkpoint import is_phase_resumable

inputs = [
    f"workspace/feats/{n}-*.md",       # FEAT parent
    f"workspace/us/{n}-*.md",         # toutes les US
    "workspace/stack/stack.md",        # config + stacks actifs
]
# Glob les patterns vers paths concrets avant l'appel
resumable, reason = is_phase_resumable(
    feat=n, phase="qa-generate", input_paths=resolved_inputs,
)
if resumable:
    print(f"⊘ /qa-generate {n}: skipped (checkpoint hit, reason=ok)")
    # STOP avec succès, ne pas regénérer

Read the full file on GitHub · 379 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. 4d ago First seen · 379 lines · 17 tokens per session scan A bbda3377f44c

Subscribe to this mod's changes

qa-generate is a command published in the GitHub repository zekiriabd/SDD-Pro (190 stars, last pushed yesterday), licensed Apache-2.0. It adds 17 tokens to every session and 4,047 once invoked, about $0.0001 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.