run-tests

An automated test command runs the project’s functional test suite and records the results. Functional tests check whether features behave as expected from a user’s point of view.

In plain words
What is it for?
It is for running all tests or filtering them by category or tag, viewing detailed output, previewing a dry run, and producing a summary of passed, failed, and skipped tests.
Why use it?
It replaces a manual sequence of test runs and preserves results needed by tests that depend on earlier tests.

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/modeled-information-format/mnemonic/run-tests
Clone the repo
git clone --depth 1 https://github.com/modeled-information-format/mnemonic

Made for: Claude Code.

Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 734 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.00024 $0.00734
Opus 5 $0.00012 $0.00367
Sonnet 5 $0.00005 $0.00147
Haiku 4.5 $0.00002 $0.00073

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

Security

Grade A, and why

run-tests 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 2d 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/run-tests.md · 127 lines

How it starts

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

/run-tests

Execute the automated functional test suite to validate all project components.

Usage

/run-tests [options]

Options

  • --category <name> - Run only tests in specified category
  • --tag <tag> - Run only tests with specified tag
  • --verbose - Show detailed output for each test
  • --dry-run - Show tests that would run without executing

Execution Strategy

  1. Read test definitions from .claude/tests/tests.yaml
  2. Initialize test state in .claude/test-state.json
  3. Execute tests sequentially, tracking results
  4. Validate each test response against expected patterns
  5. Generate summary report

State Management:

  • State file tracks: current test, results, saved variables
  • Each test can save output values for dependent tests
  • Tests with depends_on wait for dependencies to pass

Workflow

Phase 1: Initialization

  1. Load Test Suite

    • Read .claude/tests/tests.yaml
    • Parse test definitions
    • Filter by category/tag if specified
  2. Initialize State Run: ./.claude/tests/runner.sh reset && ./.claude/tests/runner.sh init

  3. Show Test Plan Display total tests and categories to run

Phase 2: Test Execution Loop

For each test, execute automatically without waiting for user input:

  1. Get Next Test Run: ./.claude/tests/runner.sh next

  2. Execute Test Action Parse the action from test output and execute it:

    • If action starts with "Run:" - execute the bash command
    • If action starts with "Check:" - cat/ls the target file
    • Otherwise - execute as described
  3. Validate Response Run: ./.claude/tests/runner.sh validate "$response"

  4. Record and Continue Display pass/fail result and proceed to next test

Phase 3: Report Generation

After all tests complete:

Run: ./.claude/tests/runner.sh report --format md

Display final summary with pass/fail counts.

Test Format Reference

Read the full file on GitHub · 127 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. 2d ago First seen · 127 lines · 24 tokens per session scan A 0d9976e9e411

Subscribe to this mod's changes

run-tests is a command published in the GitHub repository modeled-information-format/mnemonic (22 stars, last pushed 1mo ago), licensed MIT. It adds 24 tokens to every session and 734 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.