From claude-cleanup
Use when the user says "clean up claude.json", "remove stale projects", "prune old project entries", "clean up my Claude project history", or wants to remove project entries from ~/.claude.json whose directories no longer exist on disk.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-cleanup:claude-cleanupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Remove project entries from `~/.claude.json` whose directories no longer exist
Remove project entries from ~/.claude.json whose directories no longer exist
on disk.
~/.claude.json for other reasonsThe system-reminder at load time contains: Base directory for this skill: <path>
Use that value to derive the plugin root:
# SKILL_BASE = the base directory shown in the system context
PLUGIN_ROOT="${SKILL_BASE%/skills/claude-cleanup}"
SCRIPT="$PLUGIN_ROOT/scripts/cleanup.sh"
Use $SCRIPT for all bash invocations below.
Run:
bash "$SCRIPT" --dry-run
Ask the user with AskUserQuestion:
If the user chose Yes, invoke the /insights built-in using the Skill
tool with skill name insights. Wait for it to complete before proceeding.
Run:
bash "$SCRIPT" --clean
Report the output to the user: number of entries removed and backup location
(~/.claude.json.bak).
npx claudepluginhub gchiam/claude-code-plugins --plugin claude-cleanupScans Claude Code config (skills, memory, hooks, permissions, MCP servers, caches) for stale or redundant items and walks the user through confirm-each-deletion cleanup.
Analyzes Claude Code environment for token waste in skills, plugins, memory files, and CLAUDE.md; proposes and performs safe cleanups with user approval. Invoke via /claude-slim for token optimization.
Audits Claude Code project health: verifies CLAUDE.md accuracy against codebase, checks memory hygiene, audits settings and plans, discovers patterns, proposes cleanups.