Auto-export your Claude Code plans to the project root when you finish planning.
- Optimize token usage - Plan with Opus, execute with faster/cheaper models
- Clean implementation context - Fresh context window without planning artifacts
- Flexible workflows - Execute plans with any model, not just Claude Code
- Zero passive cost - No MCP servers or Skills overhead
/plugin marketplace add kenryu42/cc-marketplace
/plugin install plan-export@cc-marketplace
Note: Restart Claude Code after installation.
- Run
/plugin→ SelectMarketplaces→ Choosecc-marketplace→ Enable auto-update
┌─────────────────┐ ┌──────────────┐ ┌──────────────┐ ┌────────────────┐
│ 1. Plan Mode │────▶│ 2. Press ESC │────▶│ 3. /clear or │────▶│ 4. plan-{slug} │
│ │ │ │ │ /new │ │ .md saved! │
└─────────────────┘ └──────────────┘ └──────────────┘ └────────────────┘
- Plan with any model in Plan Mode
- Press ESC when asked to choose auto-accept/manual
- Start new session (
/clear,/reset, or/new) - Plan exported to
plan-{slug}.md
Then run /execute-plan to execute with your preferred model.
| Command | Description | Output |
|---|---|---|
/execute-plan |
Execute most recent plan | Runs *plan-*.md in CWD |
/export-project-plans |
Export all project plans | Root (1) or plans/ (2+) |
/export-project-plans-with-timestamp |
Export with timestamps | YYYYMMDD-HHMMSS-plan-{slug}.md |
SessionStart Hook SessionEnd Hook
│ │
▼ ▼
┌────────────────┐ ┌────────────────┐
│session_start.py│ │ export_plan.py │
│ │ │ │
│ Saves │ ──────▶ │ Reads transcript│
│ TRANSCRIPT_DIR │ session │ Finds slug │
│ to env file │ │ Copies plan │
└────────────────┘ └────────────────┘
Key paths:
- Source:
~/.claude/plans/{slug}.md - Destination:
{CWD}/plan-{slug}.md
1 plan found? ──▶ Export to project root: plan-{slug}.md
2+ plans found? ──▶ Export to plans/ folder: plans/plan-{slug}.md
.claude-plugin/
plugin.json
hooks/
hooks.json
scripts/
session_start.py
export_plan.py
export_project_plans.py
export_project_plans_with_timestamp.py
commands/
execute-plan.md
export-project-plans.md
export-project-plans-with-timestamp.md
tests/
test_export_plan.py
test_export_project_plans.py
test_concurrency.py
test_session_start.py
# Setup
just setup # Or: uv sync && uv run pre-commit install
# Test
uv run pytest
# Lint
just check # Or: uv run ruff check && uv run mypy .MIT