testing-unit

testing-unit is a skill for Claude Code from yonatangross/orchestkit. It costs 95 tokens per session (2,442 once invoked), scanned A, original, MIT.

A set of patterns for unit tests, which check one small piece of program logic in isolation. It covers test structure, repeated input cases, test fixtures, network mocking, and generated test data.

In plain words
What is it for?
Use it to write Arrange-Act-Assert tests, parameterised cases, scoped fixtures, network-level mocks with MSW or VCR.py, and factories for test data.
Why use it?
Tests become slow, repetitive, or unreliable when they share mutable data or contact real services. These patterns help keep each test focused and predictable.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: agent in frontmatter; mentions Claude Code.

Part of the ork plugin — 115 skills, 43 commands, 36 agents, 32 hooks shipped together

Good fit Use it to write Arrange-Act-Assert tests, parameterised cases, scoped fixtures, network-level mocks with MSW or VCR.py, and factories for test data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yonatangross/orchestkit/testing-unit
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 yonatangross/orchestkit --skill testing-unit
Clone the repo
git clone --depth 1 https://github.com/yonatangross/orchestkit

Made for: Claude Code.

Or install ork, the plugin that ships this one along with the rest of its 115 skills, 43 commands, 36 agents, 32 hooks.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/yonatangross/orchestkit/testing-unit"><img src="https://agentmods.dev/badge/skills/yonatangross/orchestkit/testing-unit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,442 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00095 $0.02442
Opus 5.5 $0.00038 $0.00977
Sonnet 5.5 $0.00019 $0.00488
Haiku 4.5 $0.00010 $0.00244

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

Security

Grade A, and why

testing-unit 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 1mo 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/ork/skills/testing-unit/SKILL.md · 273 lines

How it starts

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

Unit Testing Patterns

Focused patterns for writing isolated, fast, maintainable unit tests. Covers test structure (AAA), parametrization, fixture management, HTTP mocking (MSW/VCR), and test data generation with factories.

Each category has individual rule files in rules/ loaded on-demand, plus reference material, checklists, and scaffolding scripts.

Core Principles (ALWAYS apply)

  1. AAA structure: Every test MUST follow Arrange-Act-Assert. Use // Arrange, // Act, // Assert comments for clarity.
  2. Parametrize, don't duplicate: Use test.each (TypeScript) or @pytest.mark.parametrize (Python) when testing multiple inputs. Never copy-paste the same test body with different values.
  3. Fixture scoping matters: Use scope="function" (default) for mutable data. Use scope="module" or scope="session" ONLY for expensive read-only resources (DB engines, ML models). Mutable data with shared scope causes flaky tests.
  4. Speed target: Each unit test should run under 100ms. If it's slower, you're likely hitting I/O — mock it.
  5. Mock at the network level: Use MSW (TypeScript) or VCR.py (Python) to intercept HTTP at the network layer. Never mock fetch/axios/requests directly.

Quick Reference

Category Rules Impact When to Use
Unit Test Structure 3 CRITICAL Writing any unit test
HTTP Mocking 2 HIGH Mocking API calls in frontend/backend tests
Test Data Management 3 MEDIUM Setting up test data, factories, fixtures

Total: 8 rules across 3 categories, 4 references, 3 checklists, 1 example set, 3 scripts

Unit Test Structure

Core patterns for structuring isolated unit tests with clear phases and efficient execution.

Rule File Key Pattern
AAA Pattern rules/unit-aaa-pattern.md Arrange-Act-Assert with isolation
Fixture Scoping rules/unit-fixture-scoping.md function/module/session scope selection
Parametrized Tests rules/unit-parametrized.md test.each / @pytest.mark.parametrize

Read the full file on GitHub · 273 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. 1mo ago First seen · 273 lines · 95 tokens per session scan A 07dd65accf66

Subscribe to this mod's changes

testing-unit is a skill published in the GitHub repository yonatangross/orchestkit (300 stars, last pushed today), licensed MIT. It adds 95 tokens to every session and 2,442 once invoked, about $0.0004 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-09-05.

Related

Other skills, from other repositories

vitest

Vitest unit testing — Vite-powered, Jest-compatible. Use when writing tests, mocking, configuring coverage, or working with test filtering and fixtures.

martineserios/thebrana · 33 tokens

pytest

Advanced Python unit testing framework for customer support tech enablement, covering FastAPI, SQLAlchemy, PostgreSQL, async operations, mocking, fixtures, parametrization, coverage, and comprehensive testing strategies for backend support systems.

manutej/luxor-claude-marketplace · 44 tokens

python-testing

Guidelines for writing and running tests in the Agent Framework Python codebase. Use this when creating, modifying, or running tests.

microsoft/agent-framework · 29 tokens

writing-tests

Kiro Crew repo only: how to write a backend pytest test with NO side effects that does not flake. Use when adding, editing, reviewing or debugging a test there: which conftest applies, what leaks (temp dirs, data home, /.kiro, cron, threads), the seven flake classes, cross-platform traps.

kirodotdev/KiroCrew · 72 tokens

dashboard-template

Kiro Crew repo only: load this when a task will author or change a dashboard page. A page never ships alone: the same PR carries its TypedDict contract, its provider, and a parity test that the two agree. Scaffold all four from one field list; read numbers from an existing fold, never type them.

kirodotdev/KiroCrew · 68 tokens

test-writer

How to write pytest tests for modules in this workspace. Load whenever you are about to write or extend tests.

genkit-ai/genkit · 26 tokens