test-design

test-design is a skill for Claude Code from yarlson/yarstack. It costs 49 tokens per session (669 once invoked), scanned A, original, MIT.

A method for designing or writing repeatable software tests based on the behavior and risks that matter. It covers product code as well as tools and infrastructure when built-in checks are not enough.

In plain words
What is it for?
Use it to define expected results, preserved state, side effects, failure cases, and cleanup before implementation. It can guide example tests, property-based tests, fuzzing, concurrency checks, or recovery tests when appropriate.
Why use it?
It prevents tests from checking only easy examples or internal implementation details. It helps choose a test type and level that can actually reveal important failures.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the yarstack plugin — 46 skills, 1 agent shipped together

Good fit Use it to define expected results, preserved state, side effects, failure cases, and cleanup before implementation. It can guide example tests, property-based tests, fuzzing, concurrency checks, or recovery tests when appropriate.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yarlson/yarstack/test-design
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.

Any agent
npx skills add yarlson/yarstack --skill test-design
Clone the repo
git clone --depth 1 https://github.com/yarlson/yarstack

Made for: Claude Code.

Or install yarstack, the plugin that ships this one along with the rest of its 46 skills, 1 agent.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/yarlson/yarstack/test-design"><img src="https://agentmods.dev/badge/skills/yarlson/yarstack/test-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 669 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.00049 $0.00669
Opus 5.5 $0.00020 $0.00268
Sonnet 5.5 $0.00010 $0.00134
Haiku 4.5 $0.00005 $0.00067

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

Security

Grade A, and why

test-design 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 3d 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.

plugins/yarstack/skills/test-design/SKILL.md · 29 lines

How it starts

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

Test Design

Own the prospective test contract and test code, not the production implementation or retrospective evidence audit.

Workflow

  1. Confirm that dedicated automated tests are warranted. For tooling or infrastructure, name the native checks that prove the change and stop, unless those checks cannot show behavior that matters.
  2. Identify the authoritative contract, condition, action, observable result, invariants, important side effects, assumptions, and state preserved on failure.
  3. Choose the lowest test level that proves the contract through a stable public or system boundary.
  4. Match the method to the risk: use examples for concrete cases, property or model-based tests for invariants and sequences, fuzzing for broad or hostile input, and systematic concurrency or fault-injection tests for ordering, restart, and recovery. Select only methods that address a material risk.
  5. Make every test deterministic: control time, randomness, and concurrency, wait for states instead of sleeping, and avoid real network calls and shared mutable state. Async waits, concurrency, and test-order dependence cause most flaky tests. Make generated or scheduled cases reproducible with a recorded seed, useful bounds, and a minimized counterexample or retained failing input where the tooling supports them.
  6. Select only cases that materially define the behavior: one check that fails when the logic breaks, plus a boundary, failure, cleanup, or external-effect case only where the behavior carries that risk.
  7. Derive each expected value from the requirement or a small fixed example, never from the logic, constants, or mappings of the code under test. Prefer real implementations, then fakes; stub or mock only dependencies that the system does not own, and assert an interaction only when the interaction is the observable behavior.
  8. Follow the repository's existing test structure, helpers, fixtures, and commands.
  9. Design test code to the same engineering standard as product code. Reuse existing focused helpers before adding new ones. Extract cohesive repeated setup while keeping scenario inputs and expected results visible. Prefer named table-driven cases when they share one setup, action, and assertion path; use direct tests when they do not.
  10. Write the smallest reproducible test whose failure identifies the broken contract. When you write a test, run it against the unfixed code or a deliberate temporary break, and confirm that it fails.
  11. State what remains unverified when the behavior cannot be tested economically instead of adding a weak proxy assertion.

Read the full file on GitHub · 29 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. 3d ago Changed · +1 lines · +5 tokens per session 3c58429eb6d4
  2. 1mo ago Changed 1f935a658e42
  3. 1mo ago First seen · 28 lines · 44 tokens per session scan A 78e74636fecb

Subscribe to this mod's changes

test-design is a skill published in the GitHub repository yarlson/yarstack (3 stars, last pushed 2d ago), licensed MIT. It adds 49 tokens to every session and 669 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

safe-change

Trace, implement, test, and independently review one bounded software change. Use for ordinary feature, bug-fix, or refactor work after the repository is bootstrapped; do not use for broad repository cleanup, production operations, or undefined rewrites.

cz1993/vibe-coding-repository-standard · 54 tokens

gentle-ai-bench

Trigger: bench, journey, journeys, driven mode, gentle-ai-bench, journey corpus, j-numbers, bench axis. Author and verify gentle-ai bench journeys; go test ./bench never proves driven execution.

Gentleman-Programming/gentle-ai · 49 tokens

go-testing

Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.

Gentleman-Programming/gentle-ai · 26 tokens

include-test-files-that-assert-on-behavior-being-changed-in-decl

When delegating a task affected by this skill, include.

ZaxbyHub/opencode-swarm · 29 tokens

Autonomous Agent Testing

Testing patterns for autonomous AI coding agents like Devin and SWE-Agent including task verification, output validation, sandboxed execution, regression testing for agent behavior, and safety guardrails for autonomous code generation.

PramodDutta/qaskills · 43 tokens

ring:running-dev-cycle

Running the backend dev cycle: implements every task in a rolling-wave plan.md (ring:writing-plans format) for a Go/TS service, driving specialist agents through Gate 0 implementation/TDD, Gate 8 parallel review, and Gate 9 validation per epic, elaborating later phases at each phase boundary. Use when starting or…

LerianStudio/ring · 122 tokens