Skip to main content

config-gc

Facilitates garbage collection for Claude Code configurations, ensuring optimal performance by removing redundant and stale items.

Install this skill

or
37/100

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

medium line 3

Access to hidden dotfiles in home directory

SourceSKILL.md
3description: Garbage collection for your Claude Code configuration. Periodically scans ~/.claude (skills, memory, hooks, permissions, MCP servers, caches) for redundant, stale, orphaned, or low-value
medium line 26

Access to hidden dotfiles in home directory

SourceSKILL.md
264. **Soft-delete first.** Rename to `.disabled` > move to `~/.claude/_gc_trash/` > real deletion. Always keep an undo path.
medium line 28

Access to hidden dotfiles in home directory

SourceSKILL.md
286. **Keep a log.** Every GC run appends to `~/.claude/gc_log.md`: what was touched, why, and how to undo it.
medium line 34

Access to hidden dotfiles in home directory

SourceSKILL.md
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 |
medium line 35

Access to hidden dotfiles in home directory

SourceSKILL.md
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
medium line 36

Access to hidden dotfiles in home directory

SourceSKILL.md
36| 3 | Hooks | `~/.claude/hooks/` + settings | Scripts present on disk but referenced by no hook config; old versions superseded by rewrites |
medium line 38

Access to hidden dotfiles in home directory

SourceSKILL.md
38| 5 | MCP servers | `~/.claude.json` or project `.mcp.json` | Servers that fail to connect; functional duplicates; long-unused |
medium line 40

Access to hidden dotfiles in home directory

SourceSKILL.md
40| 7 | Project history | `~/.claude/projects/*/` | Stale handoff snapshots; session records superseded by newer state |
medium line 49

Access to hidden dotfiles in home directory

SourceSKILL.md
495. **Log** the run to `~/.claude/gc_log.md`: timestamp, items actioned, undo instructions.
low line 57

Access to hidden dotfiles in home directory

SourceSKILL.md
57for f in ~/.claude/hooks/*; do
low line 59

Access to hidden dotfiles in home directory

SourceSKILL.md
59grep -rq "$name" ~/.claude/settings.json ~/.claude/settings.local.json 2>/dev/null \
low line 67

Access to hidden dotfiles in home directory

SourceSKILL.md
67jq -r '.permissions.allow[]' ~/.claude/settings.local.json | sort | uniq -d
low line 68

Access to hidden dotfiles in home directory

SourceSKILL.md
68if jq -e '.permissions.allow | index("Bash(*)")' ~/.claude/settings.local.json >/dev/null; then
low line 69

Access to hidden dotfiles in home directory

SourceSKILL.md
69jq -r '.permissions.allow[]' ~/.claude/settings.local.json \
low line 77

Access to hidden dotfiles in home directory

SourceSKILL.md
77find ~/.claude/file-history ~/.claude/shell-snapshots -type f -mtime +30 \
low line 85

Access to hidden dotfiles in home directory

SourceSKILL.md
85mkdir -p ~/.claude/_gc_trash/$gc_date
low line 86

Access to hidden dotfiles in home directory

SourceSKILL.md
86mv ~/.claude/skills/dead-skill ~/.claude/_gc_trash/$gc_date/
low line 87

Access to hidden dotfiles in home directory

SourceSKILL.md
87echo "$(date -Iseconds) moved skills/dead-skill -> _gc_trash/$gc_date/ (undo: mv back)" >> ~/.claude/gc_log.md
low line 93

Access to hidden dotfiles in home directory

SourceSKILL.md
93cp ~/.claude/settings.local.json ~/.claude/settings.local.json.bak
low line 94

Access to hidden dotfiles in home directory

SourceSKILL.md
94echo "$(date -Iseconds) removed permission entry: Bash(git push) (undo: restore from .bak or re-add)" >> ~/.claude/gc_log.md
low line 95

Access to hidden dotfiles in home directory

SourceSKILL.md
95jq '.permissions.allow -= ["Bash(git push)"]' ~/.claude/settings.local.json.bak \
low line 96

Access to hidden dotfiles in home directory

SourceSKILL.md
96> ~/.claude/settings.local.json
medium line 105

Access to hidden dotfiles in home directory

SourceSKILL.md
105- **Touching anything outside `~/.claude`** (or the project's `.claude/`). Config GC never wanders into source trees.
Scanned on Jun 24, 2026
View Security Dashboard
Installation guide →
GitHub Stars 220.9K
Rate this skill
Categorysales
UpdatedAugust 9, 2026
affaan-m/ECC