rules-distill
Scan skills to extract cross-cutting principles and distill them into rules — append, revise, or create new rule files. Use when the same principle keeps recurring across skills and belongs in a rule file instead.
- Kind
- Skill
- Works with
- Claude Code, Codex
- Source
- affaan-m/ECC @ d3b8a3e90890
- Path
- skills/rules-distill/SKILL.md
Credit
- Made by
- affaan-m
- Original
- github.com/affaan-m/ECC/blob/d3b8a3e908904e242ed2dbe66af62cca…
- License
- MIT
Listed by Skill Manifest; not made by us.
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
Install factsScanned 3 Nov 2026
- Adds
- .claude/skills/rules-distill/ (the skill folder)
- 2 other files in the folder: scripts/scan-rules.sh, scripts/scan-skills.sh
- Runs scripts
- Yes
- scripts/scan-rules.sh
- scripts/scan-skills.sh
- shell block in the text
- script file in the folder (scripts/scan-rules.sh)
- Uses the network
- None found
- Needs secrets
- None found
- Reads environment variables
- RULES_DISTILL_DIR
- RULES_DIR
- RULES_DISTILL_GLOBAL_DIR
- RULES_DISTILL_PROJECT_DIR
- CWD_SKILLS_DIR
- GLOBAL_DIR
- Reads outside the project
- ~/.claude/skills/rules-distill/scripts/scan-skills.sh (SKILL.md)
- ~/.claude/skills/rules-distill/scripts/scan-rules.sh (SKILL.md)
- /usr/bin/env (scripts/scan-rules.sh)
- ~/.claude/rules (scripts/scan-rules.sh)
- and 3 more
- Value without its scripts
- High
- The main file never tells the agent to run a bundled script, so the text works without them.
- scripts/scan-rules.sh: scan-rules.sh — enumerate rule files and extract H2 heading index
- scripts/scan-skills.sh: scan-skills.sh — enumerate skill files, extract frontmatter and UTC mtime
- Source revision
- d3b8a3e90890
- Licence
- MIT
- Last activity
- 23 Nov 2026
- Source changed after the scan
- Yes
- Last push 23 Nov 2026, scanned 3 Nov 2026; read it again before you rely on this scan
- Review
- Reviewed
Found by a static scan of the stored text; nothing is run. “None found” is not a guarantee, so read what you install before you run it.
# Rules Distill
Scan installed skills, extract cross-cutting principles that appear in multiple skills, and distill them into rules — appending to existing rule files, revising outdated content, or creating new rule files.
Applies the "deterministic collection + LLM judgment" principle: scripts collect facts exhaustively, then an LLM cross-reads the full context and produces verdicts.
## 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 being used
## How It Works
The rules distillation process follows three phases:
### Phase 1: Inventory (Deterministic Collection)
#### 1a. Collect skill inventory
```bash
bash ~/.claude/skills/rules-distill/scripts/scan-skills.sh
```
#### 1b. Collect rules index
```bash
bash ~/.claude/skills/rules-distill/scripts/scan-rules.sh
```
#### 1c. Present to user
```
Rules Distillation — Phase 1: Inventory
────────────────────────────────────────
Skills: {N} files scanned
Rules: {M} files ({K} headings indexed)
Proceeding to cross-read analysis...
```
…