agentleFS
danielrosehilldanielrosehill/KDP-Publishing-Plugin/skills/kdp-print-geometry/SKILL.md

kdp-print-geometry

Skill3 starsChanged 3 days agoMITView on GitHub

Choose a KDP trim size, paper and margins, and compute spine width and full-wrap cover dimensions. Use when starting a book project, when deciding between trim sizes, when a page count changes and the cover has to follow, or whenever a spine, gutter, bleed or wrap dimension is being calculated or quoted. Biased toward KDP's US standard trim sizes.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every number here comes from scripts/kdp_geometry.py.

    line 8
  2. Distinctive:

    If nothing in the interior touches the edge, supply the file at trim size and select "No bleed".

    line 105

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

KDP print geometry

Every number here comes from scripts/kdp_geometry.py. Do not compute a spine width, a wrap dimension or a gutter minimum in your head or in a one-off snippet — call the module. A caliper written down in two places is a caliper that will eventually disagree with itself.

python3 ${CLAUDE_PLUGIN_ROOT}/scripts/kdp_geometry.py --list-trims
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/kdp_geometry.py --pages 398 --trim 6x9
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/kdp_geometry.py --pages 398 --json

Prefer a standard trim

KDP splits paperback trims into standard and non-standard. Standard sizes are available in every marketplace, are the only ones some distribution channels accept, and are what the print-cost tables are quoted against. Non-standard sizes print, but expanded distribution may refuse them and the economics are worse.

So: recommend a standard size, and treat a non-standard one as a decision that has to be made deliberately rather than by typing a number slightly wrong. The module returns standard: null for a non-standard trim and every caller surfaces it — that is the warning working as intended, not a bug to route around.

The defaults worth reaching for first:

BookTrim
Non-fiction, guides, reference, technical6x9
Novels, memoir5.5x8.5
Novellas, poetry5x8
Workbooks, manuals, anything with figures7x10
Wide tables, code listings, textbooks8.5x11

Trims above 6.12in wide or 9in tall are "large trim" and cost more to print. Say so when recommending one.

Spine width

Page count times per-page caliper. No minimum, no rounding.

PaperCaliper (in/page)
White B&W0.002252
Cream B&W0.0025
Standard colour0.002252
Premium colour0.002347

The paper chosen in the KDP form must match the paper the cover was built for, or the spine KDP computes stops matching the spine that was printed.

KDP prints no spine text at 79 pages or under. Above that, keep type inside the band left after 0.0625in of clearance on each side — the press trims with variance toward either face, so type filling the full spine width runs onto a cover.

Full wrap

wrap width  = bleed + trim_w + spine + trim_w + bleed
wrap height = bleed + trim_h + bleed

Bleed is 0.125in, on all four outside edges of the wrap. The cover is one page carrying back, spine and front — not three pages, not three files. Back cover on the left, front on the right.

KDP's minimum safe zone is 0.25in from the trim line. The bundled template uses 0.375in because type sitting exactly on the compliance figure reads on a proof as though it is about to fall off the page.

Margins and the gutter

The inside margin (gutter) minimum is tiered by page count — this is the one people get wrong, because it means a book that grows past a tier boundary needs its margins changed:

PagesMinimum gutter
up to 1500.375in
151–3000.500in
301–5000.625in
501–7000.750in
701–8280.875in

Outside margins: 0.25in minimum without bleed, 0.375in with. These are rejection thresholds, not designs — recommended_margins() adds a buffer over the floor, because a book set exactly at the minimum is accepted by KDP and still reads badly.

build-interior.py derives margins from the measured first-pass extent for exactly this reason.

Bleed

Bleed is for interiors where art runs to the page edge. With bleed the interior FILE is larger than the trim — 0.125in added to the top, bottom and outer edge, never the gutter edge, which is bound rather than trimmed.

If nothing in the interior touches the edge, supply the file at trim size and select "No bleed". Choosing bleed for a text-only book tells KDP to trim 0.125in off content that is not there.

Verify before quoting

reference/ carries the source and the verification date for each table. KDP changes these figures without notice and without a changelog. If a number is about to go into a real upload and the date is old, say the date rather than presenting the figure as current.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.