ccc-rules-distill

ccc-rules-distill is a command for Claude Code from KevinZai/commander. It costs 38 tokens per session (576 once invoked), scanned B, original, MIT.

A command that scans installed skills and turns shared principles into concise rules for Claude Code.

In plain words
What is it for?
Use it to extract cross-cutting rules from the skills installed in your environment.
Why use it?
It helps keep repeated guidance consistent across skills instead of leaving the same principles scattered in many places.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: reads .claude/ paths; names the AskUserQuestion tool; mentions Codex.

Good fit Use it to extract cross-cutting rules from the skills installed in your environment.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kevinzai/commander/ccc-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.

Clone the repo
git clone --depth 1 https://github.com/KevinZai/commander

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/kevinzai/commander/ccc-rules-distill/github.svg)](https://agentmods.dev/commands/kevinzai/commander/ccc-rules-distill)
Your own site
<a href="https://agentmods.dev/commands/kevinzai/commander/ccc-rules-distill"><img src="https://agentmods.dev/badge/commands/kevinzai/commander/ccc-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 ccc-rules-distill

Your own site · 80×15
<a href="https://agentmods.dev/commands/kevinzai/commander/ccc-rules-distill"><img src="https://agentmods.dev/badge/commands/kevinzai/commander/ccc-rules-distill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 576 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00038 $0.00576
Opus 5.5 $0.00015 $0.00230
Sonnet 5.5 $0.00008 $0.00115
Haiku 4.5 $0.00004 $0.00058

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

Security

Grade B, and why

ccc-rules-distill scanned grade B with 1 finding 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 5d 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.

Enumerates other installed skillsmediumAgent snooping

Other skills' SKILL.md files reveal prompts, capabilities and secrets that should be invisible to peers.

ls -d ~/.claude/skills/*/SKILL.md .claude/skills/*/SKILL.md 2>/dev/null
commands/ccc-rules-distill.md · 44 lines

How it starts

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

/ccc-rules-distill — turn repeated skill guidance into rules

CC Commander · /ccc-rules-distill · a reviewed list of cross-cutting principles, promoted into rule files you approve.

What happens

  1. Load the rules-distill skill with the Skill tool and follow its workflow. It is an opt-in skill, absent by default. If it is not listed in this session, say so and continue with steps 2 to 6, which are the minimal version of the same workflow.

  2. Inventory the sources. List skill files and existing rules, and report which paths were found:

    ls -d ~/.claude/skills/*/SKILL.md .claude/skills/*/SKILL.md 2>/dev/null
    ls ~/.claude/rules .claude/rules 2>/dev/null
    

    If no skills are found, say so and stop.

  3. Read each skill and extract principles: imperative guidance that is not specific to that skill's domain (for example "validate input at boundaries", "verify before reporting done").

  4. Keep a principle only when it appears in two or more skills. For each, record the skills that state it (path:line) and whether an existing rule already covers it. Drop candidates an existing rule already states; link to that rule instead.

  5. Present the candidates as a table: principle, source skills, proposed rule file, new or amend. Then ask with AskUserQuestion (Codex: a plain-text question):

    • 🟢 Write approved rules — add or amend only the rows the user keeps
    • Show the evidence — print the quoted lines for each candidate first
    • Save the report only — write nothing to the rules directory
    • Cancel — nothing is written
  6. For each approved row, write or amend one rule file per topic (short, one topic, no restating another rule). Then verify: read each file back, and run git diff --stat when the rules live in a git repository. Report the files changed.

Done when

Every proposed rule names at least two source skills, and every written rule file has been read back and listed in the report.

Guardrails

  • Never edit a skill file during distillation; this command only writes rules.
  • Never write a rule the user did not approve in the picker.
  • Never duplicate a rule that already exists; amend or link instead.

Read the full file on GitHub · 44 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. 5d ago Changed · +32 lines · +24 tokens per session scan A → B e946464b4b43
  2. 1mo ago First seen · 12 lines · 14 tokens per session scan A 6ebde0e28057

Subscribe to this mod's changes

ccc-rules-distill is a command published in the GitHub repository KevinZai/commander (6 stars, last pushed today), licensed MIT. It adds 38 tokens to every session and 576 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (enumerates other installed skills). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.