En

@2008muyu/pi-plan

A two-stage planning workflow: strong model for planning, lightweight model for execution.

开发流程 优化Token消耗拆解开发任务保存编码进度 通用 ★ 329 Updated 2026-08-02

Install & Use

Copy this prompt and send it to your AI assistant (Claude / Cursor / TRAE / Codex / WorkBuddy etc.) to auto-install:

Help me install this AI Skill: @2008muyu/pi-plan.
It is used for: A two-stage planning workflow: strong model for planning, lightweight model for execution.
Full Skill content: https://321skill.com/skills/2008muyu-pi-plan/raw/index.md
Read that page and install it.

The prompt includes a link to the full Skill content. You can also view the full content.

This Skill addresses the issue of excessive token consumption in AI coding agents when handling complex tasks. In real-world development, developers often need AI agents to perform deep analysis and planning. However, using a strong model (like Claude Opus) for the entire process can quickly escalate costs, while using a lightweight model directly for execution may lead to inadequate planning and lower code quality. By separating the process into two stages—first using a strong model for comprehensive codebase analysis and task breakdown, then employing a lightweight model for efficient implementation—it significantly reduces token usage while maintaining reasoning quality.

Usage is straightforward. Simply install this plugin via pi install and restart pi. You can then enter planning mode using the /plan command. The AI will automatically switch to your configured strong model, analyze the codebase in read-only mode, and call submit_plan to generate a plan file. After planning, you'll see a menu allowing you to either "Execute Plan" (switching to the lightweight model and restoring full tool permissions) or "Continue Refining" to further optimize the plan. Additionally, it supports /plan resume to restore a saved plan, /plan list to view all plans, /plan-settings for interactive configuration of model parameters, and the shortcut Ctrl+Alt+P to quickly toggle planning mode.

It is particularly suitable for teams or individuals who frequently use AI coding agents for complex development, especially those already using the pi coding agent and looking to control API costs without compromising code quality. For large projects, the plan-then-execute workflow can significantly boost efficiency and also facilitates team retrospectives and knowledge retention. Whether in full-stack, backend, or agent development, users can benefit from this approach.

It is recommended to configure the planning model (e.g., claude-opus-4-6 or deepseek-r1) and execution model (e.g., gpt-5.5 or claude-sonnet-4) uniformly via /plan-settings at the project's outset, adjusting the thinking level based on project complexity. Note that it primarily relies on the pi coding agent environment and is not compatible with other AI coding tools. During the planning phase, only read-only tools (read/grep/find/ls) are available; modification operations cannot be performed. Plan files are saved in the .plans/ directory and can be used for team collaboration or future review.

Key Features

Unlike similar plan-mode extensions, this Skill allows users to configure the planning model and execution model separately, rather than using hardcoded model settings. It also supports unified management via environment variables and an interactive menu (`/plan-settings`), offering greater flexibility.

Limitations

Currently, it only supports the pi coding agent (requires a Node.js environment). During the planning phase, tool access is limited to read-only operations (read/grep/find/ls); modification actions cannot be performed while planning.

FAQ

How do I switch the planning model?

Use the `/plan-settings` command to select the planning model provider, model ID, and thinking level via the interactive menu, or configure them using the environment variables `PI_PLAN_PROVIDER`, `PI_PLAN_MODEL`, and `PI_PLAN_THINKING`.

Can the planning and execution models be set to the same one?

Yes, but it is recommended to use different models to save costs. Strong reasoning models (e.g., Claude Opus) are recommended for planning, while lightweight models (e.g., GPT-5.5) are recommended for execution.

Installation guide for AI assistants

If your AI coding assistant (Claude Code, Cursor, TRAE etc.) can see this page, send it this message to auto-install:

Visit https://321skill.com/skills/2008muyu-pi-plan/raw/index.md to read the original Skill definition (Markdown format) for @2008muyu/pi-plan, and install it according to the instructions.