test-driven-development skill
Implements behavior changes with a test-first red-green-refactor loop: write one meaningful failing test, watch it fail for the intended reason, make the smallest change, then refactor while green. Use for new behavior, bug fixes, refactors with preserved contracts, and regression tests. Not required for disposable prototypes, generated files, or documentation-only edits.
- GitHub stars
- 100
- Files
- 2
- Last commit
- Aug 26, 2026
- License
- MIT
- Allowed tools
- —
What does the test-driven-development skill do?
test-driven-development implements behavior changes with a test-first red-green-refactor loop: write one meaningful failing test, watch it fail for the intended reason, make the smallest change, then refactor while green. Use for new behavior, bug fixes, refactors with preserved contracts, and regression tests. Not required for disposable prototypes, generated files, or documentation-only edits.
How to install the test-driven-development skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the test-driven-development skill in Plugin
/plugin marketplace add thiientv/godmode /plugin install godmode@godmode
Install the test-driven-development skill in Claude Code
~/.claude/skills/test-driven-development/SKILL.md
$ npx degit thiientv/godmode/skills/test-driven-development ~/.claude/skills/test-driven-developmentInstall the test-driven-development skill in Claude Code (project)
.claude/skills/test-driven-development/SKILL.md
$ npx degit thiientv/godmode/skills/test-driven-development .claude/skills/test-driven-developmentInstall the test-driven-development skill in Codex
~/.agents/skills/test-driven-development/SKILL.md
$ npx degit thiientv/godmode/skills/test-driven-development ~/.agents/skills/test-driven-developmentInstall the test-driven-development skill in Gemini CLI
~/.gemini/skills/test-driven-development/SKILL.md
$ npx degit thiientv/godmode/skills/test-driven-development ~/.gemini/skills/test-driven-developmentInstall the test-driven-development skill in Claude.ai
npx degit thiientv/godmode/skills/test-driven-development test-driven-development && zip -r test-driven-development.zip test-driven-development # claude.ai → Customize → Skills → + → Create skill → Upload a skill → test-driven-development.zip
SKILL.md
View on GitHubTest-Driven Development
The test is an executable statement of behavior, not a coverage decoration.
Red-green-refactor
- Red: name one behavior and write the smallest test at the highest seam that can fail for the missing behavior.
- Verify red: run the focused command. Confirm it fails because the behavior is absent, not because of a typo, broken fixture, or setup error.
- Green: implement the simplest production change that makes the test pass. Do not add speculative options or unrelated cleanup.
- Verify green: run the focused test and relevant existing tests.
- Refactor: improve names, duplication, and boundaries while keeping the suite green. Add the next behavior only after the current loop is stable.
Honest tests
- Assert user-visible or contract-visible behavior, not private call counts.
- Prefer real collaborators; mock only an expensive, nondeterministic, or unavailable boundary and state why.
- Make failures diagnostic: clear name, small fixture, one cause.
- Include error, empty, boundary, retry, ordering, and permission cases when they are part of the contract.
Exceptions
For a prototype, generated output, or docs-only change, state why test-first is not useful and choose another observable check. “I will test later” is not an exception for production behavior.
Use test-design.md when the test seam or fixture
quality is unclear. Pair with root-cause-debugging for an existing failure
and completion-verification at the final gate.
Completion condition
The loop is credible when the test was observed failing for the intended reason, passes after the change, neighboring checks remain green, and the remaining untested behavior is named.
Files in this skill
2test-driven-development skill questions
How do I install the test-driven-development skill in Claude Code?
Run npx degit thiientv/godmode/skills/test-driven-development ~/.claude/skills/test-driven-development. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the test-driven-development skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.