plan-delete

plan-delete is a command for Claude Code from oborchers/fractional-cto. It costs 27 tokens per session (1,488 once invoked), scanned B, original, MIT.

A command that clears the temporary plan file for the current Claude Code session and recreates it empty. Claude Code is a coding assistant that can keep a working plan during a session.

In plain words
What is it for?
Use it to reset the session's temporary plan before making a fresh implementation plan.
Why use it?
It removes accumulated planning notes when starting over. The command uses the current session information rather than asking which plan to delete.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions subagents; names the ExitPlanMode tool.

Part of the planning-tools plugin — 5 skills, 7 commands, 3 agents shipped together

Good fit Use it to reset the session's temporary plan before making a fresh implementation plan.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/oborchers/fractional-cto/plan-delete
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/oborchers/fractional-cto

Made for: Claude Code.

Or install planning-tools, the plugin that ships this one along with the rest of its 5 skills, 7 commands, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for plan-delete

README.md
[![agentmods](https://agentmods.dev/badge/commands/oborchers/fractional-cto/plan-delete/github.svg)](https://agentmods.dev/commands/oborchers/fractional-cto/plan-delete)
Your own site
<a href="https://agentmods.dev/commands/oborchers/fractional-cto/plan-delete"><img src="https://agentmods.dev/badge/commands/oborchers/fractional-cto/plan-delete/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for plan-delete

Your own site · 80×15
<a href="https://agentmods.dev/commands/oborchers/fractional-cto/plan-delete"><img src="https://agentmods.dev/badge/commands/oborchers/fractional-cto/plan-delete.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,488 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.01488
Opus 5.5 $0.00011 $0.00595
Sonnet 5.5 $0.00005 $0.00298
Haiku 4.5 $0.00003 $0.00149

Measured 5d ago against content hash b9e58b46c1ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

plan-delete scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

TRANSCRIPT="$(find "$HOME/.claude/projects" -name "${SESSION_ID}.jsonl" -type f 2>/dev/null | head -1)"
planning-tools/commands/plan-delete.md · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Clear the current session's Claude Code plan file. Plans accumulate in ~/.claude/plans/<slug>.md as plan mode is re-entered within a session — this command resets to a clean slate.

Follow these steps exactly. Do not prompt the user for confirmation; the explicit /planning-tools:plan-delete invocation is the confirmation.

Step 1: Detect the current session's plan slug

Claude Code stamps every transcript entry with a top-level "slug" field once plan mode is entered. That slug equals the plan filename (without .md). This is the authoritative signal — far more reliable than path-grepping or file mtime.

Run this bash one-liner:

SESSION_ID="${CLAUDE_CODE_SESSION_ID:-}"
if [ -z "$SESSION_ID" ]; then
  echo "ERROR: CLAUDE_CODE_SESSION_ID not set"; exit 1
fi
# Session IDs are globally unique UUIDs; find the transcript wherever it lives
# (more robust than computing the encoded-CWD path, which is fragile for paths with spaces/Unicode).
TRANSCRIPT="$(find "$HOME/.claude/projects" -name "${SESSION_ID}.jsonl" -type f 2>/dev/null | head -1)"
if [ -z "$TRANSCRIPT" ] || [ ! -f "$TRANSCRIPT" ]; then
  echo "NO_TRANSCRIPT"; exit 0
fi
SLUG="$(grep -m1 -o '"slug":"[^"]*"' "$TRANSCRIPT" 2>/dev/null | sed 's/"slug":"//; s/"$//')"
if [ -z "$SLUG" ]; then
  echo "NO_PLAN_FOUND"
else
  # Defense in depth: slugs are random adjective-style strings like "moonlit-swimming-petal".
  # Reject anything that could escape ~/.claude/plans/ (slashes, dots, control chars, spaces).
  case "$SLUG" in
    *[!a-z0-9-]*|""|*--*|-*|*-)
      echo "ERROR: malformed slug rejected: '$SLUG'"; exit 1 ;;
  esac
  PLAN_PATH="$HOME/.claude/plans/${SLUG}.md"
  echo "SLUG=$SLUG"
  echo "PLAN_PATH=$PLAN_PATH"
  ls -la "$PLAN_PATH" 2>/dev/null || echo "(file no longer exists on disk)"
fi

Interpret the output:

  • SLUG=<x> and PLAN_PATH=<path> → go to Step 3
  • NO_TRANSCRIPT or NO_PLAN_FOUND → go to Step 2 (bootstrap)

Step 2: Bootstrap a plan file (only if Step 1 returned NO_PLAN_FOUND / NO_TRANSCRIPT)

Read the full file on GitHub · 105 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 105 lines · 27 tokens per session scan B b9e58b46c1ec

Subscribe to this mod's changes

plan-delete is a command published in the GitHub repository oborchers/fractional-cto (32 stars, last pushed 5d ago), licensed MIT. It adds 27 tokens to every session and 1,488 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-13.