laws: Skill for Claude Code

.claude/skills/distill/SKILL.md

distill is a skill for Claude Code from promptctl/laws. It costs 147 tokens per session (1,410 once invoked), scanned A, original, MIT.

A rewriting workflow that turns a long, story-filled guidance document for an AI or developer into a short specification. It keeps the original rules, conditions, exceptions, and stated failure cases while removing repetition and metaphor.

In plain words
What is it for?
Use it to distil skill instructions, system prompts, project guidance, or similar documents into a concise specification with clear conditions and exceptions.
Why use it?
It makes instructions easier to follow by stating each rule once and distinguishing required actions from preferences and permissions. It also avoids adding rules that were not in the source.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md; mentions subagents.

This is promptctl/laws's own configuration. It tells Claude Code how to work on laws itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything laws configures →

Reuse

Borrowing it

Nothing to install: this file belongs to promptctl/laws. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/promptctl/laws/master/.claude/skills/distill/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/promptctl/laws

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 distill

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/promptctl/laws/distill"><img src="https://agentmods.dev/badge/skills/promptctl/laws/distill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 147 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,410 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.00147 $0.01410
Opus 5.5 $0.00059 $0.00564
Sonnet 5.5 $0.00029 $0.00282
Haiku 4.5 $0.00015 $0.00141

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

Security

Grade A, and why

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 1mo 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.

.claude/skills/distill/SKILL.md · 100 lines

How it starts

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

Distill

Scope: one source document written for an LLM reader, rewritten as a specification for the same reader. The output carries the same rules as the source and nothing the source did not say.

Terms

  • Rule: a statement the source expects the reader to obey. Rules are stated directly, or carried by a story, metaphor, example, warning, or self-check question.
  • Strength: hard (Do / Do not), soft (Prefer / Avoid), or permission (May). A declarative sentence about what the reader does or what the output is ("A ticket carries its why") is hard unless the source softens it ("usually", "ideally", "encouraged"). A symptom the source names without an imperative is written as the check it implies: "Treat X as a sign to revise."
  • Condition: when a rule applies. Exception: when it does not.
  • Failure clause: one sentence on a requirement naming a mistake the source says is made, by the reader of the guidance or by the readers of what they produce, e.g. "Failure: writers skip this when they think they know the reader." Written only where the source says the mistake happens.

Setup

  1. Do not read laws:prompt or plugins/laws/skills/prompt/references/craft.md in this session, unless that craft is itself the source; then read it only as material to extract, never as guidance for your output. If either is in context for any other reason, stop and run this skill in a fresh session or a fresh subagent seeded with only this skill.
  2. Fix the source path and the output path. Default output: the source's directory, same basename with .spec.md. An output path the requester names wins. Never overwrite the source.
  3. Read the whole source before extracting anything.

Extract

Build a working list, not part of the output. One entry per rule: source location, statement, strength, condition, exceptions, failure clause.

  1. A direct statement is one entry.
  2. A story or anecdote yields the rule it demonstrates and the condition that triggered it. The characters, setting, and outcome are dropped. If the story shows a mistake being made, that mistake becomes the entry's failure clause.
  3. A metaphor yields the literal claim it stands for.
  4. An example yields the rule it demonstrates. Keep the example itself only if the rule cannot be stated without it, cut to the shortest form that still shows it. A bad example yields a failure clause only if the source says its mistake is actually made.
  5. A warning about a temptation ("you will want to X; refuse it") is a Do-not entry with its trigger as the condition and the temptation as its failure clause.
  6. A self-check or diagnostic question becomes the check inside the requirement it tests.
  7. Passages that say the same rule in different words merge into one entry, with the strongest strength any of them used; if they disagree, record the disagreement for the report. A soft passage and a hard passage that state separable rules are split instead of merged. Two rules that conflict with no order in the source both stay, and the conflict is recorded for the report.
  8. A term the source coined or uses in a non-plain sense is replaced by the plain term. If no plain term exists, or the plain term loses part of the meaning, and the term appears in two or more entries, define it once under Terms. Identifiers the source attaches to rules, such as [LAW:token], stay on their requirements.
  9. Rationale is dropped. Keep one clause of it only where the rule's boundary cannot be found without it.
  10. Pure motivation, praise, framing, audience address, and passages addressed to the source's editors rather than its reader yield no entry.
  11. Record every passage that yielded no entry, whichever rule dropped it, including passages used only for the Scope sentence. On a long source, group them by kind with line ranges.

Read the full file on GitHub · 100 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. 1mo ago First seen · 100 lines · 147 tokens per session scan A b44a0a31f66a

Subscribe to this mod's changes

distill is a skill published in the GitHub repository promptctl/laws (6 stars, last pushed 3d ago), licensed MIT. It adds 147 tokens to every session and 1,410 once invoked, about $0.0006 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-09-16.

Related

distill compared with skills from other repositories

distill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
distillpromptctl/lawsSkill63d agoMITA147Claude Code
imagegenopenai/codexSkill133kyesterdayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill99kyesterdayApache-2.0A19Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79k4d agoMITA200Claude Code, Codex
systematic-debuggingobra/superpowersSkill313k3d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143kyesterdayMITA95Claude Code
next-partial-prefetching-adoptionvercel/next.jsSkill143kyesterdayMITA103Claude Code