Cache Cleanup
Remove old cached plugin versions from ~/.claude/plugins/cache/. Claude Code
keeps every version it has ever downloaded — this skill prunes all but the
latest version of each plugin.
Workflow
Scan (dry-run): Always run the script in dry-run mode first:
node "${CLAUDE_SKILL_DIR}/../../scripts/cleanup.js" --dry-runReport: Show the user the output — which old versions would be removed and how much space would be freed. If no old versions are found, tell the user the cache is already clean and stop.
Confirm: Use the
AskUserQuestiontool with a yes/no question to ask the user if they want to proceed with deletion. Do NOT delete without explicit confirmation via this tool.Delete: Only after the user confirms, run:
node "${CLAUDE_SKILL_DIR}/../../scripts/cleanup.js" --deleteReport results: Show the user what was deleted and total space freed.