config-gc
하는 일
이 에이전트는 Claude Code 설정 파일을 정리하도록 돕습니다. 오래되었거나 중복되거나 불필요한 항목을 찾아, 더 깔끔하고 빠르게 유지하도록 제거하는 것을 돕습니다.
사용하는 경우
- ✓스킬이나 설정이 너무 많다고 느낄 때.
- ✓Claude Code 시작이 느린 것 같을 때.
- ✓설정을 월간으로 점검할 때.
스킬 링크
https://github.com/affaan-m/ECC/blob/main/skills/config-gc/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Claude Code 설정을 정리해 주세요.”
매주 새 스킬 5개. 읽는 데 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
…
자주 묻는 질문
‘스킬’, ‘메모리’, ‘훅’, ‘권한’은 무엇인가요?
Claude Code의 서로 다른 설정 유형입니다. ‘스킬’은 작은 프로그램, ‘메모리’는 정보를 저장하는 곳, ‘훅’은 이벤트에 반응하는 기능, ‘권한’은 Claude Code가 할 수 있는 일을 제어하는 것입니다.
확인 없이 무언가를 삭제하나요?
아니요. 무엇을 찾았는지 항상 보여 주고, 제거하기 전에 허락을 구합니다. 사용자가 모든 것을 통제합니다.
실수로 삭제하면 되돌릴 수 있나요?
네. 항목을 영구 삭제하지 않고 ‘휴지통’ 폴더로 옮기거나 ‘.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
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
accessibility
280k에이전트가 모든 사람이 쓸 수 있는 인터페이스를 만들도록 돕습니다. 시각 장애나 운동 장애가 있는 사람도 쓸 수 있게 합니다.
agent-architecture-audit
280k에이전트가 모든 것이 올바르게 작동하는지 점검하도록 돕습니다. AI 시스템의 문제를 찾아 고쳐서 기대대로 작동하게 합니다.
agent-eval
280k에이전트가 서로 다른 AI 코딩 도구를 비교하도록 돕습니다. 특정 작업에서 어느 도구가 더 빠르고, 저렴하고, 믿을 만한지 측정합니다.
agent-harness-construction
280k에이전트가 작업을 더 잘 이해하도록 돕습니다. 에이전트가 쓰는 도구와 지시문을 최적화해 성공 가능성을 높입니다.
비슷한 스킬
knowledge-automation
394k에이전트가 정해진 일정에 따라 새 콘텐츠를 Knowledge 볼트에 넣는 반복 작업을 설정하고, 작업이 실행되는지 확인하도록 돕습니다.
knowledge-source-ingest
394k에이전트가 이미 저장한 항목은 다시 추가하지 않고, 채팅 채널이나 피드의 새 항목을 Knowledge 보관함에 계속 반영하도록 돕습니다.
watchers
260kRSS 피드, JSON 엔드포인트, GitHub 활동을 일정에 따라 감시하고, 마지막 확인 이후 새로 생긴 항목만 보고하도록 에이전트를 돕습니다.