rules-distill
यह क्या करती है
यह टूल आपके दूसरे 'agents' (या 'skills') को देखकर बार-बार आने वाले विचार या सिद्धांत ढूंढता है। यह इन विचारों को समूह में रखता है और सुझाता है कि इन्हें औपचारिक नियमों में कैसे बदला जाए, यानी मौजूदा नियमों में जोड़कर, उन्हें बदलकर, या नए नियम बनाकर।
कब इस्तेमाल करें
- ✓जब आपको एक ही निर्देश कई agents में बार-बार दिखे।
- ✓अपने नियमों को समय-समय पर व्यवस्थित और अपडेट करने के लिए।
- ✓नए agents जोड़ने के बाद, यह देखने के लिए कि कोई नया नियम बनाने लायक है या नहीं।
Skill का लिंक
https://github.com/affaan-m/ECC/blob/main/skills/rules-distill/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे agents का विश्लेषण करो और नए नियम या मौजूदा नियमों में बदलाव सुझाओ।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
पहले यह आपके सभी agents और नियमों से जानकारी इकट्ठा करता है। फिर यह artificial intelligence की मदद से उस जानकारी की तुलना करता है, बार-बार आने वाले पैटर्न पहचानता है, और बताता है कि इन्हें साफ़ और काम में लाए जाने लायक नियमों में कैसे बदला जाए।
तकनीकी सामग्री (मूल 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' (सिद्धांत) क्या हैं? और 'rules' (नियम) क्या हैं?
Principles वे विचार या निर्देश हैं जो एक या एक से ज़्यादा agents में आते हैं। Rules वही विचार हैं जिन्हें औपचारिक और व्यवस्थित दिशानिर्देशों में बदल दिया गया है, ताकि उन्हें लगातार माना जा सके।
'cross-cutting principles' का क्या मतलब है?
इसका मतलब है वे principles जो कई अलग-अलग agents में दिखते हैं, न कि सिर्फ़ किसी एक agent तक सीमित होते हैं।
क्या यह टूल अपने आप नियम बदल देता है?
नहीं, किसी भी मौजूदा नियम को बदलने या नए नियम बनाने से पहले टूल हमेशा आपकी मंज़ूरी माँगता है।
जानकारी
लेखक का मूल विवरण
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
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
accessibility
280kयह आपके एजेंट को ऐसे इंटरफ़ेस बनाने में मदद करता है जिन्हें हर कोई इस्तेमाल कर सके। यह पक्का करता है कि वेबसाइट और ऐप दिव्यांग लोगों के लिए भी अच्छे से काम करें, जैसे नेत्रहीन या जिन्हें चलने-फिरने में दिक्कत होती है।
agent-architecture-audit
280kयह आपके एजेंट को जाँचने देता है कि सब कुछ सही से चल रहा है। यह AI सिस्टम में समस्याएँ ढूँढकर ठीक करता है, ताकि वे उम्मीद के मुताबिक काम करें।
agent-eval
280kयह आपके एजेंट को अलग-अलग AI coding tools की तुलना करने में मदद करता है। यह मापता है कि किसी खास काम के लिए कौन सा टूल ज़्यादा तेज़, सस्ता और भरोसेमंद है।
agent-harness-construction
280kयह आपके एजेंट को काम कैसे करना है, यह बेहतर समझने में मदद करता है। यह उन tools और instructions को बेहतर बनाता है जिनका एजेंट इस्तेमाल करता है, ताकि उसकी सफलता की संभावना बढ़े।
मिलती-जुलती skills
writing-skills
311kयह आपके एजेंट को नई स्किल लिखना और हर एक को पहले टेस्ट करना सिखाती है, यह जांचते हुए कि स्किल सच में उसका व्यवहार बदलती है।
writing-for-agents
310kAI एजेंट्स के लिए साफ़ निर्देश कैसे लिखें, यह समझाती है, जिसमें स्किल, AGENTS.md और CLAUDE.md फ़ाइलें शामिल हैं, ताकि एजेंट अनुमानित ढंग से व्यवहार करे।
dspy
260kआपके एजेंट को हर प्रॉम्प्ट हाथ से लिखने के बजाय इनपुट और आउटपुट घोषित करके AI प्रोग्राम बनाने में मदद करती है, फिर उदाहरण डेटा से प्रॉम्प्ट सुधारती है।