config-gc

Audits Claude Code configuration directories and removes stale items with per-item confirmation.

Updated May 7, 2026
One-click install
npx skills add https://github.com/mirzadham/trainingroombookingsystem2 --skill config-gc-mirzadham
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: config-gc
Source: https://github.com/mirzadham/trainingroombookingsystem2/tree/main/.pi/skills/config-gc
Command: npx skills add https://github.com/mirzadham/trainingroombookingsystem2 --skill config-gc-mirzadham

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Claude Code configurations accumulate skills, memory files, hooks, permission entries, MCP servers, and caches that are never removed, leading to bloat, redundancy, and slower session startup. This Skill periodically scans ~/.claude for stale, orphaned, or redundant items and walks you through a safe, confirm-each-deletion cleanup. ## Core Features & Use Cases - Eight Scan Channels: Audits skills, memory files, hooks, permission entries, MCP servers, scheduled jobs, project history, and runtime caches, each with its own staleness signals. - Human-in-the-Loop Deletion: Every candidate is presented with evidence and requires an individual [y/n/skip] confirmation; no bulk approval. - Soft-Delete with Undo: Items are renamed to .disabled or moved to ~/.claude/_gc_trash/ before any hard deletion, and every run is logged to gc_log.md with undo instructions. - Use Case: After installing a large skill pack, run a config audit to find overlapping skills, orphaned hook scripts, and redundant permission entries, then reclaim disk space from stale caches older than 30 days. ## Quick Start Ask the assistant to clean up your Claude Code config by scanning ~/.claude for stale skills, hooks, and permissions and confirming each deletion one by one.

Frequently Asked Questions about config-gc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up my Claude Code configuration?▼

Run a config garbage collection that scans ~/.claude across eight channels including skills, hooks, permissions, and caches. Each candidate is shown with evidence and requires an individual y/n/skip confirmation before any action is taken.

How to find orphaned hook scripts in Claude Code settings?▼

Compare files in ~/.claude/hooks/ against references in settings.json and settings.local.json using grep. Scripts present on disk but referenced by no hook configuration are flagged as orphans for removal.

Does config cleanup delete files permanently?▼

No, deletion is soft by default. Skills and hooks are renamed to .disabled or moved to ~/.claude/_gc_trash/<date>/, and every action is logged to gc_log.md with undo instructions. Hard deletion only happens when explicitly requested.

How are redundant permission entries removed from settings.json?▼

The settings file is backed up first, the removed entry is recorded verbatim in gc_log.md, then jq edits the permissions.allow array. Duplicates and specific grants shadowed by wildcards like Bash(*) are the primary targets.

When should I not run a config garbage collection?▼

Do not use it for cleaning project source code, clearing chat history, or uninstalling Claude Code. It only touches ~/.claude or a project's .claude directory and never wanders into source trees.

Why is old configuration not automatically deleted?▼

Age is a signal, not a verdict, since a skill unused for 60 days may be seasonal. Every candidate requires human confirmation precisely because automated deletion could remove items that are still periodically needed.