test

A testing workflow that checks whether a feature, endpoint, or function meets its stated requirements rather than copying its current implementation. TDD means test-driven development, but this workflow is intended for teams writing tests after development.

In plain words
What is it for?
Use it to read requirements, identify the observable behavior and public interface, and write tests for inputs, outputs, and side effects.
Why use it?
It helps tests remain useful when the code is refactored and prevents tests from repeating the same mistake as the implementation.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/yamanidev/claude-code-configuration/test
Any agent
npx skills add yamanidev/claude-code-configuration --skill test
Clone the repo
git clone --depth 1 https://github.com/yamanidev/claude-code-configuration

Made for: Claude Code, Codex.

Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,347 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00106 $0.01347
Opus 5 $0.00053 $0.00674
Sonnet 5 $0.00021 $0.00269
Haiku 4.5 $0.00011 $0.00135

Measured 2d ago against content hash 1f705202a6bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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.

skills/test/SKILL.md · 63 lines

How it starts

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

Test

You are a senior engineer writing tests that verify requirements, not implementation. The distinction is the entire point of this skill. A test that mirrors the implementation passes when the code is wrong in the same way the test is wrong, and breaks every time the implementation is refactored — even when behavior is unchanged. That's worse than no test.

The team you're writing for has limited test culture and is adopting tests gradually, after development rather than before. Your tests need to be valuable enough on the first read that the team chooses to keep writing them.

Operating principles

  1. Test behavior, not internals. Tests assert what the system does as observed from outside the unit: inputs go in, outputs come out, side effects occur. They don't assert which private method was called or which intermediate variable held what value.
  2. Read the spec first, the implementation second — and the implementation only for surface area. The requirement defines what should be true. The implementation only tells you what the testable surface is: function signatures, endpoint contracts, return shapes, what side effects exist. Never let the implementation's logic shape the test's assertions.
  3. If the spec is ambiguous, the test cannot be written yet. Stop and ask. A test written against a fuzzy requirement just freezes someone's guess into the codebase.
  4. One behavior per test. Each test asserts one thing about one scenario. When it fails, the failure tells you exactly what's broken. No setup-heavy tests that verify five things at once.
  5. Cover the requirement's branches, not the code's branches. What does the spec say should happen on valid input? Invalid input? Missing input? Boundary values? Permission denied? Concurrent access? These come from understanding the requirement, not from looking at if statements.
  6. Realistic, not exhaustive. Tests should cover what plausibly happens — the happy path, the failures users will actually hit, the edge cases the requirement explicitly addresses. Don't enumerate every theoretical input.
  7. Match the codebase. Use the existing test framework, the existing fixtures, the existing patterns for mocking and setup. A test that's stylistically alien is a test no one will maintain.
  8. Mock at the boundary, not inside the unit. Mock external services (payment APIs, email providers, third-party HTTP) — not internal collaborators. Heavy internal mocking is the most reliable way to produce tests that verify implementation rather than behavior.
  9. A flaky test is worse than a missing test. It teaches the team to ignore failures. Don't ship tests that depend on timing, ordering, network availability, or system clock without isolating those dependencies explicitly.

Read the full file on GitHub · 63 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. 2d ago First seen · 63 lines · 106 tokens per session scan A 1f705202a6bc

Subscribe to this mod's changes

test is a skill published in the GitHub repository yamanidev/claude-code-configuration (9 stars, last pushed 1mo ago), licensed MIT. It adds 106 tokens to every session and 1,347 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

059-design-atdd

Use when reviewing whether an OpenSpec change's execution goal, acceptance criteria, and implementation or verification tasks are aligned. This should trigger for requests such as Review this OpenSpec change with ATDD; Check acceptance criteria against tasks; Find acceptance criteria without task coverage; Detect…

jabrena/plinth · 93 tokens

054-design-tdd

Use when Java implementation work should be guided by Test-Driven Development, including maintaining a test list, choosing the next behavior, writing a failing test first, implementing only enough production code to pass, and refactoring while keeping tests green. This should trigger for requests such as Apply TDD…

jabrena/plinth · 93 tokens

058-design-bdd

Use when a Java change needs independent Behavior-Driven Development guidance from trusted behavior facts through concrete examples and observable scenarios, with focused clarification when behavior is pending or ambiguous. This should trigger for requests such as Apply BDD; Facilitate behavior examples; Discover…

jabrena/plinth · 84 tokens

auto-loop

TDD-based autonomous development loop with checkpoint recovery and observability changelog.

claude-world/director-mode-lite · 17 tokens

test-first

Drive one feature through a strict TDD Red-Green-Refactor cycle with checklists for each phase. Use when implementing new functionality test-first, or when the user runs /test-first.

claude-world/director-mode-lite · 42 tokens

feature-dev

Take one new feature slice from idea to reviewed, committed code in a single guided pass — scope it into the smallest shippable slice, build it test-first with strict TDD, review and fix the diff, then commit it. Chains slice → test-driven-development → the built-in /code-review → git-commit. Not for reviewing an…

thoughtbot/rails-consultant · 83 tokens