unit-test-tatsujin

Enforce AAA pattern and mocking guidelines for unit test design.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/kazuph/dotfiles --skill unit-test-tatsujin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unit-test-tatsujin
Source: https://github.com/kazuph/dotfiles/tree/main/claude/skills/unit-test-tatsujin
Command: npx skills add https://github.com/kazuph/dotfiles --skill unit-test-tatsujin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to writing effective, maintainable, and valuable unit tests, ensuring code quality and robustness.

Core Features & Use Cases

  • Defines Unit Testing: Clarifies the core principles of what constitutes a good unit test (small scope, fast execution, isolation).
  • Outlines Testing Pillars: Details the four essential pillars: protection against regression, refactoring resilience, rapid feedback, and ease of maintenance.
  • Specifies Mocking/Stubbing: Provides clear guidelines on when and how to use mocks and stubs, emphasizing verification of observable behavior over implementation details.
  • Enforces Test Structure: Mandates the AAA (Arrange, Act, Assert) pattern for clear and organized test methods.
  • Sets Naming Conventions: Establishes a clear, descriptive naming convention for test methods.
  • AI-Specific Guidelines: Includes explicit prohibitions for AI agents to prevent common anti-patterns in test generation.
  • Use Case: When designing tests for a new feature, consult this Skill to ensure the tests align with best practices, are easy to understand, and provide maximum value in protecting against future bugs.

Quick Start

Follow the unit-test-tatsujin skill's guidelines to write a new unit test for the user authentication module.

Frequently Asked Questions about unit-test-tatsujin

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the core principles of effective unit testing?

Effective unit testing relies on small scope, fast execution, and strict isolation. These core principles ensure tests provide rapid feedback, resist refactoring, protect against regressions, and remain easy to maintain.

How do I structure unit tests for better maintainability?

Structure unit tests using the AAA (Arrange, Act, Assert) pattern. This mandated approach organizes test methods clearly, ensuring tests serve as reliable specifications and remain easy to understand and maintain.

When should I use mocking and stubbing in test design?

Use mocking and stubbing in test design to isolate components and verify observable behavior. Avoid excessive mock verification and direct I/O access to prevent coupling tests to internal implementation details.

What is the best way to name unit test methods?

The best way to name unit test methods is by using clear, descriptive naming conventions. This establishes tests as reliable specifications, making it easier to understand the intended behavior and protect against future bugs.

Why do my unit tests break during refactoring?

Unit tests break during refactoring when they verify implementation details rather than observable behavior. Following testing guidelines that prohibit excessive mock verification ensures tests remain resilient to structural code changes.

Can AI agents generate unit tests without common anti-patterns?

AI agents can generate unit tests without anti-patterns by following explicit guidelines that prohibit direct I/O access and excessive mock verification. This ensures generated tests align with best practices and provide maximum value.