Langsung ke konten
Skillpedia
Prompt & LLM280k Β· #396

rules-distill

Fungsinya

Tool ini menganalisis agent atau skill Anda yang lain untuk menemukan ide atau prinsip yang berulang. Ide-ide tersebut dikelompokkan, lalu disarankan cara mengubahnya menjadi aturan formal, bisa dengan menambahkannya ke aturan yang sudah ada, merevisinya, atau membuat aturan baru.

Kapan dipakai

  • βœ“Saat Anda melihat instruksi yang sama muncul di beberapa agent.
  • βœ“Untuk merapikan dan memperbarui aturan secara berkala.
  • βœ“Setelah menambahkan agent baru dan ingin mengecek apakah ada aturan baru yang perlu dibuat.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/affaan-m/ECC/blob/main/skills/rules-distill/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œAnalisis agent saya dan sarankan aturan baru atau pembaruan untuk aturan yang sudah ada.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Pertama, tool ini mengumpulkan informasi dari semua agent dan aturan Anda. Lalu, ia menggunakan kecerdasan buatan untuk membandingkan informasi tersebut, mengidentifikasi pola yang berulang, dan mengusulkan cara mengubahnya menjadi aturan yang jelas dan bisa langsung diterapkan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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)

…

Pertanyaan umum

Apa itu 'prinsip'? Dan 'aturan'?

Prinsip adalah ide atau instruksi yang muncul di satu atau lebih agent. Aturan adalah ide-ide tersebut yang sudah diubah menjadi pedoman formal dan terorganisir agar bisa diikuti secara konsisten.

Apa arti 'cross-cutting principles'?

Artinya prinsip yang 'menembus' atau muncul di beberapa agent yang berbeda, bukan hanya khusus untuk satu agent saja.

Apakah tool ini mengubah aturan secara otomatis?

Tidak. Tool ini selalu meminta persetujuan Anda sebelum melakukan perubahan pada aturan yang sudah ada atau membuat aturan baru.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
280k
Peringkat
#396
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa