From fabrik
Distills long books (PDF, EPUB, Markdown, HTML, plain text) chapter-by-chapter using parallel subagents, then synthesizes results into a concise structured overview or Claude Code skill.
How this skill is triggered — by the user, by Claude, or both
Slash command
/fabrik:distill-bookThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A book is too large to load into one context window and reason about well. So fan it out: split the book into chapters, hand each chapter to its own subagent that distills it in isolation, then read back the short overviews -- not the raw chapters -- and synthesize them.
A book is too large to load into one context window and reason about well. So fan it out: split the book into chapters, hand each chapter to its own subagent that distills it in isolation, then read back the short overviews -- not the raw chapters -- and synthesize them.
The point is context hygiene: each subagent loads only one chapter, and the orchestrator never reads a full chapter, so the approach scales to any size of book. If you find yourself pulling raw chapter text into your own context, you've lost the benefit -- delegate it.
This skill stays deliberately high-level and format-agnostic. A book might arrive as a PDF, EPUB, Markdown, HTML, plain text, or something else; use whatever tools and methods suit that format. The workflow below is what matters, not the mechanics.
Use it when someone wants the core learnings out of a long document (book, manual, report) that's too big to read in one go -- especially when they want the result turned into a skill or a structured overview. For short documents that fit in context, just read them directly; this machinery is overkill.
Check the source is usable, and flag problems before grinding. Confirm you can get real, extractable text out of the document, whatever its format. Some formats need a step first -- a scanned PDF needs OCR, HTML may need its markup stripped -- while Markdown or plain text is ready as-is. Reach for the right tool for the format (for example, the pdf skill for PDFs). If the source won't yield usable text, say so up front rather than after a long process.
Break it into chapters (or natural sections). Read the book's own structure -- table of contents, headings -- to find the boundaries. Conventions vary wildly between books, so this is a judgment call, not a fixed rule; verify the split looks sane before spending tokens on it. If there are no clear chapters, fall back to Parts, sections, or sensible chunks, and say what you did. Usually skip front/back matter (preface, index, appendices) unless it's worth distilling.
Distill each chapter in parallel. Spawn one subagent per chapter, all in a single batch so they run concurrently. Each subagent prompt must be self-contained, and should include:
Synthesize. Read the overviews back (they're small, but all together can be large -- page through them or use a synthesis subagent for a very large book). Then produce the deliverable: a distillation document organized by theme rather than chapter order, or -- if the goal is reusable guidance -- a skill, by handing off to the skill-creator skill. Distill into your own words; you generally don't need to quote the book.
Clean up any intermediate working files unless the user wants them kept.
npx claudepluginhub maragudk/fabrik --plugin fabrikAnalyzes EPUB/PDF books into structured chapter notes with key concepts extracted and synthesized via parallel agents.
Converts markdown books into structured Claude skills with granular reference files, workflows, and use-case guidelines for progressive disclosure.
Distills lasting knowledge from any source — PDF, web article, pasted text, codebase file, transcript, markdown doc, or book chapter. Source-agnostic with type-aware quality rules.