config-hygiene-edho-ferdian
Periodic garbage collection for Edho's own Claude Code environment (`~/.claude`): find redundant, stale, orphaned, or context-expensive items across skills, memory, hooks, permissions, MCP servers, automations and caches, then walk them one by one with a human confirmation and an undo path. Includes the ECC decommissioning track — the concrete checklist for removing the ECC install once its native replacement exists. Use when the user says "bersihin config", "~/.claude berantakan", "kebanyakan skill", "sesi lambat mulai", "audit setup gue", "context cepat penuh", or when a periodic (~30 day) review is due.
edhoferdian · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add edhoferdian/EEF --skill config-hygiene-edho-ferdian技能说明
name: config-hygiene-edho-ferdian
description: >-
Periodic garbage collection for Edho's own Claude Code environment
(~/.claude): find redundant, stale, orphaned, or context-expensive
items across skills, memory, hooks, permissions, MCP servers, automations
and caches, then walk them one by one with a human confirmation and an
undo path. Includes the ECC decommissioning track — the concrete
checklist for removing the ECC install once its native replacement
exists. Use when the user says "bersihin config", "~/.claude berantakan",
"kebanyakan skill", "sesi lambat mulai", "audit setup gue", "context
cepat penuh", or when a periodic (~30 day) review is due.
Config Hygiene — Edho Ferdian Mode
Scope — read this first
Target: the user's own Claude Code environment — ~/.claude/*,
project-level .claude/*, ~/.claude.json, and .mcp.json.
This is the deliberate complement to skill-audit-edho-ferdian, which
audits the content quality of this ecosystem's skills/* and explicitly
refuses to look at ~/.claude. This skill looks at exactly what that one
refuses to: the environment those skills run inside.
| Question | Skill |
|---|---|
| Is this ecosystem's skill well-written, non-redundant, links intact? | skill-audit-edho-ferdian |
| Should a new skill exist at all, and is it actually obeyed? | skill-authoring-edho-ferdian |
| Is the environment carrying dead weight, and what does it cost? | this skill |
Never delete autonomously. Every candidate gets its own confirmation.
Design principles
- Append-only configs leak. Skills, memory files, hooks and permission entries only ever get added. Without a periodic pass they rot silently.
- Periodic beats one-time. Scan roughly every 30 days, propose a small batch each time. Cap a run at ~20 candidates — this is GC, not a purge.
- Per-channel signals. Each accumulation type has its own staleness test. Do not apply one rule everywhere.
- Soft-delete first. Rename to
.disabled> move to~/.claude/_gc_trash/<date>/> real deletion. Always keep an undo path. - Human-in-the-loop, per item. Show the evidence, then
[y/n/skip]. There is no "yes to all". - Log every run 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 actual work; broken or empty SKILL.md |
| 2 | Memory | ~/.claude/**/memory/*.md + index | Several index entries for one topic; contents contradicted by newer entries; dates already passed; orphans missing from the index; sub-100-word fragments that should merge |
| 3 | Hooks | ~/.claude/hooks/ + settings | Scripts on disk referenced by no hook config; old versions superseded by rewrites |
| 4 | Permissions | permissions.allow in settings.json / settings.local.json | Duplicates; specific entries already covered by a wildcard; one-off grants from past experiments |
| 5 | MCP servers | ~/.claude.json, project .mcp.json | Servers that fail to connect; functional duplicates; long unused |
| 6 | Automations | scheduled jobs / reminders, wherever kept | Fired one-shots older than 30 days; jobs whose target script no longer exists |
| 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 |
| 9 | Context cost | every loaded component | See §Context budget below — a component can be healthy and still not worth its tokens |
Config tamper guard (harvested from ECC plankton-code-quality)
A distinct failure mode from all nine channels above: an agent facing a
failing lint/format/build gate loosens the config instead of fixing the
code — relaxing a .eslintrc rule, widening ruff.toml's ignore list,
disabling a .shellcheckrc/.yamllint/.hadolint.yaml check — so the gate
goes green without the underlying issue being fixed. This is metric-gaming,
not cleanup, and it is the same shape of problem the false-positive/gaming
patterns in gan-harness-edho-ferdian/references/loop-design-review.md
already name for evaluator loops ("Goodhart-gaming the verifier" — the score
climbs while the artifact gets worse). Treat a lint/format config edit found
during a scan as a high-confidence flag, not a routine change: check whether
it was made because a check was failing at the time, and whether it
narrows coverage rather than reflecting a genuinely agreed convention (a
narrowing with an inline comment explaining the deliberate exception is a
documented convention, not tampering — same test language-code-review- edho-ferdian's Reflection gate already applies to a suppressed lens
finding). This is a detection responsibility for this skill's channel 3/4
scans, not a new channel — a tampered config is the same "stale/unreachable
correctness" concern as any other hook/permission drift, just with a
gaming motive behind it.
Language/tool gate table (harvested from ECC plankton-code-quality)
Useful as a quick cross-check when this skill (or build-fix-edho-ferdian
Phase 0) needs to confirm which formatter/linter should be running for a
given file extension before treating its absence as a gap:
| Extension / stack | Formatter | Linter | Optional |
|---|---|---|---|
.py | ruff format | ruff | ty, vulture, bandit |
.ts/.tsx/.js/.jsx | biome (or prettier) | biome (or eslint) | oxlint, semgrep, knip |
.sh/.bash | shfmt | shellcheck | — |
.yml/.yaml | — | yamllint | — |
.md | — | markdownlint-cli2 | — |
Dockerfile | — | hadolint (≥2.12.0) | — |
.toml | taplo | — | — |
.json | jaq | — | — |
Not exhaustive for every stack in this ecosystem (e.g. Go/Rust/Jav
阅读完整来源 ↗