test-design

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 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/yarlson/yarstack/test-design
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, Codex.

Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 540 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.00044 $0.00540
Opus 5 $0.00022 $0.00270
Sonnet 5 $0.00009 $0.00108
Haiku 4.5 $0.00004 $0.00054

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

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

How it starts

The opening of the file, as written. The whole thing — 28 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 engineering tooling and infrastructure, prefer native checks unless they cannot credibly prove important behavior, concrete complexity or failure risk warrants regression coverage, and a focused deterministic test boundary fits the task. If not, identify the applicable native checks and stop.
  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 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: normal operation, important boundaries, meaningful failures, cleanup, and external effects.
  7. Follow the repository's existing test structure, helpers, fixtures, and commands.
  8. 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.
  9. Write the smallest reproducible test whose failure identifies the broken contract.
  10. State what remains unverified when the behavior cannot be tested economically instead of adding a weak proxy assertion.

Read the full file on GitHub · 28 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 · 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 4d ago), licensed MIT. It adds 44 tokens to every session and 540 once invoked, about $0.0002 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

opensrc

Fetch dependency source code to give AI agents deeper implementation context. Use when the agent needs to understand how a library works internally, read source code for a package, fetch implementation details for a dependency, or explore how an npm/PyPI/crates.io package is built. Triggers include "fetch source for"…

vercel-labs/opensrc · 103 tokens

release-cli

Release a new version of the tokenmaxxing CLI to npm. Use when explicitly asked to release or publish @851-labs/tokenmaxxing, including checking main, bumping apps/cli/package.json, updating CHANGELOG.md, committing, tagging cli-vX.Y.Z, pushing, monitoring generated native package publishing, and smoke testing the…

851-labs/tokenmaxxing · 73 tokens

ship-mobile-app

Build, change, debug, and prepare production mobile apps across domain meaning, local and server state, lifecycle, platform, and release boundaries. Use for non-trivial Flutter, React Native, iOS, or Android work involving persistence, sync, auth, offline behavior, notifications, permissions, native integrations…

aiopshwang/ship-mobile-app · 103 tokens

verify-regression-tests

Verify that a regression test actually detects the defect it claims to guard against. Use after adding or reviewing a bug-fix guard, reproducing the original failure after a fix, or investigating a suspiciously green regression test. Do not use for general TDD, broad test-suite audits, mutation-score optimization…

aiopshwang/verify-regression-tests · 75 tokens

repository-bootstrap

Audit and establish or upgrade the canonical repository governance baseline. Use only when explicitly asked to bootstrap, standardize, or upgrade a repository; do not use for feature development or source-code restructuring.

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

repository-hygiene

Perform a read-only evidence-based audit of stale docs, agent files, scripts, generated artifacts, duplicate code, and optional tools. Use only when explicitly asked for cleanup or governance review; do not delete or refactor during the audit.

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