rules-distill

rules-distill is a skill for Claude Code from shimo4228/claude-harness. It costs 18 tokens per session (1,962 once invoked), scanned A, original, MIT.

A maintenance tool that reviews installed skills and finds environment-specific facts that should be kept in always-loaded rule files.

In plain words
What is it for?
Use it to review skills, propose rule changes, and create or update rule files after installing skills or finding gaps. It shows suggestions for approval before editing.
Why use it?
It helps prevent important setup details, connections, and known traps from being buried in skill documents or forgotten.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Good fit Use it to review skills, propose rule changes, and create or update rule files after installing skills or finding gaps. It shows suggestions for approval before editing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shimo4228/claude-harness/rules-distill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add shimo4228/claude-harness --skill rules-distill
Clone the repo
git clone --depth 1 https://github.com/shimo4228/claude-harness

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rules-distill

README.md
[![agentmods](https://agentmods.dev/badge/skills/shimo4228/claude-harness/rules-distill/github.svg)](https://agentmods.dev/skills/shimo4228/claude-harness/rules-distill)
Your own site
<a href="https://agentmods.dev/skills/shimo4228/claude-harness/rules-distill"><img src="https://agentmods.dev/badge/skills/shimo4228/claude-harness/rules-distill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rules-distill

Your own site · 80×15
<a href="https://agentmods.dev/skills/shimo4228/claude-harness/rules-distill"><img src="https://agentmods.dev/badge/skills/shimo4228/claude-harness/rules-distill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,962 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.01962
Opus 5.5 $0.00007 $0.00785
Sonnet 5.5 $0.00004 $0.00392
Haiku 4.5 $0.00002 $0.00196

Measured 12d ago against content hash cfe31013578f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rules-distill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/rules-distill/SKILL.md · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

rules-distill — promote environment-specific facts to rules

Scan installed skills, find principles that belong in the always-loaded rules layer, and distill them into rules — appending to, revising, or creating rule files. The skill produces candidates and verdicts; it never edits rules without your approval.

Roots. <harness> below is the harness this audit covers: ~/.claude by default, or a repository's .claude/ when skill harness-stocktake runs in project mode (its Roots section maps the paths, names the evidence that is n/a there, and says which convention checks apply). The ledger <ledger> belongs to that harness: ${CLAUDE_SKILL_DIR}/results.json when this skill's directory is inside <harness> (the harness carries its own copy of the skill), else <harness>/stocktake/rules-distill.json (an installed plugin, or project mode). Either way it is committed with the harness's other changes on the apply branch.

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 in use

Phase 1 — Inventory (Glob, exhaustive)

Enumerate with Glob (no script):

  • Skills: <harness>/skills/*/SKILL.md
  • Rules: read every <harness>/rules/**/*.md in full — the corpus is small, so no grep pre-filter is needed

Glob targets only skill definition files, so dependency markdown under .venv / .pytest_cache is excluded structurally.

Present the counts (skills scanned, rule files, headings) before analysis.

Phase 2 — Cross-read & Verdict (inline, holistic)

Read every skill body and every rule into one context and analyze them together — extraction and matching are a single pass. Seeing all skills at once is what makes the recurrence count exact and the "not already in rules" test reliable.

A principle is a candidate only if ALL of these hold:

  1. Environment-specific — a fact, a wiring, or a trap particular to this machine, harness, or set of accounts. A general engineering principle is not a candidate no matter how many skills repeat it.
  2. Substrate does not already do it — if the current model handles it natively, a written rule does not add behaviour; it freezes an older default and competes with the newer one.
  3. Not a procedure — steps and workflows belong in a skill. Residency is for facts and wiring, which have to be true before any particular task starts.
  4. Actionable behavior change — expressible as "do X" / "don't do Y", not "X is important"
  5. Clear violation risk — what goes wrong if ignored, in one sentence
  6. Not already in rules — check the full rules text, including the same idea in different words

Read the full file on GitHub · 156 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago Changed · +6 lines cfe31013578f
  2. 1mo ago Changed · +2 lines 8841ce4cd6dd
  3. 1mo ago Changed · -105 tokens per session 9129b3751c9e
  4. 1mo ago Changed 51d8512e7eb9
  5. 1mo ago Changed 6ca54a8145ec
  6. 1mo ago Changed · -4 lines e72757296caf
  7. 2mo ago Changed · -31 lines 97feb01a3079
  8. 2mo ago First seen · 183 lines · 123 tokens per session scan A fc4499cefa94

Subscribe to this mod's changes

rules-distill is a skill published in the GitHub repository shimo4228/claude-harness (4 stars, last pushed 5d ago), licensed MIT. It adds 18 tokens to every session and 1,962 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

rules-distill compared with skills from other repositories

rules-distill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rules-distillshimo4228/claude-harnessSkill45d agoMITA18Claude Code
memory-bankfockus/skill-memory-bankSkill3326d agoMITA110Claude Code
write-terva-loreterva-sh/tervaSkill59d agoMITA66Claude Code, Codex
onboardRockielab/rockie-claudeSkill231mo agoApache-2.0A117Claude Code
scheduled-notesRockielab/rockie-claudeSkill231mo agoApache-2.0A63Claude Code
handoffterva-sh/tervaSkill59d agoMITA56Claude Code, Codex
retrospectiveterva-sh/tervaSkill59d agoMITA76Claude Code, Codex