plan
Generate a plan for how an agent should accomplish a complex coding task. Use when a user asks for a plan, and optionally when they want to save, find, read, update, or delete plan files in $CODEX_HOME/plans (default ~/.codex/plans).
Best use case
plan is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Generate a plan for how an agent should accomplish a complex coding task. Use when a user asks for a plan, and optionally when they want to save, find, read, update, or delete plan files in $CODEX_HOME/plans (default ~/.codex/plans).
Teams using plan should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/plan/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How plan Compares
| Feature / Agent | plan | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Generate a plan for how an agent should accomplish a complex coding task. Use when a user asks for a plan, and optionally when they want to save, find, read, update, or delete plan files in $CODEX_HOME/plans (default ~/.codex/plans).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Plan ## Overview Draft structured plans that clarify intent, scope, requirements, action items, testing/validation, and risks. Optionally, save plans to disk as markdown files with YAML frontmatter and free-form content. When drafting in chat, output only the plan body without frontmatter; add frontmatter only when saving to disk. Only write to the plans folder; do not modify the repository codebase. This skill can also be used to draft codebase or system overviews. ## Core rules - Resolve the plans directory as `$CODEX_HOME/plans` or `~/.codex/plans` when `CODEX_HOME` is not set. - Create the plans directory if it does not exist. - Never write to the repo; only read files to understand context. - Require frontmatter with **only** `name` and `description` (single-line values) for on-disk plans. - When presenting a draft plan in chat, omit frontmatter and start at `# Plan`. - Enforce naming rules: short, lower-case, hyphen-delimited; filename must equal `<name>.md`. - If a plan is not found, state it clearly and offer to create one. - Allow overview-style plans that document flows, architecture, or context without a work checklist. ## Decide the task 1. **Find/list**: discover plans by frontmatter summary; confirm if multiple matches exist. 2. **Read/use**: validate frontmatter; present summary and full contents. 3. **Create**: inspect repo read-only; choose plan style (implementation vs overview); draft plan; write to plans directory only. 4. **Update**: load plan; revise content and/or description; preserve frontmatter keys; overwrite the plan file. 5. **Delete**: confirm intent, then remove the plan file if asked. ## Plan discovery - Prefer `scripts/list_plans.py` for quick summaries. - Use `scripts/read_plan_frontmatter.py` to validate a specific plan. - If name mismatches filename or frontmatter is missing fields, call it out and ask whether to fix. ## Plan creation workflow 1. Scan context quickly: read README.md and obvious docs (docs/, CONTRIBUTING.md, ARCHITECTURE.md); skim likely touched files; identify constraints (language, frameworks, CI/test commands, deployment). 2. Ask follow-ups only if blocked: at most 1-2 questions, prefer multiple-choice. If unsure but not blocked, state assumptions and proceed. 3. Identify scope, constraints, and data model/API implications (or capture existing behavior for an overview). 4. Draft either an ordered implementation plan or a structured overview plan with diagrams/notes as needed. 5. Immediately output the plan body only (no frontmatter), then ask the user if they want to 1. Make changes, 2. Implement it, 3. Save it as per plan. 6. If the user wants to save it, prepend frontmatter and save the plan under the computed plans directory using `scripts/create_plan.py`. ## Plan update workflow - Re-read the plan and related code/docs before updating. - Keep the plan name stable unless the user explicitly wants a rename. - If renaming, update both frontmatter `name` and filename together. ## Scripts (low-freedom helpers) Create a plan file (body only; frontmatter is written for you). Run from the plan skill directory: ```bash python ./scripts/create_plan.py \ --name codex-rate-limit-overview \ --description "Scope and update plan for Codex rate limiting" \ --body-file /tmp/plan-body.md ``` Read frontmatter summary for a plan (run from the plan skill directory): ```bash python ./scripts/read_plan_frontmatter.py ~/.codex/plans/codex-rate-limit-overview.md ``` List plan summaries (optional filter; run from the plan skill directory): ```bash python ./scripts/list_plans.py --query "rate limit" ``` ## Plan file format Use one of the structures below for the plan body. When drafting, output only the body (no frontmatter). When saving, prepend this frontmatter: ```markdown --- name: <plan-name> description: <1-line summary> --- ``` ### Implementation plan body template ```markdown # Plan <1-3 sentences: intent, scope, and approach.> ## Requirements - <Requirement 1> - <Requirement 2> ## Scope - In: - Out: ## Files and entry points - <File/module/entry point 1> - <File/module/entry point 2> ## Data model / API changes - <If applicable, describe schema or contract changes> ## Action items - [ ] <Step 1> - [ ] <Step 2> - [ ] <Step 3> - [ ] <Step 4> - [ ] <Step 5> - [ ] <Step 6> ## Testing and validation - <Tests, commands, or validation steps> ## Risks and edge cases - <Risk 1> - <Risk 2> ## Open questions - <Question 1> - <Question 2> ``` ### Overview plan body template ```markdown # Plan <1-3 sentences: intent and scope of the overview.> ## Overview <Describe the system, flow, or architecture at a high level.> ## Diagrams <Include text or Mermaid diagrams if helpful.> ## Key file references - <File/module/entry point 1> - <File/module/entry point 2> ## Auth / routing / behavior notes - <Capture relevant differences (e.g., auth modes, routing paths).> ## Current status - <What is live today vs pending work, if known.> ## Action items - None (overview only). ## Testing and validation - None (overview only). ## Risks and edge cases - None (overview only). ## Open questions - None. ``` ## Writing guidance - Start with 1 short paragraph describing intent and approach. - Keep action items ordered and atomic (discovery -> changes -> tests -> rollout); use verb-first phrasing. - Scale action item count to complexity (simple: 1-2; complex: up to about 10). - Include file/entry-point hints and concrete validation steps where useful. - Always include testing/validation and risks/edge cases in implementation plans; include safe rollout/rollback when relevant. - Use open questions only when necessary (max 3). - Avoid vague steps, micro-steps, and code snippets; keep the plan implementation-agnostic. - For overview plans, keep action items minimal and set non-applicable sections to "None."
Related Skills
gwt-spec-to-issue-migration
Migrate legacy spec sources to artifact-first GitHub Issue specs. Supports local `specs/SPEC-*` directories and body-canonical `gwt-spec` Issues using the bundled migration script.
gwt-pty-communication
PTY based communication tools for Project Mode orchestration (Lead/Coordinator/Developer).
gwt-pr
Create or update GitHub Pull Requests with the gh CLI, including deciding whether to create a new PR or only push based on existing PR merge status. Use when the user asks to open/create/edit a PR, generate a PR body/template, or says 'open a PR/create a PR/gh pr'. Defaults: base=develop, head=current branch (same-branch only; never create/switch branches).
gwt-pr-check
Check GitHub PR status with the gh CLI, including unmerged PR detection and post-merge new-commit detection for the current branch.
gwt-fix-pr
Inspect GitHub PR for CI failures, merge conflicts, update-branch requirements, reviewer comments, change requests, and unresolved review threads. Create fix plans and implement after user approval. Reply to ALL reviewer comments with action taken or reason for not addressing, then resolve threads. Notify reviewers after fixes.
release
Execute the release workflow when the user asks `release` or `/release`: sync develop, update version/changelog, create `chore(release)` commit, collect closing issues, create develop->main release PR, and verify release/publish artifacts.
hotfix
Execute the hotfix workflow when the user asks `hotfix` or `/hotfix`: create a hotfix branch from main, guide fix+checks, open PR to main, and confirm patch release.
drawio
Create and edit draw.io diagrams in XML format. Use when the user wants to create flowcharts, architecture diagrams, sequence diagrams, or any visual diagrams. Handles XML structure, styling, fonts (Noto Sans JP), arrows, connectors, and PNG export.
skill-installer
Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).
skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations.
web-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.