simon-tdd

Enforces RED-GREEN-REFACTOR test-driven development cycles with a pre-commit guard script.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Simon-YHKim/eject-button --skill simon-tdd-simon-yhkim
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: simon-tdd
Source: https://github.com/Simon-YHKim/eject-button/tree/main/.claude/skills/simon-tdd
Command: npx skills add https://github.com/Simon-YHKim/eject-button --skill simon-tdd-simon-yhkim

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Developers and AI agents often write implementation code first and add tests afterward, producing post-hoc rationalization tests that miss real behavior. This Skill forces a failing test before any implementation and blocks commits that change source code without corresponding test changes. ## Core Features & Use Cases - RED-GREEN-REFACTOR Enforcement: Structures every feature or bug fix as a failing test first, minimal passing implementation, then refactor, with an atomic commit per cycle. - TDD Guard Script: A bash pre-commit hook (tdd-guard-check.sh) inspects staged files and exits with an error when source files (*.ts, *.py, *.go, etc.) lack matching test files in the same commit. - Verification-Loop Principle: Requires explicit server, test, browser, and database commands so the agent can verify its own work instead of asking the user to check manually. - Use Case: When asked to "add a bio field to the user profile", the agent writes a failing test for the new behavior, confirms the failure, implements the minimal code to pass, refactors, and commits atomically. ## Quick Start Ask the agent to implement a new feature or fix a bug and it will write a failing test first, then the minimal implementation, then refactor with an atomic commit.

Frequently Asked Questions about simon-tdd

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

FAQPage Schema
How do I enforce test-driven development with an AI coding agent?▼

Activate this Skill whenever you request a feature or bug fix. It writes a failing test first (RED), confirms the failure, implements minimal code to pass (GREEN), then refactors, committing atomically per cycle.

How to block git commits that change source code without tests?▼

Run the included tdd-guard-check.sh script as a pre-commit hook. It scans staged files, matches source files (*.ts, *.py, *.go, etc.) against test file patterns, and exits with code 1 listing violations when tests are missing.

Does the TDD guard script support Python and Go test files?▼

Yes. The script recognizes test_*.py, *_test.py, *_test.go, *.test.*, and *.spec.* patterns, plus files under tests/, test/, __tests__/, and spec/ directories. Documentation and config files are automatically excluded.

Can I bypass the TDD pre-commit hook when needed?▼

Yes, git commit --no-verify bypasses the hook, but the Skill explicitly discourages this since it defeats the enforcement purpose. The bypass exists only as an explicit user-responsibility escape hatch.

What are the limitations of automated TDD enforcement?▼

The guard script only checks file-name correspondence, not test quality, so a trivial or heavily mocked test still passes the check. Meaningful behavioral assertions still depend on following the RED-GREEN-REFACTOR discipline in the Skill instructions.