Skip to content
Development
Skill

/tdd-green

[DEPRECATED] Write minimal code to make failing tests pass. Use when saying \"TDD green\", \"make tests pass\", or \"implement for tests\".

From plugin
specweave
15651 skills20 agents73 commands
Install
$ npx -y skills add anton-abyzov/specweave --skill tdd-green --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/tdd-green

Context preview

The summary Claude sees to decide when to auto-load this skill.

[DEPRECATED] Write minimal code to make failing tests pass. Use when saying \"TDD green\", \"make tests pass\", or \"implement for tests\".

SKILL.md

tdd-green.SKILL.md
description: "[DEPRECATED] Write minimal code to make failing tests pass. Use when saying \"TDD green\", \"make tests pass\", or \"implement for tests\"."
version: 1.0.0
deprecated: true

> ⚠️ DEPRECATED: Use `sw:tdd-cycle --phase green` instead. This skill will be removed in v1.3.0.

Migration

This skill has been deprecated as part of the Opus 4.7 framework alignment (increment 0669).

  • **Use instead**: `sw:tdd-cycle --phase green` runs only the GREEN phase (write minimal code to make tests pass)
  • **Removal**: Scheduled for v1.3.0 (2 minor releases after v1.1.0)
  • **Why**: The three TDD phase skills (tdd-red, tdd-green, tdd-refactor) were consolidated into `sw:tdd-cycle` with a `--phase` flag. Alias routing in `marketplace.json` redirects `/sw:tdd-green` → `/sw:tdd-cycle --phase green` automatically.

For the migration policy, see `.specweave/docs/internal/specs/skill-deprecation-policy.md`.

---

TDD Green Phase - Make Tests Pass

Project Overrides

**Skill Memories**: If `.specweave/skill-memories/tdd-green.md` exists, read and apply its learnings.

Implement minimal code to make failing tests pass in TDD green phase.

Implementation Process

Use Task tool with subagent_type="general-purpose" to implement minimal passing code.

Prompt: "Implement MINIMAL code to make these failing tests pass: $ARGUMENTS. Follow TDD green phase principles:

1. **Pre-Implementation Analysis**

  • Review all failing tests and their error messages
  • Identify the simplest path to make tests pass
  • Avoid premature optimization or over-engineering

2. **Implementation Strategy**

  • **Fake It**: Return hard-coded values when appropriate
  • **Obvious Implementation**: When solution is trivial and clear
  • **Triangulation**: Generalize only when multiple tests require it
  • One test at a time — don't try to pass all at once

3. **Code Guidelines**

  • Write the minimal code that could possibly work
  • Avoid adding functionality not required by tests
  • Defer architectural decisions until refactor phase
  • Don't add error handling unless tests require it

4. **Progressive Implementation**

  • Make first test pass with simplest possible code
  • Run tests after each change to verify progress
  • Add just enough code for next failing test
  • Keep track of technical debt for refactor phase

5. **Anti-Patterns to Avoid**

  • Gold plating or adding unrequested features
  • Implementing design patterns prematurely
  • Refactoring during implementation
  • Ignoring test failures to move forward

Output:

  • Complete implementation code
  • Test execution results showing all green
  • List of shortcuts taken for later refactoring"

Post-Implementation Checks

1. Run full test suite — confirm all tests pass 2. Verify no existing tests were broken 3. Document areas needing refactoring 4. Check implementation is truly minimal

Recovery

If tests still fail: review test requirements carefully, check for misunderstood assertions, add minimal code to address specific failures.

Tests to make pass: $ARGUMENTS

Resources

  • [Official Documentation](https://verified-skill.com/docs/reference/skills#tdd-green)
Read more
Ships withspecweave

Spec-first AI development: describe a feature → AI creates spec + plan + tasks, builds autonomously, syncs to GitHub/JIRA. Domain-expert skills for PM, Architect, Frontend, QA learn your patterns permanently. Claude Code, Codex, Cursor, Copilot & more.

Get the whole plugin