config-gc
Facilitates garbage collection for Claude Code configurations, ensuring optimal performance by removing redundant and stale items.
Install this skill
Security score
The config-gc skill was audited on Jun 24, 2026 and we found 23 security issues across 1 threat category. Review the findings below before installing.
Categories Tested
Security Issues
Access to hidden dotfiles in home directory
| 3 | description: Garbage collection for your Claude Code configuration. Periodically scans ~/.claude (skills, memory, hooks, permissions, MCP servers, caches) for redundant, stale, orphaned, or low-value |
Access to hidden dotfiles in home directory
| 26 | 4. **Soft-delete first.** Rename to `.disabled` > move to `~/.claude/_gc_trash/` > real deletion. Always keep an undo path. |
Access to hidden dotfiles in home directory
| 28 | 6. **Keep a log.** Every GC run appends to `~/.claude/gc_log.md`: what was touched, why, and how to undo it. |
Access to hidden dotfiles in home directory
| 34 | | 1 | Skills | `~/.claude/skills/*/` | Heavily overlapping names; never triggered in recent transcripts; domain mismatch with the user's actual work; broken or empty SKILL.md | |
Access to hidden dotfiles in home directory
| 35 | | 2 | Memory | `~/.claude/**/memory/*.md` + its index | Multiple index entries for one topic; contents contradicting newer entries; dates that have passed; orphan files missing from the index; sub-100 |
Access to hidden dotfiles in home directory
| 36 | | 3 | Hooks | `~/.claude/hooks/` + settings | Scripts present on disk but referenced by no hook config; old versions superseded by rewrites | |
Access to hidden dotfiles in home directory
| 38 | | 5 | MCP servers | `~/.claude.json` or project `.mcp.json` | Servers that fail to connect; functional duplicates; long-unused | |
Access to hidden dotfiles in home directory
| 40 | | 7 | Project history | `~/.claude/projects/*/` | Stale handoff snapshots; session records superseded by newer state | |
Access to hidden dotfiles in home directory
| 49 | 5. **Log** the run to `~/.claude/gc_log.md`: timestamp, items actioned, undo instructions. |
Access to hidden dotfiles in home directory
| 57 | for f in ~/.claude/hooks/*; do |
Access to hidden dotfiles in home directory
| 59 | grep -rq "$name" ~/.claude/settings.json ~/.claude/settings.local.json 2>/dev/null \ |
Access to hidden dotfiles in home directory
| 67 | jq -r '.permissions.allow[]' ~/.claude/settings.local.json | sort | uniq -d |
Access to hidden dotfiles in home directory
| 68 | if jq -e '.permissions.allow | index("Bash(*)")' ~/.claude/settings.local.json >/dev/null; then |
Access to hidden dotfiles in home directory
| 69 | jq -r '.permissions.allow[]' ~/.claude/settings.local.json \ |
Access to hidden dotfiles in home directory
| 77 | find ~/.claude/file-history ~/.claude/shell-snapshots -type f -mtime +30 \ |
Access to hidden dotfiles in home directory
| 85 | mkdir -p ~/.claude/_gc_trash/$gc_date |
Access to hidden dotfiles in home directory
| 86 | mv ~/.claude/skills/dead-skill ~/.claude/_gc_trash/$gc_date/ |
Access to hidden dotfiles in home directory
| 87 | echo "$(date -Iseconds) moved skills/dead-skill -> _gc_trash/$gc_date/ (undo: mv back)" >> ~/.claude/gc_log.md |
Access to hidden dotfiles in home directory
| 93 | cp ~/.claude/settings.local.json ~/.claude/settings.local.json.bak |
Access to hidden dotfiles in home directory
| 94 | echo "$(date -Iseconds) removed permission entry: Bash(git push) (undo: restore from .bak or re-add)" >> ~/.claude/gc_log.md |
Access to hidden dotfiles in home directory
| 95 | jq '.permissions.allow -= ["Bash(git push)"]' ~/.claude/settings.local.json.bak \ |
Access to hidden dotfiles in home directory
| 96 | > ~/.claude/settings.local.json |
Access to hidden dotfiles in home directory
| 105 | - **Touching anything outside `~/.claude`** (or the project's `.claude/`). Config GC never wanders into source trees. |