Skip to content
Agentmart
Submit a tool

tdd

Use test-driven development when requested, or when a clear behavior change has a trustworthy automated seam and test-first feedback is worth its cost.

Skill by Astro-Han

IndexedMIT★ 12
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/astro-han-tdd

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

Use test-driven development when requested, or when a clear behavior change has a trustworthy automated seam and test-first feedback is worth its cost. Do not trigger merely for code edits, pure refactors, visual tweaks, configuration, or exploratory work.

Use cases: testing

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. 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

What's inside

Skill name
tdd
Description
Use test-driven development when requested, or when a clear behavior change has a trustworthy automated seam and test-first feedback is worth its cost. Do not trigger merely for code edits, pure refactors, visual tweaks, configuration, or exploratory work.
License
MIT
Instructions
33 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# TDD

## Choose the signal

Inspect the existing tests and public contract; use the cheapest trustworthy boundary that exercises the real behavior.
For a defect already captured by an existing test, add no tests or parameter rows; fix production code and only delete invalid or redundant tests. Otherwise extend an existing case before adding one for a worthwhile gap.
Count parameter rows, fixtures, environment startup, and CI work as test cost, not just test functions.
If no trustworthy automated signal exists, use the nearest reliable check and state the gap; do not manufacture a test seam.

## RED → GREEN → REFACTOR

1. **RED:** Express one valuable behavior and observe failure for the predicted reason before changing production code; an existing failing test already supplies RED.
2. **GREEN:** Make the smallest production change that passes, then run affected checks.
3. **REFACTOR:** Simplify implementation and tests while preserving behavior, then choose the next needed behavior.

Do not write a batch of tests followed by a batch of implementation.

If a behavior already passes, verify it without undoing working code to manufacture RED.

If explicitly using this skill for a pure refactor, start from passing checks; add a characterization test only for a worthwhile unprotected behavior, never an invented RED.

## Keep the signal honest

Expected results come from the contract, not a copy of the implementation; assertions must reject broken behavior and survive harmless internal changes.
Reject implementation-detail checks, internal mocks, unconsumed snapshots, and weak type/nonempty assertions that do not prove the contract; a new helper does not earn its own test.
Coverage targets, review pressure, and per-function test rules do not lower this bar; never widen the public API just to test an internal helper.

## Finish

Map all tests on touched behaviors to valuable obligations and leave one representative per obligation; delete duplicate cases and parameter rows, subsumed stepping-stone tests, and existing tests that fail the quality bar above, then rerun affected checks.
Report the obligation-to-test mapping and any protection deliberately dropped.

From Astro-Han/skills, MIT.

More from Astro-Han/skills

Signals

Stars
12
Forks
3
Open issues
0
Last commit (this folder)
Sep 5, 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 Astro-Han

Cite this page

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