testing-patterns

testing-patterns is a skill for Claude Code from DDS-Solutions/AI-TadPole-OS. It costs 16 tokens per session (567 once invoked), scanned A, original, MIT.

A collection of software testing patterns for unit and integration tests, including ways to isolate code and replace dependencies with test doubles.

In plain words
What is it for?
It supports structuring tests with Arrange-Act-Assert, choosing mocks or fakes, and testing asynchronous code.
Why use it?
It helps make tests predictable, focused, and easier to maintain.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Not installable on its own: it reads a path above its own folder, which only exists inside its repository. The line is **Workflow Binding**: Used directly during the [`/test`](../../workflows/test.md) workflow..

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

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 testing-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/dds-solutions/ai-tadpole-os/testing-patterns.svg)](https://agentmods.dev/skills/dds-solutions/ai-tadpole-os/testing-patterns)
Your own site
<a href="https://agentmods.dev/skills/dds-solutions/ai-tadpole-os/testing-patterns"><img src="https://agentmods.dev/badge/skills/dds-solutions/ai-tadpole-os/testing-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 567 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.1 $0.00016 $0.00567
Opus 5 $0.00008 $0.00283
Sonnet 5 $0.00003 $0.00113
Haiku 4.5 $0.00002 $0.00057

Measured 2d ago against content hash 790fddfe8359, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

testing-patterns 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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/test_runner.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.agent/skills/testing-patterns/SKILL.md · 67 lines

What it actually says

[!IMPORTANT] AI Context & Knowledge Heritage

  • Subsystem: Agent Skills Registry / testing-patterns
  • Architecture: @docs ARCHITECTURE:Documentation
  • Failure Path: Information drift, legacy terminology, or documentation mismatch.
  • Observability: Traceability via execution/parity_guard.py ([SKILL])

Testing Patterns & Verification Principles

Standard: Arrange-Act-Assert (AAA). Fast, deterministic, isolated unit tests. Workflow Binding: Used directly during the /test workflow.


🎯 Progressive Disclosure & L3 Reference Index

Read REQUIRED testing principles below; consult deep L3 Reference Guides on demand:

L3 Reference Guide Purpose Trigger / When to Load
references/mocking_and_fixture_patterns.md Test double taxonomy (Mocks vs Spies vs Fakes), async Rust & Vitest fixtures Writing unit and integration tests

📐 1. The AAA Pattern (Arrange-Act-Assert)

it('calculates USD token burn correctly', () => {
  // 1. Arrange: Prepare mock fixtures and state
  const tokenTracker = new TokenTracker({ ratePerThousand: 0.002 });

  // 2. Act: Execute function under test
  const cost = tokenTracker.calculateCost(5000);

  // 3. Assert: Verify outcome matches specification
  expect(cost).toBe(0.01);
});

⚡ 2. Unit vs Integration Boundaries

Test Layer Target & Scope Execution Speed
Unit Pure functions, domain calculations, StateFlow reducers Blazing (<50ms per test)
Integration Axum router handlers, SQLite queries, WebSocket broadcasts Medium (100–500ms)
E2E Multi-agent swarms & end-to-end browser flows Heavy (1–5s)

🛠️ 3. Execution Commands

# 1. Run frontend unit tests
npm run test

# 2. Run backend Rust unit & integration tests
cargo test --manifest-path server-rs/Cargo.toml
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 67 lines · 16 tokens per session scan A 790fddfe8359

Subscribe to this mod's changes

testing-patterns is a skill published in the GitHub repository DDS-Solutions/AI-TadPole-OS (8 stars, last pushed yesterday), licensed MIT. It adds 16 tokens to every session and 567 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-09-03.

Related

Other skills, from other repositories

authoring-data-quality-checks

Adds and runs data quality checks (dbt-test style assertions) on a project's warehouse tables and saved-query views: not-null, uniqueness, accepted values, referential integrity, row-count bounds, freshness, and custom HogQL. Use when asked to test a model, validate a view, check for nulls or duplicates, add data…

PostHog/posthog · 161 tokens

authoring-benchmarks

Design, implement, run, debug, and interpret browser performance benchmarks for Elements components and utilities. Use whenever the user asks to benchmark or performance-test runtime code, create or update a .test.bench.ts file, compare benchmark results, investigate a browser performance regression, understand Vitest…

NVIDIA/elements · 105 tokens

component-tester

Run Vitest tests for a specific component with coverage. Use when making changes to React components to ensure tests pass and coverage is maintained.

motormetrics/motormetrics · 31 tokens

react-development

Enforces React-specific patterns: functional components with hooks, TypeScript prop interfaces, CSS Modules co-location, React Testing Library behavioral tests. Use when creating React components, writing custom hooks, structuring component folders, applying RTL test patterns, or wiring TypeScript prop types. Trigger…

monkilabs/opencastle · 81 tokens

rust-testing-strategy

HASH Rust testing strategy. Use when writing Rust unit, integration, or snapshot tests, or choosing assertion and test-organization patterns.

hashintel/hash · 31 tokens

writing-tests

Canonical rules for writing tests in the Shift codebase. Use whenever you add, rewrite, or review a .test.ts file — or any time you're about to mock, stub, or spy your way around a testing problem. This repo has deliberately swept mock-based testing out, and this skill is what keeps it out.

shift-editor/shift · 68 tokens