twhsi/a4-eight-page-booklet
Use A4 Eight Page Booklet 2.2 to create, write, repair, impose, and validate a printable A4 one-sheet eight-page mini book or zine from text, notes, images, BIRD Graph JSON, iMandalArt/九宮, FIRE, outlines, templates, or PDFs. Use whenever the user says A4八頁小書, 八頁小書, 八頁小冊, 八格小書, A4一張八頁, 八頁在一頁, 8頁在一頁, 八張一頁, 一張紙變八頁, 摺頁書, 折頁小書, 迷你書, 小誌, zine, mini zine, booklet, 做成小書, 印成小書, 單張印出八頁, 幫我拼版, 八頁PDF, 合併八頁, 6-7-8-1/5-4-3-2排列, or asks for eight upright page PDFs, an eight-page reading PDF, an editable DOCX, or a correctly rotated A4 landscape print sheet.
npx skills add https://github.com/twhsi/skills --skill a4-eight-page-booklet
Compile source material into a reproducible paper thinking object. Version 2.2 is the Skill integration release; it keeps BookletManifest 2.0 for backward compatibility, then renders every output from that manifest.
The 2.2 Skill remains in alpha while deterministic scripts are being implemented. Preserve the verified 1.x direct-PDF workflow as legacy-direct; do not claim script-backed validation when a named script is absent.
A4 Eight Page Booklet is the paper publishing king in the three-skill chain:
iMandalArt 2.2 overview -> BIRD 2.2 seven Routes -> A4 Booklet 2.2 reading PDF + print sheet + DOCX
For a complete build, produce:
booklet-output/
├── booklet-manifest.json
├── companion.md
├── pages/page-01.pdf ... page-08.pdf
├── reading-8-pages.pdf
├── print-a4-landscape.pdf
├── editable-pages.docx
├── previews/contact-sheet.png
├── previews/print-imposition.png
└── validation-report.json
Keep all eight single-page PDFs upright. Generate the reading PDF in page order 1–8. Generate the A4 print sheet only after the single pages pass structural checks.
When the user requests a Japanese textbook listening booklet, all three learner-facing formats are mandatory:
print-a4-landscape.pdf: one A4 landscape sheet imposed for folding into eight pages.reading-8-pages.pdf: eight upright pages in reading order for Voice Dream Reader.editable-pages.docx: an editable eight-page Word file that opens cleanly in Apple Pages without blank pages.BookletManifest 2.0. Read references/manifest-schema.md before creating or validating the manifest.companion.md.10. Render previews and perform V1–V4 validation. Record results in validation-report.json; do not report a check as passed without current-run evidence.
Use this mode for みんなの日本語 and comparable lesson-based Japanese materials.
companion.md, not in the booklet.聞きましょう, 止めましょう, and 声に出しましょう; do not fill pages with repeated ellipses.Accept these source types:
text: article, note, chapter, manuscript, reflection, or daily plan.bird_graph: Book, Route, Keyword, Context, Chunk, Node, and Edge data.imandalart: center plus eight cells, including standard and の字型 layouts.fire: Full-D, Index, Route, and Evolution notes.outline: Bike, Bonsai, Markdown, or another explicit hierarchy.pdf_pages: existing pages, templates, scans, or prior booklets.mixed: multiple source types with explicit source mapping.Use only the analysis skills that the source needs. Do not force FIRE, BIRD, iMandalArt, or Daily Plan semantics onto unrelated material.
Use this default sequence when no stronger structure exists:
Respect user-supplied page headings. Fill a missing page 1 as cover or overview only when needed.
Use for BIRD, book deconstruction, knowledge systems, and 64+8+1:
Use for iMandalArt-centered material:
Use for daily or weekly planning. Organize capture, frog, calendar, time grid, eight life areas, journal, plan, and review into a writable paper loop.
Use when content must remain unchanged. Repair only page order, rotation, merging, safe margins, legibility, or imposition unless the user explicitly requests rewriting.
Use schema_version: "2.0". Require exactly eight uniquely numbered page objects. Store content in typed blocks rather than page-specific ad hoc fields.
Initial allowed block types:
titleparagraphbulletsquoteroutemandalaimageqrwrite_areasource_noteUse source_refs, route_refs, and citation IDs instead of copying long evidence into paper pages. Keep render choices under render; keep QA observations under validation.
When the source is BIRD:
W + T + K + A to choose and label retrieval terms.Use thebrain-bird-address for BIRD assignment or audit. Do not invent weights, evidence, or deep links.
Use imandalart for source analysis and complete 11-line text cards. Preserve these の字型 coordinates:
Directory grid:
Ⓕ Ⓒ Ⓖ
Ⓑ ◎ Ⓓ
Ⓔ Ⓐ Ⓗ
Keyword child grid:
⑥ ③ ⑦
② ◎ ④
⑤ ① ⑧
Treat the center identity as Ⓘ when useful but always display ◎. Preserve Ⓐ or ① as the first semantic item even though it appears at bottom center. Never convert the layout to ordinary reading order. Keep full 11-line cards in the companion Markdown; a simplified paper grid may shorten text but must preserve coordinates. Store citations and cross-route notes outside cramped cells.
副題:, 用途:, 日期:, 資訊:, 格式:, or 主軸: unless they carry meaning.待證, 推論, or 需補例.Generate upright single pages using A7 portrait proportions: one finished page is one eighth of A4, approximately 74.25 × 105 mm. Use a fold-safe inset of roughly 10–14 pt. Keep page numbers, footer labels, QR blocks, and frames inside the safe area.
Impose on one A4 landscape page:
6, 7, 8, 1, upright.5, 4, 3, 2, each rotated 180 degrees.Treat these numbers as semantic booklet page numbers, not source-PDF indices. A source PDF may already be stored in imposition sequence such as 6,7,8,1,5,4,3,2, and some source pages may already be visibly upside down. Render all source pages, map their visible page labels, and record the correction needed to make every source page upright before placing anything. Do not trust filenames, file order, /Rotate, or other PDF metadata alone.
Use exact A4 landscape dimensions, approximately 841.89 × 595.276 pt. Divide the sheet into four equal columns and two equal rows. Fit each upright A7 page inside one cell without cropping or stretching.
When fold guides are requested, draw light dashed lines at one-quarter, one-half, and three-quarters of the sheet width, plus the horizontal midpoint. Draw the central cut as a solid line along the midpoint from one-quarter to three-quarters of the sheet width. Otherwise omit guides. Preserve blank space around fold paths and keep the print imposition separate from the upright reading PDF.
For image-based or scanned pages, prefer a single grayscale A4 raster of about 3368 × 2381 px at 288 dpi. Use grayscale mode L/DeviceGray, high-quality resampling, and a white background. For vector pages, normalize page rotation to content before applying placement transforms.
Print instructions must say: A4 landscape, one-sided, actual size 100%, no automatic rotation, and no fit-to-page scaling.
6,7,8,1 across the upper row without further rotation.5,4,3,2 across the lower row and rotate each normalized panel 180 degrees.If a transformed preview disagrees with the intended layout, stop and correct the semantic mapping. For fragile scanned PDFs, reconstruct the sheet from rendered upright page images; this avoids inherited crop boxes and hidden transforms.
Render supplied PDF templates to PNG before inferring visual rotations or coordinates. Do not trust PDF metadata alone.
Treat a photograph or scan of the physically folded booklet as stronger evidence than a screen preview. Preserve paper size and page order while moving content inward or reducing density. Save corrected builds with a clear foldsafe suffix without overwriting the prior build.
Perform four levels:
6,7,8,1, upright.5,4,3,2, upside down.page_break_before, not standalone manual page-break paragraphs. Leave enough bottom safety space for Pages reflow.reading-8-pages.pdf and confirm Japanese text is selectable and follows pages 1–8.Write pass, fail, not-run, evidence path, and notes for every check in validation-report.json. If an alpha build lacks automated overflow detection, mark that check as visual/manual rather than automated.
Keep the established direct workflow available as legacy-direct:
page-01.pdf through page-08.pdf upright.6,7,8,1 / 5,4,3,2 map.When using legacy-direct, create a manifest from the finished page plan so future rerenders have a stable source. Do not remove or rewrite existing user templates during the 2.0 alpha phase.
scripts/impose_a4_eight_page.py after establishing the semantic page and orientation maps. For a true upright reading-order PDF, omit both mapping options. For a PDF stored as visible pages 6,7,8,1,5,4,3,2, pass --source-order 6,7,8,1,5,4,3,2. If its last four source pages visibly start upside down, also pass --source-rotations 0,0,0,0,180,180,180,180. Add --guides only when the user wants printed fold and cut lines.Keep 2.0 in alpha until all conditions pass:
agents/openai.yaml matches this contract.Take twhsi/a4-eight-page-booklet from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.