Agent skill

Plan Mode

by espennilsen in espennilsen/pi

Structured planning mode for AI agents working on coding and development tasks.

MITAuto-check passedAgent Workflows

Install Plan Mode

skills CLI
$ npx skills add espennilsen/pi --skill plan-mode -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install espennilsen/pi plan-mode --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/espennilsen/pi.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/plan-mode .claude/skills/plan-mode && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
plan-mode
GitHub stars
122
Token cost
~2.1k tokens
SKILL.md length
787 words
Files
1
Skills in repo
36
Repo updated
First seen
Licence
MIT

At a glance

Structured planning mode for AI agents working on coding and development tasks.

  • Works in 6 steps: Understanding (What) → Approach Options (How) → Task Breakdown (Steps) → …
  • The user says /plan
  • SKILL.md covers When to Enter Plan Mode, Plan Output Structure, Saving the Plan and Execution After Approval, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Plan Mode is an agent skill from espennilsen/pi. Structured planning mode for AI agents working on coding and development tasks. Produces a comprehensive plan BEFORE any code is written or changed, including task decomposition, architecture decisions, risk assessment, and approval gates. Use this skill whenever the user says "/plan", "plan mode", "plan first", "think before coding", "make a plan", or asks the agent to plan before executing. Also trigger when the user describes a complex multi-step development task and would clearly benefit from structured…

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Planning, Task breakdown and Refactoring. The licence is MIT.

When your agent uses it

  • The user says /plan
  • Think before coding
  • Asks the agent to plan before executing
  • Infrastructure changes

Example prompts

  • “plan mode”
  • “plan first”
  • “think before coding”
  • “/plan-mode”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Understanding (What)
  2. Approach Options (How)
  3. Task Breakdown (Steps)
  4. Risk Assessment
  5. Files & Scope
  6. Approval Gate

What it can do on your machine

Read from SKILL.md and the folder at commit 79d019b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Plan Mode loads about 2.1k tokens when it runs. Until then it costs about 185 tokens; SKILL.md has 787 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~185
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from espennilsen/pi at commit 79d019b, republished under its MIT licence (© espennilsen). 787 words, ~2,086 tokens.

