bmad-distillator
Skill26 starsChanged 9 months agoMITView on GitHub
Lossless LLM-optimized compression of source documents. Use when the user requests to 'distill documents' or 'create a distillate'.
We split this skill into the rules it gives an agent
12 rules. 6 are common, 0 are distinctive, and 6 are very specific to this project.
6
Common
Most of the 8 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 37
Run scripts/analyze_sources.py --help then run it with the source paths.
- Very specific: line 49
After all compressors return, spawn one final merge compressor subagent using agents/distillate-compressor.md.
- Very specific: line 53
Graceful degradation: If subagent spawning is unavailable, read the source documents and perform the compression work directly using the …
- Common: line 59
After the compressor (or merge compressor) returns:
- Common: line 63
Format check: Verify the output follows distillate format rules:
- Common: line 64
No prose paragraphs (only bullets)
- Very specific: line 91
Create a folder {base-name}-distillate/ containing:
- Very specific: line 111
Measure distillate: Run scripts/analyze_sources.py on the final distillate file(s) to get accurate token counts for the output.
- Common: line 113
Report results: Always return structured JSON output:
- Very specific: line 130
If --validate flag was set, proceed to Stage 4.
- Common: line 140
Graceful degradation: If subagent spawning is unavailable, this stage cannot be performed by the main agent (it has already seen the …
- Common: line 144
Perform semantic diff: Read both the original source documents and the reconstructions.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Distillator: A Document Distillation Engine
Overview
This skill produces hyper-compressed, token-efficient documents (distillates) from any set of source documents. A distillate preserves every fact, decision, constraint, and relationship from the sources while stripping all overhead that humans need and LLMs don't. Act as an information extraction and compression specialist. The output is a single dense document (or semantically-split set) that a downstream LLM workflow can consume as sole context input without information loss.
This is a compression task, not a summarization task. Summaries are lossy. Distillates are lossless compression optimized for LLM consumption.
On Activation
- Validate inputs. The caller must provide:
- source_documents (required) — One or more file paths, folder paths, or glob patterns to distill
- downstream_consumer (optional) — What workflow/agent consumes this distillate (e.g., "PRD creation", "architecture design"). When provided, use it to judge signal vs noise. When omitted, preserve everything.
- token_budget (optional) — Approximate target size. When provided and the distillate would exceed it, trigger semantic splitting.
- output_path (optional) — Where to save. When omitted, save adjacent to the primary source document with
-distillate.mdsuffix. - --validate (flag) — Run round-trip reconstruction test after producing the distillate.
- Route — proceed to Stage 1.
Stages
| # | Stage | Purpose |
| 1 | Analyze | Run analysis script, determine routing and splitting |
| 2 | Compress | Spawn compressor agent(s) to produce the distillate |
| 3 | Verify & Output | Completeness check, format check, save output |
| 4 | Round-Trip Validate | (--validate only) Reconstruct and diff against originals |
Stage 1: Analyze
Run scripts/analyze_sources.py --help then run it with the source paths. Use its routing recommendation and grouping output to drive Stage 2. Do NOT read the source documents yourself.
Stage 2: Compress
Single mode (routing = "single", ≤3 files, ≤15K estimated tokens):
Spawn one subagent using agents/distillate-compressor.md with all source file paths.
Fan-out mode (routing = "fan-out"):
- Spawn one compressor subagent per group from the analysis output. Each compressor receives only its group's file paths and produces an intermediate distillate.
- After all compressors return, spawn one final merge compressor subagent using
agents/distillate-compressor.md. Pass it the intermediate distillate contents as its input (not the original files). Its job is cross-group deduplication, thematic regrouping, and final compression. - Clean up intermediate distillate content (it exists only in memory, not saved to disk).
Graceful degradation: If subagent spawning is unavailable, read the source documents and perform the compression work directly using the same instructions from agents/distillate-compressor.md. For fan-out, process groups sequentially then merge.
The compressor returns a structured JSON result containing the distillate content, source headings, named entities, and token estimate.
Stage 3: Verify & Output
After the compressor (or merge compressor) returns:
- Completeness check. Using the headings and named entities list returned by the compressor, verify each appears in the distillate content. If gaps are found, send them back to the compressor for a targeted fix pass — not a full recompression. Limit to 2 fix passes maximum.
- Format check. Verify the output follows distillate format rules:
- No prose paragraphs (only bullets)
- No decorative formatting
- No repeated information
- Each bullet is self-contained
- Themes are clearly delineated with
##headings
Determine output format. Using the split prediction from Stage 1 and actual distillate size:
Single distillate (≤~5,000 tokens or token_budget not exceeded):
Save as a single file with frontmatter:
--- type: bmad-distillate sources: - "{relative path to source file 1}" - "{relative path to source file 2}" downstream_consumer: "{consumer or 'general'}" created: "{date}" token_estimate: {approximate token count} parts: 1 ---Split distillate (>~5,000 tokens, or token_budget requires it):
Create a folder
{base-name}-distillate/containing:{base-name}-distillate/ ├── _index.md # Orientation, cross-cutting items, section manifest ├── 01-{topic-slug}.md # Self-contained section ├── 02-{topic-slug}.md └── 03-{topic-slug}.mdThe
_index.mdcontains:- Frontmatter with sources (relative paths from the distillate folder to the originals)
- 3-5 bullet orientation (what was distilled, from what)
- Section manifest: each section's filename + 1-line description
- Cross-cutting items that span multiple sections
Each section file is self-contained — loadable independently. Include a 1-line context header: "This section covers [topic]. Part N of M."
Source paths in frontmatter must be relative to the distillate's location.
- Measure distillate. Run
scripts/analyze_sources.pyon the final distillate file(s) to get accurate token counts for the output. Use thetotal_estimated_tokensfrom this analysis asdistillate_total_tokens. Report results. Always return structured JSON output:
{ "status": "complete", "distillate": "{path or folder path}", "section_distillates": ["{path1}", "{path2}"] or null, "source_total_tokens": N, "distillate_total_tokens": N, "compression_ratio": "X:1", "source_documents": ["{path1}", "{path2}"], "completeness_check": "pass" or "pass_with_additions" }Where
source_total_tokensis from the Stage 1 analysis anddistillate_total_tokensis from step 4. Thecompression_ratioissource_total_tokens / distillate_total_tokensformatted as "X:1" (e.g., "3.2:1").- If
--validateflag was set, proceed to Stage 4. Otherwise, done.
Stage 4: Round-Trip Validation (--validate only)
This stage proves the distillate is lossless by reconstructing source documents from the distillate alone. Use for critical documents where information loss is unacceptable, or as a quality gate for high-stakes downstream workflows. Not for routine use — it adds significant token cost.
Spawn the reconstructor agent using
agents/round-trip-reconstructor.md. Pass it ONLY the distillate file path (or_index.mdpath for split distillates) — it must NOT have access to the original source documents.For split distillates, spawn one reconstructor per section in parallel. Each receives its section file plus the
_index.mdfor cross-cutting context.Graceful degradation: If subagent spawning is unavailable, this stage cannot be performed by the main agent (it has already seen the originals). Report that round-trip validation requires subagent support and skip.
- Receive reconstructions. The reconstructor returns reconstruction file paths saved adjacent to the distillate.
- Perform semantic diff. Read both the original source documents and the reconstructions. For each section of the original, assess:
- Is the core information present in the reconstruction?
- Are specific details preserved (numbers, names, decisions)?
- Are relationships and rationale intact?
- Did the reconstruction add anything not in the original? (indicates hallucination filling gaps)
Produce validation report saved adjacent to the distillate as
-validation-report.md:--- type: distillate-validation distillate: "{distillate path}" sources: ["{source paths}"] created: "{date}" --- ## Validation Summary - Status: PASS | PASS_WITH_WARNINGS | FAIL - Information preserved: {percentage estimate} - Gaps found: {count} - Hallucinations detected: {count} ## Gaps (information in originals but missing from reconstruction) - {gap description} — Source: {which original}, Section: {where} ## Hallucinations (information in reconstruction not traceable to originals) - {hallucination description} — appears to fill gap in: {section} ## Possible Gap Markers (flagged by reconstructor) - {marker description}- If gaps are found, offer to run a targeted fix pass on the distillate — adding the missing information without full recompression. Limit to 2 fix passes maximum.
- Clean up — delete the temporary reconstruction files after the report is generated.
Other versions11 projects use a version of this.
Word for word · 3
- DogaOztuzun/branchdeck★ 18100% same
- ChrisBP-Dev/portfolio★ 1100% same
- cwoodcox/on-record★ 0100% same
Edited · 8
- delorenj/mcp-server-trello★ 446100% same
- paulpreibisch/AgentVibes★ 155100% same
- armelhbobdad/oh-my-skills★ 7100% same
- mugsun/curdx-flow★ 4100% same
- salacoste/oh-my-bmad★ 2100% same
- AvishkaGihan/ventureiq★ 1100% same
- Wellington-HMV/agentiq★ 1100% same
- ojaydev/skim-intelligence★ 0100% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use bmad-agent-qa, bmad-agent-sm and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
DogaOztuzunSkillbmad-agent-qa
QA engineer for test automation and coverage. Use when the user asks to talk to Quinn or requests the QA engineer.
Also in 4 projects that use this
DogaOztuzunSkillbmad-agent-sm
Scrum master for sprint planning and story preparation. Use when the user asks to talk to Bob or requests the scrum master.
Also in 4 projects that use this
GauravRatnawatSkillbmad-checkpoint-preview
LLM-assisted human-in-the-loop review. Make sense of a change, focus attention where it matters, test. Use when the user says "checkpoint", "human review", or "walk me through this change".
Also in 6 projects that use this
GauravRatnawatSkillbmad-prfaq
Working Backwards PRFAQ challenge to forge product concepts. Use when the user requests to 'create a PRFAQ', 'work backwards', or 'run the PRFAQ challenge'.
Also in 7 projects that use this
airclearSkillbmad-tea
Enterprise Test Architecture (TEA) framework for quality engineering. Includes workflows for testing education (TEA Academy), risk-based test design, framework scaffolding, ATDD (Red-phase), CI/CD pipeline configuration, NFR (Non-functional) assessment, and quality auditing (0-100 scoring). Use for establishing or executing comprehensive testing strategies.
Also in 4 projects that use this
- +7 more from DogaOztuzun
In this repository150 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- bmad-advanced-elicitationSkill
- bmad-agent-builderSkill
- bmad-agent-cis-brainstorming-coachSkill
- bmad-agent-cis-creative-problem-solverSkill
- bmad-agent-cis-design-thinking-coachSkill
- bmad-agent-cis-innovation-strategistSkill
- bmad-agent-cis-presentation-masterSkill
- bmad-agent-cis-storytellerSkill
- bmad-analystSkill
- bmad-architectSkill
- bmad-brainstormingSkill
- bmad-check-implementation-readinessSkill
- bmad-cis-design-thinkingSkill
- bmad-cis-innovation-strategySkill
- bmad-cis-problem-solvingSkill
- bmad-cis-storytellingSkill
- bmad-code-reviewSkill
- bmad-correct-courseSkill
- bmad-create-architectureSkill
- bmad-create-epics-and-storiesSkill
- bmad-create-prdSkill
- bmad-create-product-briefSkill
- bmad-create-storySkill
- bmad-create-ux-designSkill
- bmad-devSkill
- bmad-dev-storySkill
- bmad-document-projectSkill
- bmad-domain-researchSkill
- bmad-editorial-review-proseSkill
- bmad-editorial-review-structureSkill
- bmad-edit-prdSkill
- bmad-generate-project-contextSkill
- bmad-helpSkill
- bmad-index-docsSkill
- bmad-market-researchSkill
- bmad-party-modeSkill
- bmad-pmSkill
- bmad-product-brief-previewSkill
- bmad-qa-generate-e2e-testsSkill
- bmad-qaSkill
- bmad-quick-dev-new-previewSkill
- bmad-quick-devSkill
- bmad-quick-flow-solo-devSkill
- bmad-quick-specSkill
- bmad-retrospectiveSkill
- bmad-review-adversarial-generalSkill
- bmad-review-edge-case-hunterSkill
- bmad-shard-docSkill
- bmad-smSkill
- bmad-sprint-planningSkill
- bmad-sprint-statusSkill
- bmad-teach-me-testingSkill
- bmad-technical-researchSkill
- bmad-tech-writerSkill
- bmad-testarch-atddSkill
- bmad-testarch-automateSkill
- bmad-testarch-ciSkill
- bmad-testarch-frameworkSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

