rules-distilllisted
Install: claude install-skill shimo4228/akc-cycle
# rules-distill — promote environment-specific facts to rules
Scan installed skills, find principles that belong in the **always-loaded rules layer**, and distill
them into rules — appending to, revising, or creating rule files. The skill produces
candidates and verdicts; it **never edits rules without your approval**.
## When to Use
- Periodic rules maintenance (monthly, or after installing new skills)
- After a `skill-stocktake` reveals patterns that should be rules
- When rules feel incomplete relative to the skills in use
## Phase 1 — Inventory (Glob, exhaustive)
Enumerate with Glob (no script):
- Skills: `~/.claude/skills/*/SKILL.md`
- Rules: read every `~/.claude/rules/**/*.md` in full — the corpus is small (measure live with `wc -l`; do not hardcode the count here, it drifts every time a rule is added or rightsized), so no grep pre-filter is needed
> Glob targets only skill definition files, so dependency markdown under `.venv` /
> `.pytest_cache` is excluded structurally.
Present the counts (skills scanned, rule files, headings) before analysis.
## Phase 2 — Cross-read & Verdict (inline, holistic)
Read every skill body and every rule into one context and analyze them together —
extraction and matching are a single pass. Seeing all skills at once is what makes the
recurrence count exact and the "not already in rules" test reliable.
**A principle is a candidate only if ALL of these hold:**
1. **Environment-specific** — a fact, a wiring, or a trap particular