claude-sdk-rs: Command for Claude Code

.claude/commands/test.md

test is a command for Claude Code from bredmond1019/claude-sdk-rs. It costs 0 tokens per session (2,237 once invoked), scanned A, original, Apache-2.0.

A project validation command that runs the checks defined in the project's configuration and returns the results as structured JSON. The checks can include linting, formatting, type checks, tests, and build verification.

In plain words
What is it for?
Use it to run the full validation suite, record results against a task or project specification, and confirm that the project builds and its tests pass.
Why use it?
It gives one repeatable way to find regressions and code-quality problems before they affect other work. The same command can work across different programming stacks because the checks are configured by the project.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions Claude Code.

This is bredmond1019/claude-sdk-rs's own configuration. It tells Claude Code how to work on claude-sdk-rs 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 claude-sdk-rs configures →

Reuse

Borrowing it

Nothing to install: this file belongs to bredmond1019/claude-sdk-rs. 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/bredmond1019/claude-sdk-rs/main/.claude/commands/test.md
Clone the repo
git clone --depth 1 https://github.com/bredmond1019/claude-sdk-rs

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/bredmond1019/claude-sdk-rs/test/github.svg)](https://agentmods.dev/commands/bredmond1019/claude-sdk-rs/test)
Your own site
<a href="https://agentmods.dev/commands/bredmond1019/claude-sdk-rs/test"><img src="https://agentmods.dev/badge/commands/bredmond1019/claude-sdk-rs/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.

agentmods 80×15 button for test

Your own site · 80×15
<a href="https://agentmods.dev/commands/bredmond1019/claude-sdk-rs/test"><img src="https://agentmods.dev/badge/commands/bredmond1019/claude-sdk-rs/test.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 2,237 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.02237
Opus 5.5 $0.00000 $0.00895
Sonnet 5.5 $0.00000 $0.00447
Haiku 4.5 $0.00000 $0.00224

Measured 11d ago against content hash 82710657829c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test scanned grade A 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 11d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

diff = subprocess.run(['git','diff','-M','-U0','main..HEAD','--','*.md','*.mdx'], capture_output=True, text=True).stdout.splitlines()
.claude/commands/test.md · 191 lines

How it starts

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

Application Validation Test Suite

Execute the project's validation suite, returning results in a standardized JSON format for automated processing. The suite is not hardcoded — it is read from planning/harness.json (the mechanism/policy split), so this command works for any stack.

Variables

$ARGUMENTS — optional path to the task spec and optional task number. Same format as /implement.

Examples:

  • (no args) — run full suite; output JSON to chat only; no worklog/state written
  • planning/<spec-slug>/tasks.md — run full suite; append a worklog section + update state for the whole spec
  • planning/<spec-slug>/tasks.md 1 — run full suite; append a worklog section + update state scoped to task 1

The task number N does NOT change which checks run — all checks always run regardless. N only scopes which sdlc/state.json task entry and worklog section this run's results are recorded against.

Purpose

Proactively identify and fix issues before they impact the project or downstream work. By running this suite you can:

  • Detect lint / format / type errors before they reach the build
  • Catch broken tests or regressions
  • Verify the project builds/compiles cleanly
  • Enforce the universal harness rule: no emoji in changed markdown

Constants

TEST_COMMAND_TIMEOUT: 5 minutes

Instructions

  • Step 0 — Parse $ARGUMENTS: If provided, split on the last space. Trailing number = task N; remainder = spec path. Derive the spec dir from the spec's parent directory:
    • No args: no worklog/state will be written.
    • Spec only: planning/<spec-slug>/tasks.md → planning/<spec-slug>/sdlc/ (record scoped to "all tasks")
    • Spec + task N: planning/<spec-slug>/tasks.md 1 → planning/<spec-slug>/sdlc/ (record scoped to task 1)
  • Run /prime to orient to the codebase before executing any checks.
  • Step 1 — Load the validation suite: Read planning/harness.json.
    • If present and valid JSON: the checks are validation.checks[], run in order, top to bottom. Each entry has name, command, purpose, and gates (whether its failure blocks the review verdict). The check whose purpose names it authoritative for the verdict is the one that always prevents PASS when it fails.
    • If absent or invalid: fall back to the spec's optional ## Validation Commands section — run each command there, in order. If there is no spec or no such section, run no project checks and record a single informational row (test_name "no_validation_suite", passed true).
    • The engine ships no stack defaults — never invent lint/test/build commands; they come only from harness.json or the spec.
  • Run each check with the Bash tool. Capture the result (passed/failed) and any error messages.
  • IMPORTANT: Return ONLY the JSON array with check results
    • IMPORTANT: Do not include any additional text, explanations, or markdown formatting
    • We'll immediately run JSON.parse() on the output, so make sure it's valid JSON
  • If a check passes, omit the error field
  • If a check fails, include the error message in the error field
  • Execute all checks even if some fail
  • Error Handling:
    • If a command returns a non-zero exit code, mark as failed
    • Capture stderr output for the error field
    • Timeout commands after TEST_COMMAND_TIMEOUT
  • Execution order is the order in validation.checks[] (or the spec) — earlier gates (format/lint/type) before later ones (test/build)
  • All commands are run from the repo root unless the command itself changes directory
  • Always run pwd before each check to confirm you are in the repo root

Read the full file on GitHub · 191 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. 11d ago First seen · 191 lines · 0 tokens per session scan A 82710657829c

Subscribe to this mod's changes

test is a command published in the GitHub repository bredmond1019/claude-sdk-rs (23 stars, last pushed 1mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,237 tokens. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-26.

Related

test compared with commands from other repositories

test next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
testbredmond1019/claude-sdk-rsCommand231mo agoApache-2.0A0Claude Code
playwright-test-healmicrosoft/playwrightCommand99kyesterdayApache-2.0A2GitHub Copilot
bugfixnWave-ai/nWaveCommand631yesterdayMITA18Claude Code
verify-bugHoangNguyen0403/agent-skills-standardCommand583todayMITA0Claude Code
api-aqa-flow-execution-and-report-analysisgriddynamics/rosettaCommand370todayApache-2.0A28Claude Code
AGENTSmax-sixty/worktrunkCommand12kyesterdaynoneA0Claude Code
timeout-fixclassmethod/tsumikiCommand9723mo agoMITA52Claude Code