AgentSkillsCN

doc-forge

文档生成与格式化工具包。可基于模板或 Markdown 创建 PDF、DOCX、PPTX 文档,支持多种格式之间的转换、报告生成及演示文稿制作。适用于用户需要文档创建、格式化或转换的场景。

SKILL.md
--- frontmatter
name: doc-forge
description: Document generation and formatting toolkit. Create PDF, DOCX, PPTX documents from templates or markdown. Convert between formats, generate reports, create presentations. Use when user needs document creation, formatting, or conversion.
version: 1.0.0
author: Agent Zero Custom
tags: [documents, pdf, docx, pptx, markdown, generation, reports]
trigger_patterns:
  - "create document"
  - "generate pdf"
  - "convert to docx"
  - "make presentation"
  - "create report"
  - "export document"
allowed_tools:
  - code_execution_tool
  - memory_save
  - response

Doc Forge — Document Generation

Create professional documents from markdown or templates. Supports PDF, DOCX, and PPTX formats with customizable styling.

Installation

bash
# Install dependencies
pip install -r requirements.txt

# Or use setup script
bash /a0/usr/skills/setup.sh

# Note: weasyprint requires system dependencies on some Linux distributions:
# Debian/Ubuntu: apt-get install libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0
# AlmaLinux/RHEL: yum install pango pango-devel

When to Use

Use this skill when you need to:

  • Create PDF documents from markdown
  • Generate DOCX reports
  • Create PowerPoint presentations
  • Convert between document formats
  • Apply templates to structured data

Supported Formats

FormatExtensionFeatures
PDF.pdfPrint-ready, styled with CSS
DOCX.docxEditable Word documents
PPTX.pptxPowerPoint presentations

Usage

Via Python Script

bash
python /a0/usr/skills/doc-forge/scripts/doc_forge.py --format pdf --input document.md --output report.pdf --title "Report Title"

Parameters

ParameterTypeDefaultDescription
--formatstrrequiredOutput format: pdf/docx/pptx
--inputstrrequiredInput markdown file path
--outputstrrequiredOutput file path
--titlestr"Document"Document title
--templatestroptionalTemplate file path

Examples

  1. PDF from markdown:

    bash
    python /a0/usr/skills/doc-forge/scripts/doc_forge.py --format pdf --input report.md --output report.pdf --title "Q4 Report"
    
  2. DOCX document:

    bash
    python /a0/usr/skills/doc-forge/scripts/doc_forge.py --format docx --input notes.md --output notes.docx --title "Meeting Notes"
    
  3. PowerPoint presentation:

    bash
    python /a0/usr/skills/doc-forge/scripts/doc_forge.py --format pptx --input slides.md --output presentation.pptx --title "Project Proposal"
    

Markdown Support

  • Headers (H1-H6)
  • Lists (ordered/unordered)
  • Tables
  • Code blocks
  • Bold/italic text
  • Links
  • Images

Requirements

  • markdown>=3.5.0
  • python-docx>=1.1.0
  • python-pptx>=0.6.23
  • weasyprint>=60.0
  • Jinja2>=3.1.0
  • Pillow>=10.0.0

Files

code
/a0/usr/skills/doc-forge/
├── scripts/
│   └── doc_forge.py
├── requirements.txt
└── SKILL.md