/vibeflow:run-tddfrom vibeflow
Guides the TDD cycle (RED→GREEN→REFACTOR) within a docs-first workflow. Handles stub creation, failing tests, minimal implementation, integration tests, refactoring, and design-change protocol.
Ships in vibeflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
TDD implementation cycle for Stages F-H of the VibeFlow docs-first workflow.
This skill guides the TDD cycle:
Stage F: RED
│
├── Create stubs from Feature Spec API Design
├── Write failing unit tests
├── Tests fail with NotImplementedError
└── Checkpoint #3: Tests Complete
│
▼
Stage G: GREEN
│
├── Implement minimal code to pass tests
├── If contracts change → Stage G.1
└── All unit tests pass
│
▼
Stage H: REFACTOR
│
├── Write integration tests for I/O
├── Pass integration tests
├── Refactor with tests green
├── Complete H.4 quality validation
└── Checkpoint #4: Implementation Complete
/run-tdd start
Guides through the full TDD cycle starting with Stage F.
/run-tdd red
/run-tdd green
/run-tdd refactor
/run-tdd validate
Runs test quality validation (Stage H.4 checklist).
/run-tdd g1
Guides through Stage G.1 protocol when implementation reveals contract changes.
If implementation reveals contract changes, STOP IMMEDIATELY and follow these steps:
Contract changes that trigger G.1:
Changes that DON'T trigger G.1:
All tests must have categorization tags:
Speed/Scope (required):
unit / fast — All dependencies mocked, runs in msintegration / medium — Uses test DB, mocked external APIse2e / slow — Full workflow, multiple componentsreal_api — Makes real external API callsModule (required):
accounts, generation, api)Before completing Stage H, validate:
Organization:
test_<what>_<condition>_<expected>Usefulness:
Code Quality:
Categorization:
Reliability:
Quality Gate:
scripts/validate_red.py — Validate Stage F (tests failing correctly)scripts/validate_green.py — Validate Stage G (tests passing)scripts/validate_refactor.py — Validate Stage H (integration + quality)scripts/check_coverage.py — Report test coverageSee references/:
tdd-policy.md — TDD policy and requirementstdd-guide.md — TDD workflow guidancestage-g1-protocol.md — Design change handling protocolAfter completing each stage, update docs/workflow-state.yaml:
Stage F (RED):
stage: FCheckpoint #3 (after Stage F):
checkpoint: 3 after passing validationStage G (GREEN):
stage: GStage H (REFACTOR):
stage: HCheckpoint #4 (after Stage H):
checkpoint: 4 after passing validationAfter completing each stage, ask the user for permission before committing:
Stage F (RED):
git add <test-files> <stub-files> docs/workflow-state.yaml
git commit -m "feat(<module>): add failing tests and stubs (#ft-<ID>)"
Stage G (GREEN):
git add <source-files> docs/workflow-state.yaml
git commit -m "feat(<module>): implement to pass tests (#ft-<ID>)"
Stage H (REFACTOR):
git add <source-files> <test-files> docs/workflow-state.yaml
git commit -m "feat(<module>): add integration tests and refactor (#ft-<ID>)"
Replace <module> with the actual module name, <ID> with the work item ID, and file placeholders with actual paths.
After each sub-stage commit, directly run /manage-work advance <ID>:
references/stage-g1-protocol.md (opens in a new tab)references/tdd-guide.md (opens in a new tab)references/tdd-policy.md (opens in a new tab)scripts/check_coverage.py (opens in a new tab)scripts/validate_green.py (opens in a new tab)scripts/validate_red.py (opens in a new tab)scripts/validate_refactor.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub hardness1020/vibeflow --plugin vibeflow10 skills in this plugin
/analyze-codebaseCodebase discovery and analysis for Stage B of the VibeFlow docs-first workflow/clarify-demandConversational demand clarification and feasibility research before formal work item registration/create-feature-specCreate Feature Specs for Stage E of the VibeFlow docs-first workflow/define-prdCreate PRDs with success metrics for Stage A of the VibeFlow docs-first workflow/define-tech-specCreate tech specs with architecture for Stage C of the VibeFlow docs-first workflow/manage-workRegister work items, create feature branches, track and advance stages, close work items in the VibeFlow docs-first development workflow