Install
openclaw skills install kdp-publisherClawHub Security found sensitive or high-impact capabilities. Review the scan results before using.
Helps agents create, format, and publish children's books and activity books to Amazon KDP. Covers the full pipeline from story prompt through PDF assembly, cover creation, and upload guidance. Triggers on KDP publishing, children's book creation, activity book generation, book formatting, Amazon self-publishing, and book cover design.
openclaw skills install kdp-publisherHelps agents create, format, and publish children's books and activity books to Amazon Kindle Direct Publishing (KDP). Covers the full pipeline from story generation through KDP upload.
Load this skill when the user mentions:
| Type | Trim Size | Interior | Notes |
|---|---|---|---|
| Children's picture book | 8.5×8.5" | Full color | Illustration + text spreads |
| Activity book | 8.5×11" | Color or B&W | I Spy, dot-to-dot, etc. |
| Coloring book | 8.5×11" | B&W | Thick clean lines, no shading |
| Math workbook | 8.5×11" | B&W | Practice problems + answer key |
| Puzzle book | 8.5×11" | B&W | Word search, sudoku, crossword |
prompt → story generation → illustration → interior PDF → cover PDF → metadata → KDP upload
Use scripts/generate-book.py for picture books. For workbooks/puzzles, use a puzzle generator tool (BookBolt, custom scripts).
python3 scripts/generate-book.py "a curious octopus who learns to share" \
--type picture-book \
--age-group 3-5 \
--style watercolor \
--output-dir output/
Story requirements:
Critical image rules:
See references/kdp-specs.md for exact dimensions.
8.5×8.5 No Bleed (picture books):
Text rules:
Use scripts/create-cover.py for the full wrap PDF (front + spine + back + bleed):
python3 scripts/create-cover.py \
--title "The Curious Octopus" \
--author "Your Name" \
--pages 28 \
--paper white \
--front-image output/curious-octopus/images/cover.png \
--back-text "Follow Otto the octopus as he discovers the joy of sharing..." \
--output output/curious-octopus/cover.pdf
Spine width formulas (KDP standard):
Cover dimensions (8.5×8.5, white color, 28 pages):
Cover design rules:
Description rules:
KDP metadata fields:
python3 scripts/validate-book.py \
--interior output/curious-octopus/interior.pdf \
--cover output/curious-octopus/cover.pdf \
--metadata output/curious-octopus/metadata.json
Checks: page count, trim dimensions, image resolution, no-text-in-images, description/story consistency.
Browser automation rules (critical):
type on KDP form fields — focus shifts and input breaksevaluate with element IDs:
document.getElementById('data-print-book-title').value = 'The Curious Octopus';
document.getElementById('data-print-book-title').dispatchEvent(new Event('input', {bubbles:true}));
DOM.setFileInputFiles + change event (Playwright upload action doesn't work):
// After DOM.setFileInputFiles:
document.querySelector('input[type=file]').dispatchEvent(new Event('change', {bubbles:true}));
#data-print-book-interior-processing-status to show COMPLETED before proceedingCategory selection:
For non-narrative books, skip the story generation step. Instead:
Math workbook rules:
Coloring book rules:
| Book Type | Paperback Price | Expected Royalty/Sale |
|---|---|---|
| Kids picture book | $12.99 | ~$5.00 |
| Activity book (color) | $8.99-$10.99 | ~$3.10-$4.50 |
| Math/puzzle workbook | $9.99-$12.99 | ~$4.30-$6.00 |
| Coloring book | $7.99-$9.99 | ~$3.30-$4.50 |
Use 70% royalty tier: price must be $2.99-$9.99 for ebooks. Paperbacks always use 60% tier.
See references/ads-quickstart.md for full setup. Summary:
These were learned through production and would not be obvious from KDP documentation:
KDP form automation: Use JS evaluate + element IDs. Never use browser type action — fields shift focus mid-input.
File upload via CDP: Standard Playwright upload fails on KDP. Use DOM.setFileInputFiles + dispatch change event. See TOOLS.md for full script path.
Spine width formula: White paper B&W = pages × 0.002252. White paper color = pages × 0.002347. This is what KDP Cover Calculator gives you.
8.5×8.5 No Bleed margin: Images must fit within 576×576 pt content area on a 612×612 pt page. Images touching the trim edge will fail KDP preflight.
No text in AI illustrations: Every image prompt must include "no text, no words, no letters". Text baked into AI images is often garbled. Always overlay text programmatically.
Descriptions from finished content: Never write the description from the original prompt. Write it after the story is final — use actual character names and plot.
KDP categories: Select via cascade dropdowns in the modal, then JS-click the placement checkbox. Don't rely on Playwright click for the final checkbox.
Math workbooks: No answer lines below equations. Kids write below the problem line.
Stale form state: Reload the KDP page before each upload session. Uploading a second file to a page already mid-process fails silently.
AI disclosure: Amazon requires disclosure if text OR images are AI-generated. Select Yes during upload. Non-disclosure can result in account action.
references/kdp-specs.md — Trim sizes, margins, bleed, spine width tables, file requirementsreferences/qa-checklist.md — Pre-upload quality checklistreferences/niche-guide.md — Profitable niches with pricing and competition datareferences/ads-quickstart.md — Amazon Ads campaign setup and optimizationscripts/generate-book.py — Full book generation pipeline (story + illustrations + interior PDF)scripts/create-cover.py — Standalone cover wrap PDF generatorscripts/validate-book.py — Pre-upload validatorpip install reportlab Pillow google-genai PyPDF2
# Optional for validation:
pip install pytesseract # OCR-based text-in-image detection
API key: Set GOOGLE_AI_API_KEY env var, or pass --api-key, or create ~/.clawdbot/credentials/google_ai.json with {"api_key": "..."}.