skills/writing-plans/SKILL.md
Draft lean, executable, and verifiable plans before non-trivial work. Use when the user asks for a plan, implementation plan, roadmap, design plan, migration plan, refactor plan, PR split, plan checklist, or completion checklist for a plan; or when the task needs sequencing, tradeoffs, assumptions, unknowns, risk control, or completion criteria. Do not use for small, obvious tasks that can be completed directly.
npx skillsauth add narumiruna/agent-skills writing-plansInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Write plans that help an agent or engineer act, verify progress, and expose uncertainty. Keep the plan as small as the task allows.
When this skill is used, produce a plan document. Save it to the repository by default unless the user explicitly asks for chat-only output.
Use ./docs/plans/ by default unless the user specifies another path. Name plan files as YYYY-MM-DD_<topic>-plan.md, where <topic> is a lowercase kebab-case stem, for example 2026-05-10_auth-migration-plan.md or 2026-05-10_checkout-refactor-plan.md.
Create ./docs/plans/ if it does not exist. If the user does not specify a topic, derive a concise lowercase kebab-case stem from the plan goal and report the created file path.
When a plan is complete, immediately archive it by moving it to ./docs/plans/archived/YYYY-MM-DD_<topic>-plan.md. Create ./docs/plans/archived/ if it does not exist. Report the completion evidence and archived file path.
Use this default structure, deleting optional sections that do not add value.
## Goal
## Context (optional)
## Architecture (optional)
## Tech Stack (optional)
## Non-Goals (optional)
## Assumptions (optional)
## Unknowns (optional)
## Plan
## Risks (optional)
## Rollback / Recovery (optional)
## Completion Checklist
Always include Goal, Plan, and Completion Checklist.
Goal: Describe the intended outcome and success condition.Context (optional): Include only task-local background needed to understand the plan.Architecture (optional): Include when the work affects module boundaries, data flow, APIs, state management, deployment, permissions, storage, or ownership.Tech Stack (optional): Include when the work adds, removes, upgrades, or chooses tools, frameworks, packages, runtimes, databases, CI/CD, or cloud services.Non-Goals (optional): Name related work that is explicitly out of scope.Assumptions (optional): Name premises the plan depends on but can reasonably proceed with for now.Unknowns (optional): Name unanswered questions that could change the plan; convert each important unknown into an early discovery task or completion-check item.Plan: Use Markdown task list items (- [ ]) for actionable steps. Each task must be independently executable by an agent or engineer, with a clear object, expected result, and an executable acceptance method in the same task item, such as a command, file/path evidence, test result, review status, deployment state, or explicit user acceptance. Example: - [ ] Update \src/auth.ts` to reject expired tokens; verify with `npm test -- auth`.` Prefer tasks that can map to a commit, PR slice, command, file change, investigation, or review step. Include dependencies between steps when order matters.Risks (optional): List risks that could break correctness, schedule, data integrity, UX, security, or maintainability.Rollback / Recovery (optional): Include when the work touches production data, releases, migrations, infrastructure, public APIs, or user-visible behavior.Completion Checklist: End every plan with finite Markdown task list items (- [ ]) that prove the whole work outcome is complete. Each item must be objectively checkable by code, docs, command output, test result, deployment state, review status, or explicit user acceptance. Each checklist item must include the verification method or evidence in the same item.Use this shape for Plan task list items when it helps keep acceptance explicit:
- [ ] <action> <object> to produce <expected result>; verify with <command/evidence/user acceptance>.
Use this shape for Completion Checklist items to prove the whole work outcome is complete:
- [ ] <completed outcome> is verified by <command/evidence/user acceptance>.
Completion Checklist, not with open-ended commentary. If execution should begin immediately, put the next concrete action in the Plan task list.Treat a plan as complete only when all of these are true:
Plan task list item is checked or explicitly marked as not applicable using - [x] Not applicable: <reason>.Completion Checklist item is checked and has supporting evidence when the evidence is not obvious from repository state. Put evidence in the checklist item or in the completion review response, using commands, file paths, PR or review status, deployment state, or explicit user acceptance.Unknowns that affected execution are resolved, converted into follow-up work, or explicitly accepted by the user.Risks are documented as accepted, mitigated, or moved to follow-up work.Do not infer completion from implementation work alone. If evidence is missing, report which checks remain open instead of calling the plan complete.
At the end of any task that uses this skill, inspect ./docs/plans/*.md for active plans that appear complete. If an active plan appears complete, run the Completion Review rules before responding.
When the plan is complete, archive it immediately under ./docs/plans/archived/ and report the archived path. Do not archive if completion evidence is missing. Do not leave a completed plan in ./docs/plans/. If an archived file with the same name already exists, stop and report the conflict instead of overwriting.
Use these distinctions when deciding whether a section is needed:
Non-Goal: Do not migrate historical records in this phase.
Assumption: Historical records can remain readable through the old schema.
Unknown: Do any reports require historical records in the new schema?
development
Maintains concise repository MEMORY.md notes for gotchas, stale memory corrections, and durable user preferences. Use at the start of repository conversations, when the user mentions MEMORY.md, when an error should be remembered to avoid repeating it, or when MEMORY.md content may be wrong.
testing
Use only when the user explicitly names the work-log-writer skill; never auto-activate from generic work log, daily log, EOD summary, status update, or date-range summary requests.
development
Use when implementing non-trivial code changes that should follow TDD (write a failing test first, make the smallest passing change, then refactor safely).
tools
Use when designing, implementing, reviewing, or debugging Codex CLI hooks, including `hooks.json`, `.codex/hooks.json`, feature-flag setup, matcher behavior, event-specific stdin/stdout payloads, and hook scripts for `SessionStart`, `PreToolUse`, `PostToolUse`, `UserPromptSubmit`, or `Stop`.