Write An Implementation Plan: Agent Skill (SKILL.md) for Claude Code, Codex and Cursor

Turns an approved design or spec into an ordered plan another agent or developer can execute: small steps with files to touch, the test to write first, exact commands, done criteria, dependency order, parallel groups, risks and rollback.

Prompt

Installs to .agents/skills/write-an-implementation-plan-agent-skill-skill-md-for-claude-cod/

mkdir -p .agents/skills/write-an-implementation-plan-agent-skill-skill-md-for-claude-cod && curl -sL "https://prompts-gpt.com/prompts/write-an-implementation-plan-agent-skill-skill-md-for-claude-code-codex-and-cursor/raw" -o .agents/skills/write-an-implementation-plan-agent-skill-skill-md-for-claude-cod/SKILL.md
SKILL.md
Preview
---
name: write-an-implementation-plan-agent-skill-skill-md-for-claude-cod
description: "Turns an approved design or spec into an ordered plan another agent or developer can execute: small steps with files to touch, the test to write first, exact commands, done criteria, dependency order, parallel groups, risks and rollback."
---

# Write An Implementation Plan: Agent Skill (SKILL.md) for Claude Code, Codex and Cursor

Turns an approved design or spec into an ordered plan another agent or developer can execute: small steps with files to touch, the test to write first, exact commands, done criteria, dependency order, parallel groups, risks and rollback.

## Prompt

```
---
name: write-implementation-plan
description: "Turns an approved design or spec into an ordered plan another agent or developer can execute: small steps with files to touch, the test to write first, exact commands, done criteria, dependency order, parallel groups, risks and rollback. Use when asked to write an implementation plan, break a spec into steps or tickets, plan the build, or 'how should we implement this'."
---

# Write an implementation plan

Turn an approved design or spec into ordered steps that another agent or developer can execute without asking you.

## Steps

1. Read the spec and the code it touches. List the files, modules and commands (test, lint, typecheck, build, migrate) that apply, taken from package scripts, the Makefile or CI config. If there is no spec, or it has open questions, stop and list them.
2. Break the work into steps that are each one commit: one behavior or one mechanical change, leaving the code working and checkable on its own.
3. For each step, write:
   - Goal: one sentence.
   - Files: paths to create or change.
   - Test first: the test name and what it asserts.
   - Commands: the exact commands to run.
   - Done when: an observable result (test passes, endpoint returns 201, page shows the empty state).
   - Depends on: earlier step numbers, or none.
4. Order steps by dependency. Mark groups that can run in parallel ("Group B: steps 4 to 6, independent of each other, no shared files").
5. Add a risks and rollback section: migrations, config or env changes, feature flags, and how to undo each risky step.
6. End with an execution checklist.
7. Save it where the repo keeps plans (look for docs/plans/ or similar), otherwise at `docs/plans/<feature>.md`, unless the user asked for it inline.

## Rules

- No vague verbs: "handle", "improve", "clean up", "support", "refactor as needed". Say what changes and how you'll know.
- Every step names at least one file and one check.
- No step depends on a later step. Steps in a parallel group don't touch the same files.
- Don't redesign. If the spec has a gap, list it under open questions instead of deciding silently.
- Use real paths and commands from the repo. Mark anything you couldn't confirm as unverified.

## Example output

```
### Step 3: Reject expired coupons
Goal: applyCoupon refuses coupons past their end date.
Files: src/cart/coupon.ts, src/cart/coupon.test.ts
Test first: "rejects a coupon past its end date" expects CouponExpiredError
Commands: npm test -- coupon.test.ts
Done when: the new test passes and existing coupon tests still pass
Depends on: Step 2

Execution checklist
- [ ] Each step's test seen failing before code is written
- [ ] Each step's done-when checked
- [ ] Full suite, lint and typecheck pass after the last step
- [ ] Rollback confirmed for every migration
```
```

## Usage Notes

Save as .claude/skills/write-implementation-plan/SKILL.md in one project (or ~/.claude/skills/write-implementation-plan/ for all of them); Codex reads .agents/skills/write-implementation-plan/SKILL.md. Then ask for the job in plain words and the agent loads it. Or install with: npx skills add prompts-gpt/skills --skill write-implementation-plan.

Example output

