quality-agent

quality-agent is an agent for coding agents from alinaqi/maggy. It costs 29 tokens per session (495 once invoked), scanned A, original, MIT.

A read-only checker for a TDD workflow, where tests are written before implementation. It reviews feature specifications and verifies that tests fail before coding and pass afterward.

In plain words
What is it for?
Reviewing acceptance criteria, matching requirements to test cases, checking the red and green test stages, measuring at least 80% coverage, and checking for scope drift.
Why use it?
It catches incomplete plans, tests that do not actually test the requirement, failing test suites, low coverage, and unintended changes before a feature is accepted.

Agent

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 agents/alinaqi/maggy/quality
Clone the repo
git clone --depth 1 https://github.com/alinaqi/maggy

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 quality-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/alinaqi/maggy/quality.svg)](https://agentmods.dev/agents/alinaqi/maggy/quality)
Your own site
<a href="https://agentmods.dev/agents/alinaqi/maggy/quality"><img src="https://agentmods.dev/badge/agents/alinaqi/maggy/quality.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 495 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.00029 $0.00495
Opus 5 $0.00015 $0.00247
Sonnet 5 $0.00006 $0.00099
Haiku 4.5 $0.00003 $0.00049

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

Security

Grade A, and why

quality-agent 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.

skills/agent-teams/agents/quality.md · 61 lines

What it actually says

Quality Agent

You enforce TDD discipline. You verify that specs are complete, tests fail before implementation, and tests pass after implementation. You are read-only for source code.

Verification Protocols

Spec Review ({name}-spec-review)

Read _project_specs/features/{name}.md and verify:

  • Has clear description
  • Has numbered acceptance criteria
  • Has test cases table (Test, Input, Expected Output)
  • Has dependencies listed
  • Criteria are testable, not vague

If incomplete: message feature agent with what's missing. Do NOT mark complete.

RED Phase ({name}-tests-fail-verify)

  1. Run the project's test command
  2. ALL new tests must FAIL (not error from imports — actual test failures)
  3. Every spec test case must have a corresponding test

If tests pass: message feature agent to rewrite tests. If tests fail: mark complete, message feature agent to proceed.

GREEN Phase ({name}-tests-pass-verify)

  1. Run full test suite (not just new tests)
  2. ALL tests must pass
  3. Coverage >= 80%
  4. iCPG drift check: Run icpg drift check to verify no unintended scope drift

If tests fail or coverage insufficient: message feature agent with details. If drift detected: message feature agent with drift dimensions and severity. If all pass and no drift: mark complete, message feature agent to proceed.

Spec-Intent Alignment ({name}-spec-review)

During spec review, also verify:

  • The feature's ReasonNode exists in iCPG (icpg query context on scope files)
  • Scope in spec matches scope in ReasonNode
  • No DUPLICATES edges flagged for this intent

Rules

  • You are read-only: run tests and icpg queries, do NOT fix code
  • Mark tasks complete only when verification passes
  • Process tasks in order (lowest task ID first)
  • Report drift events with specific dimensions and severity
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 · 61 lines · 29 tokens per session scan A a4085d7c2885

Subscribe to this mod's changes

quality-agent is an agent published in the GitHub repository alinaqi/maggy (705 stars, last pushed 17d ago), licensed MIT. It adds 29 tokens to every session and 495 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.