config-gc
🤖 AI Summary
Config GC scans a user's Claude Code configuration for unused, redundant, expired, or low-value skills, hooks, and settings, then presents a list of candidates for the user to manually approve deletion—it never removes anything autonomously.
How to Install
Claude Code:
git clone --depth 1 https://github.com/affaan-m/ECC.git && cp ECC/skills/config-gc ~/.claude/skills/config-gc -r# Config GC — Garbage Collection for Claude Code Setups
Borrowed from runtime garbage collection: periodically scan for objects that are no longer referenced, redundant, expired, or low-value, and reclaim the space. The critical difference: **here, collection requires a human in the loop. Never delete autonomously.**
## When to Activate
- The user asks to clean up, audit, or slim down their Claude Code configuration
- The user complains about too many skills, noisy hooks, or slow session startup
- A monthly/periodic config review is due
- After installing a large skill pack (e.g. this repo), to reconcile overlaps with existing setup
Do NOT activate for: cleaning project source code (that's refactoring), clearing chat history, or uninstalling Claude Code itself.
## Design Philosophy
1. **Append-only configs leak.** Skills, memory files, hooks, and permission entries only ever get added. Without periodic review they rot silently.
2. **Regular audits beat one-time purges.** Scan every ~30 days, propose a small batch of candidates each time.
3. **Per-channel strategies.** Each accumulation type (skills, hooks, permissions, ...) has its own staleness signals — don't apply one rule everywhere.
4. **Soft-delete first.** Rename to `.disabled` > move to `~/.claude/_gc_trash/` > real deletion. Always keep an undo path.
5. **Forced human-in-the-loop.** Every candidate gets its own `[y/n/skip]` confirmation. No "yes to all" shortcut.
6. **Keep a log.** Every GC run appends to `~/.claude/gc_log.md`: what was touched, why, and how to undo it.
## Scan Channels
| # | Channel | Path | Staleness / redundancy signals |
|---|---------|------|--------------------------------|
| 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 |
| 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-word fragments that should merge |
| 3 | Hooks | `~/.claude/hooks/` + settings | Scripts present on disk but referenced by no hook config; old versions superseded by rewrites |
| 4 | Permissions | `permissions.allow` in `settings.json` / `settings.local.json` | Duplicate entries; specific entries already covered by a wildcard (e.g. `Bash(git push)` when `Bash(*)` is allowed); one-off grants from past experiments |
| 5 | MCP servers | `~/.claude.json` or project `.mcp.json` | Servers that fail to connect; functional duplicates; long-unused |
| 6 | Scheduled reminders / jobs | wherever the user keeps them | Fired one-shots older than 30 days; jobs whose target scripts no longer exist |
| 7 | Project history | `~/.claude/projects/*/` | Stale handoff snapshots; session records superseded by newer state |
| 8 | Runtime caches | `cache/`, `file-history/`, `logs/`, `shell-snapshots/` | Sort by size and mtime; propose items
Details
| Category | Coding → generation |
| Source | affaan-m/ECC |
| SKILL.md | View on GitHub → |
| Repo Stars | ★ 220.5K |
| Est. per Skill | N/A (shared across 121 skills from this repo) |
| Difficulty | Intermediate |
| Risk Level | N/A |
Related Skills
jq
jq — JSON Querying and Transformation Overview jq is the standard CLI tool for querying and reshapin
animejs-animation
Anime.js Animation Skill Anime.js is a lightweight but extremely powerful JavaScript animation engin
cc-skill-continuous-learning
cc-skill-continuous-learning Development skill skill. When to Use This skill is applicable to execut
git-hooks-automation
Git Hooks Automation Automate code quality enforcement at the Git level. Set up hooks that lint, for
Works Well With
Skills from the same repository — often designed to work together
accessibility
Accessibility (WCAG 2.2) This skill ensures that digital interfaces are Perceivable, Operable, Under
agent-architecture-audit
Agent Architecture Audit A diagnostic workflow for agent systems that hide failures behind wrapper l
agent-eval
Agent Eval Skill A lightweight CLI tool for comparing coding agents head-to-head on reproducible tas