Skip to content
/

Claude Code Plan Export

claude-code-plan-export · kenryu42/claude-code-plan-export · ★ 21 · last commit 2026-01-19

Primitive shape 4 total
Commands 2 Hooks 2
00

Summary

claude-code-plan-export — Summary

Claude Code Plan Export was a Claude Code plugin that automatically saved the active Plan Mode plan to a markdown file in the project root when a session ended. Its core use case was a "plan with Opus, execute with cheaper model" workflow: plan in Plan Mode, press ESC, start a new session with /clear, and find the plan already exported as plan-{slug}.md. The plugin is archived and deprecated — Claude Code natively added planDirectory settings and automatic context clearing on plan execution, which cover all functionality. It ships only 2 lifecycle hooks (SessionStart for backfill check, SessionEnd for export), 3 Python scripts, and 2 commands (/execute-plan, /export-project-plans). At 21 stars, it was a niche utility superseded by its host platform.

differs_from_seeds: Most like claude-conductor (Archetype 4 — minimal markdown scaffold, zero behavioral intelligence) but simpler still — no templates, no knowledge structure, just automatic file export. Unlike ccmemory (global Neo4j graph) or planning-with-files (three-file discipline system), this is purely mechanical session→file pipeline with no memory semantics at all.

01

Overview

claude-code-plan-export — Overview

Origin

Created by kenryu42. Archived January 2026 with a deprecation notice pointing to Claude Code's native planDirectory setting as the replacement.

Philosophy

"Plan with Opus, execute with faster/cheaper models." "Zero passive cost — No MCP servers or Skills overhead."

The plugin was built around the insight that Claude Code's Plan Mode produces structured plans but loses them when you start a new execution session. By exporting the plan to a file automatically on session end, you could start a new session with any model and reference the plan without paying for Opus again.

Deprecation Notice

From README:

"This plugin is no longer maintained. Claude Code now natively supports: planDirectory setting — Configure where plans are saved directly in Claude Code settings; Fresh context on plan execution — Claude Code automatically clears context when executing a plan."

What It Was

A minimal 2-hook, 2-command plugin. Its entire value was: read the transcript JSONL at session end, find the slug field, copy ~/.claude/plans/{slug}.md to the project root as plan-{slug}.md.

02

Architecture

claude-code-plan-export — Architecture

Distribution

Claude Code plugin via custom marketplace (kenryu42/cc-marketplace). Now archived and deprecated.

Directory Layout

claude-code-plan-export/
├── .claude-plugin/        # Plugin manifest
├── commands/              # Slash commands
│   ├── execute-plan.md    # /execute-plan
│   └── export-project-plans.md
├── hooks/
│   └── hooks.json         # 2 hooks: SessionStart + SessionEnd
└── scripts/
    ├── session_start.py   # Check for unexecuted plans at session start
    ├── export_plan.py     # Read transcript JSONL, find slug, copy plan file
    └── export_project_plans.py  # Export all plans in ~/.claude/plans/

Required Runtime

  • Python 3.x
  • Claude Code

Workflow Summary

Plan Mode session ends
    → SessionEnd hook fires
    → export_plan.py reads stdin JSON (has transcript_path)
    → scans transcript JSONL for "slug" field
    → copies ~/.claude/plans/{slug}.md → {cwd}/plan-{slug}.md

Native Replacement

// .claude/settings.json
{
  "planDirectory": "./plans"
}
03

Components

claude-code-plan-export — Components

Commands (2)

Name Purpose
/execute-plan Execute the most recently exported *plan-*.md in CWD
/export-project-plans Export all plans from ~/.claude/plans/ to project root

Hooks (2)

Event Script Purpose
SessionStart session_start.py Check for plans that were exported but not yet executed; remind user
SessionEnd export_plan.py Read transcript JSONL, find slug, copy plan file to project root

Scripts (3)

Script Purpose
scripts/export_plan.py Core export: scan transcript for slug, copy ~/.claude/plans/{slug}.md to {cwd}/plan-{slug}.md
scripts/session_start.py Detect unexecuted exported plans, surface reminder to user
scripts/export_project_plans.py Batch export: copy all plans from ~/.claude/plans/ to project
05

Prompts

claude-code-plan-export — Prompts

Excerpt 1: export_plan.py — Core Logic (from source)

Prompting technique: Not a prompt file — this is Python automation. The plugin contains no LLM prompts; it is pure mechanical automation.

def find_slug_in_transcript(
    transcript_path: Path, *, retries: int = 5, delay: float = 0.05
) -> str | None:
    """Scan transcript JSONL for the first object containing a 'slug' field."""
    def _scan_once() -> str | None:
        try:
            with open(transcript_path, encoding="utf-8") as f:
                for line in f:
                    line = line.strip()
                    if not line:
                        continue
                    try:
                        obj = json.loads(line)
                        if isinstance(obj, dict):
                            slug = obj.get("slug")
                            if isinstance(slug, str):
                                return slug
                    except json.JSONDecodeError:
                        continue
        except FileNotFoundError:
            return None
        return None

    for attempt in range(max(1, retries)):
        slug = _scan_once()
        if slug:
            return slug
        if attempt < retries - 1:
            time.sleep(delay)
    return None

