qa

qa is a command for Claude Code from MadAppGang/magus. It costs 51 tokens per session (2,029 once invoked), scanned A, original, MIT.

A command that writes behaviour tests from a specification or public contract without giving the test writer access to the implementation, then runs the tests and a negative control.

In plain words
What is it for?
Use it to generate and run independent quality-assurance tests for a feature, API, or other publicly defined behaviour.
Why use it?
It helps keep tests focused on what users or callers can observe rather than on how the code happens to work. It also stops when the required specification or contract is missing.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents; names the AskUserQuestion tool.

Part of the dev plugin — 19 skills, 15 commands, 12 agents shipped together

Good fit Use it to generate and run independent quality-assurance tests for a feature, API, or other publicly defined behaviour.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/madappgang/magus/qa
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.

Clone the repo
git clone --depth 1 https://github.com/MadAppGang/magus

Made for: Claude Code.

Or install dev, the plugin that ships this one along with the rest of its 19 skills, 15 commands, 12 agents.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/madappgang/magus/qa"><img src="https://agentmods.dev/badge/commands/madappgang/magus/qa.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,029 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.00051 $0.02029
Opus 5.5 $0.00020 $0.00812
Sonnet 5.5 $0.00010 $0.00406
Haiku 4.5 $0.00005 $0.00203

Measured today against content hash 30b7fd6f8da4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 today.

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.

plugins/dev/commands/qa.md · 147 lines

How it starts

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

If --spec or --contract is missing, or a path does not exist, stop with BLOCKED — <what is missing>. Never search the repo for a spec to substitute.

1. Check for child mode first, as "Inside a claudish session (child mode)" in that
   skill describes. `list_models` still answers in child mode, so it cannot tell you.
   In child mode you are already the delegate: go to step 4, and the report says
   `writer: internal (nested claudish session; blindness by agent contract)`.
   Otherwise, `list_models()`: if the tool is unavailable or errors, the writer is
   internal (go to step 4) and the report says `writer: internal (claudish unreachable)`.
2. `search_models({ query: "<tier word>" })` with the `--model` value (default `gpt`).
   Pick the top-tier model of that family from the live results. The tier the user
   named is a hard constraint: if the catalog has no model matching it, stop and show
   the live alternatives from the search; never pick a lower tier because its name
   is closer. Record the chosen id.
3. External writer:
   ```
   create_session(
     model = <resolved id>,
     agent = "dev:qa-engineer",
     work_dir = "${SESSION_PATH}/qa/sandbox",
     timeout_seconds = 900,
     prompt = <the writer prompt below, with sandbox-relative paths>
   )
   ```
   `work_dir` is the sandbox, so the child session's tools cannot reach the
   implementation: blindness is a property of the file system, not of the prompt.
   Then wait for the channel `completed` event and call `get_output(session_id)`;
   on `failed` or `timeout` call `get_diagnostics(session_id)`, record it, and fall
   through to step 4 with `writer: internal (external failed: <reason>)`.
4. Internal writer:
   ```
   Agent(
     subagent_type: "dev:qa-engineer",
     run_in_background: false,
     description: "blind tests: <feature>",
     prompt: <the same writer prompt, sandbox paths>
   )
   ```
   The subagent runs in its own context window; the prompt names only sandbox
   paths, and the agent's own contract refuses Reads outside them.

Read the full file on GitHub · 147 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. today Changed · +4 lines 30b7fd6f8da4
  2. 22d ago Changed · -1 lines 70caabe0c067
  3. 1mo ago First seen · 144 lines · 51 tokens per session scan A 2b626ae8a919

Subscribe to this mod's changes

qa is a command published in the GitHub repository MadAppGang/magus (13 stars, last pushed today), licensed MIT. It adds 51 tokens to every session and 2,029 once invoked, about $0.0002 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-09-15.