test

test is a command for Claude Code from ngocsangyem/MeowKit. It costs 0 tokens per session (760 once invoked), scanned A, original, MIT.

A test-running command that can also enforce TDD, or test-driven development, when enabled. TDD means writing a failing test before implementing the code it checks.

In plain words
What is it for?
Running all or selected tests, checking coverage, watching for changes, showing only failures, and writing failing tests in TDD mode.
Why use it?
It runs the relevant tests and can prevent implementation from proceeding when the required test-first step has not happened.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Running all or selected tests, checking coverage, watching for changes, showing only failures, and writing failing tests in TDD mode.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ngocsangyem/meowkit/test
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/ngocsangyem/MeowKit

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/ngocsangyem/meowkit/test.svg)](https://agentmods.dev/commands/ngocsangyem/meowkit/test)
Your own site
<a href="https://agentmods.dev/commands/ngocsangyem/meowkit/test"><img src="https://agentmods.dev/badge/commands/ngocsangyem/meowkit/test.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 760 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.00000 $0.00760
Opus 5 $0.00000 $0.00380
Sonnet 5 $0.00000 $0.00152
Haiku 4.5 $0.00000 $0.00076

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

Security

Grade A, and why

test 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/mk/test.md · 62 lines

How it starts

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

/test — Test Runner & TDD Enforcement (opt-in)

Usage

/test [optional: specific test file or pattern]
/test --coverage
/test --watch
/test --red-only         # Force RED-phase semantics (writes failing tests, no implementation)
/test --tdd              # Run with TDD enforcement explicitly enabled for this invocation

Behavior

Runs the test suite. TDD enforcement is opt-in: with --tdd (or when MEOWKIT_TDD=1 is set), the command enforces RED-phase semantics — failing tests must exist before implementation. Without --tdd, the command runs tests when invoked but does NOT block the developer.

For backward compatibility, --red-only still forces the RED-phase write-failing-tests behavior regardless of mode (used by /mk:cook Phase 2 in TDD mode).

Execution Steps

  1. Determine scope. If a specific file or pattern is provided, target those tests. Otherwise, detect the current feature context and target related tests.

  2. Check if tests exist for the current feature/change.

    If NO tests exist:

    • Write failing tests first (Phase 2 — RED).
    • Tests must target the feature's expected behavior as defined in the approved plan.
    • Each test must: run successfully, target a specific behavior, and produce a FAIL result.
    • Compilation errors do NOT count as failing tests (per tdd-rules).
    • Print: number of tests written and confirmation all are RED.

    If tests exist:

    • Run the test suite.
    • Report results: total, passed, failed, skipped.
    • If any fail: print failure details with file, line, expected vs actual.
  3. TDD Rules Enforcement (only when --tdd / MEOWKIT_TDD=1 — see rules/tdd-rules.md):

    • No implementation code before a failing test exists.
    • After implementation, ALL existing tests must pass (not just new ones).
    • If tests fail after implementation: self-heal up to 3 attempts.
    • After 3 failed attempts: stop and escalate to human with failing output, attempted fixes, and suspected root cause.
    • Test coverage for new code should match or exceed the project's existing coverage percentage.
    • During refactoring: re-run tests after every change.

Read the full file on GitHub · 62 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 · 62 lines · 0 tokens per session scan A 853d29ccaecb

Subscribe to this mod's changes

test is a command published in the GitHub repository ngocsangyem/MeowKit (14 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 760 tokens. 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-03.