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.
npx agentmods add skills/sjarmak/agent-workflows/distillnpx skills add sjarmak/agent-workflows --skill distillgit clone --depth 1 https://github.com/sjarmak/agent-workflowsWrote 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.
[](https://agentmods.dev/skills/sjarmak/agent-workflows/distill)<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>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.
| Model | Per session | Once 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 |
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.
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
- Read the file or parse inline text
- Measure its size (word count, section count)
- 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.
- 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
- Confirm with the user before proceeding. Adjust if the user gives feedback.
Phase 2: Run Compression Chain
Run 4 sequential compression agents. Each one:
- Receives the previous agent's output (or the original artifact for agent 1)
- 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)
- Must explicitly list what it DROPPED and why
- 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: [...]
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.
- 5d ago First seen · 134 lines · 0 tokens per session scan A 920db8943c7d
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.
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.
speckit.clarify
Skill "speckit.clarify" from caipe-io/ai-platform-engineering, covering user input and outline.
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.
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…
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…
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.