rules-distill

Extract cross-cutting principles from skills and distill them into rule files.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/Femad-6/my-skills --skill rules-distill-femad-6
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rules-distill
Source: https://github.com/Femad-6/my-skills/tree/main/.github/skills/rules-distill
Command: npx skills add https://github.com/Femad-6/my-skills --skill rules-distill-femad-6

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, and includes scripts (resource) components.

What problem does it solve? As a skill library grows, the same principles get repeated across many skills while the central rules files drift out of date. This Skill scans all installed skills, finds principles that appear in two or more of them, and proposes concrete additions or revisions to your rules files — with mandatory user approval before anything changes. ## Core Features & Use Cases - Deterministic Inventory: Bash scripts scan skill frontmatter and rule file headings, producing structured JSON inventories of both. - LLM Cross-Read Analysis: Skills are grouped into thematic clusters and analyzed in batches against the full rules text, producing verdicts such as Append, Revise, New Section, New File, Already Covered, or Too Specific. - User-Gated Execution: Every candidate is presented with evidence, violation risk, and draft text; rules are never modified without explicit approval, and results are saved to results.json. - Use Case: After installing a batch of new skills, run a monthly maintenance pass to detect that three skills independently describe LLM output validation, then promote that principle into coding-style.md as a new section. ## Quick Start Ask the assistant to run rules-distill to scan all installed skills and propose updates to the rules files.

Frequently Asked Questions about rules-distill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I distill shared principles from multiple skills into rules?

Run the rules-distill workflow: it scans all skill frontmatter and rule headings with bash scripts, then batches skills into thematic clusters for LLM analysis. Each candidate principle gets a verdict (Append, Revise, New Section, New File) with draft text you approve or skip.

What criteria decide whether a principle becomes a rule?

A principle qualifies only if it appears in at least two skills, describes an actionable behavior change, has a clear violation risk, and is not already covered in existing rules. Single-skill or overly specific principles stay at the skill level.

Does rules-distill modify rule files automatically?

No. Every candidate is presented in a summary table with evidence and draft text, and you approve, modify, or skip each one by number. Nothing is written to rules files without explicit user approval.

What dependencies does the rules-distill scanning require?

The scan scripts require bash, jq, awk, find, grep, and standard coreutils. They read SKILL.md frontmatter and rule file headings, outputting JSON inventories to stdout.

When should I not promote a principle to a rule?

Skip promotion when a principle is language- or framework-specific, appears in only one skill, or is already covered by existing rules even if worded differently. Code examples and commands belong in skills, not rules.