dmccreary/claude-skills/book-chapter-generator
Claude Code and agent skill by dmccreary/claude-skills
- community
Checking that the SKILL.md file is still in the repository.
Designs the chapter structure for an intelligent textbook by analyzing the learning graph and concept dependencies. Use after the learning graph is complete and before generating chapter content.
Install
npx vskill@latest install dmccreary/claude-skills/book-chapter-generatorSKILL.md
Book Chapter Generator
Version: 1.1.2
Changelog
- v1.1.2 — The "Concepts Covered" table's second column is now headed
Concept Impact Scoreinstead of the abbreviatedCIS Score, which redundantly repeated "Score" (CIS already stands for Concept Impact Score). Purely a column-header rename -- the underlyingcisfield, its computation, and every other behavior are unchanged. Applies to newly generated chapters; a book with chapters already generated under an earlier skill version keeps the old header on those files until its own chapter-generation script or table is updated separately.
- v1.1.1 — Step 4.6's completion message now always includes a strong recommendation to create a learning mascot (via
book-installer's learning-mascot guide) before runningchapter-content-generator. A mascot designed up front gets placed into every chapter as content is written; adding one after dozens of chapters already exist means retrofitting each one instead. Also stated as a standing rule in the Notes section. No change to chapter design or file structure.
- v1.1.0 — Version is now tracked in the SKILL.md frontmatter as
metadata.ibook.version. It lives undermetadata:rather than a bareversion:key because strict packaging validation rejects any frontmatter key outside the six spec fields, which would block the skill from claude.ai, the Skills API, andpackage_skill.py. No behavioural change.
- v1.0.0 — BREAKING: First tracked version number for this skill. Step 1.4a no longer computes its own "dependents count" from the edge list — it now reads the pre-computed Concept Impact Score (CIS) directly from each node's
cisfield inlearning-graph.json(added bylearning-graph-generatorv1.06+). CIS is a strictly better importance signal than raw dependents count: it captures transitive impact (a concept with few direct dependents can still be highly foundational if those dependents themselves have many dependents), which plain dependents-count undercounts. The "Concepts Covered" section in each generated chapter'sindex.md(Step 4.4) is now a markdown table withConceptandCIS Scorecolumns, replacing the old numbered list with a(N dependents)suffix. Requireslearning-graph.jsonto have been regenerated withlearning-graph-generatorv1.06+ (nodes missing acisfield will read ascis=1, the minimum — check the console output when loading the graph and regenerate if every concept shows 1).
Overview
This skill creates a comprehensive chapter structure for intelligent textbooks by analyzing the course description, learning graph, and concept taxonomy. It designs an optimal chapter outline that ensures all concepts are covered exactly once, respects dependency relationships, and distributes content appropriately across chapters. This task is run serially after the learning graph generation.
When to Use This Skill
Use this skill when:
- The course description is finalized and the a learning graph has been generated (learning-graph.json exists)
- Chapter content structure needs to be designed before writing begins
Prerequisites:
/docs/course-description.mdmust exist/docs/learning-graph/learning-graph.jsonmust exist with ~200 concepts- mkdocs.yml file must be in place for the chapter links to be generated to the nav section
Do NOT use this skill if:
- The learning graph hasn't been generated yet (use
learning-graph-generatorfirst) - Chapter content already exists and just needs updating
Chapter Generation Workflow
This skill follows a four-step sequential workflow with user approval before generating files.
Step 1: Analyze Input Resources
Before designing chapters, analyze the following resources:
1.1 Read Course Description
Read /docs/course-description.md to understand:
- Course title and target audience
- Learning objectives and outcomes
- Prerequisite knowledge
- Overall scope and goals
1.2 Read Learning Graph
Read /docs/learning-graph/learning-graph.json to extract:
- Complete list of concepts (typically 200 concepts)
- Concept dependencies (which concepts require others as prerequisites)
- Concept groupings by taxonomy category
- Metadata about the course
!!! info "Learning Graph = Concept Dependency Graph (a DAG)" A learning graph is a Concept Dependency Graph -- a directed acyclic graph (DAG) where each edge represents a "depends on" relationship. We chose the dependency direction (edges point FROM a concept TO the concepts it depends on) because this aligns with standard graph theory algorithms for topological sorting, cycle detection, and transitive reduction.
Some learning management systems use an alternative called an enablement graph, where edges point in the opposite direction (FROM prerequisite TO the concepts it enables). The enablement direction is more intuitive for some teachers ("learning Ecology enables you to learn Ecosystems"), but it is less natural for graph algorithms. This project uses the dependency direction exclusively.
!!! danger "CRITICAL: Edge Direction in learning-graph.json" In the vis-network JSON format, edges point FROM dependent TO prerequisite (the dependency direction).
- Edge
{from: 5, to: 1}means "Biodiversity (5) depends on Ecology (1)" - It does NOT mean "Ecology leads to Biodiversity" (that would be the enablement direction)
To build a prerequisite map: ``python prereqs = defaultdict(set) for edge in data['edges']: prereqs[edge['from']].add(edge['to']) # CORRECT: dependency direction ``
NEVER use prereqs[edge['to']].add(edge['from']) -- this accidentally converts to the enablement direction, inverting ALL dependencies and silently producing invalid chapter orderings. This bug wastes significant tokens and requires a complete redesign.
Validate that:
- The graph structure is a valid DAG (no circular dependencies)
- All concepts have unique IDs
- Dependency references are valid
1.2a Validate Edge Direction (MANDATORY)
Before designing any chapters, verify the edge direction is correct:
- Build the prerequisite map using
prereqs[edge['from']].add(edge['to']) - Identify foundational concepts (those with zero entries in prereqs)
- Verify foundational concepts are simple, introductory terms (e.g., "Ecology", "Energy", "System")
- If advanced concepts appear as foundational, the direction is WRONG -- stop and fix
Do NOT proceed to chapter design until this check passes.
1.3 Read Concept Taxonomy
Read /docs/learning-graph/concept-taxonomy.md (if it exists) to understand:
- Taxonomy categories and their meanings
- How concepts are grouped conceptually
- Any suggested ordering or progression
1.4 Identify Design Constraints
Analyze the data to identify:
- Foundational concepts: Concepts with no dependencies (should appear early)
- Advanced concepts: Concepts with many dependencies (should appear later)
- Dependency chains: Long sequences of prerequisite relationships
- Concept clusters: Groups of related concepts that should stay together
- Terminal concepts: Concepts that nothing depends on (can be placed flexibly)
1.4a Read Concept Impact Score (CIS) Per Concept
Every node in learning-graph.json carries a pre-computed `cis` field (added by learning-graph-generator v1.06+) -- the Concept Impact Score, a PageRank-style recursive importance measure: CIS(x) = 1 + sum(CIS(d) for d in direct dependents of x). Unlike a simple dependents count (direct dependents only), CIS captures transitive impact: a concept with only 1-2 direct dependents can still have a very high CIS if those dependents themselves have many dependents. This is why CIS, not raw dependents count, now drives per-concept word-count and non-text-element targets in chapter-content-generator.
Sanity check: if every concept shows cis == 1, learning-graph.json predates learning-graph-generator v1.06 and needs to be regenerated before proceeding -- do not fall back to computing your own dependents count.
Carry this cis map forward into Step 4 -- it is placed alongside each concept name in every chapter's "Concepts Covered" table.
Step 2: Design Chapter Structure
Design an optimal chapter structure following these principles:
2.1 Determine Chapter Count
Choose the appropriate number of chapters (6-20) based on:
- Total concepts: ~200 concepts typically need 10-15 chapters
- Dependency complexity: More complex dependencies may need more chapters
- Taxonomy distribution: Natural groupings suggest chapter boundaries
- Target audience: Introductory courses may need smaller chapters
Guidelines:
- Minimum 6 chapters (for very concise courses)
- Optimal range: 10-15 chapters
- Maximum 20 chapters (for comprehensive graduate-level content)
- Aim for 10-20 concepts per chapter on average
2.2 Assign Concepts to Chapters
Design chapter assignments that satisfy these requirements:
CRITICAL REQUIREMENTS:
- Every concept appears in exactly one chapter (no duplicates, no omissions)
- No concept appears before its dependencies (respect the DAG structure)
- Balanced distribution (avoid chapters with too many or too few concepts)
OPTIMIZATION GOALS:
- Keep related concepts (same taxonomy category) together when possible
- Create logical progression from foundational to advanced topics
- Balance chapter sizes (avoid chapters with <8 or >25 concepts)
- Group concepts that form natural learning units
- Consider cognitive load (mix difficulty levels within chapters)
2.3 Create Chapter Titles
For each chapter, create a title that:
- Uses Title Case formatting
- Is no longer than 200 characters (to fit on one line)
- Clearly describes the chapter's main topic
- Uses standard educational terminology
- Avoids acronyms unless widely known
Examples:
- "Introduction to Graph Theory Fundamentals"
- "Binary Trees and Tree Traversal Algorithms"
- "Graph Coloring Problems and Applications"
- "Advanced Topics in Network Flow Optimization"
2.4 Write Chapter Summaries
For each chapter, write a single sentence (20-40 words) that:
- Describes what the chapter covers
- Mentions key concepts or themes
- Indicates the chapter's role in the learning progression
Step 3: Present Design to User for Approval
Before creating any files, present the chapter design to the user in this format:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationPassed, 70 of 100Effective. 1 run. Evaluated 8 months ago.
Source
- SKILL.md in the repositoryCheckingskills/book-chapter-generator/SKILL.md
Popularity
- Repository stars
- 91
- Repository forks
- 12
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 28 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dmccreary/claude-skills/book-chapter-generator)