name: design-export description: Export to PDF/HTML/markdown. Use when distributing documentation, creating presentations, or archiving design docs. allowed-tools: Read, Glob, Bash context: fork agent: design-doc-agent
Design Documentation Export
Exports design documentation to various formats (PDF, HTML, markdown) for distribution, presentation, or archival purposes.
Overview
This skill exports design docs by collecting documents across modules, preparing content with resolved links and processed images, generating exports in requested formats using Pandoc, applying styling and theming, creating table of contents, and producing professional output files.
Quick Start
Export to PDF:
/design-export --format=pdf
Export specific module to HTML:
/design-export effect-type-registry --format=html
Export to multiple formats:
/design-export --format=pdf,html,markdown
Parameters
Optional
module: Specific module to export (default: all modules)format: Output format - pdf, html, markdown, or comma-separated list (default: pdf)output: Custom output path (default:.claude/exports/design-docs-{date}.{ext})include-archived: Include archived docs (default: false)standalone: Create self-contained file (default: true)
Workflow
High-level export process:
- Parse parameters to determine module scope, format, and options
- Load design.config.json to get module paths and export settings
- Collect documents based on scope and filters
- Prepare content (process frontmatter, resolve links, handle images)
- Generate export using Pandoc or direct markdown processing
- Apply styling (format-specific themes and layouts)
- Generate table of contents with navigation structure
- Write export file to output path
- Generate metadata file with export details
- Report results with summary and file location
For detailed implementation steps, see supporting documentation below.
Supporting Documentation
When you need detailed information, load the appropriate supporting file:
For Detailed Workflow
See instructions.md for:
- Complete step-by-step export workflow
- Document collection and filtering
- Content preparation (links, images, frontmatter)
- Export generation for each format
- Styling application
- TOC generation algorithms
- Metadata creation
- Advanced features (batch export, selective export, incremental, templates)
Load when: Performing exports or need implementation details
For Export Formats
See export-formats.md for:
- PDF format specifications (Pandoc commands, LaTeX templates, options)
- HTML format specifications (structure, CSS, JavaScript)
- Markdown format specifications (organization, frontmatter handling)
- Format comparison and selection guidelines
- Requirements and dependencies
Load when: Need format specifications or Pandoc command details
For Usage Examples
See examples.md for:
- Export all modules to PDF
- Export specific module to HTML
- Multi-format export
- Standalone markdown export
- Custom output path
- Error scenarios (Pandoc not found, invalid format)
Load when: User needs examples or clarification
Error Handling
Pandoc Not Found
ERROR: Pandoc not installed
PDF and HTML export require Pandoc.
Install: brew install pandoc (macOS)
or visit https://pandoc.org/installing.html
LaTeX Engine Missing
ERROR: LaTeX engine not found
PDF export requires XeLaTeX or PDFLaTeX.
Install: brew install --cask mactex (macOS)
Invalid Format
ERROR: Invalid export format: {format}
Valid formats: pdf, html, markdown
Example: /design-export --format=pdf
Integration
Works well with:
/design-review- Review docs before exporting/design-validate- Ensure docs valid before export/design-sync- Sync docs before exporting/design-prune- Clean docs before exporting
Success Criteria
A successful export:
- ✅ All target documents collected
- ✅ Content properly prepared (links resolved, images handled)
- ✅ Export generated in requested format(s)
- ✅ Styling applied correctly
- ✅ Table of contents included
- ✅ Metadata file created
- ✅ Output file created at specified location
- ✅ Clear export summary provided