At a glanceSaved searches plan: six ordered stepsSteps 3 to 5 run in parallel as Group B
  1. Add saved_searches tableStep 1Migration applies, rolls back and reapplies cleanly
  2. Repository layerStep 2SavedSearchRepo: create, listByUser, delete
  3. POST /saved-searchesStep 3201 on valid body, 409 for the 21st
  4. GET /saved-searchesStep 4200 with array sorted newest first
  5. DELETE /saved-searches/:idStep 5204 for owned, 404 for another user's
  6. Mount router behind flagStep 6Routes respond only when flag is on

Example for: approved spec "Saved searches" in a Node/TypeScript Express API with Postgres (Knex migrations), Jest tests, scripts from package.json.

Implementation plan: Saved searches

Spec: docs/specs/saved-searches.md (approved). Saved to docs/plans/saved-searches.md.

Repo commands (from package.json): npm test, npm run lint, npm run typecheck, npm run migrate, npm run migrate:rollback.

Open questions

  • Spec caps saved searches at 20 per user. Should the 21st return 409 or 422? The plan assumes 409 until confirmed.
Step 1: Add saved_searches table

Goal: Create the saved_searches table with user_id, name, query_json and created_at.
Files: db/migrations/20240611_saved_searches.ts
Test first: "migration creates saved_searches with unique (user_id, name)" asserts that a duplicate insert throws.
Commands: npm run migrate && npm test -- migrations.test.ts
Done when: the migration applies, rolls back, and reapplies cleanly.
Depends on: none

Step 2: Repository layer

Goal: SavedSearchRepo provides create, listByUser and delete.
Files: src/searches/savedSearchRepo.ts, src/searches/savedSearchRepo.test.ts
Test first: "listByUser returns only that user's searches, newest first"
Commands: npm test -- savedSearchRepo.test.ts
Done when: the repo tests pass against the test database.
Depends on: Step 1

Group B: steps 3 to 5. These are independent of each other and touch no shared files.

Step 3: POST /saved-searches

Goal: Create a saved search. Return 409 when the user already has 20.
Files: src/searches/routes/create.ts, src/searches/routes/create.test.ts
Test first: "returns 409 when user has 20 saved searches"
Commands: npm test -- create.test.ts
Done when: a valid body returns 201 and the 21st returns 409.
Depends on: Step 2

Step 4: GET /saved-searches

Goal: List the current user's saved searches.
Files: src/searches/routes/list.ts, src/searches/routes/list.test.ts
Test first: "does not return another user's searches"
Commands: npm test -- list.test.ts
Done when: the endpoint returns 200 with an array sorted newest first.
Depends on: Step 2

Step 5: DELETE /saved-searches/:id

Goal: Delete a saved search the user owns. Return 404 for searches the user does not own.
Files: src/searches/routes/delete.ts, src/searches/routes/delete.test.ts
Test first: "returns 404 when deleting another user's search"
Commands: npm test -- delete.test.ts
Done when: deleting an owned search returns 204, and deleting a foreign one returns 404.
Depends on: Step 2

Step 6: Mount router behind flag

Goal: Register the three routes under FEATURE_SAVED_SEARCHES.
Files: src/app.ts, src/config/flags.ts, src/app.test.ts
Test first: "saved-searches routes 404 when flag is off"
Commands: npm test -- app.test.ts
Done when: routes respond only when the flag is on.
Depends on: Steps 3, 4, 5

Risks and rollback

  • Migration (Step 1): Run npm run migrate:rollback to drop the table. The table holds new data only, so no existing data is lost.
  • New env var FEATURE_SAVED_SEARCHES: The default is off. Rollback means setting it to false, with no redeploy needed. The prod config key name is unverified.
  • 409 vs 422: Pending the open question. Changing it affects Step 3 only.

Execution checklist

  • [ ] Each step's test seen failing before code is written
  • [ ] Each step's done-when checked
  • [ ] npm test, npm run lint, npm run typecheck pass after Step 6
  • [ ] Migration rollback run once locally
  • [ ] Open question on the 409 status resolved
Written by AI from this prompt. Your results will vary.

Save as .claude/skills/write-implementation-plan/SKILL.md in one project (or ~/.claude/skills/write-implementation-plan/ for all of them); Codex reads .agents/skills/write-implementation-plan/SKILL.md. Then ask for the job in plain words and the agent loads it. Or install with: npx skills add prompts-gpt/skills --skill write-implementation-plan.

Make it repeatable

Keep using this prompt without pasting it in every time.

Prompt details

By
Prompts-GPT editors
Published
How prompts are written and checked

Did this prompt work?

Keep exploring

More in AI Coding Agents