config-gc

config-gc is a skill for Claude Code from AndrewDongminYoo/cc-agents-kit. It costs 81 tokens per session (2,763 once invoked), scanned A, original, Apache-2.0.

A cleanup workflow for a Claude Code configuration folder, covering skills, memory, hooks, permissions, MCP servers, and caches.

In plain words
What is it for?
Use it to audit or reduce a cluttered Claude Code setup, review the active configuration root, create backups, and approve cleanup one item at a time.
Why use it?
It finds duplicate, outdated, unused, or disconnected configuration items while keeping a person in control of each deletion.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the context-handoff plugin — 6 skills shipped together

Good fit Use it to audit or reduce a cluttered Claude Code setup, review the active configuration root, create backups, and approve cleanup one item at a time.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/andrewdongminyoo/cc-agents-kit/config-gc
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AndrewDongminYoo/cc-agents-kit --skill config-gc
Clone the repo
git clone --depth 1 https://github.com/AndrewDongminYoo/cc-agents-kit

Made for: Claude Code.

Or install context-handoff, the plugin that ships this one along with the rest of its 6 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for config-gc

README.md
[![agentmods](https://agentmods.dev/badge/skills/andrewdongminyoo/cc-agents-kit/config-gc/github.svg)](https://agentmods.dev/skills/andrewdongminyoo/cc-agents-kit/config-gc)
Your own site
<a href="https://agentmods.dev/skills/andrewdongminyoo/cc-agents-kit/config-gc"><img src="https://agentmods.dev/badge/skills/andrewdongminyoo/cc-agents-kit/config-gc/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for config-gc

Your own site · 80×15
<a href="https://agentmods.dev/skills/andrewdongminyoo/cc-agents-kit/config-gc"><img src="https://agentmods.dev/badge/skills/andrewdongminyoo/cc-agents-kit/config-gc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,763 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00081 $0.02763
Opus 5 $0.00041 $0.01381
Sonnet 5 $0.00016 $0.00553
Haiku 4.5 $0.00008 $0.00276

Measured 10d ago against content hash 201422c0826c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

config-gc scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/context-handoff/skills/config-gc/SKILL.md · 170 lines

How it starts

The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on 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.

Active Config Root

Derive one root at the start of the run and use it for every scan, backup, soft-delete, and log operation:

ACTIVE_CONFIG_ROOT="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"

Do not scan both the default and an override. When CLAUDE_CONFIG_DIR is set, it is the active root; otherwise use $HOME/.claude.

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 $ACTIVE_CONFIG_ROOT/_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 $ACTIVE_CONFIG_ROOT/gc_log.md: what was touched, why, and how to undo it.

Scan Channels

# Channel Path Staleness / redundancy signals
1 Skills $ACTIVE_CONFIG_ROOT/skills/*/ Heavily overlapping names; never triggered in recent transcripts; domain mismatch with the user's actual work; broken or empty SKILL.md
2 Memory $ACTIVE_CONFIG_ROOT/**/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 $ACTIVE_CONFIG_ROOT/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 $ACTIVE_CONFIG_ROOT/.claude.json or .mcp.json records Servers that fail to connect; functional duplicates; long-unused
6 Scheduled reminders / jobs job metadata referenced from $ACTIVE_CONFIG_ROOT Fired one-shots older than 30 days; jobs whose target scripts no longer exist
7 Project history $ACTIVE_CONFIG_ROOT/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

Read the full file on GitHub · 170 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 170 lines · 81 tokens per session scan A 201422c0826c

Subscribe to this mod's changes

config-gc is a skill published in the GitHub repository AndrewDongminYoo/cc-agents-kit (2 stars, last pushed yesterday), licensed Apache-2.0. It adds 81 tokens to every session and 2,763 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.