testing-principles

testing-principles is a skill for Claude Code from shinpr/claude-code-workflows. It costs 49 tokens per session (1,108 once invoked), scanned A, original, MIT.

A set of general testing guidelines covering test-driven development, test quality, coverage, and test design. Test-driven development means writing a failing test, making it pass with the smallest change, then improving the code.

In plain words
What is it for?
Use it when writing tests, planning test coverage, reviewing test quality, or fixing reproducible bugs.
Why use it?
It keeps tests focused on meaningful behaviour instead of chasing coverage numbers or creating fragile, low-value tests.

Skill for Claude Code

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

Part of the dev-skills plugin — 9 skills shipped together

Good fit Use it when writing tests, planning test coverage, reviewing test quality, or fixing reproducible bugs.

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

Made for: Claude Code.

Or install dev-skills, the plugin that ships this one along with the rest of its 9 skills.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/shinpr/claude-code-workflows/testing-principles"><img src="https://agentmods.dev/badge/skills/shinpr/claude-code-workflows/testing-principles.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 1,108 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.00049 $0.01108
Opus 5.5 $0.00020 $0.00443
Sonnet 5.5 $0.00010 $0.00222
Haiku 4.5 $0.00005 $0.00111

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

Security

Grade A, and why

testing-principles 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 6d 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.

dev-skills/skills/testing-principles/SKILL.md · 61 lines

How it starts

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

Language-Agnostic Testing Principles

Tests here guarantee accepted behavior, and the next agent reads every existing test as a requirement to preserve. A brittle, duplicated, or implementation-shaped test therefore becomes a false requirement: it gets worked around, and the workaround leaves debt in the implementation. Keep the set of tests whose proof is worth its maintenance.

Test Selection

  • Prove accepted behavior by default through integration and E2E tests at the boundary users and callers observe. Add a unit test for logic whose cases one representative boundary test cannot prove, such as calculations, parsing, or branching rules.
  • Each behavioral claim is owned by one test: such logic by its unit test, other behavior by the test at the narrowest integration or E2E boundary where it is observable. A test at a wider boundary or in a variant (viewport, device, role) proves what that boundary or variant adds, such as wiring, mapping, persistence, rendering, or navigation, and keeps at most one representative case of a rule owned elsewhere.
  • Determine the required proof boundary from the accepted outcome before minimizing tests. An outcome delivered through an application or service entry point includes the relevant production composition, such as routing, providers, state ownership or adapters. An isolated component test or a test-built substitute composition does not prove that wiring. Reuse proof that traverses it, or select a test that will; choose the harness by what it must observe, not by component count or a lane quota. A disconnected action, lost state update or broken transition can remain invisible to tests below that boundary. Explicitly component-scoped outcomes retain their component boundary.
  • Treat coverage as a diagnostic signal for finding untested areas, not a target; any CI threshold is the project's config, not a quality goal in itself.
  • Use project-configured speed budgets when present. Otherwise investigate test speed only when observed feedback or CI cost is material to the current outcome; retain slower tests when their proof boundary requires it.

Read the full file on GitHub · 61 lines

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. 6d ago Changed 80360d250793
  2. 8d ago Changed · +1 lines dc2ff705943f
  3. 25d ago Changed · -1 tokens per session aea0e6f86789
  4. 1mo ago Changed · +1 lines 6edf8ef18f2e
  5. 1mo ago Changed · +1 lines · +10 tokens per session 591da4ef5b88
  6. 3mo ago First seen · 58 lines · 40 tokens per session scan A 3da24a71e449

Subscribe to this mod's changes

testing-principles is a skill published in the GitHub repository shinpr/claude-code-workflows (725 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 1,108 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-30.

Related

testing-principles compared with skills from other repositories

testing-principles next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
testing-principlesshinpr/claude-code-workflowsSkill725yesterdayMITA49Claude Code
plangreglas75/zuvoSkill7todayMITA53Claude Code
handoffreidemeister94/development-skillsSkill1219d agoMITA22Claude Code
tddt1/tdderSkill144d agoApache-2.0A102Claude Code
unfolding-orchestratort1/tdderSkill144d agoApache-2.0A47Claude Code
github-safetyt1/tdderSkill144d agoApache-2.0A43Claude Code
engineering-craftmickeyyaya/evolve-loopSkill8yesterdayApache-2.0A40Claude Code