From jc
Removes task directories from .planning/ with interactive selection and confirmation. Use when removing task directories from .planning/. Do NOT use for modifying plan state (use jc:implement).
How this skill is triggered — by the user, by Claude, or both
Slash command
/jc:cleanupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
1. **Always present a multiSelect list.** Even if the user says "just remove them all" or "I trust you" — present the list and let them confirm. This is not optional. The confirmation step is the entire point of the skill: it prevents accidental deletion and provides an audit trail.
.planning/codebase/. It is the shared codebase map regenerated by jc:map and referenced by every active task. Deleting it forces a full re-map and breaks in-progress plans. Do not list it, do not offer to remove it, do not suggest it might be stale.List only directories (ignore loose files):
ls -d .planning/*/ 2>/dev/null
If .planning/ doesn't exist or has no subdirectories: report "No .planning/ directory found" and stop.
Filter results: exclude codebase/. Everything else is a task-scoped directory.
If no task directories remain after filtering: report "No task directories to clean up" and stop.
For each task directory, read .planning/{task-id}/plans/PLAN.md frontmatter to extract status:
| Status found | Label |
|---|---|
completed | Completed |
paused | Paused |
executing | Executing |
verifying | Verifying |
planning | Planned |
No plans/PLAN.md found | No plan |
PLAN.md exists but status unreadable | Unknown |
Use AskUserQuestion with multiSelect: true. Each option is a task directory with its status label.
Format each option label as: {task-id} ({status label})
Description for each: brief context (e.g., wave progress if available, "research only" if no plan).
If no directories are selected (or user cancels), report "Nothing selected — no changes made" and stop.
For each user-selected directory:
rm -rf .planning/{task-id} # {task-id} = directory basename from Step 1
Verify each deletion succeeded. If any rm -rf fails, report which directories could not be removed and stop before committing.
Stage only the deleted paths:
git add .planning/{task-id-1} .planning/{task-id-2} ...
Commit with a message listing removed directories:
chore: clean up planning directories
Removed:
- .planning/{task-id-1}
- .planning/{task-id-2}
| Excuse | Reality |
|---|---|
| "User said 'just do it' so I'll skip confirmation" | See Principle #1 — the confirmation IS the skill, regardless of user urgency |
| "All tasks are completed, no need to ask" | Users may want to keep completed tasks for reference. Always let them choose |
| "I'll also clean up codebase/ since it looks stale" | codebase/ is never a cleanup target. It's shared infrastructure managed by /jc:map |
| "I'll use git add -A to stage everything" | -A can catch unrelated changes. Stage only the specific deleted paths |
jc:implement — modifies plan state (status fields, execution)jc:map — manages .planning/codebase/jc:status — read-only reporting on .planning/ statenpx claudepluginhub jamesacarr/claude --plugin jcManages execution plans as versioned Markdown artifacts with progress tracking, decision logs, and archiving in .agents/plans. Use for creating, updating, or archiving plans in complex multi-step work.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.