---
name: document-formatter
description: 'Convert content into professional document formats: DOCX, PPTX, XLSX, PDF, HTML, Google Workspace'
title: Document Formatter & Exporter
category: core
status: active
metadata:
  triggers:
  - export as
  - convert to
  - format as docx
  - format as pdf
  - create word document
  - create pdf
  - google docs
  - export to google
---
## Instructions

Convert content into a target format:

1. **Identify source** — The content to format:
   - A draft file from `drafts/` or `output/`
   - A wiki article
   - Content generated by another skill (report, proposal, memo)
   - Raw text from the user

2. **Identify target format**:
   - **Markdown** (.md) — default, always available
   - **Word** (.docx) — professional documents, reports, proposals
   - **PowerPoint** (.pptx) — presentations, slide decks
   - **Excel** (.xlsx) — spreadsheets, data tables, dashboards
   - **PDF** (.pdf) — final/read-only documents
   - **HTML** (.html) — web-ready, email-embeddable
   - **CSV** (.csv) — raw data export
   - **Google Docs/Slides/Sheets** — via export file that Google can import

3. **Apply formatting**:
   - Use templates if available (check `agnt-system/templates/`)
   - Apply brand colors/fonts from `brand-voice` skill if configured
   - Ensure consistent heading hierarchy
   - Tables formatted properly for target format
   - Images embedded (not linked) for portable formats

4. **Save** — Write to `output/FILENAME.{ext}`

## Format-Specific Rules

### Word (.docx)
- Use heading styles (Heading 1, 2, 3) not bold text
- Include table of contents for documents > 3 pages
- Page numbers in footer
- Company letterhead if available in templates

### PowerPoint (.pptx)
- One key message per slide
- Max 5 bullets per slide
- Speaker notes for every content slide
- Title slide + agenda + content + summary structure

### Excel (.xlsx)
- Header row with bold/filter
- Auto-column-width
- Number formatting (currency, percentages, dates)
- Separate sheets for data vs summary/dashboard

### PDF
- Generated from the best-looking source (DOCX or HTML)
- Ensure all fonts embedded
- Bookmarks for sections > 5 pages

### Google Workspace
- Export as .docx/.pptx/.xlsx (Google auto-converts on upload)
- Or use Google API if credentials configured
- Maintain formatting compatibility

## Rules

- Always save the markdown source alongside the exported file
- Include metadata in the exported file (author, date, version)
- Warn if content exceeds format limits (e.g., 50MB for PPTX)
- For presentations: suggest image placeholders with descriptions