Enforces the TDD Green phase by guiding minimal code changes to pass failing tests without adding unrequested functionality.

Install

mkdir -p .claude/skills/tdd-green && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16590" && unzip -o skill.zip -d .claude/skills/tdd-green && rm skill.zip

Installs to .claude/skills/tdd-green

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Guides the implementation of the simplest code to pass the current failing test. Enforces minimal change, no test edits, and commit discipline. Loads detailed rules from asset files.
182 charsno explicit “when” trigger
Beginner

Key capabilities

  • Write the simplest code to make the failing test pass
  • Do not modify tests in this phase
  • No refactoring or generalization
  • Commit after tests pass
  • Check whether the RED test compiles
  • Judge the next GREEN move before editing production code

How it works

The skill guides the implementation of minimal code to pass a failing test, ensuring no test modifications, refactoring, or generalization occurs during this phase.

Inputs & outputs

You give it
Failing test id, skill and asset references, project code style patterns
You get back
Changed production files, test pass summary

When to use tdd-green

  • Write minimal code for a failing test
  • Implement structural stubs to fix compilation failures
  • Maintain TDD workflow integrity
  • Apply project code style patterns

About this skill

TDD Green Phase Skill

Purpose

  • Write the simplest code to make the failing test pass
  • Do not modify tests in this phase
  • No refactoring or generalization
  • Commit after tests pass

Inputs

  • Failing test id
  • Skill and asset references
  • Project code style patterns from .github/instructions/tdd-patterns.instructions.md
  • Canonical GREEN style guide placeholder at .github/skills/tdd-green/assets/project-code-style-patterns.md

Outputs

  • Changed production files
  • Test pass summary

Steps

  1. Load .github/skills/tdd-green/assets/project-code-style-patterns.md first, then load core asset files for minimal implementation, anti-patterns, and commit discipline
  2. Check whether the RED test compiles.
    • If the test references missing production symbols (types, methods, fields), the only allowed edit is the smallest possible compile-only stub — no behavior.
    • Run the narrow test again. It must now compile and fail at runtime/assertion level before proceeding.
    • This is the distinction between structural red (compile failure) and behavioral red (assertion failure). Both are RED; behavior must not be added until you are at behavioral red.
  3. Judge the next GREEN move before editing production code.
  • Ask whether the change is the dumbest possible thing that makes only the current test pass.
  • If the change also solves untested cases, tries to generalize, or looks like the feature instead of the slice, it is too broad.
  • Prefer a constant, hardcoded branch, or the narrowest exact-case behavior the current test demands.
  • Do not move from behavioral red into generalized implementation just because the change is small.
  1. Write minimal code to pass the test
  2. Use tdd-test-run with a test_run_request contract whose expected result is a passing narrow check for the protected test or slice
  3. If the observed result does not match the expected GREEN outcome, revert only the scoped production changes and return to the preceding GREEN decision point
  4. Run the broader validation required by project policy through tdd-test-run before reporting GREEN complete
  5. Return contract output

Completion Checks

  • Only minimal code added
  • All tests pass
  • No test or refactor changes

When not to use it

  • When modifying tests
  • When refactoring or generalizing code
  • When not in the TDD green phase

Limitations

  • Only minimal code added

How it compares

This skill enforces a strict TDD green phase workflow, focusing solely on passing the current test with minimal changes, which is distinct from broader development or refactoring tasks.

Compared to similar skills

tdd-green side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
tdd-green (this skill)03moNo flagsBeginner
tdd-workflow64moReviewIntermediate
qlty-check57moReviewBeginner
superpowers-tdd57moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry