Validate EPUB Project
Core Workflow
Use this skill to validate an EPUB project end to end. Prefer existing project scripts over ad hoc commands.
- Inspect project shape:
- Locate
manuscript/, metadata/, styles/, assets/, tools/, output/, and dist/.
- Locate scripts such as
tools/package-release.ps1, tools/validate-project.ps1, tools/build-epub.ps1, and tools/check-epub.ps1.
- Rebuild the current release when requested or when validation must reflect latest source:
- Use the project packaging script if available.
- If a version is needed, infer it from README, PROJECT_STATUS, package script defaults, or the latest
dist/v* folder.
- Run validation:
- EPUBCheck or the repo wrapper.
- Release audit if present.
- Internal EPUB inspection for metadata, resource counts, CSS, and image inclusion.
- Scan bookstore-warning patterns:
- Google Play Books often reports unsupported CSS from Pandoc syntax highlighting or vendor-specific properties.
- Search generated EPUB internals, not only source CSS.
- Check release artifacts:
- EPUB, cover, preview, listing docs, checklist, manifest, and checksums.
- Confirm the exact file path the user should upload.
- Report readiness:
- Findings first if anything blocks publishing.
- Otherwise say clearly that validation passed and list upload paths.
Useful Commands
For this user's Windows/PowerShell ebook projects, use:
powershell -ExecutionPolicy Bypass -File .\tools\package-release.ps1 -Version <version>
powershell -ExecutionPolicy Bypass -File .\tools\check-epub.ps1
Get-ChildItem -LiteralPath .\dist\v<version> | Select-Object Name,Length
For deeper checks, read references/checks.md.
What To Report
Include:
- EPUBCheck result.
- Google Play Books CSS warning scan result.
- Number of XHTML/CSS/image resources if inspected.
- Upload EPUB path.
- Upload cover path.
- Whether release folder audit passed.
- Any untracked files that may matter.
Do not push, submit, delete release files, or upload to a bookstore without explicit user confirmation.
1---2name: validate-epub-project3description: Validate EPUB ebook projects before release or bookstore upload. Use when asked to check whether an EPUB is ready, run EPUBCheck, rebuild a release package, inspect generated EPUB contents, verify images and CSS, scan Google Play Books warning patterns, audit dist folders, or report final publishing readiness.4---56# Validate EPUB Project78## Core Workflow910Use this skill to validate an EPUB project end to end. Prefer existing project scripts over ad hoc commands.11121. Inspect project shape:13 - Locate `manuscript/`, `metadata/`, `styles/`, `assets/`, `tools/`, `output/`, and `dist/`.14 - Locate scripts such as `tools/package-release.ps1`, `tools/validate-project.ps1`, `tools/build-epub.ps1`, and `tools/check-epub.ps1`.152. Rebuild the current release when requested or when validation must reflect latest source:16 - Use the project packaging script if available.17 - If a version is needed, infer it from README, PROJECT_STATUS, package script defaults, or the latest `dist/v*` folder.183. Run validation:19 - EPUBCheck or the repo wrapper.20 - Release audit if present.21 - Internal EPUB inspection for metadata, resource counts, CSS, and image inclusion.224. Scan bookstore-warning patterns:23 - Google Play Books often reports unsupported CSS from Pandoc syntax highlighting or vendor-specific properties.24 - Search generated EPUB internals, not only source CSS.255. Check release artifacts:26 - EPUB, cover, preview, listing docs, checklist, manifest, and checksums.27 - Confirm the exact file path the user should upload.286. Report readiness:29 - Findings first if anything blocks publishing.30 - Otherwise say clearly that validation passed and list upload paths.3132## Useful Commands3334For this user's Windows/PowerShell ebook projects, use:3536```powershell37powershell -ExecutionPolicy Bypass -File .\tools\package-release.ps1 -Version <version>38```3940```powershell41powershell -ExecutionPolicy Bypass -File .\tools\check-epub.ps142```4344```powershell45Get-ChildItem -LiteralPath .\dist\v<version> | Select-Object Name,Length46```4748For deeper checks, read `references/checks.md`.4950## What To Report5152Include:5354- EPUBCheck result.55- Google Play Books CSS warning scan result.56- Number of XHTML/CSS/image resources if inspected.57- Upload EPUB path.58- Upload cover path.59- Whether release folder audit passed.60- Any untracked files that may matter.6162Do not push, submit, delete release files, or upload to a bookstore without explicit user confirmation.