compile-book

Regenerate modified chapter PDFs and merge them into a compiled metricsAI textbook.

6|3|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/quarcs-lab/metricsai --skill compile-book
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compile-book
Source: https://github.com/quarcs-lab/metricsai/tree/main/.claude/skills/compile-book
Command: npx skills add https://github.com/quarcs-lab/metricsai --skill compile-book

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, pypdf, jupyter.

What problem does it solve?

Automates the end-to-end process of regenerating chapter PDFs and assembling a professional metricsAI textbook from notebook content.

Core Features & Use Cases

  • Detects modified chapters and regenerates only those PDFs.
  • Merges cover page, copyright page, three tables of contents (Brief, Detailed, Key Concepts), and all chapter PDFs into a single book with bookmarks and clickable links.
  • Supports batch workflow after edits to produce a ready-to-distribute textbook.

Quick Start

Run the compile-book workflow after editing chapters to regenerate affected PDFs and assemble the complete metricsAI book.

Frequently Asked Questions about compile-book

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compile a single PDF from multiple Jupyter notebooks?

The pipeline detects modified chapter notebooks, selectively regenerates only those PDFs via nbconvert and Playwright, and merges them with cover, copyright, and TOC pages into one textbook.

How does automated PDF compilation handle modified notebooks?

It computes chapter freshness to detect outdated PDFs, then selectively regenerates only modified chapters via targeted arguments before assembling the complete book with bookmarks.

Can I regenerate specific chapter PDFs instead of rebuilding the entire book?

Yes, you can target specific chapters using chXX arguments or force a full rebuild with the --all flag, avoiding unnecessary regeneration of unchanged notebook PDFs.

Does Jupyter nbconvert work with Playwright for PDF generation?

Yes, the workflow uses nbconvert for initial conversion, injects CSS for styling, and leverages Playwright to render final PDFs with proper bookmarks and over 750 clickable TOC links.

Do I need Playwright and pypdf installed to automate notebook PDF merging?

Yes, Playwright renders high-fidelity chapter PDFs from HTML, while pypdf merges individual PDFs and applies bookmarks to produce the final textbook with clickable TOC links.