Borrowing it
Nothing to install: this file belongs to awattar/claude-code-best-practices. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/awattar/claude-code-best-practices/main/.claude/commands/test.mdgit clone --depth 1 https://github.com/awattar/claude-code-best-practicesWrote 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.
[](https://agentmods.dev/commands/awattar/claude-code-best-practices/test)<a href="https://agentmods.dev/commands/awattar/claude-code-best-practices/test"><img src="https://agentmods.dev/badge/commands/awattar/claude-code-best-practices/test/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.
<a href="https://agentmods.dev/commands/awattar/claude-code-best-practices/test"><img src="https://agentmods.dev/badge/commands/awattar/claude-code-best-practices/test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00010 | $0.00954 |
| Opus 5.5 | $0.00004 | $0.00382 |
| Sonnet 5.5 | $0.00002 | $0.00191 |
| Haiku 4.5 | $0.00001 | $0.00095 |
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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Claude Code User Command: Test
This command helps you run and improve the test suite for the scope specified in $ARGUMENTS.
Usage
To test specific files or features, just type:
/test <file-or-directory>
/test <feature>
To test everything, just type:
/test all
What This Command Does
- Identifies test scope based on $ARGUMENTS (file, directory, feature or all).
- Checks current test coverage and runs targeted tests first.
- Executes integration and full test suite as needed.
- Fixes failing tests and adds missing test coverage.
- Documents results and commits improvements.
Agents Used
This command leverages specialized agents for comprehensive test suite management:
- general-qa - Primary agent for comprehensive testing strategies and automation
- general-code-quality-debugger - For debugging failing tests and improving test quality
- general-backend-developer - For API testing and integration test implementation
- general-frontend-developer - For UI testing with browser automation tools
Each agent contributes specialized expertise to ensure thorough project analysis and high-quality documentation generation.
Follow these steps:
General
Follow testing best practices and TDD principles. See GitHub's language-specific testing guides at https://docs.github.com/en/actions/how-tos/use-cases-and-examples/building-and-testing
Before starting:
- Identify the project's test framework (e.g., RSpec, Jest, pytest, xUnit). Check package.json, Gemfile, requirements.txt, or project documentation.
- Determine the browser automation tool for UI tests (e.g., puppeteer, playwright, selenium, cypress). Ask if unclear.
- Identify E2E testing approach based on the application type (browser-based, API, CLI, or mixed).
- Locate test configuration files and understand the test structure.
- Check for any project-specific testing guidelines in documentation or README.
Assess
Understand the current testing landscape:
- Identify the scope:
- If $ARGUMENTS is a file/directory, focus tests there.
- If $ARGUMENTS is a feature, find all related specs.
- If $ARGUMENTS is "all", prepare for full suite run.
- Check current test coverage:
- Run coverage reports if available.
- Identify untested or poorly tested areas.
- Review existing test patterns:
- Search for similar test files as examples.
- Check scratchpads for testing guidelines.
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.
- 1mo ago First seen · 130 lines · 10 tokens per session scan A 239a2576fb64
test is a command published in the GitHub repository awattar/claude-code-best-practices (262 stars, last pushed 5mo ago), licensed MIT. It adds 10 tokens to every session and 954 once invoked, about $0.0000 per session on Opus 5.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.
Other commands, from other repositories
prototype
You are building a proof-of-concept for the current Grainulator sprint. Read CLAUDE.md for sprint context and claims.json for existing research claims.
qa-changes
This skill should be used when the user asks to "QA a pull request", "test PR changes", "verify a PR works", "functionally test changes", or when an automated workflow triggers QA validation of code changes. Provides a structured methodology for setting up the environment, exercising changed behavior, and reporting…
verify
Run repository verification using the verification-loop skill.
modernize-transform
Transform one legacy module to the target stack — idiomatic rewrite with behavior-equivalence tests.
constraints
A command for defining a project's quality standards through a short interview and a written CONSTRAINTS.md file. It records checks, thresholds, exceptions, and commands for enforcing them.
check-dev
Type-check a Z specification with fuzz.