Skip to content
Skill

Book publisher

Turns manuscripts into print-ready PDFs, Kindle EPUBs and KDP cover files

Book publisher is an open-source agent skill for files and documents. It is available on Claude Code.

Scripts
Python
Platforms
Claude Code
GitHub stars
20
Last commit
License
MIT
Listing updated

Similar skills

About Book publisher

Book Publisher is a set of Python scripts and templates for turning a manuscript written in Markdown, Word or plain text into a trade paperback PDF and a Kindle EPUB. The workflow covers converting source files, compiling chapters, generating a table of contents in two rendering passes so page numbers are accurate, and building an index from real page numbers. Interior styling includes running headers, callout boxes, tables, checklists and flowchart helpers.

The skill also guides cover creation. It describes an interactive loop that produces AI-generated bitmap artwork through a local zgen binary, then composes vector text over that art for paperback wraps with spine calculation and Kindle covers. It includes guidance on Amazon KDP dimensions, bleed, and spine text rules, along with a validation checklist for PDF, cover and EPUB output.

Using it requires Python with packages such as fpdf2, pypdf and ebooklib, plus optional Pillow, python-docx and poppler for conversion and validation. Cover generation needs a local zgen install on the PATH.

When your agent uses it

Professional book publishing from Markdown, Word, or text to PDF/EPUB. Use when creating books, converting manuscripts to PDF, generating covers (Kindle and paperback with spine), building indexes with real page numbers, creating table of contents, or formatting chapters. Handles trade paperback (5.5x8.5), two-pass TOC generation, EPUB conversion, and Amazon KDP requirements.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 100 files (2.6 MB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the pstuart-publishing plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add pstuart/pstuart
/plugin install pstuart-publishing@pstuart

Or copy only this skill to ~/.claude/skills/book-publisher:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pstuart/pstuart.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/book-publisher &&
cp -R "$tmp/plugins/pstuart-publishing/skills/book-publisher" ~/.claude/skills/book-publisher &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/book-publisher inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/book-publisher to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pstuart/pstuart.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/book-publisher &&
cp -R "$tmp/plugins/pstuart-publishing/skills/book-publisher" ~/.agents/skills/book-publisher &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/book-publisher inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/book-publisher to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pstuart/pstuart.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/book-publisher &&
cp -R "$tmp/plugins/pstuart-publishing/skills/book-publisher" ~/.cursor/skills/book-publisher &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/book-publisher inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/pstuart/pstuart.git --path plugins/pstuart-publishing/skills/book-publisher

Or copy the folder to ~/.gemini/skills/book-publisher yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/book-publisher:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pstuart/pstuart.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/book-publisher &&
cp -R "$tmp/plugins/pstuart-publishing/skills/book-publisher" ~/.copilot/skills/book-publisher &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/book-publisher inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/pstuart/pstuart.git

Then copy pstuart/plugins/pstuart-publishing/skills/book-publisher into your agent's skills folder as book-publisher. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Manuscript Conversion
Converts Word documents and plain text files into Markdown chapters that the build scripts can compile.
Trade Paperback PDF
Renders a 5.5 by 8.5 inch interior with running headers, page numbers and styled sections.
Two-Pass Table of Contents
Renders the book once to collect actual page numbers, then again so the contents page matches.
Automatic Index
Extracts configured index terms from the PDF text and lists their page numbers alphabetically.
Kindle EPUB Output
Builds an EPUB with navigation tables of contents and responsive stylesheet for Kindle devices.
Cover and Spine Tools
Composes paperback wraps with spine width from page count and Kindle covers at 1600 by 2560 pixels.

Good for

  • Convert my Word manuscript into a print-ready PDF with a table of contents
  • Generate a Kindle EPUB from my chapter Markdown files
  • Build an index with page numbers for my nonfiction book
  • Calculate the spine width and create a KDP paperback cover wrap
  • Check my PDF layout for orphaned headings and overflowing boxes

Book publisher FAQ

What does the skill need installed?

Python packages fpdf2 and pypdf for PDF generation, ebooklib for EPUB, and optionally Pillow, python-barcode, python-docx, poppler and pdf2image for covers, Word conversion and validation. Cover art also needs a local zgen binary on the PATH.

How does Book publisher get accurate table of contents page numbers?

It renders the whole book once to collect the actual page numbers, then renders again with those references so the contents page matches the final layout.

When should spine text be added to a paperback cover?

According to the skill, spine text is drawn only when the book reaches KDP's 100-page minimum for spine text. Spine width is calculated from page count and paper thickness.

Does Book publisher publish books or add access restrictions by default?

No. The skill says outputs stay unrestricted unless the user explicitly asks for owner-password encryption, and publication is treated as a separate action.

How do I install Book publisher in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/book-publisher to use it in all your projects, or to .claude/skills/book-publisher in one project. Or install the pstuart-publishing plugin, which includes it: /plugin marketplace add pstuart/pstuart, then /plugin install pstuart-publishing@pstuart.

Does Book publisher run scripts?

Yes. It runs Python scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Book publisher?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to Book publisher?

The closest alternatives to Book publisher are PDF, Ni poetry book, Convert PDF to md, PDF and Publish to pages.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from pstuart/pstuart

  1. Reports git state, activity and build evidence across every project in a folder

    • Open source
    • 20 GitHub stars
    • Developer tools
  2. Checks web pages against WCAG 2.1 AA contrast, labels, keyboard and ARIA rules

    • Open source
    • 20 GitHub stars
    • Developer tools
  3. Guides an AI agent through building and reviewing Nuxt 4 apps with the app/ layout

    • Open source
    • 20 GitHub stars
    • Developer tools
  4. Walks an agent through a web application security audit checklist and report

    • Open source
    • 20 GitHub stars
    • Security
  5. Guides an agent to style Nuxt and Vue UIs with Tailwind CSS 4 utilities and @theme tokens

    • Open source
    • 20 GitHub stars
    • Developer tools
  6. Guides an agent to write and review strict TypeScript in Vue, Nuxt and Node code

    • Open source
    • 20 GitHub stars
    • Developer tools