跳到正文
Skillpedia
提示词与 LLM280k · #396

rules-distill

它能做什么

这个工具会分析你的其他智能体(也就是技能),找出反复出现的想法或原则。它会把这些想法归类,并建议如何把它们整理成正式的规则:可以补充到现有规则里、修改现有规则,或者新建规则。

适用场景

  • ✓当你发现同一条指令反复出现在多个智能体中时。
  • ✓定期整理和更新你的规则时。
  • ✓新增了智能体,想检查是否有值得新建的规则时。

技能链接

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

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/affaan-m/ECC/blob/main/skills/rules-distill/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 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)

…

常见问题

什么是“原则”?什么是“规则”?

原则是出现在一个或多个智能体中的想法或指令。规则则是把这些想法整理成正式、有条理的指南,以便持续遵守。

什么是“跨领域原则”?

指的是贯穿多个不同智能体、出现在多处的原则,而不是只属于某一个智能体的原则。

这个工具会自动修改规则吗?

不会。在修改现有规则或新建规则之前,工具一定会先征得你的同意。

详情

作者的原始描述

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

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能