$npx -y skills add Soul-Brews-Studio/arra-oracle-skills-cli --skill oracle-combine-blogsCombine EXISTING finished blog posts into ONE mini-book PDF — assemble, don't re-generate. Strips each blog's frontmatter + title + signature, stitches them as chapters with a hook/close, renders pandoc→typst with Thai word-break. Use when you ALREADY have several polished posts
| 1 | # /oracle-combine-blogs — bind finished posts into one mini-book |
| 2 | |
| 3 | > Born 2026-07-09 binding 4 Claude-Code channel posts into "ช่องสัญญาณถึง Claude" (25pp). |
| 4 | > The point: when the prose already exists and the human LIKES it, **assemble — never re-generate.** |
| 5 | > Re-drafting risks losing the quality that earned the "combine these" request. |
| 6 | |
| 7 | ## When to use vs the writer skills |
| 8 | |
| 9 | | You have… | Use | |
| 10 | |---|---| |
| 11 | | Finished posts you want bound, prose unchanged | **this skill** (assemble) | |
| 12 | | A session's work but no written prose yet | `/oracle-booklet` or `/oracle-write-mini-book-v3` (generate) | |
| 13 | | One page of commands | `/oracle-cheatsheet` | |
| 14 | |
| 15 | ## Pipeline |
| 16 | |
| 17 | ``` |
| 18 | assemble.py (strip + stitch existing blogs) → harden-md → wordbreak (attacut ZWSP) |
| 19 | → pandoc MD→typst → cat preamble.typ + body.typ → typst compile |
| 20 | ``` |
| 21 | |
| 22 | Self-contained: `harden-md.py` + `wordbreak.py` are bundled in `scripts/` (works even on a |
| 23 | machine without oracle-booklet installed). The two helpers originate from `/oracle-booklet`. |
| 24 | |
| 25 | ## Steps |
| 26 | |
| 27 | 1. **Pick the posts + order.** Decide a narrative arc (e.g. story → mechanism → comparison → |
| 28 | deep-dive), not just chronological. Note each post's absolute path. |
| 29 | |
| 30 | 2. **Make the book dir** under `ψ/writing/mini-books/<date>_<slug>/`. |
| 31 | |
| 32 | 3. **Write `book.json`** in that dir (see `templates/book.json.example`): |
| 33 | - `pdf_name` — output stem (also the PDF filename). Convention: same as dir basename. |
| 34 | - `hook` / `close` — filenames (relative to book dir) of hand-written `# บทเปิด` / `# ปิดเล่ม` |
| 35 | pages. Optional but recommended — they frame WHY these posts belong together. |
| 36 | - `chapters[]` — each `{ "file": "<abs path to blog.md>", "heading": "# บทที่ N — Title" }`. |
| 37 | The heading becomes a level-1 chapter (page-break + rule). Chapter titles can be shorter |
| 38 | than the blog's own title. |
| 39 | |
| 40 | 4. **Write `00-hook.md` + `99-close.md`** — start each with a level-1 `# บทเปิด` / `# ปิดเล่ม`. |
| 41 | The hook states the thread connecting the posts; the close synthesizes (don't just recap). |
| 42 | Author is the oracle (an AI — Rule 6, never pretend to be human). |
| 43 | |
| 44 | 5. **Copy `templates/preamble.typ`** into the book dir and fill EVERY `{{PLACEHOLDER}}`: |
| 45 | `{{EMOJI}}` (cover + byline), `{{TITLE}}`, `{{SUBTITLE}}` (1–2 lines: what + the angle), |
| 46 | `{{ORACLE}}`, `{{HUMAN}}`, `{{DATE}}`, `{{PROOF}}` (e.g. "อ้าง source จริงทุกบรรทัด"), |
| 47 | `{{ACCENT}}` (one hex, appears 4×). Pick an emoji/accent DIFFERENT from sibling books so |
| 48 | readers don't confuse them. |
| 49 | |
| 50 | 6. **Build:** from the book dir, `bash ~/.claude/skills/oracle-combine-blogs/scripts/build.sh` |
| 51 | |
| 52 | 7. **Verify the PDF** — Read pages 1–3 (cover + สารบัญ + hook) and one page with a big table + |
| 53 | code block. Check: Thai word-break, code line-refs intact, table zebra, chapter rules. |
| 54 | |
| 55 | 8. **Commit** source + PDF; skip regenerable intermediates (`body.md`, `body-zwsp.md`, |
| 56 | `body.typ`, `full.typ`). Re-running `build.sh` reproduces them. |
| 57 | |
| 58 | ## How assemble.py strips each blog (so you can trust it) |
| 59 | |
| 60 | - Drops YAML frontmatter (leading `---` … next `---`). |
| 61 | - Truncates at the **last** standalone `---` line → removes the trailing signature block. |
| 62 | Decorative mid-content `---` rules are kept (they become thin rules in the PDF). |
| 63 | - Drops the blog's first `# H1` title line; your `book.json` heading replaces it. |
| 64 | - `hook`/`close` are included **verbatim** — write them clean, no frontmatter. |
| 65 | |
| 66 | ## Gotchas (learned) |
| 67 | |
| 68 | - **Heading levels:** blog `##`/`###` are preserved as section/subsection. Your chapter heading |
| 69 | MUST be level-1 `#` so it gets the page-break + big-title style. Don't use `##` for chapters. |
| 70 | - **Fonts:** if the cover falls back to a boxy font, the `--font-path` for AssetsV2 (Sarabun) or |
| 71 | ~/Library/Fonts (Fira Code) is missing — build.sh already passes all three. |
| 72 | - **pandoc turns `---` into `#horizontalrule`** which typst doesn't know — build.sh rewrites it to |
| 73 | a real `#line(...)`. Keep that sed/perl step. |
| 74 | - **Edit the source blog, not body.md** — body.md is regenerated every build. |