Agent skill · operations · affaan-m

config-gc

Garbage collection for your Claude Code configuration. Periodically scans ~/.claude (skills, memory, hooks, permissions, MCP servers, caches) for redundant, stale, orphaned, or low-value items, then walks the user through a confirm-each-deletion cleanup. Use when the user says "clean up my config", "config GC", "too many skills", "audit my setup", "my .claude is bloated", or asks for a periodic config review.

Why this skill is useful

Adds a structured workflow for periodic configuration cleanup that the AI wouldn't reliably generate on its own.

What it needs

About 5k tokens when loaded. Last updated 2026-08-06. 238,342 stars on the source repository.

What this skill does

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/gctrash/ > 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/gclog.md: what was touched, why, and how to undo it. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills affaan-m/config-gc--055f01

View the source on GitHub

Browse the @skills marketplace