Agent Native

tdd

This skill guides the agent to write tests first, then implement code in red-green-refactor cycles.

by You.comOfficial publisherNot reviewed

Identity proven by GitHub's verified organisation badge (youdotcom-oss)

Agents
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
License
MIT (permissive)
Pin
9bc61f5pinned Oct 9, 2026
Context cost
about 670 tokenswhen the skill loads
GitHub stars
86on youdotcom-oss/agent-skills
Scripts
None found

What it does

“Use test-driven development for behavior-changing feature or fix work, and whenever the user mentions TDD, test-first, red-green-refactor, tracer bullets, integration tests, or public-interface behavior tests. Skip for docs-only, path-only rename, formatting-only, or purely mechanical chores unless explicitly requested.”
The author's description, from SKILL.md

Generated summary from the skill's own text

This skill guides the agent to write tests first, then implement code in red-green-refactor cycles. The agent explores the codebase to understand interfaces and behavior, writes one focused test that fails, implements minimal code to pass it, and refactors while tests stay green. It applies to feature work and fixes when TDD is mentioned, using bun test and avoiding mocks except at external boundaries.

When to use it

  • Adding behavior-changing features or fixes with clear observable interfaces
  • User explicitly requests TDD, test-first, or red-green-refactor approach
  • Building functionality where interface and expected behavior are discoverable from code
  • Integration tests or public-interface behavior tests are appropriate for the task

When not to

  • Documentation-only, formatting-only, or pure rename changes
  • When existing tests already prove the behavior without changes
  • Exploratory work where behavior and interface are entirely undiscovered

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add youdotcom-oss/agent-skills --skill tdd

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install youdotcom-oss/agent-skills tdd@9bc61f556646770da3085c048f35db9547343c44

Installs the commit we checked (9bc61f5).

Copy by hand

Download the folder at 9bc61f5 and put it in .claude/skills/tdd for Claude Code and in .agents/skills/tdd for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at 9bc61f5

Claude Code plugin

/plugin install youdotcom-agent-skills@claude-plugins-official

The publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "tdd" by You.com.

Source, pinned to commit 9bc61f556646770da3085c048f35db9547343c44:
https://github.com/youdotcom-oss/agent-skills/tree/9bc61f556646770da3085c048f35db9547343c44/.agents/skills/tdd

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/tdd/ for Claude Code and .agents/skills/tdd/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/you-com/tdd

SKILL.md at the pin

---
name: tdd
description: Use test-driven development for behavior-changing feature or fix work, and whenever the user mentions TDD, test-first, red-green-refactor, tracer bullets, integration tests, or public-interface behavior tests. Skip for docs-only, path-only rename, formatting-only, or purely mechanical chores unless explicitly requested.
license: MIT
compatibility: Requires bun for Plaited repository validation
---

# Test-Driven Development

## Core Rule

Work in vertical red-green-refactor slices:

1. **RED**: write one test for one observable behavior.
2. **GREEN**: implement the smallest production change that makes that test pass.
3. **REFACTOR**: clean up only while tests are green.

Do not write a batch of imagined tests before implementation. Each new test should respond to
what the last cycle taught you about the actual behavior and interface.

## Plaited Defaults

- Use `bun test` for targeted tests and `bun --bun tsc --noEmit` for the type gate.
- Use `test`, not `it`, and organize with `describe`.
- Prefer real dependencies and real runtime boundaries over mocks.
- Mock only external boundaries such as remote APIs, time, randomness, or rare filesystem cases.
- Avoid conditional assertions: assert the branch first, then assert branch-specific values.
- Test both branches for conditionals, fallbacks, and error paths.
- Exercise public interfaces and runtime contracts rather than private helpers.
- Follow applicable repo skills and `AGENTS.md` rules for the touched area.

## When Starting Work

Explore the codebase first. If the public interface, expected behavior, or risk boundary is
discoverable from code, tests, or docs, use that evidence instead of asking the user.

Ask one concise question only when the decision cannot be discovered and a reasonable assumption
would be risky. Include your recommended answer.

Before writing production code, identify:

- the public interface or runtime boundary under test
- the first observable behavior to prove
- the targeted test command for the cycle
- the broader validation needed before handoff

