test

test is a command for Claude Code from wesammustafa/Claude-Code-Everything-You-Need-to-Know. It costs 17 tokens per session (1,068 once invoked), scanned A, original, MIT.

A checklist for writing unit tests, which check one piece of a program's internal logic at a time rather than testing web endpoints.

In plain words
What is it for?
Use it to identify the logic being tested, choose normal and unusual inputs, keep tests focused, and break down complex workflows.
Why use it?
It helps prevent tests from targeting the wrong part of the code or changing shared test setup unnecessarily.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents.

Good fit Use it to identify the logic being tested, choose normal and unusual inputs, keep tests focused, and break down complex workflows.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/wesammustafa/claude-code-everything-you-need-to-know/test
About the project

Claude Code: Everything You Need to Know is a practical guide to using Claude Code, an AI coding assistant that can be extended with commands, skills, hooks, subagents, workflows, and external tool servers. Developers use it to learn Claude Code from basic prompting through team and automation setups. The catalogue entries are examples of the guide's Claude Code extensions and workflows.

wesammustafa/Claude-Code-Everything-You-Need-to-Know · 2,969 stars · on GitHub

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/wesammustafa/Claude-Code-Everything-You-Need-to-Know

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/wesammustafa/claude-code-everything-you-need-to-know/test.svg)](https://agentmods.dev/commands/wesammustafa/claude-code-everything-you-need-to-know/test)
Your own site
<a href="https://agentmods.dev/commands/wesammustafa/claude-code-everything-you-need-to-know/test"><img src="https://agentmods.dev/badge/commands/wesammustafa/claude-code-everything-you-need-to-know/test.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,068 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.00017 $0.01068
Opus 5 $0.00009 $0.00534
Sonnet 5 $0.00003 $0.00214
Haiku 4.5 $0.00002 $0.00107

Measured 8d ago against content hash 6b9650375add, 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 8d 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.md · 141 lines

How it starts

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

✅ LLM Unit Testing Best Practices Checklist

Focused on testing internal logic, not API endpoints


🔍 Context Verification

  • Understand the Purpose of the Component
    Do not infer from names. Derive intent from behavior and direct usage.

  • Identify Critical Inputs and Outputs
    Cover expected, edge, malformed, and unexpected scenarios.

  • Determine the True Unit Under Test
    Target the logic layer (e.g., services, classes, helpers)—not API routes or request handlers.

  • Avoid API Testing Patterns
    Do not simulate NextRequest, fetch, or Express routes unless explicitly instructed.

  • Apply Strict Scope Discipline
    Don’t touch other modules, files, or features unless clearly necessary.

  • Always Tend to Simplify
    Clear, modular tests beat overly clever ones.

  • Avoid Adding Dependencies Unless Justified
    Don't install libraries unless there's a strong, test-specific reason.

  • Preserve Test Configuration
    Do not alter global setups, environments, or shared mocks unless explicitly asked.

  • Use Subagents for Complex Flows
    When testing decision trees or workflows, spawn helpers to aid decomposition and reliability.


⚙️ Test Structure

  • Test Core Behavior, Not Wiring
    The unit under test must not include route handlers, HTTP abstractions, or serialization logic.

  • Follow the Given–When–Then Format
    Reinforces clarity and intention behind test actions.

  • Name Tests Clearly
    Prefer: should_<action>_when_<condition>_given_<context>


🧪 Test Cases

  • Focus on Internal Logic Units
    Classes, methods, services, pure functions—these are the test targets.

  • Cover Valid and Invalid Inputs
    Ensure the unit responds correctly to correct and incorrect usage.

  • Avoid Over-Mocking
    Only mock I/O or external services—never mock the unit’s own logic.

  • Don’t Test API Response Codes or Routing Behavior
    This is not the place for POST(req) or handler-level simulation.

Read the full file on GitHub · 141 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. 8d ago First seen · 141 lines · 17 tokens per session scan A 6b9650375add

Subscribe to this mod's changes

test is a command published in the GitHub repository wesammustafa/Claude-Code-Everything-You-Need-to-Know (2,969 stars, last pushed 1mo ago), licensed MIT. It adds 17 tokens to every session and 1,068 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.