Skip to content
Agentmart
Submit a tool

tdd

Test-driven development.

Skill by officialunofficial

IndexedApache-2.0★ 7
Write a review

Chalk Labs

Need help deploying tdd?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

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/officialunofficial-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

Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

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
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
License
Apache-2.0
Instructions
33 lines in SKILL.md · view on GitHub

Files (3)

  • SKILL.md
  • mocking.md
  • tests.md

SKILL.md (first lines)

# Test-Driven Development

TDD runs on the red → green loop. This skill is the reference that keeps that loop producing tests you'll actually want to keep: what counts as a good test, where tests belong, the traps to avoid, and the rules that govern each cycle. Treat every section as active on every cycle — read them going in and while you loop, not as a post-mortem.

While you're getting your bearings in the codebase, open `CONTEXT.md` if it's there so your test names and interface vocabulary track the project's domain language, and honor any ADRs covering the area you're changing.

## What a good test is

A good test checks behavior through public interfaces — never through implementation details. The internals can be rewritten wholesale; the test should stand. It reads like a spec: "user can checkout with valid cart" states plainly what the system can do, and it outlives refactors because it never touched internal structure in the first place.

See [tests.md](tests.md) for worked examples and [mocking.md](mocking.md) for when mocking earns its place.

## Seams — where tests go

A **seam** is the public boundary you test from: the interface where behavior is observable without prying inside. Put tests on seams; never wire them to internals.

**Only test at seams you've agreed in advance.** Before you write a single test, list the seams you plan to cover and get the user to confirm them. An unconfirmed seam gets no test. You can't test everything, so naming the seams up front is what steers your effort onto critical paths and genuinely hard logic instead of scattering it across every edge case.

Ask: "What's the public interface, and which seams are worth testing?"

## Anti-patterns

- **Implementation-coupled** — the test mocks internal collaborators, pokes at private methods, or checks results through a back channel (reading the database instead of calling the interface). Its signature: refactoring turns it red even though behavior never moved.
- **Tautological** — the assertion derives the expected value the same way the code does (`expect(add(a, b)).toBe(a + b)`, a snapshot hand-computed with the code's own formula, a constant compared to itself). It passes by construction and can never contradict the code. Pull expected values from an independent source: a known-good literal, a worked example, the spec.
- **Horizontal slicing** — all the tests up front, then all the implementation. Tests written in bulk describe _imagined_ behavior: you end up pinning the _shape_ of things rather than what users see, the suite goes numb to real changes, and you've locked in a test structure before you understand the implementation. Slice **vertically** instead — one test, one implementation, repeat — where each test is a **tracer bullet** shaped by what the previous cycle revealed.

## Rules of the loop

- **Red before green.** The failing test comes first, then just enough code to pass it. No pre-empting future tests, no speculative features.
- **One slice per cycle.** A single seam, a single test, a single minimal implementation.
- **Refactoring lives outside the loop.** It belongs to review (see the `code-review` skill), not to the red → green implementation cycle.

From officialunofficial/skills, Apache-2.0.

More from officialunofficial/skills

Signals

Stars
7
Forks
0
Open issues
0
Last commit (this folder)
Jul 7, 2026 (3 months ago)
Last release
Aug 25, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from officialunofficial

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get tdd running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying tdd?

CallGet help
Cite this page

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