| name | document-generator |
| description | Specialized skill for converting Markdown documents into professional, branded formats includingPPTX, DOCX, PPT, DOC, PDF, HTML and processing Mermaid diagrams. Use this when asked to generate branded client documents from Markdown. |
Document Generator Skill
Overview
The Document Generator is a specialized skill for converting Markdown documents into professional, branded formats including DOCX, PDF, HTML, and processing Mermaid diagrams. It leverages PowerShell scripting and Custom Office Templates to produce client-ready deliverables.
Purpose
- Convert Markdown to multiple formats (DOCX, PDF, HTML)
- Apply client/partner branding via templates
- Process Mermaid diagrams into images
- Generate final-form documents for sharing
Scope
- Input: Markdown files with optional Mermaid diagrams
- Output: Branded documents in requested formats
- Templates: Custom Office Templates for branding
- Integration: PowerShell-based conversion with Pandoc
Key Features
- Multi-Format Conversion: PPTX, DOCX, PPT, DOC, PDF, HTML outputs
- Mermaid Processing: Automatic diagram-to-image conversion
- Template Support: Client/partner-specific branding
- Resource Management: Image and resource path handling
- TOC Generation: Optional table of contents
Inputs
- Markdown file path
- Output formats (array)
- Partner/Client for template selection
- Resource path for images
- Optional: TOC depth, title
Outputs
- Generated documents in specified formats
- Processed images/diagrams
- Success/failure status
Process Flow
- Validate input Markdown file
- Select appropriate template (client > partner priority)
- Process Mermaid diagrams if present
- Convert using Pandoc with template
- Handle resource paths and images
- Generate output files
Template Management
- Defaults: Templates stored in
$env:USERPROFILE\Documents\Custom Office Templates(user profile) - Priority: Client templates > Partner templates > Defaults
- Override: Use
-TemplateDirparameter for custom locations (e.g., shared dreamcatcher templates) - Augmentation: Clients can add subfolders (e.g.,
ecolab/template.docx) to override defaults
Usage
Invoke during Implement phase to create branded client documents. Output folder is automatically determined: uses ~/project-root/docs/Analysis/outputs if it exists, otherwise the input file's directory.
Example:
.\Convert-Document.ps1 -InputFile 'report.md' -Formats 'docx','pdf' -Client 'ecolab' -IncludeToc
Or specify custom output:
.\Convert-Document.ps1 -InputFile 'report.md' -Formats 'docx','pdf' -OutputFolder 'custom' -Client 'ecolab' -IncludeToc
Dependencies
- Pandoc installed
- PowerShell execution
- Custom Office Templates directory
- Mermaid CLI (optional for diagram processing)