Skip to content
Agentmart
Submit a tool

tdd-workflow

Test-Driven Development workflow enforcement with RED-GREEN-REFACTOR cycle.

Skill by travisjneuman

IndexedMIT★ 106
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/travisjneuman-tdd-workflow

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Test-Driven Development workflow enforcement with RED-GREEN-REFACTOR cycle. Use only when the user explicitly asks for test-first work or improved test coverage.

Use cases: testing, productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/tdd-workflow

What's inside

Skill name
tdd-workflow
Description
Test-Driven Development workflow enforcement with RED-GREEN-REFACTOR cycle. Use only when the user explicitly asks for test-first work or improved test coverage.
License
MIT
Instructions
248 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Test-Driven Development (TDD) Workflow

Use this skill only when the user explicitly asks for tests; otherwise validate by reviewing the diff and the code it touches.

A disciplined approach to development where tests drive design and implementation.

## The TDD Mantra

> "Never write a line of code without a failing test."

## The RED-GREEN-REFACTOR Cycle

### RED Phase: Write a Failing Test

**Goal**: Define the expected behavior BEFORE implementation.

**Rules**:

1. Write the smallest test that fails
2. Test must fail for the RIGHT reason
3. Test should clearly express intent
4. Don't write implementation yet

**Example**:

```typescript
// RED: Test the behavior we want
describe("Calculator", () => {
  it("should add two numbers", () => {
    const calc = new Calculator();
    expect(calc.add(2, 3)).toBe(5);
  });
});

// Run: npm test
// Result: FAIL - Calculator is not defined
// This is RED ✓
```

**Checklist**:

- [ ] Test is written
- [ ] Test fails when run
- [ ] Failure message is clear
- [ ] Test name describes expected behavior

---

### GREEN Phase: Make the Test Pass

**Goal**: Write the MINIMUM code to pass the test.

**Rules**:

1. Do the simplest thing that works
2. Don't add extra features
3. Don't optimize
4. Just make it green

**Example**:

```typescript
// GREEN: Minimum implementation to pass
class Calculator {
  add(a: number, b: number): number {
    return a + b; // Simplest thing that works
  }
}

// Run: npm test
// Result: PASS
// This is GREEN ✓
```

**Checklist**:

- [ ] Test passes
- [ ] No extra code added
- [ ] Implementation is minimal

---

### REFACTOR Phase: Improve the Code

**Goal**: Clean up while keeping tests green.

**Rules**:

1. Only refactor with passing tests
2. Run tests after each change
3. Improve design, not behavior
4. Small, incremental changes

**Examples of refactoring**:

- Extract methods
- Rename for clarity
- Remove duplication
- Improve performance
- Add types/documentation

**Checklist**:

- [ ] Tests still pass
- [ ] Code is cleaner
- [ ] No behavior changed
- [ ] Ready for next RED

---

## TDD in Practice

### Starting a New Feature

```
1. Write high-level acceptance test (may not run yet)
2. Write first unit test (RED)
3. Implement minimum code (GREEN)
4. Refactor if needed (REFACTOR)

From travisjneuman/.claude, MIT.

More from travisjneuman/.claude

Signals

Stars
106
Forks
26
Open issues
2
Last commit (this folder)
Sep 30, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from travisjneuman

Cite this page

tdd-workflow skill. Agent Mart. https://agentmart.dev/skills/travisjneuman-tdd-workflow (last updated 2026-10-24)