book-ingest
Installation
SKILL.md
Book Ingest — Phase 03: MDX → Supabase
Purpose
Land the validated corpus in Supabase so the e-reader, commerce flow, and pgvector RAG can serve from a single source of truth.
Schema (Drizzle, src/lib/database/schema/books.ts):
books— one row per book per language; embedsmanifest(fullbook.jsonsnapshot), commerce fields, reader defaults, RAG config.book_chapters— one row per chapter;mdx_contenttext,content_sha256for drift detection,is_previewfor paywalled chapters, generatedftstsvector.book_sections— display anchors (stable IDs the e-reader bookmarks against). Re-embedding does NOT regenerate sections.book_chunks— RAG retrieval units (regenerable). HNSW pgvector index onembedding(cosine, m=16, ef_construction=64).user_book_purchases | progress | bookmarks | highlights— user-scoped tables, RLS-protected.
Invocation
$ARGUMENTS: