capture-plan
Warning: This project is under heavy development churn. Interfaces and features are evolving rapidly and may be unstable from version to version.
A Claude Code plugin that captures plans and execution summaries to an Obsidian vault.
What it does
The plugin captures three types of Claude Code sessions:
- Plan mode: On ExitPlanMode, captures the plan content, summarizes it with Claude Haiku, creates an Obsidian note with YAML frontmatter, and appends an entry to your daily journal. On Stop, creates a summary note with execution results, plus tools-stats, tools-log, and (if subagents were used) agent prompt notes.
- Superpowers: Auto-detects superpowers sessions by scanning the transcript for Write operations to spec/plan directories. Creates vault notes with
source: superpowers metadata. Specs and plans get separate sibling notes.
- Skill capture: Detects skill-only sessions and creates activity notes with a skill invocation table. Only skills listed in
capture_skills are captured as standalone sessions; skills used during plan-mode or superpowers sessions are always captured as sibling notes.
Notes are organized as (default calendar scheme):
Claude/Plans/
└── <yyyy>/
└── <mm-Month>/
└── <dd-Day>/
└── <counter>-<slug>/
├── plan.md
├── summary.md
├── tools-stats.md
├── tools-log.md
└── agents/ (if subagents used)
Session documents (when session.enabled = true):
Claude/Sessions/
└── <project>/
├── 001-<id-prefix>.md
├── 002-<id-prefix>.md
└── …
Prerequisites
-
Bun runtime (v1.0+)
bun --version
-
Obsidian CLI — the obsidian command must be available on PATH
obsidian --help # should print "Obsidian CLI" and a list of commands
-
An Obsidian vault — verify yours is visible to the CLI:
obsidian vaults # should list your vault names
Installation
Option A: CLI (recommended)
-
Add the marketplace:
claude plugin marketplace add kriswill/capture-plan
-
Install the plugin:
claude plugin install capture-plan@kriswill
Option B: Manual settings.json
-
Add both the marketplace and the enabled flag to ~/.claude/settings.json:
{
"extraKnownMarketplaces": {
"kriswill": {
"source": {
"source": "github",
"repo": "kriswill/capture-plan"
}
}
},
"enabledPlugins": {
"capture-plan@kriswill": true
}
}
-
Restart Claude Code, or run /reload-plugins inside an active session.
Verify
After installation, confirm the hooks are active:
/reload-plugins output should include the capture-plan hooks in its count.
- Enter plan mode, write a plan, and exit. Check that a note appears under
Claude/Plans/ in your vault.
Troubleshooting
Debug logs with ISO timestamps are written to two files:
/tmp/capture-plan-debug.log — ExitPlanMode hook: plan extraction, Haiku summarization, vault note creation, journal appends
/tmp/capture-done-debug.log — Stop hook: transcript parsing, session type detection, summary/tools-stats/tools-log generation
Logs accumulate across sessions. To start fresh:
rm /tmp/capture-plan-debug.log /tmp/capture-done-debug.log
Configuration
The plugin ships with a default config. Override settings at any of these locations (highest priority wins):
- Project local:
$PROJECT/.claude/capture-plan.toml
- User global:
~/.config/capture-plan/config.toml
- Plugin default:
capture-plan.toml (shipped with plugin)
Config options
# Obsidian vault name (run `obsidian vaults` to list available vaults)
vault = "Personal"
# Override the project name (default: directory name)
# project_name = "my-project"
# Plan notes configuration
[plan]
path = "Claude/Plans"
date_scheme = "calendar" # calendar | compact | monthly | flat
# Journal entries configuration
[journal]
path = "Journal"
date_scheme = "calendar" # calendar | compact | monthly | flat
# Context window cap in tokens (auto-detected, override if needed)
# Standard: 200000, Max/Enterprise: 1000000
# context_cap = 1000000
# Superpowers integration — auto-detected from transcript at session end.
# Override patterns if superpowers writes to non-default directories.
# superpowers_spec_pattern = "/superpowers/specs/"
# superpowers_plan_pattern = "/superpowers/plans/"
# Skills to capture as standalone sessions (whitelist).
# Only skill-only sessions matching this list are captured.
# Skills during plan-mode/superpowers sessions are always captured.
# capture_skills = ["simplify"]