book-publisher
Skill0 starsChanged 2 months agoMITView on GitHub
Build designed PDF+EPUB books/lead magnets from Markdown: swappable themes, checklists, cover page, sidenotes.
- Installs packages
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 48
Write the manuscript as one .md file — start from assets/example-book.md (a working, buildable reference covering every pattern, …
- Distinctive: line 72
Default output is single-sided: every page uses the same fixed margins, correct for reading one page at a time on a screen (which is what …
- Distinctive: line 85
Don't guess a look from memory — derive it the same way the two existing themes were built: fetch the actual PDF/page, sample real pixel …
- Very specific: line 95
All tokens (colors, fonts, page geometry, type scale) are CSS custom properties at the top of each assets/themes/<name>/pdf.css.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Book Publisher
Turns a single Markdown manuscript into a professionally designed PDF and EPUB via a swappable theme system — each theme reproduces a real reference design (a PDF someone liked, a web page someone liked) rather than a generic default look. One manuscript, any theme, no edits needed between them.
When to use
Any request to produce a polished ebook, lead magnet, guide, or report as
a downloadable PDF and/or EPUB — not a one-off text answer, and not a
plain unstyled document (use the docx/pdf skills for those instead).
Also use this when the user points at a PDF or web page and says "I like
this look, use it for our book(s)" — that's a request to add a new theme
(see "Adding a theme" below), not a one-off styling hack.
Themes
boardroom(default) — corporate lead-magnet look: colored Part/Chapter/ Section headings, wide left margin, full-bleed color cover.tufte— monochrome academic/print look adapted from Tufte CSS: serif throughout, sidenotes in a right-margin rail, restrained paper-white cover.jianghu— translated-novel look: digest trim, first-line-indent body paragraphs, centered chapter openers, real bottom-of-page footnotes, a gold-rule frontmatter "plate", roman-numeral front matter that resets to Arabic 1 at Chapter 1.haibara— business-guide look reverse-engineered from the HBR Guide series (2012): 372x642pt trim, serif body with first-line indents, light- bold sans chapter openers a quarter of the way down the page, running head top-outer and folio bottom-outer, roman-numeral front matter, a "Contents" page with real page numbers.
Full details, tokens, and how each was derived: references/themes.md.
Workflow
- Read
references/content-model.mdfor the Markdown conventions (heading levels = Part/Chapter/Section, the "repeat the Part heading before every Chapter" pagination rule, checklist/definition/sidenote syntax, front-matter fields). - Write the manuscript as one
.mdfile — start fromassets/example-book.md(a working, buildable reference covering every pattern, theme-agnostic) rather than from scratch. - First time on a host:
python3 scripts/check_deps.py, thenbrew install pandoc(or apt/dnf) anduv tool install weasyprintif either is missing. Details and the macOS dylib gotcha are inreferences/cli-workflow.md. - Build:
python3 scripts/build_book.py manuscript.md --out dist --theme boardroom. Producesdist/<name>.pdf,dist/<name>.epub, anddist/preview/page-NN.pngfor the first few pages. - View rendered pages before calling the book done. CSS paged-media
output has real failure modes (overflow, bad breaks, color mistakes,
running header/footer bleeding onto the cover) that only show up
rendered, and most of them sit past the three default previews. Read
page-01..03.png, then rasterize and Read these pages as well: the contents page, the first chapter opener, one page each with a table, a figure, and a sidenote, and the last two pages (rasterize snippet inreferences/cli-workflow.md, "QA loop"). For books over ~40 pages also build a contact sheet (a PIL grid of every page at ~220px wide) and Read it once to catch bad breaks across the whole book. - Iterate on the theme's CSS or the manuscript, rebuild, re-check.
Facing pages (print/duplex)
Default output is single-sided: every page uses the same fixed margins,
correct for reading one page at a time on a screen (which is what both
current themes' source references are). If the book is actually going
to be printed and bound double-sided, add --facing-pages: margins and
running header/footer mirror between odd (recto/right) and even
(verso/left) pages, and chapters start on a recto page (inserting a
blank verso if needed) instead of wherever they happen to fall. EPUB is
reflowable and unaffected either way. Per-theme mechanics, and a real
CSS limitation (sidenote rails can't fully alternate sides — documented
rather than silently wrong) are in each theme's facing-pages.css.
Adding a theme (new reference design)
Don't guess a look from memory — derive it the same way the two existing
themes were built: fetch the actual PDF/page, sample real pixel colors
and read the real CSS/fonts, then translate to WeasyPrint paged media.
Full step-by-step and the WeasyPrint gotchas already hit (cover-page
header/footer bleed, page-canvas background not covering margins, flex
mis-sizing checklists) are in references/themes.md — read it before
starting so those bugs aren't re-introduced.
To change an existing theme
All tokens (colors, fonts, page geometry, type scale) are CSS custom
properties at the top of each assets/themes/<name>/pdf.css. Edit tokens
first; only touch individual selectors for structural changes.
Fonts default to a zero-dependency system stack per theme (already
renders correctly on any host). Run scripts/fetch_fonts.py only if
pixel-exact, fully self-contained typography is required (embeds Fira
Sans, OFL-licensed); wire it in with --extra-css assets/fonts.css.
Files
assets/themes/<name>/{pdf.css,epub.css,facing-pages.css}— the design systems (facing-pages.cssonly applies with--facing-pages).assets/template.pdf.html5— Pandoc HTML template (cover/front- matter/TOC wrapper) shared by every theme, feeding WeasyPrint.assets/example-book.md— copy-and-edit starter manuscript.scripts/build_book.py— the only command needed to produce output.scripts/check_deps.py,scripts/fetch_fonts.py— setup helpers.
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- dmccreary/claude-skills★ 111same name
- dmccreary/ibook-skills★ 111same name
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.
In this repositoryOne other file it gives its agents.
- site/llms.txtllms.txt
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

