← ClaudeAtlas

prune-plans-pblisted

Delete old plan versions or entire plans based on retention preferences, explicit age, or interactive selection. Keeps the latest version of each plan by default.
brennacodes/brenna-plugs · ★ 1 · Testing & QA · score 70
Install: claude install-skill brennacodes/brenna-plugs
<purpose> Prune old plan versions from `~/.things/playbook/plans/`. Three modes: use the configured `plan_retention_days` preference (default), specify `--older-than <days>` explicitly, or use `--interactive` to pick specific plans or versions. Default and `--older-than` modes delete old VERSIONS but always keep the latest version per slug. Interactive mode allows deleting entire plans or specific versions. </purpose> <critical-constraint> Never delete the only remaining version of a plan. If a plan directory has only one `v*.md` file, it cannot be pruned in age-based modes. In interactive mode, warn the user and require explicit confirmation. </critical-constraint> <steps> <step id="load-config" number="1"> <description>Load Configuration</description> <load-config> <action>Resolve the user's home directory.</action> <command language="bash" output="home" tool="Bash">echo $HOME</command> <constraint>Never pass `~` to the Read tool.</constraint> <read path="<home>/.things/config.json" output="config" /> <if condition="config-missing">Tell the user: "Run `/things:setup-things` first." Then stop.<exit /></if> <read path="<home>/.things/playbook/preferences.json" output="preferences" /> <if condition="preferences-missing">Tell the user: "Run `/setup-pb` first." Then stop.<exit /></if> </load-config> </step> <step id="determine-mode" number="2"> <description>Determine Pruning Mode</description> <action>Pa