drillan/issue-workflow · Archived

tdd-workflow

Enforce TDD workflow and ensure proper execution of the Red-Green-Refactor cycle. Use when starting a new feature implementation, bug fix, or refactoring.

First seen Jun 18, 2026

Installation

$ npx skills add drillan/issue-workflow --skill tdd-workflow

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 5
License MIT
Default branch main
Open issues 3
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,937 B
  • docs SUMMARY.md 174 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

TDD Workflow Skill

Enforce TDD workflow and ensure proper execution of the Red-Green-Refactor cycle.

Trigger Conditions

  • When starting a new feature implementation
  • When starting a bug fix
  • When starting refactoring

Phases

Phase 1: Red (Create test and confirm failure)

  1. Create/identify test file

- Naming convention: test_<feature>.py - Location: tests/ directory

  1. Design test cases

- Clearly define expected behavior - Consider edge cases - Test naming convention: test<feature><situation><expectedresult>

  1. Run test and confirm failure

``bash uv run pytest tests/test_<feature>.py -v ``

  1. User approval (required)

- Present test cases - Get approval before proceeding to next phase

Phase 2: Green (Minimal implementation)

  1. Create implementation file

- Focus only on making the test pass - Avoid over-engineering

  1. Run test and confirm success

``bash uv run pytest tests/test_<feature>.py -v ``

  1. Quality checks

``bash uv run ruff check --fix . && uv run ruff format . && uv run mypy . ``

Phase 3: Refactor

  1. Improve code

- Remove duplication - Improve readability

  1. Re-run all tests

``bash uv run pytest ``

File Mapping

Implementation File Test File
src/auth.py tests/test_auth.py
src/article.py tests/test_article.py
src/services/user.py tests/test_user.py

Test Naming Convention

test<feature><situation><expectedresult>

Examples:

  • testloginwithvalidcredentialsreturnssession
  • testloginwithinvalidpasswordraiseserror
  • testcreateuserwithduplicateemailfails

Enforcement Rules

  1. If test file doesn't exist

- Request test file creation before starting implementation - Block implementation file edits

  1. If test is not failing (Red)

- Confirm test fails as intended - Explain that a test that doesn't fail is meaningless

  1. After test succeeds (Green)

- Suggest transition to refactoring phase - Check if additional test cases are needed

Quality Gates

  • All tests must pass
  • Coverage must meet standards
  • No errors in static analysis

Instructions for Claude

When implementing a feature:

  1. Always ask: "Do you want me to follow TDD workflow?"
  2. If yes:

- First, write the test file - Show the test to the user - Run the test and confirm it fails - Get user approval before implementation - Implement the minimal code to pass - Run tests again - Refactor if needed

  1. Track progress:

- Mark each phase (Red, Green, Refactor) - Report test results at each phase