Unit Testing Principles
Apply Vladimir Khorikov's unit testing framework from "Unit Testing Principles, Practices, and Patterns" (Manning, 2020). Covers the four pillars (protection against regressions, resistance to refactoring, fast feedback, maintainability) and their unavoidable trade-offs, the three styles of unit testing (output-based, state-based, communication-based), observable behavior vs implementation details as the line that separates good and bad tests, mocks vs stubs with strict verification rules, the managed vs unmanaged dependency distinction (the most useful heuristic for deciding what to mock), wh
Install
/plugin marketplace add vnovakovits/claude-skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add vnovakovits/claude-skills --skill unit-testing-principlesgit clone --depth 1 https://github.com/vnovakovits/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/plugins/engineering-practices/skills/unit-testing-principles ~/.claude/skills/unit-testing-principlesPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Unit Testing Principles (Vladimir Khorikov) Apply this skill when you want to evaluate whether tests are *good* — not just whether they pass. The central premise: a good test gives you confidence to refactor, catches regressions, runs fast, and is easy to read. These four goals are in tension; the discipline is choosing the right trade-off. ## Core Philosophy **The goal of unit testing is sustainable growth of the codebase.** Tests that survive refactoring let you keep changing the system. Tests that break on every internal change are a tax, not an asset. **A good test is hard to write.** If a test is trivial, either the code is trivial (no domain value) or you are testing the wrong thing. The friction of testing complex code is the design feedback TDD aims for; the absence of friction is a sign the test does not earn its keep. **Tests should target observable behavior, not implementation details.** This single principle subsumes most of Khorikov's other rules. **Code coverage is not the metric.** A codebase with 100% coverage of trivial getters, mocked-everything orchestration tests, and brittle assertions is worse than one with 60% coverage of high-significance domain logic tested at the boundary. --- ## The Four Pillars of a Good Unit Test Every unit test sits somewhere in a four-dimensional space: ### 1. Protection Against Regressions Does the test catch bugs?
Details
- Skill name
unit-testing-principles- Repository
- vnovakovits/claude-skills
- Path
plugins/engineering-practices/skills/unit-testing-principles/SKILL.md- License
- MIT
- Repo updated
- 16 November 2026
FAQ
What does the Unit Testing Principles skill do?
Apply Vladimir Khorikov's unit testing framework from "Unit Testing Principles, Practices, and Patterns" (Manning, 2020). Covers the four pillars (protection against regressions, resistance to refactoring, fast feedback, maintainability) and their unavoidable trade-offs, the three styles of unit testing (output-based, state-based, communication-based), observable behavior vs implementation details as the line that separates good and bad tests, mocks vs stubs with strict verification rules, the managed vs unmanaged dependency distinction (the most useful heuristic for deciding what to mock), wh
How do I install the Unit Testing Principles skill?
Claude Code plugin: /plugin marketplace add vnovakovits/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Unit Testing Principles popular?
It lives in vnovakovits/claude-skills, which has 5 GitHub stars and 2 forks.
Related skills
Accidental Cio
5vnovakovits/claude-skills
Apply Scott Millett's "The Accidental CIO — A Lean and Agile Playbook for IT Leaders" (Wiley, 2024) when designing or reviewing how a technology organisation decides, funds, governs and delivers work. Covers the five components of an adaptive IT operating model (organised, work, govern, talent, lead) and its four themes (outcomes over output, intrinsic motivation, being not doing agile, manage flow not people); matching method and governance to context via Cynefin and Wardley evolution; governance as demand management + funding + measurement + decision rights, shifting from project funding to
Agent Retro
5vnovakovits/claude-skills
Run a retrospective on a coding-agent session and improve the agent's environment, not the code. Combines Derby & Larsen's five-stage retrospective, Shigeo Shingo's poka-yoke (turn a mechanical mistake into a check that makes it impossible), and Matt Pocock's retro categories — navigation, automated checks, coding standards, steering files, tool economy, information access. Covers mining the session transcript for corrections, wrong turns and slow searches; deciding where each fix belongs (analyzer, hook, CI, reviewer standards, CLAUDE.md pointer, skill, doc or memory); the no-op test for stee
API Design
5vnovakovits/claude-skills
Design APIs that are clear, evolvable, and idiomatic to their protocol — covering REST (Fielding, Richardson Maturity Model, Massé), GraphQL, gRPC/protobuf, versioning strategies, pagination, error responses (RFC 7807 Problem Details), idempotency, authentication, documentation (OpenAPI), and the pragmatic trade-offs between RESTful purity and developer ergonomics. Use when designing a new endpoint, choosing between REST/GraphQL/gRPC, defining versioning, structuring error responses, deciding pagination strategy, or evaluating an existing API's evolvability.
Verification Before Completion
8Freddy-CHEN-ux/00_claude_skills
Use when finishing any task. Final checklist before marking complete. Ensures nothing forgotten, all tests pass, documentation updated.
To Tickets
5vnovakovits/claude-skills
Break a plan, spec, grilling summary or conversation into a set of tracer-bullet tickets — thin, end-to-end slices that each work and can be demonstrated on their own — with explicit "blocked by" edges, so the work forms a dependency graph and anyone can pick up a ticket whose blockers are done. Covers vertical vs horizontal slicing (Hunt & Thomas's tracer bullets, Cockburn's Elephant Carpaccio, INVEST), prefactoring first ("make the change easy, then make the easy change"), sequencing a wide refactor as expand-migrate-contract (Parallel Change), sizing a ticket to one session and one pull req
Voice E2E Test
8Freddy-CHEN-ux/00_claude_skills
Comprehensive E2E test of voice call pipeline - place call, verify auth flow, monitor transcripts/scores, verify report. Use when user says "test voice e2e", "run voice test", or "full voice test".
Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.