Skip to content
Agent Memory
Skill

/oracle-write-complete-book

Write a complete book from scratch — outline, parallel Sonnet drafting, Thai word break, typst PDF rendering, review, title brainstorm, publish to GitHub. Two size targets: standard <=100 pages (8-12 chapters), short <=50-60 pages (5-8 chapters). Pipeline proven on 'The Oracle

BOOST
From plugin
arra-oracle-skills-cli
12532 skills3 hooks
Install
$ npx -y skills add soul-brews-studio/arra-oracle-skills-cli --skill oracle-write-complete-book --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/oracle-write-complete-book

Context preview

The summary Claude sees to decide when to auto-load this skill.

Write a complete book from scratch — outline, parallel Sonnet drafting, Thai word break, typst PDF rendering, review, title brainstorm, publish to GitHub. Two size targets: standard <=100 pages (8-12 chapters), short <=50-60 pages (5-8 chapters). Pipeline proven on 'The Oracle

SKILL.md

oracle-write-complete-book.SKILL.md
name: oracle-write-complete-book
description: "Write a complete book from scratch — outline, parallel Sonnet drafting, Thai word break, typst PDF rendering, review, title brainstorm, publish to GitHub. Two size targets: standard <=100 pages (8-12 chapters), short <=50-60 pages (5-8 chapters). Pipeline proven on 'The Oracle Pattern'. TRIGGER when: user says 'เขียนหนังสือ', 'write book', 'complete book', 'เขียนเล่มยาว', or wants a full book with PDF output. DO NOT TRIGGER for: short guides (use /oracle-write-book), cheatsheets (use /oracle-cheatsheet), single docs."
created_at: 2026-06-09T13:40:00+07:00
hidden: true
metadata:
  internal: true

/oracle-write-complete-book — Complete Book Pipeline

> จาก idea สู่หนังสือ PDF — standard <=100 หน้า, short <=50-60 หน้า > proven pipeline จาก "The Oracle Pattern"

When to Use

  • **standard** — 8-12 บท, **<=100 หน้า** (default)
  • **short** — 5-8 บท, **<=50-60 หน้า** (`--short`)

ถ้าร่างเกิน cap ให้ตัด/รวมบท ไม่ใช่ปล่อยยาว — page cap เป็นข้อจำกัดจริง ไม่ใช่คำแนะนำ

  • ต้องการ PDF สวย (typst + Thai font + code blocks)
  • ต้องการ parallel agents เขียนขนาน
  • ต้องการ Thai word segmentation ที่ถูกต้อง

Pipeline Overview

Step 0:  Mine session         ← dig JSONL + traces + issues
Step 1:  Outline              ← per-chapter metadata (YAML)
Step 2:  Prism review         ← 5-lens structure check
Step 3:  Title brainstorm     ← 10 DNA + 3 judges workflow
Step 4:  Parallel draft       ← N Sonnet agents write files
Step 5:  Thai word break      ← PyThaiNLP ZWSP insertion
Step 6:  Compile              ← pandoc MD → typst markup
Step 7:  Render PDF           ← typst compile with styling
Step 8:  Review               ← 3 Sonnet agents check
Step 9:  Iterate              ← fix findings, re-render
Step 9.5: Save to working repo ← commit PDF+sources to ψ/writing/books/, THEN copy to ~/Downloads/
Step 10: Publish              ← separate public GitHub repo + release — confirm with human first

---

Step 0: Mine Session Material

ห้ามเขียนจาก memory — ขุด source material จริงเสมอ

# Session traces
python3 ~/.claude/skills/dig/scripts/dig.py 0 --deep

# GitHub issues
gh issue view <NNNN> --json body,comments

# Trace logs
find ψ/memory/traces/ -name "*.md" -newer <reference>

# Cheatsheets + design sheets
ls -t ψ/writing/cheatsheets/ | head -5

---

Step 1: Outline (MUST do before drafting)

สร้าง outline file: `ψ/writing/books/YYYY-MM-DD_<slug>-OUTLINE.md`

Book Metadata

title: "<title>"
subtitle: "<subtitle>"
author: <oracle-name>
date: YYYY-MM-DD
language: Thai (kien-thai 7 frames)
register: <pick from kien-thai 6 registers>
target_chapters: 8-12      # standard, <=100 pages
# target_chapters: 5-8    # --short, <=50-60 pages
target_words_per_chapter: 3000-4000
parts: 2-3 (Overview / Technical / Vision)

Per-Chapter Metadata

## บทที่ N: <title>

target_words: 3500
dna: <DNA name> (<insight>)
soul_thread: "<theme thread>"
subtopics:
  - N.1 <subtopic>
  - N.2 <subtopic>
  - N.3 <subtopic>
