distill-rules

distill-rules is a skill for Claude Code, Codex from technicalpickles/pickled-claude-plugins. It costs 20 tokens per session (529 once invoked), scanned A, original, MIT.

A review process for improving routing rules in a notes vault. It examines past corrections and the vault’s CLAUDE.md instructions, then suggests rule changes based on repeated patterns.

In plain words
What is it for?
Use it to find recurring routing mistakes, propose new category or edge-case rules, revise rules that are often overridden, and apply selected updates.
Why use it?
It helps prevent the same notes from being sent to the wrong place repeatedly.

Skill for Claude CodeCodex

Part of the second-brain plugin — 7 skills, 7 commands shipped together

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.

agentmods
npx agentmods add skills/technicalpickles/pickled-claude-plugins/distill-rules
Any agent
npx skills add technicalpickles/pickled-claude-plugins --skill distill-rules
Clone the repo
git clone --depth 1 https://github.com/technicalpickles/pickled-claude-plugins

Made for: Claude Code, Codex.

Or install second-brain, the plugin that ships this one along with the rest of its 7 skills, 7 commands.

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 distill-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/technicalpickles/pickled-claude-plugins/distill-rules.svg)](https://agentmods.dev/skills/technicalpickles/pickled-claude-plugins/distill-rules)
Your own site
<a href="https://agentmods.dev/skills/technicalpickles/pickled-claude-plugins/distill-rules"><img src="https://agentmods.dev/badge/skills/technicalpickles/pickled-claude-plugins/distill-rules.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 529 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00020 $0.00529
Opus 5 $0.00010 $0.00264
Sonnet 5 $0.00004 $0.00106
Haiku 4.5 $0.00002 $0.00053

Measured 4d ago against content hash 3a5e0e26e998, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

distill-rules 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 4d 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.

plugins/second-brain/skills/distill-rules/SKILL.md · 66 lines

What it actually says

Distill Rules

Review accumulated routing corrections in .routing-memory.md and propose updates to the vault's CLAUDE.md routing rules.

See references/routing-memory.md for correction format and learning loop.

Process

  1. Read .routing-memory.md from vault root

  2. Read vault CLAUDE.md

  3. Analyze corrections for patterns:

    • Group corrections by destination
    • Identify repeated corrections (same type of note going to same destination)
    • Look for corrections that contradict existing CLAUDE.md rules
  4. Propose updates:

    • New edge case mappings for disambiguation sections
    • New category table entries
    • New learned patterns for .routing-memory.md
    • Corrections to existing rules that have been consistently overridden
  5. Present proposals to user:

    Found {n} patterns in {m} corrections:
    
    1. Add edge case: "{scenario}" -> {destination}
       Based on: {n} corrections over {date range}
    
    2. Add to category table: "{tool}" under {area}
       Based on: {n} corrections
    
    3. Update rule: "{old rule}" -> "{new rule}"
       Based on: consistently overridden {n} times
    
    Apply these updates?
    (A) Apply all
    (B) Review individually
    (C) Skip for now
    
  6. Apply selected updates:

    • Edit vault CLAUDE.md with new rules
    • Move applied corrections to an ## Archived section in .routing-memory.md
    • Promote stable patterns to ## Patterns Learned

Constraints

  • Never auto-apply. Always present proposals for approval.
  • Preserve existing CLAUDE.md structure and formatting
  • Archive corrections, don't delete them (audit trail)
  • Only propose rules backed by multiple corrections (minimum 2)
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. 4d ago First seen · 66 lines · 20 tokens per session scan A 3a5e0e26e998

Subscribe to this mod's changes

distill-rules is a skill published in the GitHub repository technicalpickles/pickled-claude-plugins (10 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 529 once invoked, about $0.0001 per session on Opus 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

Other skills, from other repositories