Delegate independent tasks to specialized agents working concurrently with isolated context.
EPUB Publication Validator Skill
epub-publication-validator
Run EPUBCheck and Ace accessibility validation. Use before final EPUB packaging or distribution to ensure publication readiness.
SKILL.md
Full skill instructions
EPUB Publication Validator Skill
Purpose
Validate the EPUB package against EPUB 3.2 specification and WCAG 2.2 AA accessibility standards. This is the final gate before packaging and distributing the EPUB to retailers (Kindle, Apple Books, Kobo, etc.).
When to Invoke
- User says "validate the EPUB" or "is this ready to publish?"
- Before running
npm run build:epubfor final packaging - After making changes to XHTML, CSS, or content.opf
- User asks "does this pass EPUBCheck?"
- User mentions accessibility compliance or WCAG
Workflow
Step 1: EPUBCheck Validation
# Validate the entire EPUB package
epubcheck REBRANDED_OUTPUT/ --mode exp --save
What it checks:
- Package document (content.opf) validity
- Spine order and manifest completeness
- All XHTML files are well-formed XML
- No broken internal links
- Proper mimetype file
- META-INF/container.xml correctness
- Image dimensions and formats
- Font embedding compliance
- Navigation document (nav.xhtml) structure
Expected output:
- Pass: "No errors or warnings detected"
- Fail: List of errors with file paths and line numbers
Step 2: Accessibility Validation (Ace by DAISY)
# Run Ace accessibility checker
ace -o docs/accessibility-report REBRANDED_OUTPUT/
What it checks:
- WCAG 2.2 AA compliance
- Image alt text presence and quality
- Heading hierarchy (no skips)
- Color contrast ratios
- ARIA landmark usage
- Language declarations
- Table headers and captions
- Semantic HTML structure
Expected output:
- HTML report at
docs/accessibility-report/report.html - JSON data at
docs/accessibility-report/ace.json - Violations categorized by severity (critical, serious, moderate, minor)
Step 3: Metadata Completeness Check
# Extract and validate OPF metadata
python3 scripts/validate_metadata.py --opf REBRANDED_OUTPUT/content.opf
What it checks:
- Required fields: title, creator, language, identifier (ISBN)
- Recommended fields: publisher, date, subject, description
- Accessibility metadata: accessMode, accessibilityFeature, accessibilitySummary
- Modified date is current
- Subject keywords (should have 3-7 for discoverability)
Step 4: Cross-Reference Validation
# Verify all manifest items exist on disk
python3 scripts/verify_asset_references.py --opf REBRANDED_OUTPUT/content.opf
What it checks:
- All
<item href="...">files exist - All images referenced in XHTML are in manifest
- All CSS files referenced exist
- All fonts referenced exist
- No orphaned files (files in directory but not in manifest)
Interpreting Results
EPUBCheck Results
Common errors:
RSC-005: File not found in ZIP (missing manifest item)OPF-007: Spine item not in manifestHTM-014: Invalid XHTML markupCSS-008: Invalid CSS property value
How to fix:
- Read the error message carefully (includes file path and line number)
- Open the offending file
- Fix the issue
- Re-run EPUBCheck to verify
Accessibility Results
Critical violations (must fix):
- Images missing alt text
- Insufficient color contrast (<4.5:1)
- Heading hierarchy skips
- Missing language declarations
Serious violations (should fix):
- Link text not descriptive ("click here")
- Table missing headers
- Form inputs without labels
Moderate violations (nice to fix):
- Redundant ARIA attributes
- Overly verbose alt text
- Missing ARIA landmarks
Example Invocation
User: "Is the EPUB ready to upload to KDP?"
Agent response:
- Run EPUBCheck
- Run Ace accessibility check
- Run metadata validation
- Run asset reference check
- Summarize results:
EPUB Publication Validation Results
====================================
EPUBCheck: ✅ PASS
- No errors or warnings detected
- All 44 spine items validated
- Manifest complete
Accessibility (Ace): ⚠️ 3 issues found
- CRITICAL: 0
- SERIOUS: 2 (missing alt text on 2 images)
- MODERATE: 1 (redundant ARIA attribute)
Metadata: ✅ COMPLETE
- All required fields present
- ISBN: 978-1-234567-89-0
- Language: en
- Accessibility metadata present
Asset References: ✅ ALL VALID
- 44 XHTML files verified
- 31 images verified
- 6 fonts verified
- No broken links
RECOMMENDATION: Fix 2 missing alt text issues before publication.
See: docs/accessibility-report/report.html for details.
Pre-Publication Checklist
Before final packaging, ensure:
- EPUBCheck passes with 0 errors and 0 warnings
- Ace accessibility has 0 critical violations
- All serious violations addressed or documented
- Metadata includes ISBN, current date, publisher
- Tested in Kindle Previewer (for KDP submission)
- Tested in Apple Books simulator (for Apple Books submission)
- Tested in Adobe Digital Editions 4.5+
- Visual QA audit complete (all chapters PASS)
- PDF parity check complete (if POD edition exists)
Integration with Other Skills
Run after:
epub-visual-auditor- Fix visual issues before validationcss-diagnostics- Remove unused CSS before validation
Run before:
- Final EPUB packaging (
npm run build:epub) - Distribution to retailers (KDP, Apple Books, IngramSpark)
Notes
- EPUBCheck should run on the DIRECTORY (not a packaged .epub file) during development
- Ace requires Node.js 18+ and modern browser for report viewing
- Some warnings are acceptable (e.g., unused manifest items for alternate formats)
- Zero-error EPUBCheck is required for Apple Books submission
- Kindle Create and Kindle Previewer may flag additional issues not caught by EPUBCheck
More Other skills
brand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
internal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
Fundamental design principles for writing maintainable, testable Python code.
responsive-design
Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.
Generate Playwright tests from scenarios using interactive browser exploration and validation.
Automated website exploration and test case generation using Playwright.
Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.
gdpr-data-handling
GDPR-compliant data handling with consent management, data subject rights, and privacy controls.
Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.
refactor-plan
Detailed multi-file refactor planning with safety checks and rollback guidance.
