This guide explains how to use the book-metadata.yml file and helper scripts for managing intelligent textbook creation workflows with Claude Code skills.
Overview
The book-metadata.yml file serves as a central hub for:
Dublin Core Metadata - Standard bibliographic information about the textbook
Skill Execution Tracking - Status and results of each Claude Code skill
Workflow Management - Overall progress through textbook creation phases
Dependency Management - Ensures skills run in the correct order
Quality Validation - Tracks quality scores and completion metrics
File Structure
Dublin Core Metadata
Standard bibliographic metadata following ISO 15836:
1234567
dublin_core:title:"YourTextbookTitle"creator:"AuthorName"subject:"SubjectAreas"description:"Coursedescription"language:"en"# ... other Dublin Core fields
skills:course_description_analyzer:status:"completed"# not_started, in_progress, completed, failed, needs_updatequality_score:85# 0-100date_run:"2025-01-15T10:30:00Z"version:"1.0.0"dependencies:[]# Skills that must run firstoutputs:file_path:"docs/course-description.md"validation_passed:trueissues:[]notes:"Additionalnotesaboutexecution"
fromsrc.book_metadata_helperimportBookMetadata# Initializemetadata=BookMetadata()# Check if skill can runcan_run,reasons=metadata.can_skill_run('quiz_generator')ifnotcan_run:print("Cannot run skill:")forreasoninreasons:print(f" - {reason}")exit(1)# Run your skill...# ...# Update status when completemetadata.update_skill_status(skill_name='quiz_generator',status='completed',quality_score=85,outputs={'quizzes_generated':12,'total_questions':120,'validation_passed':True})
Skill Dependencies
Skills define their dependencies to ensure correct execution order:
Simple Dependencies
Run after another skill completes:
12
dependencies:-"course_description_analyzer"
Quality Score Dependencies
Run only if previous skill meets quality threshold:
================================================================================
INTELLIGENT TEXTBOOK STATUS REPORT
================================================================================
Title: Designing and Building Intelligent Textbooks
Creator: Dan McCreary
Language: en
Current Phase: foundation
SKILLS STATUS:
--------------------------------------------------------------------------------
✓ course_description_analyzer: completed (score: 85)
✓ learning_graph_generator: completed (score: 92)
→ glossary_generator: in_progress
○ chapter_generator: not_started
└─ Blocked: Dependency 'learning_graph_generator' requires quality score >= 70
...
Validation Rules
The metadata file includes validation rules:
1 2 3 4 5 6 7 8 91011121314151617
validation:min_quality_scores:course_description:70learning_graph:70glossary:70chapters:60quizzes:60min_completion:chapters_for_quizzes:30# 30% of chapters before generating quizzeschapters_for_faqs:30chapters_for_social:50required_files:-"docs/course-description.md"-"docs/glossary.md"-"docs/faq.md"
Best Practices
For Skill Developers
Always check dependencies before running your skill
Update status immediately when starting (in_progress) and completing
Include quality scores when your skill can assess output quality
Populate outputs with useful metrics and file paths
Log issues in the outputs.issues array for failed validations
For Textbook Authors
Start with course description - foundation for everything else
Follow the workflow phases - don't skip ahead
Check status regularly - use the status report to track progress
Validate quality scores - ensure each step meets minimum thresholds
Update Dublin Core - keep metadata current as project evolves
defrun_skill_with_checks(skill_name,skill_function):"""Wrapper to run skills with automatic dependency checking."""metadata=BookMetadata()# Check dependenciescan_run,reasons=metadata.can_skill_run(skill_name)ifnotcan_run:raiseRuntimeError(f"Cannot run {skill_name}: {reasons}")# Mark as in progressmetadata.update_skill_status(skill_name,'in_progress')try:# Run the actual skillresult=skill_function()# Mark as completedmetadata.update_skill_status(skill_name,'completed',quality_score=result.quality_score,outputs=result.outputs)exceptExceptionase:# Mark as failedmetadata.update_skill_status(skill_name,'failed',notes=str(e))raise# Usagerun_skill_with_checks('glossary_generator',generate_glossary)
Integration with Claude Code Skills
In Your Skill Prompt
Include instructions for Claude to check and update metadata:
1 2 3 4 5 6 7 8 91011121314
## Before Running This Skill1. Use the BookMetadata helper to check if dependencies are met
2. If dependencies are not met, inform the user what needs to be done first
3. If ready, update status to 'in_progress'
## After Completing This Skill1. Calculate a quality score (0-100) based on validation criteria
2. Update the skill status with:
-status: 'completed'
-quality_score: <your calculated score>
-outputs: <dictionary with file paths, counts, validation results>
3. If validation fails, set status to 'needs_update' with issues listed