Skip to content
Development
Skill

/atdd-plan

Produce an ATDD-first implementation plan in Claude Code's native plan mode, with named design patterns called out where they earn their keep. The skill enters plan mode automatically (via the EnterPlanMode tool), runs /flagrare:codebase-explore to ground the plan in the actual

From plugin
agent-skills
1240 skills

Claude Code

$ npx -y skills add Flagrare/agent-skills --skill atdd-plan --agent claude-code

SKILL.md

atdd-plan.SKILL.md
name: atdd-plan
description: "Produce an ATDD-first implementation plan in Claude Code's native plan mode, with named design patterns called out where they earn their keep. The skill enters plan mode automatically (via the EnterPlanMode tool), runs /flagrare:codebase-explore to ground the plan in the actual codebase, then produces a plan-mode plan that MUST include both: (1) 3-5 acceptance tests in plain English defining 'done' before any implementation, written behavior-first against the public API only; and (2) any non-trivial structural decisions named as design patterns with a one-line rationale. Plan mode's native approve/edit/reject button UI is the close, ExitPlanMode is how the skill ends. Use whenever the user wants to plan a feature, fix, or refactor, 'how should we implement X', 'plan this', 'let's design X', 'where do we start on Y'. Tests follow Kent Dodds Testing Trophy: behavior over implementation, integration-heavy, public-API-only, refactor-proof. The skill stops at the plan; it does not write implementation code."

ATDD Plan

This skill produces an implementation plan in **Claude Code's native plan mode**. It does not reinvent plan mode's output shape, Claude already knows how to write a plan-mode plan. The skill exists to enforce three things plan mode alone won't:

1. **Plan mode is actually used**: `EnterPlanMode` at skill start, `ExitPlanMode` at skill end. The user gets the native approve/edit/reject button UI, not a wall of markdown. 2. **The plan is grounded in the real codebase**: `/flagrare:codebase-explore` runs before any planning, so the plan references the actual files, conventions, and reusable pieces that exist. 3. **The plan contains the two non-negotiables below.**

Everything else about the plan's form, length, section ordering, tone, follows plan mode's defaults. Don't impose extra structure on top.

**REQUIRED BACKGROUND:** Invoke `/flagrare:testing-philosophy` before writing the Acceptance Tests. It defines, layer-agnostically, what a good test is, behavior over implementation, the Testing Trophy, and the e2e necessity floor below. The AT rules here are its application to planning; read both.

---

The two non-negotiables

Every plan this skill produces **must include** both:

1. Acceptance Tests (ATDD)

3 to 5 acceptance tests, written in plain English, that define "done" before implementation begins. Each test must:

  • **Exercise the public API only**: no private methods, no internal state, no `_inner` fields. A test that breaks on a behavior-preserving rename is a broken test, not a broken refactor. (Apply the acid test from `/flagrare:testing-philosophy`: would this break under a behavior-preserving refactor? Does it assert what a real user observes?)
  • **Describe behavior, not method names**: `"returns an empty Scene when the story has ended"` not `"test_advance_flag"`. A name that describes a mechanism (`"calls advanceFlag"`) is the tell of an implementation-detail test.
  • **Use real collaborators where cheap; mock only at external/network/clock/process/OS boundaries.** Never assert on spy/mock call-counts for a collaborator you own, that asserts the mechanism, not the behavior.
  • **Follow the Testing Trophy**: integration-heavy is the default, because most regressions live between units, not inside them. Unit tests are reserved for pure functions with complex logic.
  • **Include the e2e floor for user-facing work**: if the feature is user-facing, at least one AT must exercise the critical happy path end-to-end through the real, assembled system (browser journey for a UI; running-service-over-HTTP-against-a-real-DB for a backend; subprocess for a CLI; public-API-as-a-consumer for a library). "Mostly integration" is not "skip e2e": one or two critical paths, not one per scenario, but never zero for a user-facing feature.

Write 3-5 ATs. Too few leaves behavior undefined; too many creates a brittle harness.

2. Design Patterns (named, with rationale)

For every **non-trivial structural decision**, name the pattern and give a one-line rationale that explains why it fits *this* problem, not what the pattern is in the abstract.

| Problem shape | Pattern to consider | |---|---| | Swap implementations without changing callers | Strategy | | Hide a complex subsystem behind a simple interface | Facade | | Decouple data access from business logic | Repository | | Notify dependents without coupling to them | Observer | | Add behavior without changing the object | Decorator | | Create objects without specifying the class | Factory / Abstract Factory | | One algorithm, pluggable steps | Template Method | | Encapsulate a request as an object | Command | | Wrap incompatible interfaces | Adapter |

Only name a pattern when it genuinely solves the stated problem. Forcing a pattern where it doesn't fit is worse than no pattern. If a plan's structural decisions are all trivial (one obvious file change, no abstraction needed), say so explicitly, *"No design patterns needed; this is a single-function fix in `path/to/file`"*, rather than inventing one.

---

Procedure

Step 1: Enter plan mode

Call `EnterPlanMode` immediately. Do not preface with a summary or ask for confirmation first, the user invoked a planning skill, plan mode is the right posture, just enter it. Plan mode restricts the session to read-only tools, which is exactly what planning needs.

If `EnterPlanMode`'s schema isn't loaded, use `ToolSearch` with `select:EnterPlanMode,ExitPlanMode` to load both before proceeding.

Step 2: Explore the codebase

Invoke `/flagrare:codebase-explore`. Pass it the user's description (or the brief from `/flagrare:intake` if the skill was chained through `/flagrare:work-prep`).

**Hard requirement: invoke the skill, not a substitute.** Do not replace it with a generic `Explore` agent or manual grep, the skill encodes a specific methodology (prior-branch discovery, convention mapping, utility inventory, dependency tracing) and produces

Read more
@flagrare
Ships withagent-skills

Thirty-eight skills that wrap around your development cycle in Claude Code. They turn tickets into ATDD plans, smoke-test features against a running app or service, hunt down bugs with runtime evidence, guard commits against doc drift, run seven-axis code

Stars on GitHub

Momentum

stars in total
12
Star history of Flagrare/agent-skills on GitHub, a chart by star-history.com

Other skills on agent-skills.

brag-doc

brag-doc

Generate a comprehensive, impact-framed brag-doc entry for a chosen time window (day, week, biweek, month, or custom). Pulls…

bug-bash

bug-bash

Programmatic bug bashing, ingest a prescribed test plan (Notion, markdown, pasted spec), drive a real running system (browser via…

career

career

Run the career skills that are due, in one pass, and return one short combined digest plus an updated board. It reads timestamps…

codebase-explore

codebase-explore

Explore the codebase to map conventions, reusable utilities, analogous features, and data flows relevant to a planned change.…

daily-code-review

daily-code-review

Generate a daily code review report showing stale PRs, items needing your attention, and active work for your team. Use whenever…

debug-hunt

debug-hunt

Evidence-first debugging for bugs that are hard to reproduce, intermittent, performance-related, or where previous…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about atdd-plan.

Which coding agents can use atdd-plan?
atdd-plan installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.