본문으로 건너뛰기
Skillpedia
프롬프트 및 LLM280k · #396

rules-distill

하는 일

이 도구는 다른 '에이전트'(또는 '스킬')를 분석해 반복되는 아이디어나 원칙을 찾습니다. 이 아이디어들을 묶고, 기존 규칙에 추가하거나 수정하거나 새 규칙을 만드는 방식으로 정식 규칙으로 바꾸는 방법을 제안합니다.

사용하는 경우

  • ✓같은 지침이 여러 에이전트에 나타나는 것을 발견했을 때.
  • ✓규칙을 주기적으로 정리하고 업데이트하고 싶을 때.
  • ✓새 에이전트를 추가한 뒤 새로 만들 규칙이 있는지 확인하고 싶을 때.

스킬 링크

https://github.com/affaan-m/ECC/blob/main/skills/rules-distill/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/affaan-m/ECC/blob/main/skills/rules-distill/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