rules-distill
하는 일
이 도구는 다른 '에이전트'(또는 '스킬')를 분석해 반복되는 아이디어나 원칙을 찾습니다. 이 아이디어들을 묶고, 기존 규칙에 추가하거나 수정하거나 새 규칙을 만드는 방식으로 정식 규칙으로 바꾸는 방법을 제안합니다.
사용하는 경우
- ✓같은 지침이 여러 에이전트에 나타나는 것을 발견했을 때.
- ✓규칙을 주기적으로 정리하고 업데이트하고 싶을 때.
- ✓새 에이전트를 추가한 뒤 새로 만들 규칙이 있는지 확인하고 싶을 때.
스킬 링크
https://github.com/affaan-m/ECC/blob/main/skills/rules-distill/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 에이전트를 분석해서 새 규칙이나 기존 규칙의 업데이트를 제안해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
먼저 모든 에이전트와 규칙에서 정보를 모읍니다. 그다음 인공지능을 사용해 정보를 비교하고, 반복되는 패턴을 찾아, 이것을 명확하고 실행 가능한 규칙으로 만드는 방법을 제안합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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 ~/.claude/skills/rules-distill/scripts/scan-skills.sh
1b. Collect rules index
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...
Phase 2: Cross-read, Match & Verdict (LLM Judgment)
Extraction and matching are unified in a single pass. Rules files are small enough (~800 lines total) that the full text can be provided to the LLM — no grep pre-filtering needed.
Batching
Group skills into thematic clusters based on their descriptions. Analyze each cluster in a subagent with the full rules text.
Cross-batch Merge
After all batches complete, merge candidates across batches:
- Deduplicate candidates with the same or overlapping principles
- Re-check the "2+ skills" requirement using evidence from all batches combined — a principle found in 1 skill per batch but 2+ skills total is valid
Subagent Prompt
Launch a general-purpose Agent with the following prompt:
You are an analyst who cross-reads skills to extract principles that should be promoted to rules.
## Input
- Skills: {full text of skills in this batch}
- Existing rules: {full text of all rule files}
## Extraction Criteria
Include a candidate ONLY if ALL of these are true:
1. **Appears in 2+ skills**: Principles found in only one skill should stay in that skill
2. **Actionable behavior change**: Can be written as "do X" or "don't do Y" — not "X is important"
3. **Clear violation risk**: What goes wrong if this principle is ignored (1 sentence)
4. **Not already in rules**: Check the full rules text — including concepts expressed in different words
## Matching & Verdict
For each candidate, compare against the full rules text and assign a verdict:
- **Append**: Add to an existing section of an existing rule file
- **Revise**: Existing rule content is inaccurate or insufficient — propose a correction
- **New Section**: Add a new section to an existing rule file
- **New File**: Create a new rule file
- **Already Covered**: Sufficiently covered in existing rules (even if worded differently)
- **Too Specific**: Should remain at the skill level
## Output Format (per candidate)
```json
{
"principle": "1-2 sentences in 'do X' / 'don't do Y' form",
"evidence": ["skill-name: §Section", "skill-name: §Section"],
"violation_risk": "1 sentence",
"verdict": "Append / Revise / New Section / New File / Already Covered / Too Specific",
"target_rule": "filename §Section, or 'new'",
"confidence": "high / medium / low",
"draft": "Draft text for Append/New Section/New File verdicts",
"revision": {
"reason": "Why the existing content is inaccurate or insufficient (Revise only)",
"before": "Current text to be replaced (Revise only)",
"after": "Proposed replacement text (Revise only)"
}
}
```
## Exclude
- Obvious principles already in rules
- Language/framework-specific knowledge (belongs in language-specific rules or skills)
- Code examples and commands (belongs in skills)
Verdict Reference
| Verdict | Meaning | Presented to User |
|---|---|---|
| Append | Add to existing section | Target + draft |
| Revise | Fix inaccurate/insufficient content | Target + reason + before/after |
| New Section | Add new section to existing file | Target + draft |
| New File | Create new rule file | Filename + full draft |
| Already Covered | Covered in rules (possibly different wording) | Reason (1 line) |
…
자주 묻는 질문
'principles'와 '규칙'은 무엇인가요?
원칙은 하나 이상의 에이전트에 나타나는 아이디어나 지침입니다. 규칙은 이 아이디어를 일관되게 따를 수 있도록 정식이고 체계적인 지침으로 바꾼 것입니다.
'cross-cutting principles'는 무엇을 뜻하나요?
한 에이전트에만 해당하지 않고, 여러 다른 에이전트에 걸쳐 나타나는 원칙을 뜻합니다.
도구가 규칙을 자동으로 바꾸나요?
아니요. 도구는 기존 규칙을 바꾸거나 새 규칙을 만들기 전에 항상 사용자의 승인을 요청합니다.
상세 정보
작성자의 원본 설명
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.
repo: affaan-m/ECC
인기도
- GitHub 스타
- 280k
- 순위
- #396
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
accessibility
280k에이전트가 모든 사람이 쓸 수 있는 인터페이스를 만들도록 돕습니다. 시각 장애나 운동 장애가 있는 사람도 쓸 수 있게 합니다.
agent-architecture-audit
280k에이전트가 모든 것이 올바르게 작동하는지 점검하도록 돕습니다. AI 시스템의 문제를 찾아 고쳐서 기대대로 작동하게 합니다.
agent-eval
280k에이전트가 서로 다른 AI 코딩 도구를 비교하도록 돕습니다. 특정 작업에서 어느 도구가 더 빠르고, 저렴하고, 믿을 만한지 측정합니다.
agent-harness-construction
280k에이전트가 작업을 더 잘 이해하도록 돕습니다. 에이전트가 쓰는 도구와 지시문을 최적화해 성공 가능성을 높입니다.
비슷한 스킬
writing-skills
311k에이전트를 위한 새 스킬을 작성하고, 각 스킬이 실제로 에이전트의 행동을 바꾸는지 사용하기 전에 테스트하도록 가르칩니다.
writing-for-agents
310k스킬, AGENTS.md, CLAUDE.md 등 AI 에이전트가 읽는 문서를 명확하게 쓰는 방법을 알려 주어 에이전트가 예측 가능하게 행동하도록 돕습니다.
dspy
260k프롬프트를 일일이 쓰는 대신 입력과 출력을 선언하고, 예시 데이터로 프롬프트를 조정해 AI 프로그램을 만들도록 돕습니다.