Help us improve
Share bugs, ideas, or general feedback.
From Flagrare
Enforces ATDD-first plans in Claude Code's native plan mode with acceptance tests and named design patterns. Use for planning features, fixes, or refactors.
npx claudepluginhub flagrare/agent-skills --plugin flagrareHow this skill is triggered — by the user, by Claude, or both
Slash command
/flagrare:atdd-planThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
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:
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Share bugs, ideas, or general feedback.
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:
EnterPlanMode at skill start, ExitPlanMode at skill end. The user gets the native approve/edit/reject button UI, not a wall of markdown./flagrare:codebase-explore runs before any planning, so the plan references the actual files, conventions, and reusable pieces that exist.Everything else about the plan's form — length, section ordering, tone — follows plan mode's defaults. Don't impose extra structure on top.
Every plan this skill produces must include both:
3 to 5 acceptance tests, written in plain English, that define "done" before implementation begins. Each test must:
_inner fields. A test that breaks on a behavior-preserving rename is a broken test, not a broken refactor."returns an empty Scene when the story has ended" not "test_advance_flag".Write 3-5 ATs. Too few leaves behavior undefined; too many creates a brittle harness.
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.
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.
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 structured findings the plan depends on.
Wait for it to complete. Do not start writing the plan until you have its output.
Before writing the plan, post a 3-5 sentence synthesis of what you understood:
path/to/file.ts:42-style references)Then call AskUserQuestion with three options:
This gate is light by design — it's one button click when the synthesis is correct, which is the common case. Its purpose is to prevent committing to a wrong direction before producing a full plan, not to interrogate the user.
Write a plan-mode plan. Follow Claude Code's normal plan-mode conventions for shape, length, and tone — narrative + targeted lists, scannable, no padding.
Two requirements layered on top of plan mode's defaults:
Do NOT add:
Those were artifacts of an older form that produced deliverable documents. Plan mode plans don't need them — they make the plan long without making it better. If something genuinely matters to the design (a real concurrency risk, a real boundary issue), call it out inline in the prose where it lives. A plan that surfaces 2-3 specific risks based on what exploration found is far more useful than one that enumerates every theoretical category.
Call ExitPlanMode with the plan as the plan argument. This gives the user the native button-driven approve/edit/reject UI — which is what they invoked the skill to get.
Do not follow ExitPlanMode with a prose question or summary. The button UI is the close.
_inner, mock call counts on types you own, private fields). Refactor-proof or it's not an AT.EnterPlanMode and producing a markdown plan in the regular conversation. The user wants the native plan-mode UX; that means the actual tool, not an approximation./flagrare:codebase-explore. The plan must be grounded in the real codebase; references to actual path/to/file.ts:42 locations are what separate this from a generic chatbot plan.ExitPlanMode. The button UI is the close. Don't double-prompt.