TDD Story Implementation

VerifiedCaution

Implement a prepared story using red-green-refactor TDD methodology, task-by-task with test verification.

Sby Skills Guide Bot
DevelopmentIntermediate
7/23/2026
Claude CodeCursorCodex
#tdd#red-green-refactor#story-implementation#sprint-tracking#acceptance-criteria

Recommended for

Automated summary

Implements a prepared story task by task using red-green-refactor TDD, with test and acceptance-criteria verification.

Strengths

  • Explicit TDD loop: failing test, minimal code, refactor, running the full suite at each step
  • Keeps sprint-status.yaml updated (in_progress, blocked, review) so progress stays traceable
  • Checks story dependencies before starting and halts with a clear HALT format when blocked
  • Final pass over Given/When/Then acceptance criteria plus a quality checklist

Limitations

  • Assumes an existing BMAD layout (_bmad-output/implementation-artifacts/stories/, _bmad/sprint-status.yaml)
  • Does not cover story authoring or code review, which belong to other skills
  • Enforces one commit per task, which may not match every team's conventions
When to use it

Use it when a story with tasks and acceptance criteria is already written and needs to be coded cleanly with TDD.

When not to use it

Avoid it for exploratory prototyping or urgent fixes that have no story or prior specification.

Security analysis

Caution
Quality score85/100

The skill is a normal TDD development workflow and contains no destructive or exfiltration instructions. However, it implicitly uses powerful capabilities such as running tests, committing code, and editing status files, so it warrants caution rather than being considered risk-free.

Findings
  • •No allowed-tools declared, but the workflow implicitly requires shell/test execution, git commits, and file writes.
  • •Automatically modifies sprint-status.yaml and story files, which can change repository state.
  • •Runs project test suites, which may execute arbitrary code from the repository under test.
How this analysis is made

Examples

Implement next story
implement story
Develop a specific story ID
develop STORY-142
Start coding from sprint backlog
start coding the next todo story from the sprint status

name: dev description: "Implement a story using red-green-refactor TDD. Task-by-task with test verification."

Use when implementing a prepared story. Follows red-green-refactor TDD methodology, completing tasks one at a time with test verification.

Trigger with: "implement story", "dev story", "develop [STORY-ID]", "start coding"

Instructions

Agent: Developer (Devon) Input: _bmad-output/implementation-artifacts/stories/[STORY-ID].md Output: Implemented code + tests

Step 1: Load Story

Read the story file. If not specified, read _bmad/sprint-status.yaml to find the next "todo" story. Load the story file from _bmad-output/implementation-artifacts/stories/.

Verify all dependencies are complete (status "complete" in sprint-status.yaml). If not, HALT.

Step 2: Update Status

Update sprint-status.yaml: set story status to "in_progress".

Step 3: Implement Task by Task

For each task in the story file:

RED — Write a failing test that describes the expected behavior.

Run the test. Verify it fails for the right reason.

GREEN — Write the minimum code to make the test pass.

Run the test. Verify it passes.
Run the full test suite. Verify nothing else broke.

REFACTOR — Improve the code without changing behavior.

Run the full test suite. Verify everything still passes.

Commit after each task with a descriptive message: feat(STORY-ID): task N - [description]

Step 4: Verify Acceptance Criteria

After all tasks are complete, verify every acceptance criterion from the story file:

For each criterion:

  1. Read the Given/When/Then
  2. Verify the implementation satisfies it
  3. If a criterion is not met, implement the missing piece
  4. Mark each criterion as verified

Step 5: Final Checks

  • [ ] All tasks implemented
  • [ ] All tests passing
  • [ ] All acceptance criteria verified
  • [ ] No console errors or warnings
  • [ ] No hardcoded values or secrets
  • [ ] Error handling in place

Step 6: Handle Blockers

If at any point you cannot proceed:

HALT: [What is blocking you]
Context: [What you need to continue]
Recommendation: [Suggested resolution]

Update sprint-status.yaml: set story status to "blocked" with blocker description.

Step 7: Announce Completion

  1. Update sprint-status.yaml: set story status to "review"
  2. Update the story file: set Status to REVIEW
  3. Announce: "Story [ID] implementation complete. Ready for code review: /bmad-cowork:review for [STORY-ID]"

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/tdd-story-implementation-mrx3xxz0/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/tdd-story-implementation-mrx3xxz0' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/tdd-story-implementation-mrx3xxz0/download' --output '.skill-downloads/tdd-story-implementation-mrx3xxz0/SKILL.md.part' && mv '.skill-downloads/tdd-story-implementation-mrx3xxz0/SKILL.md.part' '.skill-downloads/tdd-story-implementation-mrx3xxz0/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/tdd-story-implementation-mrx3xxz0/SKILL.md' && test -s '.skill-downloads/tdd-story-implementation-mrx3xxz0/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/dev' && cp -R '.skill-downloads/tdd-story-implementation-mrx3xxz0' '.claude/skills/dev'

Cursor
test -f '.skill-downloads/tdd-story-implementation-mrx3xxz0/SKILL.md' && test -s '.skill-downloads/tdd-story-implementation-mrx3xxz0/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/dev' && cp -R '.skill-downloads/tdd-story-implementation-mrx3xxz0' '.cursor/skills/dev'

Codex
test -f '.skill-downloads/tdd-story-implementation-mrx3xxz0/SKILL.md' && test -s '.skill-downloads/tdd-story-implementation-mrx3xxz0/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/dev' && cp -R '.skill-downloads/tdd-story-implementation-mrx3xxz0' '.agents/skills/dev'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/tdd-story-implementation-mrx3xxz0'

openskills read 'tdd-story-implementation-mrx3xxz0'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/tdd-story-implementation-mrx3xxz0/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills