config-gc

config-gc is a skill for Claude Code, Codex from Bilal140202/the-lord-of-the-skills. It costs 101 tokens per session (1,967 once invoked), scanned B, a copy of config-gc, MIT.

A cleanup process for Claude Code configuration, including skills, memory, hooks, permissions, connections to external tools, and caches.

In plain words
What is it for?
Use it to review an overgrown configuration, propose safe deletion candidates, and confirm each cleanup before removal.
Why use it?
It helps find stale, duplicate, unused, or abandoned configuration items without deleting anything automatically.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions Claude Code.

Good fit Use it to review an overgrown configuration, propose safe deletion candidates, and confirm each cleanup before removal.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bilal140202/the-lord-of-the-skills/affaan-m__everything-claude-code
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 Bilal140202/the-lord-of-the-skills --skill affaan-m__everything-claude-code
Clone the repo
git clone --depth 1 https://github.com/Bilal140202/the-lord-of-the-skills

Made for: Claude Code, Codex.

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/bilal140202/the-lord-of-the-skills/affaan-m__everything-claude-code/github.svg)](https://agentmods.dev/skills/bilal140202/the-lord-of-the-skills/affaan-m__everything-claude-code)
Your own site
<a href="https://agentmods.dev/skills/bilal140202/the-lord-of-the-skills/affaan-m__everything-claude-code"><img src="https://agentmods.dev/badge/skills/bilal140202/the-lord-of-the-skills/affaan-m__everything-claude-code/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/bilal140202/the-lord-of-the-skills/affaan-m__everything-claude-code"><img src="https://agentmods.dev/badge/skills/bilal140202/the-lord-of-the-skills/affaan-m__everything-claude-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,967 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 95% copy Near-identical to another mod 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.00101 $0.01967
Opus 5 $0.00051 $0.00983
Sonnet 5 $0.00020 $0.00393
Haiku 4.5 $0.00010 $0.00197

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

Security

Grade B, and why

config-gc scanned grade B with 1 finding 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 12d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

grep -rq "$name" ~/.claude/settings.json ~/.claude/settings.local.json 2>/dev/null \
Origin

This is a copy

95% identical to config-gc — 30 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/fangorn/claude-code/affaan-m__everything-claude-code/SKILL.md · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 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.

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/_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 ~/.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

Read the full file on GitHub · 121 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. 12d ago First seen · 121 lines · 101 tokens per session scan B e8ade5c8d487

Subscribe to this mod's changes

config-gc is a skill published in the GitHub repository Bilal140202/the-lord-of-the-skills (4 stars, last pushed 6d ago), licensed MIT. It adds 101 tokens to every session and 1,967 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). It is 95% identical to config-gc, differing in 30 lines, and is treated as a copy.

Related

Other skills, from other repositories

serpsmith

Publish SEO articles reliably across AI-agent runtimes.

emiliojohann/SERPsmith · 14 tokens

tool-calling-tutor

Use when a tool-calling agent does not call a tool, sends wrong arguments, loops without stopping, or needs a function schema. Guides a four-branch diagnosis and five-step schema repair. Do not use for framework-specific, MCP-server, or production-observability questions.

WenyuChiou/awesome-agentic-ai-zh · 62 tokens

performing-threat-hunting-with-yara-rules

Use YARA pattern-matching rules to hunt for malware, suspicious files, and indicators of compromise across filesystems and memory dumps. Covers rule authoring, yara-python scanning, and integration with threat intel feeds.

adriannoes/awesome-agentic-ai · 53 tokens

hunt-idor

Hunting skill for idor vulnerabilities. Built from 26 public bug bounty reports. Use when hunting idor on any target.

adriannoes/awesome-agentic-ai · 30 tokens

performing-soc2-type2-audit-preparation

Automates SOC 2 Type II audit preparation including gap assessment against AICPA Trust Services Criteria (CC1-CC9), evidence collection from cloud providers and identity systems, control testing validation, remediation tracking, and continuous compliance monitoring. Covers all five TSC categories (Security…

adriannoes/awesome-agentic-ai · 112 tokens

testrail

Sync tests with TestRail. Use when user mentions "testrail", "test management", "test cases", "test run", "sync test cases", "push results to testrail", or "import from testrail".

adriannoes/awesome-agentic-ai · 50 tokens