course-ebook-publishing

course-ebook-publishing is a skill for Claude Code, Codex from kevintsai1202/teaching-site-skills. It costs 160 tokens per session (2,688 once invoked), scanned A, original, MIT.

A publishing tool that turns a finished, stable teaching website into a book-like PDF and optionally a DOCX document. PDF is useful for printing or sharing, while DOCX can be reviewed or edited.

In plain words
What is it for?
Creating printable course ebooks, archived teaching materials, review documents, and corporate training deliverables.
Why use it?
People may need a course outside the browser as a handout, archive, or client deliverable. Publishing from the live course data keeps the book based on the website's content.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **Schema authority**: this skill reads the live `window.COURSE` object whose shape is defined in [`_shared/domain-primitives.md`](../_shared/domain-primitives.m.

Good fit Creating printable course ebooks, archived teaching materials, review documents, and corporate training deliverables.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/kevintsai1202/teaching-site-skills
agentmods
npx agentmods add skills/kevintsai1202/teaching-site-skills/course-ebook-publishing

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for course-ebook-publishing

README.md
[![agentmods](https://agentmods.dev/badge/skills/kevintsai1202/teaching-site-skills/course-ebook-publishing/github.svg)](https://agentmods.dev/skills/kevintsai1202/teaching-site-skills/course-ebook-publishing)
Your own site
<a href="https://agentmods.dev/skills/kevintsai1202/teaching-site-skills/course-ebook-publishing"><img src="https://agentmods.dev/badge/skills/kevintsai1202/teaching-site-skills/course-ebook-publishing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for course-ebook-publishing

Your own site · 80×15
<a href="https://agentmods.dev/skills/kevintsai1202/teaching-site-skills/course-ebook-publishing"><img src="https://agentmods.dev/badge/skills/kevintsai1202/teaching-site-skills/course-ebook-publishing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 160 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,688 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00160 $0.02688
Opus 5 $0.00080 $0.01344
Sonnet 5 $0.00032 $0.00538
Haiku 4.5 $0.00016 $0.00269

Measured 11d ago against content hash 884319f2aecc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

course-ebook-publishing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

course-ebook-publishing/SKILL.md · 252 lines

How it starts

The opening of the file, as written. The whole thing — 252 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Course Ebook Publishing

Schema authority: this skill reads the live window.COURSE object whose shape is defined in _shared/domain-primitives.md. Quiz / pre-test / post-test items are filtered OUT of the ebook (per §10 quiz item rules + ebook content policy).

Filename convention (English-first): outputs land in dist/{name}.pdf / dist/{name}.docx. Source markdown is composed under dist/master.md.

This skill turns a finished teaching website into a book — PDF (primary) and optionally DOCX (for editorial review or further authoring). It is a post-site step: it consumes window.COURSE from the live site, never re-authoring content.

When to Invoke

  • Site is feature-complete (Stages 1–5 done) and content is stable.
  • Stakeholders ask for a printable hand-out, an archivable record, or a deliverable for non-web channels.
  • Sometimes invoked after course-corporate-edition to produce a client deliverable bundle.

Do NOT invoke when site is mid-development. The ebook pipeline reads window.COURSE; if the site changes daily, the ebook drifts daily.

Architecture: Single Source → Two Outputs

window.COURSE  ─┐
                ├─→ compose-ebook.mjs ─→ master.md ─→ pandoc ─→ ebook.docx
asset folders ─┤                                  └─→ Playwright page.pdf() ─→ ebook.pdf
materials/   ─┘

Why a single composed markdown intermediate: keeps PDF and DOCX content identical. Pandoc handles markdown → DOCX cleanly; Playwright renders the same markdown via an HTML wrapper → PDF. Two outputs, one source of truth.

File Layout (Standard)

scripts/
├── build-ebook.mjs              ← CLI entry point (--md-only, --no-docx, --no-pdf, --output, --keep-html)
├── render-pdf.mjs               ← markdown → HTML → PDF via Playwright
└── lib/
    ├── compose-ebook.mjs        ← loadSources + composeXxx functions (cover, TOC, chapters, appendix)
    └── reference.docx           ← pandoc style template (generated by gen-reference-docx.mjs)

style-ebook.css                   ← @page rules, cover, page-number footer, print-only styles
dist/                             ← output: ebook.md, ebook.pdf, ebook.docx

Read the full file on GitHub · 252 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 252 lines · 160 tokens per session scan A 884319f2aecc

Subscribe to this mod's changes

course-ebook-publishing is a skill published in the GitHub repository kevintsai1202/teaching-site-skills (49 stars, last pushed 3mo ago), licensed MIT. It adds 160 tokens to every session and 2,688 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

pptx-import

A method for adding an uploaded PowerPoint presentation to an existing classroom as extra pages while keeping the slides' original layout. PowerPoint is Microsoft's presentation file format.

THU-MAIC/OpenMAIC · 125 tokens

exam-study-guide

A study-guide builder for a completed exam chapter that has not yet passed its required checks. It creates a structured teaching checklist and, in full mode, a self-contained HTML and printable PDF guide with readable formulas, visible images, explanations, examples, and answers.

ZeKaiNie/universal-examprep-skill · 113 tokens

brief-compliance-check

Check a LaTeX coursework submission against the requirements in a supplied PDF assessment brief. Use when verifying format, required sections, word limits, or deliverables before submission. Not for general prose proofreading; use $proofread.

flonat/flonat-research · 50 tokens

textbook-to-md

Convert PDF/EPUB textbooks to searchable markdown files for an AI agent's own reference. Use this skill whenever: (1) the user asks to convert a textbook/PDF chapter to markdown, (2) you need to search textbook content and no markdown version exists yet, (3) batch-converting a set of reference books into a knowledge…

drpwchen/textbook-to-note · 90 tokens

scan-to-practice

A complete methodology for turning scanned or image-based learning materials into high-quality desktop, web, or mobile practice products. Covers visual transcription, data assembly, answer-key-driven controls and grading, product design, animation, validation, and long-term maintenance. Use when a user wants to…

parz0val0/scan-to-practice · 89 tokens

svg-press

Teaches agents how to hand-craft self-contained SVG diagrams that render correctly in browsers, tags, and Playwright PDF/PNG. Covers containment math, viewBox sizing, arrow construction, text hierarchy, KDCube brand color tokens, semantic zone fills, badges, the PNG inspection loop, writepng parameters, multi-diagram…

kdcube/kdcube · 87 tokens