Download SKILL.mdSave it as .claude/skills/plan-mode/SKILL.md (or your agent's skills folder).
name
plan-mode
description
Structured planning mode for AI agents working on coding and development tasks. Produces a comprehensive plan BEFORE any code is written or changed, including task decomposition, architecture decisions, risk assessment, and approval gates. Use this skill whenever the user says "/plan", "plan mode", "plan first", "think before coding", "make a plan", or asks the agent to plan before executing. Also trigger when the user describes a complex multi-step development task and would clearly benefit from structured planning before implementation — especially for tasks involving new features, refactors, migrations, infrastructure changes, or multi-file edits. When in doubt, plan. A few minutes of planning prevents hours of rework.

Plan Mode

When triggered, switch into planning mode: analyze the task, produce a structured plan, and wait for explicit user approval before writing any code or making changes.

The core philosophy: think deeply, communicate clearly, execute only when aligned.

When to Enter Plan Mode

  • User explicitly requests it (/plan, "plan this", "think first", etc.)
  • Task touches 3+ files or components
  • Task involves architecture decisions, new patterns, or breaking changes
  • Task is ambiguous and could be approached multiple ways
  • Task involves infrastructure, CI/CD, database changes, or migrations
  • You're unsure about the right approach

Plan Output Structure

Produce a plan with these sections. Adapt depth to task complexity — a small bug fix needs a lighter plan than a new feature.

1. Understanding (What)

Restate the task in your own words to confirm understanding. Call out any ambiguities or assumptions you're making. This catches misalignment early.

## Understanding
[Restate the goal in 2-3 sentences]

**Assumptions:**
- [List anything you're assuming that wasn't explicitly stated]

**Open questions:**
- [List anything you need clarified before proceeding]

If there are open questions that would significantly change the approach, STOP here and ask the user before continuing with the plan. Don't build a full plan on shaky assumptions.

2. Approach Options (How)

For non-trivial tasks, present 2-3 distinct approaches. For simple tasks, present one recommended approach with brief justification.

For each option include:

  • Summary: One-line description
  • How it works: Key implementation steps (keep high-level, not line-by-line)
  • Pros: Why this approach is good
  • Cons: Tradeoffs and risks
  • Effort estimate: Relative complexity (small / medium / large)

End with a clear recommendation and why.

## Approach Options

### Option A: [Name]
**Summary:** [One line]
**How it works:** [3-5 bullet points, high-level]
**Pros:** [What's good about this]
**Cons:** [Tradeoffs]
**Effort:** [small / medium / large]

### Option B: [Name]
...

**Recommendation:** Option [X] because [reason tied to project context].
3. Task Breakdown (Steps)

Break the chosen (or recommended) approach into concrete, ordered steps. Each step should be small enough to verify independently. Group related steps into phases.

## Task Breakdown

### Phase 1: [Name, e.g. "Setup / Preparation"]
- [ ] Step 1.1: [Concrete action]
- [ ] Step 1.2: [Concrete action]
  **Checkpoint:** [What should be true after this phase — a testable condition]

### Phase 2: [Name, e.g. "Core Implementation"]
- [ ] Step 2.1: [Concrete action]
- [ ] Step 2.2: [Concrete action]
  **Checkpoint:** [Testable condition]

### Phase 3: [Name, e.g. "Verification & Cleanup"]
- [ ] Step 3.1: [Concrete action]
- [ ] Step 3.2: [Concrete action]
  **Checkpoint:** [Testable condition]

Guidelines for good steps:

  • Each step modifies 1-2 files at most
  • Steps are ordered so the project stays in a working state after each phase
  • Include test/verification steps, not just implementation
  • Checkpoints are concrete and testable ("tests pass", "server starts", "endpoint returns 200")
4. Risk Assessment

Identify what could go wrong and how to mitigate it. Focus on risks specific to this task, not generic software risks.

## Risks

| Risk | Likelihood | Impact | Mitigation |
|------|-----------|--------|------------|
| [Specific thing that could go wrong] | low/med/high | low/med/high | [How to prevent or handle it] |

Always consider:

  • Breaking changes: Will this break existing functionality? Which consumers/callers are affected?
  • Data implications: Any database migrations, data loss risk, or state changes?
  • Rollback: If this goes wrong, how hard is it to undo?
  • Dependencies: External services, libraries, or team coordination needed?
5. Files & Scope

List the files that will be created, modified, or deleted. This helps the user understand the blast radius.

## Affected Files
- **Create:** `path/to/new-file.ts` — [purpose]
- **Modify:** `path/to/existing-file.ts` — [what changes]
- **Delete:** `path/to/old-file.ts` — [why]
6. Approval Gate

Always end the plan with an explicit request for approval. Never proceed to implementation without it.

## Ready to Execute?

Plan is complete. Please review and let me know:
- ✅ **Approve** — proceed with implementation
- 🔄 **Revise** — adjust the approach (tell me what to change)
- ❓ **Clarify** — answer open questions first
- ❌ **Cancel** — abort this task
Show full SKILL.md (374 more words)Show less

Saving the Plan

After generating the plan, save it to a plans/ directory in the project root before requesting approval.

File naming convention: plans/YYYY-MM-DD-<short-slug>.md

Examples:

  • plans/2026-02-25-auth-refactor.md
  • plans/2026-02-25-add-search-endpoint.md
  • plans/2026-02-25-fix-race-condition.md

The slug should be a concise, kebab-case summary of the task (3-5 words max).

File contents: The full plan output (all sections) as a markdown document. Add a YAML frontmatter block at the top:

yaml
---
task: "[One-line task description]"
status: proposed  # proposed → approved → in-progress → completed → cancelled
created: YYYY-MM-DD
approach: "[Name of chosen/recommended approach]"
---

Status updates: Update the status field in the frontmatter as the task progresses. If the plan is revised after feedback, append a ## Revision Log section at the bottom rather than overwriting the original plan — this preserves the decision history.

Create the plans/ directory if it doesn't exist. If a .gitignore exists and the user hasn't indicated whether plans should be tracked in git, ask.

Execution After Approval

Once approved, follow the task breakdown step by step. After each phase checkpoint:

  • Briefly report what was completed
  • Confirm the checkpoint condition is met
  • Proceed to the next phase (or flag if something unexpected came up)

If during execution you discover something that contradicts the plan (unexpected complexity, a better approach, a blocker), pause and re-plan rather than silently deviating.

Scaling the Plan to Task Size

Not every task needs a full plan. Scale the depth:

Small tasks (bug fix, config change, typo):

  • Understanding + single approach + file list + approval gate
  • Skip options comparison and risk table
  • 1-2 minutes of planning

Medium tasks (new endpoint, component, small feature):

  • Full plan structure
  • 2 approach options
  • Basic risk assessment
  • 3-5 minutes of planning

Large tasks (new feature, refactor, migration, infrastructure):

  • Full plan with detailed options
  • Comprehensive risk table
  • Consider suggesting the work be split into multiple PRs/phases
  • Include dependency graph if components interact
  • 5-10 minutes of planning

Anti-Patterns to Avoid

  • Plan theater: Don't produce a 500-line plan for renaming a variable. Match depth to complexity.
  • Vague steps: "Implement the feature" is not a step. "Add handleSubmit function to LoginForm.tsx that validates inputs and calls POST /api/auth" is a step.
  • Optimistic risk assessment: If a migration could lose data, say so plainly. Don't bury risks.
  • Planning in circles: If you've laid out the plan and the user approved, execute. Don't re-plan unless something changes.
  • Assumption hiding: Surface your assumptions explicitly. The most dangerous assumptions are the ones nobody stated.

© espennilsen, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/plan-mode of espennilsen/pi.

Open the folder on GitHubat commit 79d019b

Compare with similar skills

Plan Mode next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Plan Mode compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Plan Mode this skillespennilsen/pi122—~2.1kAutomated safety check: PassMIT
Improvefossasia/eventyay-interpretation1.6k10 repos~3.7kAutomated safety check: WarnMIT
Planning And Task Breakdownabashev/vfs-s31068 repos~1.9kAutomated safety check: PassApache-2.0
ULW Plan Workflowcode-yeongyu/oh-my-openagent70k—~3.9kAutomated safety check: PassCustom licence
Implementation Plan Creatortailcallhq/forgecode7.6k1 repos~1.1kAutomated safety check: PassApache-2.0
Ask NavigatorYeachan-Heo/oh-my-claudecode40k—~4.1kAutomated safety check: PassMIT

Similar skills

  • Improve

    fossasia/eventyay-interpretation

    Survey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute.

    1.6k GitHub starsUsed in 10 repos~3.7k tokens
    Agent WorkflowsAuto-check: warnings
  • Breaks work into ordered tasks. An agent skill from abashev/vfs-s3.

    106 GitHub starsUsed in 8 repos~1.9k tokens
    Agent WorkflowsAuto-check passed
  • ULW Plan Workflow

    code-yeongyu/oh-my-openagent

    Explore-first planning that turns a vague or large request into one decision-complete work plan, written only after your approval and executed by a separate worker.

    70k GitHub stars~3.9k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Implementation Plan Creator

    tailcallhq/forgecode

    Writes a structured Markdown implementation plan with checkbox tasks, verification criteria and risks, then checks it with a validation script; no code changes.

    7.6k GitHub starsUsed in 1 repo~1.1k tokens
    Agent WorkflowsAuto-check passed
  • Ask Navigator

    Yeachan-Heo/oh-my-claudecode

    Charts a foggy effort into a map of decision tickets on the repo's issue tracker and works through them one per session, producing decisions rather than deliverables.

    40k GitHub stars~4.1k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Workflow Orchestration

    vxcozy/workflow-orchestration

    Disciplined task execution with planning, verification, and self-improvement loops.

    116 GitHub stars~1k tokensUpdated 5 mo ago
    Agent WorkflowsAuto-check passed

More from espennilsen/pi

All 36 skills in this repo
  • GitHub

    espennilsen/pi

    Interact with GitHub repos, PRs, issues, CI, and notifications via the pi-github extension commands and gh CLI.

    122 GitHub stars~1k tokensUpdated 17 days ago
    Auto-check passed
  • Skill Creator

    espennilsen/pi

    Create, review, and improve skills for Pi agents. An agent skill from espennilsen/pi.

    122 GitHub stars~2.1k tokensUpdated 17 days ago
    Auto-check passed
  • Dry Code Review

    espennilsen/pi

    Perform a comprehensive DRY (Don't Repeat Yourself) code review on a codebase.

    122 GitHub stars~1.7k tokensUpdated 17 days ago
    Auto-check passed
  • Extract Design System

    espennilsen/pi

    Reverse-engineer a design system from a live website (public URL or localhost).

    122 GitHub stars~2k tokensUpdated 17 days ago
    Auto-check passed
  • Herdr Operations

    espennilsen/pi

    A skill your agent uses when inspecting or operating Herdr sessions, workspaces, tabs, panes, agents, terminal output, agent messaging, or waits.

    122 GitHub starsUsed in 1 repo~525 tokens
    Auto-check passed
  • PDF Reader

    espennilsen/pi

    Read and extract content from PDF files — text, tables, metadata, and images.

    122 GitHub stars~1.6k tokensUpdated 17 days ago
    Auto-check passed

Categories

Questions about Plan Mode

What does Plan Mode do?

Structured planning mode for AI agents working on coding and development tasks. Plan Mode is an agent skill from espennilsen/pi. Structured planning mode for AI agents working on coding and development tasks.

When should I use Plan Mode?

Plan Mode fits situations like: the user says /plan; think before coding; asks the agent to plan before executing; infrastructure changes.

How do I install Plan Mode in Claude Code?

Run `npx skills add espennilsen/pi --skill plan-mode -a claude-code`. Or copy the skill folder (skills/plan-mode in espennilsen/pi) into .claude/skills/plan-mode in your project. Claude Code loads it when a task matches its description.

How do I install Plan Mode in Codex?

Run `npx skills add espennilsen/pi --skill plan-mode -a codex`. Or copy the skill folder (skills/plan-mode in espennilsen/pi) into .agents/skills/plan-mode in your project. Codex loads it when a task matches its description.

Can I use Plan Mode in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add espennilsen/pi --skill plan-mode -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/plan-mode, .gemini/skills/plan-mode, .github/skills/plan-mode and .opencode/skills/plan-mode in your project.

What does Plan Mode need to run?

SKILL.md names no scripts, command-line tools or credentials: Plan Mode is instructions for the agent only.

Does Plan Mode access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Plan Mode safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Plan Mode use?

Plan Mode is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Plan Mode use?

About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Plan Mode?

Skills that share tags, products or a category with Plan Mode: Improve (fossasia/eventyay-interpretation, 1.6k stars), Planning And Task Breakdown (abashev/vfs-s3, 106 stars), ULW Plan Workflow (code-yeongyu/oh-my-openagent, 70k stars) and Implementation Plan Creator (tailcallhq/forgecode, 7.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Plan Mode?

espennilsen (a GitHub user) maintains it in espennilsen/pi, which has 122 GitHub stars. The repository holds 36 skills in this directory. The repository was last updated on September 21, 2026.

Source: espennilsen/pi on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.