config-gc
यह क्या करती है
यह एजेंट आपकी Claude Code कॉन्फ़िगरेशन फ़ाइलों को व्यवस्थित करने में मदद करता है। यह पुरानी, डुप्लिकेट या बेकार चीज़ें खोजता है और उन्हें हटाने में मदद करता है, ताकि सब कुछ साफ़ और तेज़ रहे।
कब इस्तेमाल करें
- ✓जब आपको लगे कि आपके पास बहुत सारी 'skills' या कॉन्फ़िगरेशन इकट्ठा हो गए हैं।
- ✓अगर Claude Code शुरू होने में धीमा लगे।
- ✓अपनी सेटिंग्स की महीने में एक बार समीक्षा के लिए।
Skill का लिंक
https://github.com/affaan-m/ECC/blob/main/skills/config-gc/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी Claude Code कॉन्फ़िग साफ़ करो”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह समय-समय पर आपकी कॉन्फ़िगरेशन फ़ाइलों में ऐसी चीज़ें जाँचता है जो अब इस्तेमाल नहीं होतीं या दोहराई गई हैं। फिर यह बताता है कि क्या मिला, और एक-एक करके पूछता है कि क्या आप हर चीज़ को हटाना चाहते हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
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
- Append-only configs leak. Skills, memory files, hooks, and permission entries only ever get added. Without periodic review they rot silently.
- Regular audits beat one-time purges. Scan every ~30 days, propose a small batch of candidates each time.
- Per-channel strategies. Each accumulation type (skills, hooks, permissions, ...) has its own staleness signals — don't apply one rule everywhere.
- Soft-delete first. Rename to
.disabled> move to~/.claude/_gc_trash/> real deletion. Always keep an undo path. - Forced human-in-the-loop. Every candidate gets its own
[y/n/skip]confirmation. No "yes to all" shortcut. - 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 >30 days old and large |
Workflow
- Scan all channels (or the subset the user names). Collect candidates with: path, channel, signal that flagged it, size, last-modified.
- Rank by confidence (broken/orphaned = high; merely old = low) and present as a numbered table. Cap each run at ~20 candidates — GC is periodic, not exhaustive.
- Confirm one by one. For each candidate show the evidence, then ask
[y/n/skip]. The user can stop at any point. - Soft-delete confirmed items: prefer
.disabledrename for skills/hooks and_gc_trash/<date>/move for files. Permission entries live in JSON (no comments possible): back up the settings file, record each removed entry verbatim ingc_log.md, then remove it from theallowarray withjq. Only hard-delete when the user explicitly asks. - Log the run to
~/.claude/gc_log.md: timestamp, items actioned, undo instructions. - Report: reclaimed size, channels still healthy, suggested next review date.
Example Scan Commands
Orphaned hook scripts (channel 3) — scripts on disk that no hook config references:
for f in ~/.claude/hooks/*; do
name=$(basename "$f")
grep -rq "$name" ~/.claude/settings.json ~/.claude/settings.local.json 2>/dev/null \
|| echo "ORPHAN: $f"
done
Redundant permission entries (channel 4) — duplicates, and specific grants shadowed by a wildcard:
jq -r '.permissions.allow[]' ~/.claude/settings.local.json | sort | uniq -d
…
अक्सर पूछे जाने वाले सवाल
'skills', 'memory', 'hooks' और 'permissions' क्या हैं?
ये Claude Code के लिए कॉन्फ़िगरेशन के अलग-अलग प्रकार हैं। 'Skills' छोटे प्रोग्राम जैसे हैं, 'memory' जानकारी सेव रखती है, 'hooks' किसी घटना पर प्रतिक्रिया देते हैं, और 'permissions' तय करते हैं कि Claude Code क्या कर सकता है।
क्या यह मुझसे पूछे बिना कुछ डिलीट कर देगा?
नहीं। यह हमेशा बताएगा कि उसे क्या मिला, और कुछ भी हटाने से पहले आपकी अनुमति माँगेगा। पूरा नियंत्रण आपके पास है।
अगर मैंने गलती से कुछ डिलीट कर दिया तो क्या मैं उसे वापस ला सकता हूँ?
हाँ। यह चीज़ों को स्थायी रूप से मिटाने के बजाय उन्हें 'trash' फ़ोल्डर में डालने की या '.disabled' नाम देने की कोशिश करता है, ताकि ज़रूरत पड़ने पर आप उन्हें वापस ला सकें।
जानकारी
लेखक का मूल विवरण
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 co
repo: affaan-m/ECC
लोकप्रियता
- GitHub स्टार
- 280k
- रैंकिंग में स्थान
- #281
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
accessibility
280kयह आपके एजेंट को ऐसे इंटरफ़ेस बनाने में मदद करता है जिन्हें हर कोई इस्तेमाल कर सके। यह पक्का करता है कि वेबसाइट और ऐप दिव्यांग लोगों के लिए भी अच्छे से काम करें, जैसे नेत्रहीन या जिन्हें चलने-फिरने में दिक्कत होती है।
agent-architecture-audit
280kयह आपके एजेंट को जाँचने देता है कि सब कुछ सही से चल रहा है। यह AI सिस्टम में समस्याएँ ढूँढकर ठीक करता है, ताकि वे उम्मीद के मुताबिक काम करें।
agent-eval
280kयह आपके एजेंट को अलग-अलग AI coding tools की तुलना करने में मदद करता है। यह मापता है कि किसी खास काम के लिए कौन सा टूल ज़्यादा तेज़, सस्ता और भरोसेमंद है।
agent-harness-construction
280kयह आपके एजेंट को काम कैसे करना है, यह बेहतर समझने में मदद करता है। यह उन tools और instructions को बेहतर बनाता है जिनका एजेंट इस्तेमाल करता है, ताकि उसकी सफलता की संभावना बढ़े।
मिलती-जुलती skills
knowledge-automation
394kयह आपके एजेंट को एक नियमित काम सेट करने देती है जो समय-सारणी पर Knowledge vault में नई सामग्री जोड़ता है, फिर जांचता है कि काम चल रहा है।
knowledge-source-ingest
394kयह आपके एजेंट को चैट चैनल, फ़ीड या मेलबॉक्स से आई नई चीज़ों से Knowledge vault अपडेट रखने देती है, बिना वह दोबारा जोड़े जो पहले से है।
watchers
260kआपके एजेंट को RSS फ़ीड, JSON endpoints या GitHub गतिविधि को तय समय पर देखने देती है, और केवल पिछली जांच के बाद नए आइटम की सूचना देती है।