plan-draft

A planning skill and template for producing a structured implementation plan before code is written.

In plain words
What is it for?
It gathers relevant repository guidance and external specifications, then creates an approval summary, requirements, acceptance criteria, key decisions, and items that still need a decision.
Why use it?
It makes the intended changes, requirements, acceptance checks, and unresolved decisions explicit before implementation starts.

Skill for Claude CodeCodex

Part of the ai-workflow plugin — 8 skills, 4 agents, 2 MCP servers shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/cunhaax/ai-workflow/plan-draft
Any agent
npx skills add cunhaax/ai-workflow --skill plan-draft
Clone the repo
git clone --depth 1 https://github.com/cunhaax/ai-workflow

Made for: Claude Code, Codex.

Or install ai-workflow, the plugin that ships this one along with the rest of its 8 skills, 4 agents, 2 MCP servers.

Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,413 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00064 $0.02413
Opus 5 $0.00032 $0.01207
Sonnet 5 $0.00013 $0.00483
Haiku 4.5 $0.00006 $0.00241

Measured 3d ago against content hash f777433eeb0a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

plan-draft scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ai-workflow/skills/plan-draft/SKILL.md · 209 lines

How it starts

The opening of the file, as written. The whole thing — 209 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/plan-draft — Implementation Planning

Use this skill to produce a structured implementation plan before writing any code. Can be invoked standalone (/plan-draft) or applied by the planner sub-agent during the /feature workflow.


Context Gathering

Before planning, collect all relevant context:

  • External specs: If the prompt references an external link or doc, fetch it before planning — the Requirements section must quote the source verbatim.
  • Codebase: Read any module-specific AGENTS.md files in directories likely to be affected, ADRs in docs/adr/, and relevant product docs in docs/.

Planning Rules

  • The Approval Summary is what the developer approves. It is read on a phone, so constrain the units, not the total: goal in 1–2 sentences, one line per acceptance criterion, one line per key decision, one line per NEEDS_DECISION. There is no hard line cap — the per-item limits keep it short. If the acceptance criteria grow past ~10, treat that as a signal the task should be split into smaller slices, not that the summary should be longer. Each acceptance criterion must be user-visible behaviour, not implementation ("a visitor submitting an invalid form sees the error next to the field", not "add a guard clause in the controller"). Number each criterion AC-<slug>-n, where <slug> is derived from the current git branch name: strip one leading type prefix if present (worktree-, feat-, feature-, fix-, bugfix-, hotfix-, chore-, or similar — these are redundant, every branch in the suite has one), replace remaining / with -, and truncate to 30 characters — plain AC-n restarts at 1 for every feature and collides with every other feature's AC-1 once tests live side by side in the same suite, so the slug is what keeps the tag globally unique, greppable, and short. Every AC-<slug>-n MUST map to at least one Test Strategy entry tagged [AC-<slug>-n]; a criterion with no test is an incomplete plan. Everything below the summary is the detailed contract the summary stands on — the two must never disagree.
  • The Contract section is written before Approach and is what the end-to-end tests are coded against. For full-stack slices it pins routes, fields/params, response shapes, error rendering, and schema changes. Deviating from an approved Contract during implementation is a material change requiring re-approval. Mark it "None" for pure backend/infra work.
  • Lead with intent. The Context & Decisions section states, in a few sentences, what problem this solves and the shape of the solution — then lists every decision taken during planning and every alternative considered and rejected, each with its reason. The plan is self-contained: a reader with no access to the planning conversation must understand what to build and why. Nothing load-bearing may live only in the chat.
  • The Requirements section MUST capture the complete feature requirements exactly as specified by the user or the linked spec. Do not summarize or omit details — the code-critic cross-checks every requirement and edge case in this section against the committed tests. If they come from a document, quote them; if from the user's prompt, reproduce them in full.
  • The Files section MUST list every file the change touches, each tagged NEW / EDIT / DELETE / MOVE, with a phrase on what changes and why. It is the implementer's checklist and the reviewer's blast-radius map — a file in the diff but not here is an undiscussed change.
  • The Out of Scope section MUST state the boundary explicitly: what a reader might reasonably expect this change to include but it deliberately does not. This is where scope disagreements surface cheaply and what stops the implementer gold-plating. Write "None" only if you mean it.
  • List ALL edge cases explicitly in Edge Cases — do not assume any can be skipped. Number each edge case EDGE-<slug>-n, reusing the same <slug> derived for acceptance criteria (see above) — plain edge-N restarts at 1 for every feature and collides with every other feature's edge-1 once tests live side by side in the same suite. Every EDGE-<slug>-n MUST map to at least one Test Strategy entry tagged [EDGE-<slug>-n]; an edge case with no test is an incomplete plan.
  • Flag any potential single-responsibility concerns in the proposed approach.
  • Propose a test strategy that covers the happy path AND every identified edge case. Tests are the plan's deterministic oracle — every claim the plan makes about user-visible behaviour (error placement, section open/closed state, button enable/disable, post-failure page coherence, persistence-vs-UI consistency) MUST map to a committed end-to-end test that exercises the behaviour and observes the rendered result (per project convention; e.g., Playwright for a web UI). If a UI claim is worth writing down in the plan, it is worth committing as a test.
  • Do NOT write a manual "Verification" or "QA checklist" of behavioural steps. If you catch yourself writing "Try X and confirm Y", convert it into a committed test assertion in the Test Strategy. The one exception is environmental preconditions that are not themselves behaviour under test (e.g. "a migration was edited in place, so the local DB must be reset first") — record those under Environment & Preconditions, not as verification.
  • Prefer concrete, quotable statements over prose blobs: name the files, show the key data class or signature, number the edge cases. The plan is reviewed line by line — a reviewer can only annotate what is stated specifically. Where an existing pattern should be followed, point at it by name (e.g. "mirror ExistingValidator") so the implementer copies the canonical shape.
  • If any part of the spec is ambiguous, flag it as NEEDS_DECISION with options. Do NOT ask the user directly from within a sub-agent — surface ambiguities in the plan so the main agent can relay them.
  • Respect existing ADRs. If your plan contradicts a past decision, flag it explicitly and explain why the decision should be reconsidered.
  • Sections that genuinely do not apply may be marked "None" (Out of Scope, Environment & Preconditions, NEEDS_DECISION) — but do not drop them; "None" tells the reader you considered them.

Read the full file on GitHub · 209 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 209 lines · 64 tokens per session scan A f777433eeb0a

Subscribe to this mod's changes

plan-draft is a skill published in the GitHub repository cunhaax/ai-workflow (5 stars, last pushed 6d ago), licensed MIT. It adds 64 tokens to every session and 2,413 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.