test

test is a command for Claude Code from rjmurillo/ai-agents. It costs 31 tokens per session (2,146 once invoked), scanned C, original, MIT.

Prove it works. Multi-dimensional quality validation across functional, non-functional, security, DevOps, DX, and observability. Run after /build.

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/rjmurillo/ai-agents/test
Clone the repo
git clone --depth 1 https://github.com/rjmurillo/ai-agents

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 test

README.md
[![agentmods](https://agentmods.dev/badge/commands/rjmurillo/ai-agents/test.svg)](https://agentmods.dev/commands/rjmurillo/ai-agents/test)
Your own site
<a href="https://agentmods.dev/commands/rjmurillo/ai-agents/test"><img src="https://agentmods.dev/badge/commands/rjmurillo/ai-agents/test.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 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,146 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin unknown 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.00031 $0.02146
Opus 5 $0.00015 $0.01073
Sonnet 5 $0.00006 $0.00429
Haiku 4.5 $0.00003 $0.00215

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

Security

Grade C, and why

test scanned grade C with 1 finding 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

Invoke Skill(skill="orphan-ref-validator"). Reject the gate on `VERDICT: CRITICAL_FAIL` or `VERDICT: ERROR`; `VERDICT: WARN` is non-blocking and surfaces in the test summary. This mirrors `/build` Mandatory Exit Gate 4 (
.claude/commands/test.md · 159 lines

How it starts

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

@CLAUDE.md

Test: $ARGUMENTS

If $ARGUMENTS is empty, test the current branch diff against the base branch.

Cross-Harness Hook Routing

If the diff touches Claude Code or GitHub Copilot CLI hooks, dispatchers, generated shims, event translation, or hook output:

  1. Invoke Skill(skill="agent-harness-reference") to load the pinned contract.
  2. Run the verification path in Skill(skill="ai-agents-portability-campaign").
  3. Require unit coverage for translation plus a real-harness smoke test for each affected harness.
  4. Treat documentation silence as an unknown to probe, not permission to guess.

Step 0: Classify PR Type

Detect the base branch from gh pr view --json baseRefName or fall back to main. Run git diff origin/<base-branch> --name-only and classify changed files:

Type Patterns Gates to Run
CODE *.py, *.ps1, *.ts, *.js, *.cs All 6 gates
WORKFLOW *.yml in .github/workflows/ Gates 1, 3, 4
CONFIG *.json, *.yaml (non-workflow) Gates 3, 4
DOCS *.md, *.txt, *.rst Gate 5 only
MIXED Combination Apply per-file rules

Print: PR TYPE: [type]. Running gates: [list].

Skip non-applicable gates. Do not waste agent invocations on irrelevant dimensions.

Gate 1: Functional Testing

Invoke Skill(skill="code-qualities-assessment") for quality baseline.

Task(subagent_type="qa"): You are a senior QA engineer. Your job is to catch issues that will cause production incidents. Be skeptical. Cite specific file:line evidence for every finding. Evaluate:

  1. Unit coverage - Each method in isolation, dependencies injected. Every new function has at least 1 test.
  2. Integration coverage - Contracts between components verified. Cross-module boundaries exercised.
  3. Acceptance coverage - Each requirement has a passing test. Map to acceptance criteria from /spec output.
  4. Edge cases - Null/empty/boundary values, invalid types, concurrent access where applicable.
  5. Error paths - Every catch/error branch tested. No silent swallowing. Resources cleaned up on failure.
  6. Regression risk - High-risk areas (auth, data persistence, payments) require full coverage regardless of change size.

Read the full file on GitHub · 159 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 First seen · 159 lines · 31 tokens per session scan C 74281fbfcba9

Subscribe to this mod's changes

test is a command published in the GitHub repository rjmurillo/ai-agents (45 stars, last pushed today), licensed MIT. It adds 31 tokens to every session and 2,146 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.