test-driven-development

Configure CLAUDE.md, npm scripts, and git hooks to enforce red-green-refactor workflows.

7|3|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/cskiro/annex --skill test-driven-development-cskiro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/cskiro/annex/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/cskiro/annex --skill test-driven-development-cskiro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enforces a Test-Driven Development (TDD) workflow by installing infrastructure that makes Claude Code automatically follow the RED-GREEN-REFACTOR pattern. It minimizes manual prompting and reduces cognitive load by standardizing how features are implemented.

Core Features & Use Cases

  • Automated TDD Infra: Installs CLAUDE.md configuration, git hooks, and npm scripts to enforce a test-first approach.
  • Phase-by-Phase Guidance: Guides users through RED, GREEN, and REFACTOR phases with safe, reversible changes.
  • Safety & Reversibility: Backups existing files and enables rollback to a known-good state.
  • Coverage & Quality: Supports coverage gates and Testing Trophy methodology to improve code quality.

Quick Start

Install and activate the TDD automation, then say: "Implement feature X" to trigger the workflow.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I enforce test-driven development in my Claude Code projects?

This Skill automates TDD enforcement by installing git hooks, npm scripts, and CLAUDE.md configuration that guide you through the red-green-refactor workflow. It eliminates manual prompting and standardizes how features are implemented across your project.

Can I use TDD automation with multiple testing frameworks?

Yes. This Skill supports multiple testing frameworks through configurable npm scripts and Testing Trophy models. It applies coverage gates and test templates across your chosen framework setup.

What happens if I need to roll back the TDD configuration?

The Skill creates non-destructive backups of existing files before making changes, enabling safe rollback to a known-good state. All modifications are merge-safe and reversible.

How does this Skill ensure tests are written before code?

Pre-commit git hooks check that tests exist before allowing commits. Combined with CLAUDE.md guidance through each phase, this enforces the red-green-refactor pattern automatically without extra prompting.

What's the difference between TDD automation and manual test-first development?

Automation reduces cognitive load by standardizing workflow phases, enforcing coverage gates, and using git hooks to prevent commits that skip tests. Manual approaches require consistent discipline; automation makes it structural.