Book Installer
Version: 1.0.1
Changelog
v1.0.1 โ The canonical mascot CSS in
references/learning-mascot.md(Step 5) now targets.md-typeset img.mascot-admonition-imginstead of the bare.mascot-admonition-img. Material's.md-typeset img { height: auto }outranked the bare class selector, so only the width applied and portrait poses rendered far taller than--mascot-size(90px-wide poses measured 93โ210px tall in clocks-and-watches). The class name itself is unchanged, so chapter markdown,validate-chapter-mascots.py, and glightboxskip_classesneed no edits. Existing books should update the selector in their owndocs/css/mascot.css.v1.0 โ First tracked version number for this skill. Adds
references/mascot-placement-rules.mdas the single canonical source for when and how often a learning mascot may appear, plusscripts/render-mascot-guide.py(renders those rules into a book'sCONTENT-GENERATION-GUIDE.mdbetween sentinel comments so the copy is regenerated, never hand-edited). The old fixed per-chapter ceiling is replaced with an informal guideline scaled to the chapter's concept count (~1 admonition per 2 concepts, adjusted for reader age), advisory only and never a hard failure.scripts/validate-chapter-mascots.pynow also reports the deprecated-encouragingspelling of the encourage pose class โ whichmascot.cssnever defined, so it rendered unstyled โ and exempts the Chapter 1 self-introduction from the 1-3 sentence cap it always violated. Version is tracked undermetadata:rather than a bareversion:key, which strict packaging validation rejects.
Overview
This meta-skill handles installation and setup tasks for intelligent textbook projects. It consolidates five installation skills into a single entry point with on-demand loading of specific installation guides.
When to Use This Skill
Use this skill when users request:
- Setting up a new MkDocs Material project
- Creating a new intelligent textbook from scratch (feature #0 scaffold)
- Installing a learning graph viewer
- Setting up skill usage tracking with hooks
- Registering the book with Google Analytics (GA4 Measurement ID)
- Bootstrapping project infrastructure
Step 1: Handle Help Requests
If the user asks for "help", "what can you do", or "list features", display this numbered list directly (do not load a reference file):
Book Installer Features (most โ least common):
0. New textbook scaffold - complete mkdocs.yml + docs/ tree + license for an empty directory (run once at project birth)
1. Simple mkdocs.yml template - Minimal starter config for new projects (see feature 0)
2. Site logo - Add custom logo to header
3. Favicon - Browser tab/bookmark icon
3b. Generate favicon from mascot - Auto-generate favicon.ico from neutral.png mascot image
4. Cover image & social preview - Home page image + og:image metadata
4b. Generate cover image prompt - Create a prompt for generating a cover image using text-to-image AI (DALL-E, Midjourney, etc.)
4c. Social media preview hook - Inject og:* / twitter:* meta tags via MkDocs hook (no Cairo required)
5. Math equations - KaTeX (recommended) or MathJax
6. Code syntax highlighting - Language-aware code blocks
7. Code copy button - One-click copy for code blocks
8. Mermaid diagrams - Flowcharts, sequence diagrams from text
9. Content tabs - Tabbed sections for alternatives
10. Image zoom (GLightbox) - Click to enlarge images
11. Custom admonitions - Prompt boxes with copy button
12. Interactive quizzes - Self-assessment questions
13. Abbreviations & tooltips - Glossary hover definitions
14. Task lists - Checkbox lists
15. Simple feedback - Thumbs up/down per page
16. Detailed comments (Giscus) - GitHub Discussions integration
17. Tags & categorization - Page tagging system
18. Search enhancements - Suggestions and highlighting
19. Table of contents config - TOC sidebar options
20. Blog support - Add blog section
21. Announcement bar - Dismissible top banner
22. Privacy & cookie consent - GDPR compliance
23. Learning graph viewer - Interactive concept visualization
24. Skill usage tracker - Claude Code analytics hooks
25. Google Analytics - requires a Google Analytics property ID G-*
26. .gitignore installer - make sure that `site` and `.cache` are not in the main branch
27. extra CSS installer for iframe and customer prompt admonition
28. extra JavaScript installer - for prompt admonition copy button
29. Feature checklist - auto-detect and document which features are implemented
30. Learning mascot - add a pedagogical agent character to guide students
31. Instructor's guide - comprehensive teacher's guide with classroom tips
32. Custom 404 page - friendly error page with mascot image
33. Document status indicators - colored dots in nav showing page lifecycle state
34. Kanban board - GitHub Projects board for tracking textbook development
35. Mascot chapter updater - retrofit existing chapters with mascot admonitions
36. About page - professional about.md with motivation, author bio, and citations
37. Slide generator - install slide-viewer MicroSim and generate slides.md decks for chapters
38. Reading level analysis - Flesch-Kincaid grade level report for all chapters
39. Generate all supplementary content - glossary, FAQ, per-chapter quizzes & references, book metrics, diagram reports, about page, landing page, README
40. Book metrics report - chapters, concepts, glossary/FAQ counts, quiz & reference totals, diagrams, equations, MicroSims, word count & equivalent pages (book-metrics.md + chapter-metrics.md)
41. MkDocs-serve warning - MkDocs-only hook that warns when a Zensical-built book is previewed with `mkdocs serve` (recommended for every Zensical-designed book during the MkDocs-to-Zensical transition)
Type a number or feature name to install.
Note: If you see `navigation.tabs` in mkdocs.yml, remove it. These books
use side navigation optimized for wide landscape screens.After displaying the list, wait for user to specify which feature they want.
Step 1b: Check for Navigation Tabs (Existing Projects)
When working with an existing mkdocs.yml, always check for and remove navigation tabs:
# REMOVE these lines if present in mkdocs.yml:
theme:
features:
- navigation.tabs # DELETE
- navigation.tabs.sticky # DELETEThese books use side navigation optimized for wide landscape screens. Top navigation tabs waste vertical space and are not appropriate for this format.
Step 2: Identify Installation Type
Match the user's request to the appropriate installation guide:
Routing Table
| Trigger Keywords | Action | Purpose |
|---|---|---|
| help, what can you do, features, capabilities, list features | Display numbered list (Step 1) | Show quick feature overview |
| init textbook, scaffold textbook, brand new book, empty directory, fresh start, new textbook from scratch, 0 | references/init-textbook.md |
Bootstrap a brand-new textbook from scratch (mkdocs.yml + docs/ + license + contact + social-override hook) โ run this before any other feature |
| 1, simple mkdocs, minimal template, starter config | references/init-textbook.md |
Canonical scaffold (supersedes the old minimal template) |
| google analytics, GA4, measurement id, tracking id, G-, analytics property, register analytics, 25 | references/google-analytics.md |
Create the GA4 property, write the G-* Measurement ID into mkdocs.yml extra.analytics, verify the tag, deploy |
| enrich, add feature, number 2-24, specific feature name | references/mkdocs-features.md |
Install specific feature |
| new project, mkdocs, textbook, bootstrap, setup, template, new book | references/init-textbook.md |
Create new MkDocs Material project (feature 0 scaffold) |
| graph viewer, learning graph, visualization, interactive graph, concept viewer | references/learning-graph-viewer.md |
Add learning graph viewer to existing project |
| track skills, skill usage, activity tracking, hooks, usage analytics | references/skill-tracker.md |
Set up skill tracking with hooks |
| generate cover image prompt, generate cover image, auto cover image prompt, create cover image promt, run cover prompt script | references/cover-image-generator.md |
Generate a high-quality cover image prompt from the book's own content; image auto-generation via API/ChatGPT is optional and only runs if explicitly requested |
| cover image, home page, montage, book cover, index page | references/home-page-template.md |
Create home page with cover image and social metadata |
| social media preview, social card, social meta, og:image, og:title, og:description, open graph, twitter card, twitter image, linkedin preview, slack unfurl, bk-check-social-cover, social hook, social override | references/social-media-preview.md |
Install the Cairo-free hook that injects og:* and twitter:* meta tags on every page |
| logo, site logo, branding, upper left, header icon | references/mkdocs-features.md |
Add custom logo with AI prompt examples |
| favicon, browser tab, bookmark icon, .ico | references/mkdocs-features.md |
Add favicon with AI prompt examples |
| generate favicon, favicon from mascot, mascot favicon, favicon.ico from png, create favicon | references/favicon-generator.md |
Generate favicon.ico from neutral.png mascot using Python |
| math, equations, latex, mathjax, katex | references/mkdocs-features.md |
Add math equation support |
| feature checklist, generate feature checklist, feature status, what features | references/feature-checklist-generator.md |
Auto-detect and document implemented features |
| quiz, quizzes, assessment, multiple choice | references/mkdocs-features.md |
Add interactive quizzes |
| feedback, thumbs up, thumbs down, was this helpful | references/mkdocs-features.md |
Add page feedback widget |
| comments, giscus, discussions | references/mkdocs-features.md |
Add comment system |
| image zoom, lightbox, glightbox, click to enlarge | references/mkdocs-features.md |
Add image zoom on click |
| code highlighting, syntax, copy button | references/mkdocs-features.md |
Add code syntax highlighting |
| mermaid, diagrams, flowchart | references/mkdocs-features.md |
Add Mermaid diagram support |
| admonition, callout, prompt box, copy prompt | references/mkdocs-features.md |
Add custom admonitions with copy |
| mascot, learning mascot, pedagogical agent, character, guide character, persona | references/learning-mascot.md |
Add a learning mascot to guide students |
| instructor guide, teacher guide, teachers guide, instructor's guide, classroom guide | references/instructors-guide.md |
Generate comprehensive instructor's guide |
| 404, error page, not found, custom 404, page not found | references/custom-404-page.md |
Add custom 404 page with mascot |
| document status, page status, status indicators, status dots, nav status, page lifecycle, review workflow | references/document-status.md |
Add colored status dots to nav sidebar |
| kanban, project board, kanban board, project management, github project, task board, milestones, 34 | references/kanban-board.md |
Create GitHub Projects Kanban board for textbook development |
| mascot chapter, update chapter, retrofit mascot, place mascot, add mascot to chapter, 35 | references/mascot-chapter-updater.md |
Retrofit an existing chapter with mascot admonitions using placement rules |
| mascot placement rules, mascot rules, how often mascot, mascot frequency, which mascot pose, mascot admonition guidelines | references/mascot-placement-rules.md |
Canonical single-source rules for when/how often each mascot pose is used (read, never restate) |
| about page, about, about.md, about this book, author bio, cite this book, citation, 36 | references/about-page.md |
Generate professional about page with motivation, bio, and citations |
| slide generator, slides, slide deck, slide viewer, presentation, generate slides, install slide viewer, 37 | references/slide-generator.md |
Install the slide-viewer MicroSim and generate slides.md decks for chapters |
| reading level, readability, flesch kincaid, grade level, reading analysis, 38 | references/reading-level-analysis.md |
Analyze chapter reading level consistency |
| generate all supplementary content, supplementary content, complete the book, finish the book, book completion, generate glossary faq quiz, generate all content, all supplementary, 39 | references/supplementary-content-generator.md |
Generate glossary, FAQ, per-chapter quizzes & references, book metrics, diagram reports, about page, landing page, and README in one coordinated workflow |
| book metrics, generate metrics, book-metrics, chapter metrics, content statistics, word count, page count, equivalent pages, book composition, metrics report, 40 | references/book-metrics.md |
Generate book-metrics.md, chapter-metrics.md, and the metrics block in book-metadata.json via bk-generate-book-metrics |
| mkdocs serve warning, serve warning, warn on mkdocs serve, wrong builder, wrong renderer, zensical transition, zensical warning, mkdocs vs zensical, transition guard, broken iframe in mkdocs serve, 41 | references/mkdocs-serve-warning.md |
Install the MkDocs-only hook that warns when a Zensical-built book is previewed with mkdocs serve (only for books built and deployed with Zensical) |
Decision Tree
Asking for help or what book-installer can do?
โ YES: Display numbered list directly (Step 1)
Creating a new project/textbook from scratch (empty directory)?
โ YES: init-textbook.md (feature 0 โ the canonical scaffold)
Registering the book with Google Analytics (GA4 / G-* Measurement ID)?
โ YES: google-analytics.md
Adding a learning graph viewer to existing project?
โ YES: learning-graph-viewer.md
Setting up skill usage tracking?
โ YES: skill-tracker.md
Want to GENERATE a high-quality cover image prompt from the book's content?
โ YES: cover-image-generator.md (prompt is the default output; auto-generation via API/ChatGPT only runs if explicitly requested)
Creating a cover image MANUALLY or setting up home page with social metadata?
โ YES: home-page-template.md
Installing the social media preview hook (og:* / twitter:* meta tags) or
fixing a failing bk-check-social-cover run?
โ YES: social-media-preview.md (Cairo-free; this is the default approach)
Want to generate a feature checklist showing what's implemented?
โ YES: feature-checklist-generator.md
Want to GENERATE a favicon.ico automatically from the mascot's neutral.png?
โ YES: favicon-generator.md (runs scripts/generate-favicon.py via Python/Pillow)
Want to add branding (logo, favicon, cover image)?
โ YES: mkdocs-features.md (Branding Features section)
Want to add a learning mascot (pedagogical agent) to guide students?
โ YES: learning-mascot.md
Want to generate an instructor's/teacher's guide?
โ YES: instructors-guide.md
Want a custom 404 error page with the mascot?
โ YES: custom-404-page.md
Want to add colored status dots to the nav sidebar for page lifecycle tracking?
โ YES: document-status.md
Want a GitHub Projects Kanban board to track textbook development?
โ YES: kanban-board.md
Want to retrofit an existing chapter with mascot admonitions?
โ YES: mascot-chapter-updater.md
Want to generate a professional about page with author bio and citations?
โ YES: about-page.md
Want to install a slide viewer and generate slide decks for chapters?
โ YES: slide-generator.md
Want to analyze reading level consistency across chapters?
โ YES: reading-level-analysis.md
Want to generate all supplementary content in one pass (glossary, FAQ, per-chapter quizzes & references, book metrics, diagram reports, about page, landing page, README)?
โ YES: supplementary-content-generator.md
Want to generate book metrics only (chapters, concepts, word/page counts,
diagram/MicroSim/quiz totals) into book-metrics.md and chapter-metrics.md?
โ YES: book-metrics.md
Want to warn people who run `mkdocs serve` on a book that is built and deployed
with Zensical (MkDocs-to-Zensical transition guard)?
โ YES: mkdocs-serve-warning.md (only if the book deploys with Zensical; ask if unclear)
Want to add a specific feature (equations, quizzes, feedback, etc.)?
โ YES: mkdocs-features.md (then follow specific feature instructions)Step 2: Load the Matched Guide
Read the corresponding guide file from references/ and follow its installation workflow.
Step 3: Execute Installation
Each guide contains:
- Prerequisites and requirements
- Step-by-step installation commands
- Configuration options
- Verification steps
- Troubleshooting tips
Available Installation Guides
mkdocs-features.md
Purpose: Detailed configuration for all MkDocs feature enhancements
Contains: Full configuration snippets for features 2-24 listed in the help output, including:
- YAML for mkdocs.yml
- JavaScript files to create
- CSS files to create
- Usage examples
Use when:
- User selects a feature by number or name
- User wants detailed configuration for a specific feature
- User has a minimal mkdocs.yml and wants to enrich it
init-textbook.md (feature 0)
Purpose: The canonical scaffold for a brand-new intelligent textbook in an empty directory
Creates:
- mkdocs.yml (side nav, search, admonitions, arithmatex, exclude_docs, schema URI)
- docs/ tree: index, about, course-description, contact, license, chapters/, learning-graph/, sims/, css/extra.css, img/ (cover + license badge)
- CONTENT-GENERATION-GUIDE.md (CIS-driven word-count targets, anti-padding rules, MicroSim and Markdown rules โ read by book-chapter-generator and chapter-content-generator)
- plugins/social_override.py hook (per-page og:/twitter: image override)
- .gitignore and VS Code workspace file
- MicroSim status-indicator plumbing (scaffold/built/approved)
Templates: single canonical copy in assets/init-textbook/
Prerequisites:
- Empty (or nearly empty) project directory โ refuses to overwrite mkdocs.yml, docs/index.md, or docs/license.md
google-analytics.md (feature 25)
Purpose: Register the book as a Google Analytics 4 property and wire the Measurement ID into mkdocs.yml
Creates:
- GA4 property + web data stream (via Claude in Chrome)
extra.analyticsblock in mkdocs.yml with the G-* Measurement ID- Build-time tag verification, commit, and gh-deploy
Prerequisites:
- Claude in Chrome extension connected; user logged into Google Analytics
- site_url set in mkdocs.yml
learning-graph-viewer.md
Purpose: Add interactive learning graph exploration to existing textbook
Creates:
- Interactive vis-network graph viewer
- Search, filtering, and statistics features
- Integration with existing learning-graph.json
Prerequisites:
- Existing MkDocs project
- learning-graph.json file present
skill-tracker.md
Purpose: Set up Claude Code skill usage tracking
Creates:
- Hook scripts for tracking skill invocations
- Activity log directory structure
- Reporting scripts for usage analysis
Prerequisites:
- Claude Code installed
- ~/.claude directory exists
social-media-preview.md
Purpose: Install a Cairo-free MkDocs hook that emits Open Graph and Twitter Card meta tags on every page
Creates:
plugins/social_override.pyโon_post_pagehook that injects/replacesog:title,og:description,og:image,og:type,og:url, andtwitter:*tagshooks:block inmkdocs.ymlreferencing the new file
Features:
- Reads
image:,title:,description:from each page's frontmatter; falls back toimg/cover.pngand the site-wide values - Emits absolute
og:imageURLs by joiningsite_urlwith the image path (so crawlers andbk-check-social-covercan HEAD-request them) - Works without
mkdocs-material[imaging]/ Cairo โ the common-case default - Compatible with the full
socialplugin when Cairo is present: replaces its auto-generated/assets/images/social/...URLs with the declaredcover.png - Verified via
~/.local/bin/bk-check-social-cover(which enforcesog:imagebasename =cover.pngand image reachability)
Prerequisites:
- Existing MkDocs Material project with
site_url:set docs/img/cover.png(usecover-image-generator.mdorhome-page-template.mdfirst if missing)- Home page frontmatter with
title:anddescription:(typically fromhome-page-template.md)
home-page-template.md
Purpose: Create professional home page with cover image and social media optimization
Creates:
- docs/index.md with proper frontmatter metadata
- AI image generation prompts for cover with montage background
- Open Graph and Twitter Card configuration
Features:
- Cover image design guidance (1.91:1 aspect ratio)
- Montage element suggestions by topic
- Social media preview optimization
- Example prompts for various book themes
Prerequisites:
- Existing MkDocs project
- Access to AI image generator (DALL-E, Midjourney, etc.)
learning-mascot.md
Purpose: Design and implement a pedagogical agent (learning mascot) that guides students through the textbook
Creates:
- Character design (name, species, appearance, personality, catchphrase)
- AI image generation prompts for consistent mascot poses
- Implementation via inline images, custom CSS admonitions, or JavaScript auto-detection
- A mascot test page with automated transparency/4 px trim checks and all seven admonition previews
- CONTENT-GENERATION-GUIDE.md character guidelines for consistent AI-generated content, with the placement rules rendered from
references/mascot-placement-rules.md
Features:
- Subject-specific mascot suggestions with reasoning
- Seven standard pose variants (neutral, welcome, thinking, tip, warning, encouraging, celebration)
- Three implementation methods at different complexity levels
- Restraint guidelines to prevent overuse
Prerequisites:
- Existing MkDocs Material project
- Access to AI image generator (DALL-E, Midjourney, etc.)
instructors-guide.md
Purpose: Generate a comprehensive instructor's/teacher's guide for the textbook
Creates:
docs/teachers-guide/index.md(ordocs/instructors-guide/index.mdfor college-level)- Navigation entry in mkdocs.yml
Features:
- Five levels of intelligent textbooks explained
- Detailed usage instructions for chapters, MicroSims, glossary, FAQ, quizzes, and references
- Classroom tips (before/during/after class suggestions, pacing)
- MicroSim iframe embedding guide for external LMS pages
- Creative Commons license explained in plain English (what you can/cannot do)
- Step-by-step customization guide (fork, clone, change colors/title/logo, deploy)
- Google Analytics setup instructions
- xAPI/LRS overview with FERPA/COPPA/GDPR regulatory warnings
- Learning graph usage tips for teachers
- Pedagogical agent (mascot) documentation (if mascot exists)
- All technical terms defined before use โ no assumed prior knowledge
Prerequisites:
- Existing MkDocs Material project
- At least some chapter content written
custom-404-page.md
Purpose: Add a custom 404 error page featuring the project's learning mascot
Creates:
overrides/404.htmlโ Jinja2 template extending Material base theme with mascot image, friendly message, and home link- mkdocs.yml updates for
custom_dirandstatic_templates
Features:
- Uses the mascot's warning pose (or other pose) centered on the page
- Inherits full site navigation (header, sidebar, footer) from the Material theme
- Customizable message matched to the mascot's personality and voice
- Absolute image paths so the 404 works from any URL depth
Prerequisites:
- Existing MkDocs Material project
- Learning mascot images in
docs/img/mascot/(uselearning-mascot.mdfirst if needed)
document-status.md
Purpose: Add per-page colored status dots to the navigation sidebar for tracking page lifecycle state
Creates:
extra.statusconfiguration in mkdocs.yml- CSS rules for colored status dots in extra.css
status:frontmatter on individual pages
Features:
- Three-state workflow (spec-complete โ prototype โ ready-for-testing)
- Colored dots (red, orange, green) visible in the nav sidebar
- Tooltip text on hover
- Customizable status codes for any workflow
Prerequisites:
- Existing MkDocs Material project
- Custom CSS file referenced in
extra_css
reading-level-analysis.md
Purpose: Analyze Flesch-Kincaid grade level consistency across all chapters
Creates:
docs/learning-graph/chapter-reading-levels.mdโ per-chapter reading level report
Uses script: scripts/analyze-reading-levels.py
Features:
- Strips markdown/HTML formatting to analyze pure prose
- Per-chapter table with FK grade and explanatory notes
- Summary statistics (mean, median, range, standard deviation)
- Interpretation section explaining whether variation is meaningful
- Identifies vocabulary-driven score inflation vs. genuine difficulty differences
Prerequisites:
- Existing MkDocs project with chapters in
docs/chapters/ - Python
textstatlibrary (pip install textstat)
book-metrics.md
Purpose: Generate comprehensive book-wide and per-chapter metrics for an intelligent textbook
Creates:
docs/learning-graph/book-metrics.mdโ Book Composition + Student-Facing Content Metrics tablesdocs/learning-graph/chapter-metrics.mdโ per-chapter breakdown- merges a
metricsblock of book-wide totals intodocs/learning-graph/book-metadata.json(author fields preserved)
Uses script: bk-generate-book-metrics (resolves $BK_HOME/src/book-metrics/book-metrics.py); fallback python3 "$BK_HOME/src/book-metrics/book-metrics.py" docs
Features:
- Tracks all 12 book-composition elements with Required/Recommended/Optional status
- Counts concepts, chapters, MicroSims, stories, glossary terms, FAQs, quiz questions, references, diagrams, equations, words, links, appendices, mascot poses
- Estimates equivalent printed pages and records the development stage
- Produces the totals the intelligent-textbooks case-studies index displays
Prerequisites:
- Existing MkDocs project with chapters in
docs/chapters/ $BK_HOMEexported andbk-generate-book-metricson$PATH
favicon-generator.md
Purpose: Generate a web-compliant multi-resolution favicon.ico from the mascot's neutral.png
Creates:
docs/img/favicon.icoโ multi-resolution icon (16, 32, 48, 64, 128, 256 px) embedded in a single.icofile
Uses script: scripts/generate-favicon.py
How it works:
- Detects the bounding box of non-transparent pixels (trims invisible padding)
- Centers the visible content on a square canvas with configurable padding
- Downscales to each favicon size using Lanczos resampling
- Supports transparent or white background canvas
Prerequisites:
- Mascot image at
docs/img/mascot/neutral.png(image need not be square) - Python
Pillowlibrary (pip install Pillow)
cover-image-generator.md
Purpose: Craft a high-quality cover image prompt at docs/img/cover-image-prompt.md, built from the book's title, course description, concept list, mascot, and MicroSim screenshots. Image auto-generation is optional and only runs if the user explicitly asks for it.
Provides:
- Guidance for selecting 6-10 montage concepts from the book's own content
- A detailed prompt template covering subject/tone, title typography, montage, mascot, style/color, and things to avoid
- Recommended manual review loop: paste the prompt into a text-to-image tool, compare drafts, iterate on the prompt before finalizing
- Optional automated paths (API, browser automation, or local-prompt) with troubleshooting โ only used on explicit request
Prerequisites:
- Existing MkDocs project with mkdocs.yml
- docs/course-description.md with book content description
- Only if auto-generation is requested: OpenAI API billing, ChatGPT Pro subscription, or a free AI image generator
kanban-board.md
Purpose: Create a GitHub Projects (v2) Kanban board for tracking textbook development progress
Creates:
- GitHub Projects board with Board (Kanban) layout
- Priority field (High / Medium / Low)
- 13 standard textbook milestone draft items
docs/project-management.mdwith column documentation and workflow guide- README section about the Kanban board
Features:
- Automated setup via
gh projectCLI commands - Links project to the repository automatically
- Pre-populated milestones matching the 12-step textbook workflow
- Fallback instructions for manual setup if
ghcommands fail
Prerequisites:
ghCLI installed and authenticatedprojectscope on the GitHub token (gh auth refresh -s project)- Existing MkDocs project with mkdocs.yml
supplementary-content-generator.md
Purpose: Generate all standard supplementary content for an intelligent textbook in a single coordinated workflow
Produces (in execution order):
docs/about.mdโ professional about page (viaabout-page.mdreference)docs/glossary.mdโ ISO 11179-compliant glossary (viaglossary-generatorskill)docs/faq.mdโ โฅ 30-question FAQ (viafaq-generatorskill)docs/chapters/*/quiz.mdโ per-chapter quizzes (viaquiz-generatorskill)docs/chapters/*/references.mdโ per-chapter reference lists (viareference-generatorskill)docs/img/cover.pngโ book cover image + social-preview hook (viacover-image-generator.md+social-media-preview.md)- Book metrics report (via
bk-generate-book-metricsscript) - Diagram reports (via
bk-diagram-reportsscript) README.mdโ GitHub-facing README after metrics, so it can embed content counts (via thebook-publisherreadme route โ skill)docs/index.mdโ main landing page last, so it can link to all of the above (viahome-page-template.md)- Updated
mkdocs.ymlnav entries for all generated files
Execution order: about โ glossary โ FAQ โ quizzes โ references โ cover image โ metrics โ diagram reports โ README โ landing page โ nav update โ verification
Model guidance: All text-generation steps use Sonnet. Any MicroSim created during this workflow must use claude-opus-4-7 with high thinking โ Opus is significantly better at the coding and spatial reasoning MicroSims require.
Prerequisites:
- Existing MkDocs project with
mkdocs.yml docs/course-description.mdpresentdocs/learning-graph/learning-graph.jsonpresent- At least one chapter under
docs/chapters/
slide-generator.md
Purpose: Install the slide-viewer MicroSim into an intelligent textbook project and generate presentation-style slides.md decks for specified chapters
Creates:
docs/sims/slide-viewer/โ viewer shell (main.html, script.js, local.css, index.md) that fetches any rendered MkDocs page URL, splits its content on<hr>elements, and renders one slide at a time with keyboard + button navigationdocs/chapters/<slug>/slides.mdโ per chapter: title slide, content slides separated by---, retrieval check, bridge, celebration close- Three-button nav bar (
Content,Slides,Slides in Viewer) at the top of each chapter'sindex.mdand itsslides.md - mkdocs.yml nav restructured so each chapter with slides has
Content/Slidessub-entries
Features:
- Viewer reads MkDocs' rendered HTML (never raw
.mdโ MkDocs doesn't serve.mddirectly) - Mascot integration: neutral pose on every slide, celebration pose on the last slide (uses
docs/img/mascot/neutral.pngandcelebration.pngif present; silently absent otherwise) - First/last-slide jump buttons,
Home/Endkeys, fullscreen, table-of-contents overlay - Distills chapter
index.mdinto 15โ28 slides following project voice/style rules
Prerequisites:
- Existing MkDocs Material project with
docs/chapters/populated - Chapter
index.mdfiles with real content (not just scaffold) โ guide checks line counts before generating - Optional: mascot installed via
learning-mascot.md
mascot-placement-rules.md
Purpose: The single source of truth for when a learning mascot may appear, how often, and which pose carries which pedagogical job
Used by: learning-mascot.md, mascot-chapter-updater.md, instructors-guide.md, and the chapter-content-generator skill โ all of which reference this file rather than restating its rules
Contains:
- The admonition format and the Markdown-vs-raw-HTML image path rules
- The placement table (context โ pose โ per-chapter count)
- Hard limits: no back-to-back placement, one welcome and one celebration, 1-3 sentence bodies; total count is an informal guideline scaled to the chapter's concept count (~1 admonition per 2 concepts) and adjusted for reader age
- Per-pose instructional-design rules for all seven poses
- The one-time Chapter 1 self-introduction pattern
- The post-generation validation rule
Important: never copy this file's tables or counts into another skill or into a book by hand. Skills reference it by path; books receive a rendered copy via scripts/render-mascot-guide.py, spliced between sentinel comments so it can be regenerated. Run scripts/bk-check-mascot-rules from the repo root to verify no restatement has crept back in.
mascot-chapter-updater.md
Purpose: Retrofit an existing chapter markdown file with mascot admonitions in the right places, following the canonical references/mascot-placement-rules.md
Creates:
- In-place edits to the specified chapter file only (no new files)
- A placement plan shown to the user for confirmation before editing
Features:
- LLM-driven workflow for semantic placement (no regex auto-insertion)
- Enforces the hard limits defined in
references/mascot-placement-rules.md(total ceiling, one welcome and one celebration maximum, no back-to-back placements) - Image-path guidance for directory-URL rendering (counts
../from rendered page) - Voice and body-text rules: 1-3 sentences, in-character, specific to chapter content
- Validation via
scripts/validate-chapter-mascots.pythat flags count limits, back-to-backs, missing mascot images, and body-text length
Prerequisites:
- Mascot images present in
docs/img/mascot/ordocs/img/mascots/ docs/css/mascot.cssloaded and the mascot-test page renders correctly- Specific chapter file identified by absolute path
mkdocs-serve-warning.md
Purpose: Install a MkDocs-only hook that logs a warning when a book that is built and deployed with Zensical is previewed with mkdocs serve โ recommended for every Zensical-designed book during the MkDocs-to-Zensical transition, while MkDocs is still installed alongside Zensical
Creates:
hooks/mkdocs_serve_warning.pyโ copied verbatim fromassets/mkdocs-serve-warning/mkdocs_serve_warning.py- A
hooks:entry inmkdocs.yml(appended to the existing list, never a secondhooks:key โ a duplicate key silently drops the first list) - An
AGENTS.mdexception note, only if the project forbidshooks:
Features:
- Explains why the preview looks wrong: MkDocs does not rewrite relative
<iframe src>paths, so MicroSims embedded from top-level pages show as broken frames (zensical buildandzensical serveboth rewrite them) - Zensical never loads
hooks:entries, so the samemkdocs.ymlstays valid for both builders - Warns on
serveonly, neverbuild, somkdocs build --strictstill passes; also catchesmkdocs serve --clean - Verified without starting a server: simulates MkDocs' startup event
Prerequisites:
- The book is built and deployed with Zensical (do NOT install on a MkDocs-deployed book โ the message would be false)
- A
mkdocs.ymland MkDocs 1.4 or newer
Examples
Example 1: Ask for Help
User: "book-installer help" Routing: Keyword "help" โ Display numbered list Action: Show the numbered feature list (Step 1), then wait for user to select a feature
Example 2: Add a Specific Feature
User: "Add math equation support to my book"
Routing: Keyword "math" โ references/mkdocs-features.md
Action: Load mkdocs-features.md, find the Math Equations section, and apply the configuration
Example 2b: Select by Number
User: "5"
Routing: Number selection after help list โ references/mkdocs-features.md
Action: Load mkdocs-features.md, find Math Equations (item 5), and apply the configuration
Example 2c: Simple Template
User: "1"
Routing: Number 1 โ references/init-textbook.md (canonical scaffold)
Action: Load init-textbook.md and scaffold the starter config and docs/ tree
Example 3: New Textbook Project
User: "I want to create a new intelligent textbook about machine learning" (empty directory)
Routing: Keywords "create", "new", "textbook" โ references/init-textbook.md
Action: Read init-textbook.md, gather SITE_NAME/SITE_DESCRIPTION, confirm the substitution table, scaffold from assets/init-textbook/
Example 3b: Register Google Analytics
User: "Add Google Analytics to this book" or "25"
Routing: Keywords "google analytics", "GA4", "25" โ references/google-analytics.md
Action: Read google-analytics.md; create the GA4 property, write the G-* ID into mkdocs.yml extra.analytics, verify the tag, deploy
Example 4: Add Graph Viewer
User: "Add an interactive viewer for the learning graph"
Routing: Keywords "viewer", "learning graph", "interactive" โ references/learning-graph-viewer.md
Action: Read learning-graph-viewer.md and follow its workflow
Example 5: Track Skill Usage
User: "I want to track which skills I use most often"
Routing: Keywords "track", "skills", "usage" โ references/skill-tracker.md
Action: Read skill-tracker.md and follow its workflow
Example 6: Create Cover Image
User: "Help me create a cover image for my textbook"
Routing: Keywords "cover image", "textbook" โ references/home-page-template.md
Action: Read home-page-template.md and follow its workflow
Example 7: Set Up Home Page with Social Sharing
User: "I need to add og:image metadata to my home page"
Routing: Keywords "og:image", "home page" โ references/home-page-template.md
Action: Read home-page-template.md and follow its workflow
Example 8: Generate Cover Image Prompt
User: "generate cover image" or "book-installer generate cover image"
Routing: Keywords "generate cover image" โ references/cover-image-generator.md
Action: Read cover-image-generator.md, gather source material (title, course description, concept list, mascot, MicroSim screenshots), write docs/img/cover-image-prompt.md, and recommend the user paste it into a text-to-image tool and review drafts. Only ask about API key/ChatGPT Pro/macOS and run generate-cover.sh if the user explicitly requests auto-generation.
Example 9: Add a Learning Mascot
User: "I want to add a mascot character to my math textbook"
Routing: Keywords "mascot", "character" โ references/learning-mascot.md
Action: Read learning-mascot.md, guide user through character design, generate AI image prompts, and implement chosen method (inline, CSS admonitions, or JS detection)
Example 10: Generate Feature Checklist
User: "generate a feature checklist" or "what features do I have"
Routing: Keywords "feature checklist" โ references/feature-checklist-generator.md
Action: Read feature-checklist-generator.md, run the detection script, generate docs/feature-checklist.md with detected statuses
Example 11: Generate Instructor's Guide
User: "add a teacher's guide" or "create instructor guide"
Routing: Keywords "teacher guide", "instructor guide" โ references/instructors-guide.md
Action: Read instructors-guide.md, gather project variables from mkdocs.yml/course-description.md/CLAUDE.md, generate the guide with all variables substituted, add to navigation
Example 12: Create Kanban Board
User: "set up a kanban board for my textbook" or "create a project board"
Routing: Keywords "kanban", "project board" โ references/kanban-board.md
Action: Read kanban-board.md, verify gh auth with project scope, create the GitHub Project, link to repo, populate milestones, create docs/project-management.md, update nav and README
Example 13: Generate About Page
User: "create an about page" or "add about.md with author bio and citations"
Routing: Keywords "about page", "about", "author bio", "citation" โ references/about-page.md
Action: Read about-page.md, gather project variables from mkdocs.yml/course-description.md, generate docs/about.md with all sections (motivation, author bio, citation formats), add to navigation
Example 14: Add Mascots to an Existing Chapter
User: "add Sparky admonitions to chapter 2" or "place the mascot in docs/chapters/02-ohms-law/index.md"
Routing: Keywords "mascot chapter", "place mascot", "add mascot to chapter" โ references/mascot-chapter-updater.md
Action: Read mascot-chapter-updater.md, survey the chapter, propose a placement plan with line numbers, wait for user confirmation, apply edits, run validate-chapter-mascots.py, and address any flags
Example 15: Generate Favicon from Mascot
User: "generate favicon from mascot" or "create favicon.ico from neutral.png"
Routing: Keywords "generate favicon", "mascot favicon", "favicon from mascot" โ references/favicon-generator.md
Action: Read favicon-generator.md, verify docs/img/mascot/neutral.png exists and Pillow is installed, run scripts/generate-favicon.py from the project root, then update theme.favicon in mkdocs.yml to img/favicon.ico
Example 15b: Install Social Media Preview Hook
User: "add the social media preview mkdocs hook" or "my bk-check-social-cover is failing" or "install og:image meta tags"
Routing: Keywords "social media preview", "og:image", "bk-check-social-cover", "social hook" โ references/social-media-preview.md
Action: Read social-media-preview.md, create plugins/social_override.py at the project root with the exact code in the reference, add a top-level hooks: - plugins/social_override.py block to mkdocs.yml, run mkdocs build, verify the nine og:* / twitter:* meta tags appear in site/index.html, then run bk-check-social-cover against either the deployed URL or a local server staging the build under /<project>/
Example 17: Generate All Supplementary Content
User: "generate all supplementary content" or "complete the book" or "39"
Routing: Keywords "supplementary content", "complete the book", "39" โ references/supplementary-content-generator.md
Action: Read supplementary-content-generator.md. First inventory existing files. Then execute Steps 2โ12 in order: generate about page, landing page, README, glossary, FAQ, per-chapter quizzes and references, run bk-generate-book-metrics and bk-diagram-reports, update mkdocs.yml nav, and run the verification bash check. Report which files were created, skipped, or missing.
Example 16: Install Slide Viewer and Generate Chapter Slides
User: "install the slide viewer and make slides for chapters 1 and 2" or "generate slides for chapter 3"
Routing: Keywords "slide", "slides", "slide viewer", "generate slides", "slide deck" โ references/slide-generator.md
Action: Read slide-generator.md, copy the slide-viewer assets into docs/sims/slide-viewer/, ask which chapters to generate decks for, create slides.md for each (title + content slides separated by --- + retrieval check + bridge + celebration), add the three-button nav bar to each chapter's index.md, restructure the chapter's mkdocs.yml entry into Content/Slides sub-entries, and append deck links to the viewer's index.md
Example 18: Generate Book Metrics
User: "generate book metrics" or "how many words/chapters/MicroSims does this book have" or "40"
Routing: Keywords "book metrics", "generate metrics", "metrics report", "40" โ references/book-metrics.md
Action: Read book-metrics.md, run bk-generate-book-metrics from the project root (or the python3 "$BK_HOME/src/book-metrics/book-metrics.py" docs fallback), confirm book-metrics.md, chapter-metrics.md, and the metrics block in book-metadata.json were written, and add the two reports to the Learning Graph nav in mkdocs.yml if not already present.
Example 19: Install the MkDocs-Serve Warning
User: "warn people who run mkdocs serve" or "add the zensical transition guard" or "my MicroSim iframes are broken under mkdocs serve" or "41"
Routing: Keywords "mkdocs serve warning", "zensical transition", "transition guard", "41" โ references/mkdocs-serve-warning.md
Action: Confirm the book is built and deployed with Zensical (ask if unclear; stop if it deploys with MkDocs). Copy assets/mkdocs-serve-warning/mkdocs_serve_warning.py to hooks/, append hooks/mkdocs_serve_warning.py to the existing hooks: list in mkdocs.yml (create the key only if absent), then verify WITHOUT starting mkdocs serve: mkdocs build --strict exits 0 with no warning, and a simulated on_startup(command="serve") prints the warning. Ask the user to run mkdocs serve once in their own terminal to see it.
Common Workflows
Full Project Setup
For a complete new project, users typically run these installations in order:
init-textbook.md- Scaffold the project structure (feature 0)cover-image-generator.md- Generate a high-quality cover image prompt (auto-generation optional, on request)home-page-template.md- Configure home page with cover image metadatasocial-media-preview.md- Install the og:* / twitter:* meta-tag hook (verify withbk-check-social-cover)learning-graph-viewer.md- Add graph visualization (after learning graph exists)skill-tracker.md- Enable usage analytics (optional)google-analytics.md- Register the book with GA4 (feature 25, optional)supplementary-content-generator.md- Generate all supplementary content once chapters exist (glossary, FAQ, quizzes, references, metrics, about, README)mkdocs-serve-warning.md- Only if the book is built and deployed with Zensical: warn anyone who runsmkdocs serveby mistake (feature 41; recommended for every Zensical-designed book during the transition period, and best done right after step 4 so it joins the existinghooks:list)
Verification Commands
After any installation, verify with:
# For MkDocs projects
mkdocs serve
# Visit http://127.0.0.1:8000/[project-name]/
# For skill tracker
cat ~/.claude/activity-logs/skill-usage.jsonl | tail -5