LegendaryTeam_For_Claude: Command for Claude Code

.claude/commands/test-run.md

test-run is a command for Claude Code from RegardV/LegendaryTeam_For_Claude. It costs 0 tokens per session (3,668 once invoked), scanned A, original, MIT.

A command that runs the project's configured unit, integration, and end-to-end tests, then reports coverage and results to @chief.

In plain words
What is it for?
Use it to check code changes, generate coverage reports, watch for changes, or run only selected types of tests.
Why use it?
It avoids manually finding the test framework and running several test commands separately.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is RegardV/LegendaryTeam_For_Claude's own configuration. It tells Claude Code how to work on LegendaryTeam_For_Claude itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything LegendaryTeam_For_Claude configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is files: ./coverage/coverage-final.json.

Reuse

Borrowing it

Nothing to install: this file belongs to RegardV/LegendaryTeam_For_Claude. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/RegardV/LegendaryTeam_For_Claude/main/.claude/commands/test-run.md
Clone the repo
git clone --depth 1 https://github.com/RegardV/LegendaryTeam_For_Claude

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-run

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/regardv/legendaryteam_for_claude/test-run"><img src="https://agentmods.dev/badge/commands/regardv/legendaryteam_for_claude/test-run.svg" alt="Reviewed on agentmods" width="80" 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 3,668 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.03668
Opus 5 $0.00000 $0.01834
Sonnet 5 $0.00000 $0.00734
Haiku 4.5 $0.00000 $0.00367

Measured 9d ago against content hash 986cd857c3b1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

test-run 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 9d 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/test-run.md · 578 lines

How it starts

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

Test Run

Run all tests and report coverage to @chief.


What This Command Does

Automatically detects your test framework and runs:

  1. Unit tests - Individual function/component tests
  2. Integration tests - Multi-component interaction tests
  3. E2E tests - Full user flow tests (if configured)
  4. Coverage analysis - Code coverage reporting
  5. Results summary - Pass/fail counts, coverage %, slow tests

Then reports findings to @chief for review.


Usage

/test-run

Optional flags:

/test-run --watch          # Run in watch mode
/test-run --coverage       # Force coverage report
/test-run --unit-only      # Skip integration/E2E tests
/test-run --verbose        # Detailed output

Implementation

This command auto-detects your project type and runs the appropriate test command.

Auto-Detection Logic

Node.js/JavaScript Projects:

if [ -f "package.json" ]; then
  # Detect framework from package.json
  if grep -q '"jest"' package.json; then
    npm test -- --coverage --verbose
  elif grep -q '"mocha"' package.json; then
    npm test -- --coverage
  elif grep -q '"vitest"' package.json; then
    npm test -- --coverage
  else
    npm test
  fi
fi

Python Projects:

if [ -f "pytest.ini" ] || [ -f "setup.py" ] || [ -f "pyproject.toml" ]; then
  # pytest with coverage
  pytest --cov --cov-report=term --cov-report=html -v
elif [ -f "manage.py" ]; then
  # Django tests
  python manage.py test --keepdb --parallel
else
  # unittest
  python -m unittest discover -v
fi

Ruby Projects:

if [ -f "Gemfile" ]; then
  if grep -q 'rspec' Gemfile; then
    bundle exec rspec --format documentation
  else
    bundle exec rake test
  fi
fi

Go Projects:

if [ -f "go.mod" ]; then
  go test -v -cover ./...
fi

Rust Projects:

if [ -f "Cargo.toml" ]; then
  cargo test --verbose
fi

Output Format

Successful Test Run

╔══════════════════════════════════════════════════════════╗
║ TEST RUN RESULTS                                         ║
╚══════════════════════════════════════════════════════════╝

📊 Test Summary
  ✅ Unit Tests:        487 passed, 0 failed
  ✅ Integration Tests: 124 passed, 0 failed
  ✅ E2E Tests:          23 passed, 0 failed
  ────────────────────────────────────────────
  Total:                634 passed, 0 failed

⏱️  Execution Time
  Unit:        12.3s
  Integration: 45.2s
  E2E:         2m 15s
  Total:       3m 12s

📈 Coverage Report
  Statements:   94.2% (1,254 / 1,331)
  Branches:     89.5% (456 / 510)
  Functions:    92.8% (234 / 252)
  Lines:        94.1% (1,189 / 1,263)

  ✅ Coverage meets 80% threshold

⚠️  Slow Tests (>1s)
  1. checkout integration test: 3.2s
  2. payment processing e2e: 5.8s
  3. user registration flow: 2.1s

🎯 Recommendation
  All tests passing with excellent coverage.
  Consider optimizing slow tests.

📂 Coverage Report: file:///path/to/coverage/index.html

Read the full file on GitHub · 578 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. 9d ago First seen · 578 lines · 0 tokens per session scan A 986cd857c3b1

Subscribe to this mod's changes

test-run is a command published in the GitHub repository RegardV/LegendaryTeam_For_Claude (19 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,668 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-08-30.