A powerful Python library that enables using Microsoft Word files as Jinja2 templates to generate dynamic .docx documents.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install docxtpl
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install docxtpl using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
The docxtpl skill bridges the gap between sophisticated document design and automated data population. By leveraging the python-docx library for reading and writing and Jinja2 for its robust templating engine, this tool allows developers to design complex layouts directly in Microsoft Word and inject Python variables at runtime. This approach maintains high-fidelity formatting that is often lost with other document generation methods.
As part of the Openclaw Skills ecosystem, docxtpl simplifies the creation of reports, invoices, and legal documents. It handles everything from simple string substitution to complex logic like conditional paragraphs, table row looping, and dynamic image insertion, making it an essential utility for automated document workflows.
To get started with this component of Openclaw Skills, install the core package and optional subdocument support via pip:
pip install docxtpl
# For subdocuments support:
pip install "docxtpl[subdoc]"
You can also use the CLI interface for quick rendering tasks:
python -m docxtpl template.docx data.json output.docx
The skill organizes data primarily through a Context Dictionary and specialized Word Tags. The following table outlines the tag types available:
| Tag Type | Syntax | Scope & Purpose |
|---|---|---|
| Inline String | {{ var }} |
Basic variable display with standard formatting |
| Rich Text | {{r var }} |
Renders RichText objects with multiple styles |
| Paragraph Logic | {%p ... %} |
Controls full paragraphs for conditionals or loops |
| Table Row | {%tr ... %} |
Iterates over rows within a Word table |
| Table Cell | {% cellbg %} |
Dynamically sets background colors for table cells |
| Escaping | `{{ var | e }}` |
tpl.new_subdoc(path) to dynamically include external Word documents as parts of your main template.Loading
A professional academic research skill that aggregates data from five major scholarly databases to automate paper discovery and citation management.

A specialized tool for AI agents to query the origin province and city of Chinese vehicle license plates.

A specialized AI agent skill for querying detailed zodiac sign characteristics, ruling planets, and personality traits via the Jike API.

A specialized skill for searching and retrieving traditional Chinese allegorical sayings using keyword matching or random discovery.

A professional-grade astrology compatibility engine that provides deep insights into relationship dynamics based on zodiac signs.

A comprehensive Chinese dictionary skill providing word definitions, pinyin, usage examples, and linguistic relationships.








































