From 1fefd7d88626bfec465f5b54fc7ab82e63666cf2 Mon Sep 17 00:00:00 2001 From: Otto Jongerius Date: Sat, 14 Feb 2026 14:19:17 +1300 Subject: [PATCH] Add save-plan skill for archiving plans by repo and branch Saves plan mode output to ~/.claude/plans/// with timestamped filenames so plan revisions stack up over time. --- claude/skills/save-plan/SKILL.md | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 claude/skills/save-plan/SKILL.md diff --git a/claude/skills/save-plan/SKILL.md b/claude/skills/save-plan/SKILL.md new file mode 100644 index 0000000..8fa664a --- /dev/null +++ b/claude/skills/save-plan/SKILL.md @@ -0,0 +1,34 @@ +--- +name: save-plan +description: Save the current plan to ~/.claude/plans/ +disable-model-invocation: true +user-invocable: true +--- + +# Save Plan + +Save the plan from the current session to `~/.claude/plans/`, organized by repo and branch. + +## Directory structure + +``` +~/.claude/plans/// + YYYY-MM-DD-HHMMSS.md +``` + +- ``: basename of the git repo root (e.g. `dotfiles`) +- ``: current git branch or worktree branch (e.g. `add/auth-middleware`) + +Example: `~/.claude/plans/dotfiles/add/auth-middleware/2026-02-14-143022.md` + +## Steps + +1. Detect the git repo name (`git rev-parse --show-toplevel | xargs basename`) and current branch (`git branch --show-current`). +2. Create `~/.claude/plans///` if it doesn't exist. +3. Write the plan as a markdown file named `YYYY-MM-DD-HHMMSS.md` (timestamp at time of save). +4. Include a YAML frontmatter block at the top with: + - `date`: full ISO 8601 timestamp + - `repo`: repo name + - `branch`: branch name +5. Then include the full plan content as markdown. +6. Confirm the file path to the user.