Auto-fill document templates with data - mail merge for any format
Template Engine is a document automation skill for generating filled-in documents from reusable templates and structured data. It solves the repetitive work of manually customizing letters, contracts, reports, certificates, forms, and similar files by replacing placeholders with provided values. The skill is positioned as a mail-merge style workflow that can apply template-based generation across document formats such as Word, Excel, PowerPoint, and related office files.
Its core capabilities include template filling, document automation, simple placeholder substitution, loops, conditional content, and filters using Jinja2-style syntax. For Word templates, the provided content shows use of docxtpl and DocxTemplate to render data into .docx files. For Excel templates, it shows placeholder replacement using openpyxl. It also supports bulk generation patterns, where rows from a CSV file are used to create multiple output documents from the same template.
This skill is useful for users who need to generate personalized or repeated documents at scale, including teams creating bulk letters, contracts, personalized reports, certificates, welcome letters, order confirmations, or user-specific forms. It is suitable for general business users, operations teams, administrators, and anyone who works with structured data and reusable document templates. The skill supports English and Chinese and integrates with the office-mcp server through the fill_docx_template tool.
It is described as working with Word, Excel, PowerPoint, and more, with specific examples provided for Word .docx templates and Excel templates.
The documented syntax is Jinja2-based, including simple substitutions such as {{ variable }}, loops, conditionals, and filters.
Yes. The provided mail merge example shows reading rows from a CSV file and generating one document per row using the same template.
The content mentions docxtpl for Word templates, openpyxl for Excel templates, csv and pathlib for bulk generation, and the office-mcp tool fill_docx_template.
The user needs to describe the intended document generation task and provide the required input data or files, such as a template and data values or a CSV file.
Quick Setup:
.claude/skills/Repository
claude-office-skills/skills