rules-distill
Что он делает
Этот инструмент анализирует ваших других «агентов» (или «скиллы»), чтобы найти повторяющиеся идеи и принципы. Он группирует эти идеи и предлагает, как превратить их в формальные правила: дополнить существующие правила, переработать их или создать новые.
Когда использовать
- ✓Когда вы замечаете, что одна и та же инструкция повторяется в нескольких агентах.
- ✓Когда нужно периодически упорядочивать и обновлять правила.
- ✓После добавления новых агентов, если хотите проверить, есть ли новые правила для создания.
Ссылка на скилл
https://github.com/affaan-m/ECC/blob/main/skills/rules-distill/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Проанализируй моих агентов и предложи новые правила или обновления существующих.”
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) |
…
Частые вопросы
Что такое «принципы»? А что такое «правила»?
Принципы — это идеи или инструкции, которые встречаются в одном или нескольких агентах. Правила — это те же идеи, оформленные в виде чётких и организованных указаний, которым нужно последовательно следовать.
Что означают «сквозные принципы»?
Это принципы, которые «пронизывают» несколько разных агентов, а не относятся только к одному из них.
Инструмент сам меняет правила?
Нет, инструмент всегда спрашивает ваше разрешение, прежде чем вносить изменения в существующие правила или создавать новые.
Подробности
Оригинальное описание автора
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
Комментарии
- …
Другие скиллы из этого репозитория
accessibility
280kПомогает агенту создавать интерфейсы, которыми может пользоваться каждый. Следит, чтобы сайты и приложения работали для людей с нарушениями зрения или моторики.
agent-architecture-audit
280kЗаставляет агента проверить, всё ли работает правильно. Находит и исправляет проблемы в системах ИИ, чтобы они работали как задумано.
agent-eval
280kПомогает агенту сравнивать ИИ-инструменты для программирования. Измеряет, какой быстрее, дешевле и надёжнее для конкретных задач.
agent-harness-construction
280kПомогает агенту лучше понимать, как выполнять задачи. Оптимизирует инструменты и инструкции агента, чтобы повысить шансы на успех.
Похожие скиллы
writing-skills
311kУчит агента писать новые скиллы и сначала проверять каждый из них, убеждаясь, что скилл действительно меняет поведение агента.
writing-for-agents
310kОбъясняет, как писать понятные инструкции для ИИ-агентов, включая скиллы и файлы AGENTS.md и CLAUDE.md, чтобы агент вел себя предсказуемо.
dspy
260kПомогает агенту создавать ИИ-программы: вы описываете входы и выходы вместо ручного написания каждого промпта, а промпты настраиваются по примерам.