Excerpt 2: hooks/hooks.json — Hook Configuration

Prompting technique: Hook registration (not a prompt)

{
  "hooks": {
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "${CLAUDE_PLUGIN_ROOT}/scripts/session_start.py"
          }
        ]
      }
    ],
    "SessionEnd": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "${CLAUDE_PLUGIN_ROOT}/scripts/export_plan.py"
          }
        ]
      }
    ]
  }
}

Note: This plugin ships no LLM prompts, skills, or behavioral instructions. It is entirely Python automation triggered by hooks.

09

Uniqueness

claude-code-plan-export — Uniqueness

differs_from_seeds

Most similar to claude-conductor (Archetype 4 — markdown scaffold with zero behavioral intelligence), but even simpler: no templates, no knowledge hierarchy, just a mechanical SessionEnd→file-copy pipeline. Unlike all other seeds that provide ongoing behavioral guidance, this plugin is purely reactive to a single lifecycle event. It has been superseded by native Claude Code functionality and is archived.

Positioning

This was a thin workflow bridge for the "plan with Opus, execute with cheaper model" use case. Its obsolescence after Claude Code added planDirectory confirms it was solving a platform gap, not a fundamental architectural problem.

Observable Failure Modes

  1. Depends on SessionEnd hook firing — crashes prevent export
  2. Requires transcript JSONL to contain a slug field — if Plan Mode is not used, no export happens
  3. No tamper detection, no context injection, no semantic memory
  4. Archived January 2026 — no maintenance expected
04

Workflow

claude-code-plan-export — Workflow

Phases

Phase Trigger Artifact
1. Plan Mode User manually enters Plan Mode Internal Claude Code plan
2. ESC to exit planning User presses ESC Plan moves to ~/.claude/plans/{slug}.md
3. /clear or /new Session reset SessionEnd hook fires → export_plan.py copies file
4. New session Session start SessionStart hook reminds if unexecuted plan exists
5. Execute User runs /execute-plan Reads plan-{slug}.md, executes with current model

Approval Gates

None — fully automatic export on session end.

Artifacts

Artifact Location Written By
plan-{slug}.md Project root export_plan.py (copy of ~/.claude/plans/{slug}.md)
06

Memory Context

claude-code-plan-export — Memory & Context

Memory Model

None in any semantic sense. The plugin performs a one-time file copy: it moves a plan from Claude Code's internal plan store (~/.claude/plans/) to the project directory. There is no accumulation, no indexing, no recall.

Persistence Scope

project — exported plan-{slug}.md files live in the project root. They persist until manually deleted.

Context Injection

None. The plugin does not inject any context into sessions. It only exports files; the user must manually reference plan-{slug}.md when starting an execution session.

Cross-Session Handoff

Mechanical only — the exported file is available for the next session, but only if the user explicitly references it (or uses /execute-plan). There is no automatic injection.

Why This Is Now Obsolete

Claude Code's planDirectory setting does the same thing automatically at the platform level, with no plugin overhead. The planDirectory config key routes all Plan Mode outputs to a configured directory without requiring SessionEnd hook execution.

07

Orchestration

claude-code-plan-export — Orchestration

Multi-Agent: No

Single-agent only. The plugin is a passive file exporter, not an orchestration framework.

Orchestration Pattern: none

Execution Mode: one-shot

Each session end is an independent one-shot export event. No loops, no daemons.

Multi-Model: Yes (indirect)

The plugin's design philosophy explicitly enables multi-model workflows: plan with Opus (expensive, better reasoning), export plan, execute with Sonnet or Haiku (cheaper, faster). The plugin itself has no model routing — it just enables the user to manually switch models between sessions.

Isolation: none

Crash Recovery: no

If the session crashes before SessionEnd fires, the export does not happen.

08

Ui Cli Surface

claude-code-plan-export — UI & CLI Surface

CLI Binary: No

Slash Commands

  • /execute-plan — Execute most recent *plan-*.md in CWD
  • /export-project-plans — Batch export all plans

Local UI: None

Observability: Minimal

No logging beyond Python script output to stderr. Hook execution is silent on success.

Status: DEPRECATED

This plugin is archived. Use Claude Code's native planDirectory setting instead:

{
  "planDirectory": "./plans"
}

Related frameworks

same archetype · same primary tool · same memory type

MemPalace ★ 53k

Verbatim local-first AI memory with 96.6% R@5 retrieval on LongMemEval using zero API calls — structured into a palace hierarchy…

Beads (Yegge) ★ 24k

Dolt-powered distributed graph issue tracker where AI agents track tasks with hierarchical IDs and dependency edges, claim work…

deepagents (LangChain) ★ 23k

Opinionated Python agent harness on top of LangGraph with sub-agents, filesystem, memory, and context compaction bundled in

agentmemory ★ 18k

Persistent, searchable memory for AI coding agents that captures every tool interaction, compresses it via LLM, and injects…

Open Multi-Agent ★ 6.3k

Give a natural-language goal to a coordinator agent and get a dynamically decomposed, parallelized task DAG executed by…

Basic Memory ★ 3.1k

Gives AI agents a persistent, human-readable knowledge graph of project decisions, observations, and relations stored as plain…