## Cycle Discipline

For each behavior:

1. Add or update exactly one focused test.
2. Run the targeted test and confirm it fails for the intended reason.
3. Implement only enough code to pass.
4. Run the same targeted test and confirm it passes.
5. Refactor if useful, then rerun the affected tests.

If the test passes before production code changes, it is not a valid RED signal. Tighten the test,
choose a different behavior, or explain why existing coverage already proves the behavior.

## Reference Files

- [references/tests.md](references/tests.md): behavior-test examples and implementation-detail red flags
- [references/mocking.md](references/mocking.md): boundary-only mocking guidance
- [references/interface-design.md](references/interface-design.md): testable public interface design
- [references/deep-modules.md](references/deep-modules.md): small interface, deep implementation guidance
- [references/refactoring.md](references/refactoring.md): refactor checks to run after green

From youdotcom-oss/agent-skills at 9bc61f5, shown as plain text under its license: MIT (permissive). The license text is in .agents/skills/tdd/SKILL.md.

View SKILL.md on GitHub at 9bc61f5

Files

6 files, 8.1 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at 9bc61f5
All 19 skills from You.com

More from You.com

  • grill-me

    This skill conducts an intensive interview on a user's plan or design, asking probing questions one at a time to expose gaps and dependencies.

    Claude Code, Codex, Cursor +4 · about 92 tokens · pinned 6 days ago

  • karpathy-guidelines

    This skill provides behavioral guidelines to reduce common LLM coding mistakes when writing, reviewing, or refactoring code.

    Claude Code, Codex, Cursor +4 · about 560 tokens · pinned 6 days ago

  • you-discover

    This skill helps agents plan how to integrate You.com's web search, content extraction, and research APIs by discovering the right integration path for their…

    Claude Code, Codex, Cursor +4 · about 1.2K tokens · pinned 6 days ago

  • you-finance

    This skill answers finance and market-data questions using the You.com finance MCP tool, providing stock prices, company financials, earnings reports, and…

    Claude Code, Codex, Cursor +4 · about 590 tokens · pinned 6 days ago

  • you-research

    This skill routes research requests between You.com's one-shot managed research tool and an agent-led search pipeline, depending on whether the user needs a…

    Claude Code, Codex, Cursor +4 · about 610 tokens · pinned 6 days ago

  • you-web

    This skill searches the live web using You.com and reads full page content to find current information beyond training data, such as API docs, release notes…

    Claude Code, Codex, Cursor +4 · about 1.1K tokens · pinned 6 days ago

All Testing and QA skills
  • next-partial-prefetching-optimizer

    This skill optimizes Next.js client-side navigation under Partial Prefetching by defining what UI loads before and after a click.

    by VercelOfficial publisher

    Claude Code, Codex, Cursor +4 · about 2.8K tokens · pinned 6 days ago

  • Invalid--Name

    This skill cannot be described because its name format is invalid and no functional description or instructions are provided in the skill metadata.

    by CrewAIOfficial publisher

    Claude Code, Codex, Cursor +4 · about 0 tokens · pinned 6 days ago

  • chrome-devtools-cli

    This skill enables agents to automate browser interactions and inspect web pages using Chrome DevTools via command-line interface.

    by GoogleOfficial publisher

    Claude Code, Codex, Cursor +4 · about 2.9K tokens · pinned 6 days ago

  • triaging-visual-review-runs

    Inspects PostHog Visual Review screenshot regression runs that gate pull requests, helping engineers triage diff results, identify flaky stories, and decide…

    by PostHogOfficial publisher

    Claude Code, Codex, Cursor +4 · about 8.9K tokens · pinned 6 days ago

  • code-change-verification

    Runs formatting, linting, type checking, and test verification for SDK code changes after review.

    by OpenAIOfficial publisher

    Contains scripts

    Codex · about 1.3K tokens · pinned 6 days ago

  • runtime-behavior-probe

    This skill guides agents to plan and execute controlled runtime investigations with explicit user approval before each probe runs.

    by OpenAIOfficial publisher

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 3.8K tokens · pinned 6 days ago

Open roles at You.com

No open roles at You.com on the Agent Native jobs board right now.

Browse the jobs board

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use