proof:
  - <code path, issue #, trace log>
checklist:
  - [ ] <specific item>

Part Structure (3-part default)

ภาค 1: เรื่องเล่า (Overview)      — ที่มาที่ไป context ปัญหา
ภาค 2: Technical (Deep Dive)     — code architecture ข้างในเป็นยังไง
ภาค 3: Design & Vision           — design decisions อนาคต

Chapter Length

| ส่วน | ความยาว | หน้าที่ | |------|---------|---------| | เปิดบท (hook) | 200-300 คำ | ดึงเข้าเรื่อง | | เนื้อหาหลัก | 2,500-3,000 คำ | 3-5 subtopics | | Code/diagram | 300-500 คำ | 2-3 code blocks | | ปิดบท | 200-300 คำ | lesson + hook บทถัดไป | | **รวม** | **3,000-4,000 คำ** | **อ่าน 10-15 นาที** |

---

Step 2: Prism Review on Outline

ก่อน draft ใช้ /oracle-prism 5 lenses: 1. **Archaeologist** — ครบไหม? 2. **Bug Hunter** — บทไหนอ่อน? 3. **Skeptic** — narrative หรือ reference? 4. **Architect** — flow ถูกไหม? 5. **Auditor** — proof ทุกบท?

---

Step 3: Title Brainstorm (Workflow)

ใช้ Workflow tool — 2 phases:

**Phase 1: 10 perspectives brainstorm** (Sonnet ขนาน): System Architect, AI Researcher, DevTool Marketer, Philosophy Writer, Thai Copywriter, O'Reilly Editor, Indie Hacker, Conference Speaker, Manga/LN Author, Builder (Nat's perspective)

แต่ละ perspective เสนอ 5 ชื่อ + subtitle → รวม 50 candidates

**Phase 2: 3 judges score** (Sonnet ขนาน):

  • Developer Judge — curiosity, clarity, memorability
  • Publisher Judge — market fit, uniqueness, shelf appeal
  • kien-thai Judge — Thai naturalness, rhythm, emotional impact

**Title structure:**

Main Title (professional, authoritative)
Subtitle (กว้าง ครอบคลุม)

Tagline (hook — 1-2 lines)

---

Step 4: Parallel Draft (Sonnet Agents Write Files)

CRITICAL: Agents MUST write files, NOT return text

ใช้ Workflow tool pipeline pattern — 1 agent per chapter, ทุกตัวเขียนไฟล์เอง

Directory Structure

ψ/writing/books/<slug>/
├── book.typ            ← typst styling config
├── book.css            ← md-to-pdf fallback
├── book.yaml           ← pandoc metadata
├── Makefile            ← make pdf / make latex
├── thai-wordbreak.py   ← PyThaiNLP ZWSP inserter
├── 00-frontmatter.md
├── 01-chapter-one.md
├── 02-chapter-two.md
├── ...
└── 15-end-game.md

Agent Prompt Template

คุณกำลังเขียนบทที่ N ของหนังสือ "<title>"

## Context
<book metadata + transformation arc>

## บทนี้
<chapter metadata: title, DNA, subtopics, proof>

## Source Material
<file paths, issue numbers, trace logs>

## Writing Rules (kien-thai 7 frames)
- f1: Topic-comment ไม่ใช่ SVO
- f2: เงื่อนไขขึ้นหน้า (พอ...ก็...)
- f3: เว้นวรรค ไม่ใช่จุด
- f4: ปิดด้วย particles (ด้วย/แล้ว/เลย/ต่างหาก)
- f5: Zero anaphora + demonstratives
- f6: ก็ เป็นจังหวะ
- f7: Pivot ด้วยคำถาม/แต่

## CRITICAL: WRITE THE FILE
Write to: <book-dir>/NN-slug.md
Return แค่: "wrote NN-slug.md — X words"

---

Step 5: Thai Word Break (PyThaiNLP)

ภาษาไทยไม่มี space ระหว่างคำ → typst ตัดบรรทัดผิดจุด แก้ด้วย zero-width space (U+200B) ที่จุดตัดคำ

thai-wordbreak.py

Read more
Ships witharra-oracle-skills-cli

25 skills for AI coding agents — persistent memory, session awareness, and collaborative tools.

Get the whole plugin
Stats
125
Stars
58
Forks
Active
Maintenance
TypeScript
Language
MIT
License
22d ago
Last commit
9mo ago
Created
3h ago
Added

Repo: soul-brews-studio/arra-oracle-skills-cli

Other skills on arra-oracle-skills-cli.