OpenParable
Skip to content
← Back to skills

Plan Code Workflow

Productivity
plan-code-workflow

Plan Code Workflow is an Agent Skill for productivity published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Plan/Code workflow for moderate to complex tasks. Defines when to use Plan vs Code mode. Applied automatically for non-trivial implementations.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/data/plan-code-workflow/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/plan-code-workflow, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Plan/Code Workflow

Two primary work modes: Plan and Code.

Task Complexity Assessment

ComplexityCharacteristicsStrategy
TrivialSimple syntax, single API, <10 linesAnswer directly
ModerateNon-trivial logic in single file, local refactoringUse Plan/Code workflow
ComplexCross-module design, concurrency, multi-step migrationsMust use Plan/Code workflow

Common Rules

  • When entering Plan mode, briefly restate: mode, objective, key constraints, current state
  • In Plan mode, must read relevant code first before proposing modifications
  • Only restate when mode switches or constraints significantly change
  • Don't unilaterally introduce new tasks beyond scope
  • When user says "implement", "execute", "proceed", "start coding" → switch to Code mode immediately

Plan Mode (Analysis / Alignment)

  1. Analyze top-down, find root causes, not just patch symptoms

  2. List key decision points and trade-offs

  3. Provide 1–3 feasible options, each including:

    • Summary approach
    • Impact scope (modules/interfaces involved)
    • Pros and cons
    • Potential risks
    • Verification methods
  4. Only ask clarifying questions when missing info would block progress

  5. Avoid providing essentially identical plans

Exit Conditions

  • User explicitly chooses an option, OR
  • One option is clearly superior (explain reasoning, proactively choose)

Once conditions met → enter Code mode directly

Code Mode (Execute Plan)

  1. Main content must be concrete implementation, not continued planning

  2. Before providing code, briefly state:

    • Which files/modules will be modified
    • Purpose of each modification
  3. Prefer minimal, reviewable changes:

    • Local snippets/patches over complete files
    • Mark key change regions
  4. Indicate how to verify:

    • Tests/commands to run
    • Draft new test cases if needed
  5. If major problems discovered → pause, switch back to Plan mode

Output Should Include

  • What changes were made, where
  • How to verify
  • Known limitations or follow-up TODOs