Document Generation

Command Palette

Search for a command to run...

Back

Document Generation

v1Skill

Create Word, Excel, PowerPoint, PDF documents

langfuseskillextended
Edit
Capabilities

Generates code snippets and implementations

Content

Gene: Document Generation

Description

Create structured documents, spreadsheets, and presentations. Consolidated from Anthropic's docx, pdf, pptx, and xlsx skills with unified interface.

Trigger Conditions

  • User asks to create document/report
  • Spreadsheet or table requests
  • Presentation or slide deck needs
  • Structured content output
  • Analysis compilation
  • Word, Excel, PowerPoint, PDF creation

Document Types

Word Documents (.docx)

Use the docx library (npm install docx):

Key patterns:

  • Set page size explicitly (US Letter: 12240 x 15840 DXA)
  • Use Arial as default font
  • NEVER use \n - separate Paragraph elements
  • NEVER use unicode bullets - use LevelFormat.BULLET
  • Table width must equal sum of columnWidths
  • Use ShadingType.CLEAR, not SOLID
  • Always set table width with DXA (not PERCENTAGE)

Reference: https://docx.js.org/

Spreadsheets (.xlsx)

Use the xlsx library:

  • Create workbooks with multiple sheets
  • Support formulas, formatting, charts
  • Export to .xlsx format

Presentations (.pptx)

Use the pptxgenjs library:

  • Create slide decks
  • Add charts, tables, images
  • Apply themes consistently

PDF Generation

  • Use puppeteer or playwright for HTML to PDF
  • Or use pdfkit for programmatic creation

Execution Protocol

Step 1: Requirement Analysis

  • Identify document type and purpose
  • Determine required sections
  • Note format preferences
  • Gather source data/content

Step 2: Structure Design

  • Create outline with headers
  • Plan section flow
  • Design table structures (if applicable)
  • Define visual elements

Step 3: Content Generation

  • Write each section with proper tone
  • Include executive summaries
  • Add data visualizations
  • Ensure professional formatting

Step 4: Refinement

  • Review for completeness
  • Check formatting consistency
  • Verify data accuracy
  • Optimize for readability

Professional Standards

Reports

  • Executive summary first
  • Clear section headings
  • Supporting data and citations
  • Conclusions and recommendations
  • Professional tone

Spreadsheets

  • Clear headers
  • Proper data types
  • Formulas where applicable
  • Clean formatting
  • Data validation

Presentations

  • Concise slides (not text-heavy)
  • Visual hierarchy
  • Consistent design
  • Clear takeaways

Guardrails

  • Don't fabricate data
  • Cite sources appropriately
  • Flag assumptions clearly
  • Note limitations

Integration

  • Works with: research-analysis, code-execution, tool-orchestration
Actions
Test in Playground