distill

distill is a skill for Claude Code, Codex from sjarmak/agent-workflows. It costs 0 tokens per session (1,349 once invoked), scanned A, original, MIT.

A skill that repeatedly shortens a large document or other artifact while preserving its most important information. It also examines what was removed at each stage to reveal which details mattered least.

In plain words
What is it for?
Use it with a file or pasted text to measure, compress, and review the retained and discarded information.
Why use it?
It helps make long material easier to understand while showing how its priorities change during summarisation.

Skill for Claude CodeCodex

Part of the agent-workflows plugin — 28 skills, 4 agents, 4 hooks 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/sjarmak/agent-workflows/distill
Any agent
npx skills add sjarmak/agent-workflows --skill distill
Clone the repo
git clone --depth 1 https://github.com/sjarmak/agent-workflows

Made for: Claude Code, Codex.

Or install agent-workflows, the plugin that ships this one along with the rest of its 28 skills, 4 agents, 4 hooks.

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/sjarmak/agent-workflows/distill.svg)](https://agentmods.dev/skills/sjarmak/agent-workflows/distill)
Your own site
<a href="https://agentmods.dev/skills/sjarmak/agent-workflows/distill"><img src="https://agentmods.dev/badge/skills/sjarmak/agent-workflows/distill.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,349 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.00000 $0.01349
Opus 5 $0.00000 $0.00674
Sonnet 5 $0.00000 $0.00270
Haiku 4.5 $0.00000 $0.00135

Measured 5d ago against content hash 920db8943c7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

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/distill/SKILL.md · 134 lines

How it starts

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

Essence Extraction via Progressive Compression. Takes a large artifact and runs it through a chain of compression agents where each must compress the previous output by ~50% while preserving the most important information. The key insight: the DROPS at each compression layer — what each agent chose to cut — reveal the priority hierarchy. The waste product IS the signal.

Arguments

$ARGUMENTS — format: [path/to/artifact.md or inline text]

Parse Arguments

Extract:

  • artifact_source: a file path or inline text

If the argument looks like a file path (contains / or ends in a common extension), treat it as a path and read the file. Otherwise, treat the entire argument as inline text.

If no argument is provided, ask the user what artifact they want to distill.

Phase 1: Ingest the Artifact

  1. Read the file or parse inline text
  2. Measure its size (word count, section count)
  3. If it is very short (< 500 words), tell the user it is already concise enough — distill works best on substantial artifacts. Offer to proceed anyway if they insist.
  4. Present a summary of what will be compressed:
    • Source (file path or "inline text")
    • Word count
    • Number of sections/headers
    • A 2-3 sentence description of the artifact's apparent purpose
  5. Confirm with the user before proceeding. Adjust if the user gives feedback.

Phase 2: Run Compression Chain

Run 4 sequential compression agents. Each one:

  1. Receives the previous agent's output (or the original artifact for agent 1)
  2. Must compress it to roughly 50% of its length (note: code-heavy artifacts may compress non-linearly -- if the input is dominated by code blocks, summarize them rather than stripping entirely, and aim for 40-60% as an acceptable range)
  3. Must explicitly list what it DROPPED and why
  4. Must preserve the most important information in its judgment

Agent prompt template for each stage:

You are a compression agent. Your job is to compress the following text to roughly 50% of its current length while preserving the most important information.

## Input ({word_count} words)
{previous_output}

## Instructions
1. Read the input carefully
2. Identify what is MOST important (load-bearing claims, decisions, data, actionable items)
3. Identify what is LEAST important (context that can be inferred, repetition, hedging, examples that illustrate already-clear points)
4. Produce a compressed version at roughly {target_word_count} words
5. List EXPLICITLY what you dropped and why

## Output Format

### Compressed ({target_word_count} words target)
[Your compressed version]

### Dropped
| What was cut | Why | Importance (1-5) |
|-------------|-----|-----------------|
| [specific content] | [reason] | [how important was it really] |

### Compression Decisions
- Hardest cut: [what was most painful to remove and why]
- Easiest cut: [what was clearly noise]
- What I'd restore first if given 25% more space: [...]

Read the full file on GitHub · 134 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 First seen · 134 lines · 0 tokens per session scan A 920db8943c7d

Subscribe to this mod's changes

distill is a skill published in the GitHub repository sjarmak/agent-workflows (9 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,349 tokens. 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

speckit.specify

Skill "speckit.specify" from caipe-io/ai-platform-engineering, covering user input, outline, quick guidelines, section requirements and for ai generation.

caipe-io/ai-platform-engineering · 0 tokens

speckit.clarify

Skill "speckit.clarify" from caipe-io/ai-platform-engineering, covering user input and outline.

caipe-io/ai-platform-engineering · 0 tokens

local-integration-testing

Run end-to-end integration tests with all 15 agents and supervisor in local Docker Compose dev environment. Validates agent discovery, multi-agent routing, checkpoint persistence, and cross-agent follow-up conversations.

caipe-io/ai-platform-engineering · 44 tokens

release-docs

Generate a combined release blog post for ai-platform-engineering. Produces a single docs/releases/YYYY-MM-DD-release-X-Y-Z.md file containing release notes and the upgrade guide (migration guide) inline. Use when cutting a release, when a user asks "what changed in 0.4.x", or when upgrading their values.yaml to a new…

caipe-io/ai-platform-engineering · 76 tokens

update-docs

Audit and update all documentation moving parts for ai-platform-engineering. Checks release blog posts, features page, agent docs, homepage version strings, Docusaurus version config, and sidebar completeness. Fixes what is stale and reports what needs manual attention. Use after cutting a release, adding a new agent…

caipe-io/ai-platform-engineering · 70 tokens

docker-compose-first-install

Validate and repair the OSS first-install Docker Compose path. Use when editing docker-compose.yaml, docker-compose.dev.yaml, .env.example, release image tags, Compose profiles, Keycloak/OpenFGA/RAG defaults, or first-launch UI behavior for local all-in-one installs.

caipe-io/ai-platform-engineering · 60 tokens