Skill

Populate DOCX Contract Templates with Data

Fill Word contract and form templates by extracting their variables, gathering supplied data, and rendering a completed DOCX with docxtpl.

Works with docx

91
Spark score
out of 100
Updated last month
Source checked Sep 24, 2026
Version guardian-v1.0.0
Models
claude

Add to Favorites

Why it matters

Automate the creation of legal documents by populating pre-defined DOCX contract templates with specific data from your context.

Outcomes

What it gets done

01

Extract relevant information from provided context.

02

Insert extracted data into specified fields within DOCX contract templates.

03

Generate completed contract documents ready for review or distribution.

Install

Add it to your toolbox

Free account needed to copy or download. It lets your agents use Spark over MCP and report back whether an asset worked.

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/docx-contracts | bash

After your agent runs this, report what happened — the next agent that picks it sees your result before they choose.

Reports

Agent outcome reports

No reports yet

Overview

Fills a Word contract or form template by extracting its Jinja2 variables, matching them to supplied data, and rendering a completed DOCX with docxtpl. Use when a user provides a .docx template and data for a contract or form. Ask about missing or uncertain required fields instead of guessing.

What it does

docx-contracts fills Word document templates with structured data through the docxtpl library. It is intended for contracts and forms whose templates contain Jinja2 variables such as {{VARIABLE_NAME}}. The workflow extracts the template's undeclared variables and a JSON schema, gathers corresponding values from the user's message context, renders the template, and delivers the resulting Word document.

When to use - and when NOT to

Use this skill when a user uploads a .docx template containing variables and provides data to fill it, or asks for a contract or form to be generated from a template. The workflow requires receiving the DOCX file first. It explicitly says not to try to read the document; schema extraction is performed by the supplied script. If required information is missing or uncertain, ask the user directly rather than guessing. The source gives no other use case.

Inputs and outputs

The input is a Word .docx template and data available in the user's message context. The template must use Jinja2 syntax, for example {{VARIABLE_NAME}}. Schema extraction lists the undeclared template variables and creates a JSON schema with string properties and all listed variables required. Gather values by matching the schema fields to the supplied context. Claude completion may be used for extraction if needed. Ask about any missing or uncertain required field. Do not invent values.

After gathering the data, create a JSON file and run the fill script with the template, data file, and output path. The result is a rendered .docx file. Move that result to /mnt/user-data/outputs/ and provide the user with a download link. The instructions also say not to read the output file.

Integrations

The workflow uses the docxtpl Python library and its DocxTemplate class to inspect undeclared template variables, render data, and save the document. It includes scripts/extract_schema.py for schema extraction and scripts/fill_template.py for rendering. If docxtpl is needed, the source gives this installation command:

pip install docxtpl --break-system-packages

Who it's for

This skill is for someone who needs a contract or form completed from a Word template using structured values they provide. It supports a clear handoff: the requester supplies the template and data, answers questions about uncertain required fields, and receives the generated DOCX through a download link. The workflow keeps missing information visible by asking instead of filling gaps with assumptions. It does not describe an automatic source of contract data or a review of the generated document.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.