How this command is triggered — by the user, by Claude, or both
Slash command
/forge:cleanupThis command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Forge Cleanup Command Remove all Forge interview state files to reset the plugin state. ## STEP 1: CHECK FOR STATE FILES First, check what state files exist: Also check for survey data: ## STEP 2: HANDLE RESULTS ### If NO state files exist: Tell the user: > No Forge state files found. Nothing to clean up. Then STOP. ### If state files exist: List the files that will be deleted, then ask the user for confirmation using AskUserQuestion: > "Found N state files and M survey directories. What should I clean up?" > - "State files only" — Remove state.md and draft.md (keep survey...
Remove all Forge interview state files to reset the plugin state.
First, check what state files exist:
ls -la forge-specs/*/state.md 2>/dev/null || echo "NO_STATE_FILES"
Also check for survey data:
ls -d forge-specs/*/survey/ 2>/dev/null || echo "NO_SURVEY_DATA"
Tell the user:
No Forge state files found. Nothing to clean up.
Then STOP.
List the files that will be deleted, then ask the user for confirmation using AskUserQuestion:
"Found N state files and M survey directories. What should I clean up?"
- "State files only" — Remove state.md and draft.md (keep survey data for reference)
- "Everything" — Remove entire forge-specs/ directory
- "Cancel" — Don't delete anything
Then execute based on their choice:
State files only:
rm -f forge-specs/*/state.md forge-specs/*/draft.md
Everything:
rm -rf forge-specs/
Then confirm to the user:
Forge cleanup complete.
To start a new interview, use:
/forge:plan "your feature name"
npx claudepluginhub alphabravocompany/codsworth-marketplace --plugin forge/cleanupArchives phase directories from completed milestones into versioned milestone directories under `.planning/milestones/`. Shows a dry-run summary and archives on user confirmation.
/cleanupCleans up code and project structure by removing dead code, optimizing imports/files, with analysis, safe execution, validation, and summary report. Supports target path and --type, --safe, --interactive flags.
/cleanupDetects and safely removes dead code, unused imports/exports, unreachable branches, and dependencies in JS/TS, Python, Go, Rust. Outputs categorized findings with confidence; runs tests post-removal.
/cleanupCleans .a5c/runs and .a5c/processes: aggregates insights from old completed/failed runs into docs/run-history-insights.md and removes them plus orphans. Supports --dry-run and --keep-days N flags.
/cleanupRemoves temporary design lab files from .claude-design/ directory and Next.js/Vite preview routes after user confirmation. Reports deletions.
/cleanupDeletes all Lisa interview state files (.claude/lisa-*.md and lisa-draft.md) to reset plugin state. Lists files first, confirms deletion, skips completed specs.