PDF Generation pack
Claude Skill
Contract Template Filler
Fills a contract template (MSA/SOW/NDA) with deal-specific fields. Flags missing required fields.
What it does
Given a contract template (MSA, SOW, NDA, DPA) and the deal-specific fields, this skill fills placeholders, calculates dates, formats parties and signatures, and produces a PDF. Flags missing required fields. Does NOT invent legal language — refuses to fill clauses that should be lawyer-written.
When to use
- ✓You have a vetted template and need to fill in deal-specific fields
- ✓You're sending a standard NDA / SOW for review and want a clean draft
- ✓Bulk-generating customer contracts from a CRM export against a single MSA
When not to use
- ✗You don't have a template — drafting contracts from scratch is a lawyer task, not this skill
- ✗High-stakes negotiation where every clause is bespoke — use a CLM (Ironclad, Juro, PandaDoc)
- ✗Cross-border deals where local law applies and your template is US/EU only
Install
Download the .zip, then unzip into your Claude skills folder.
mkdir -p ~/.claude/skills
unzip ~/Downloads/contract-template-filler.zip -d ~/.claude/skills/
# Restart Claude Code session.
# Skill is now available — Claude will use it when relevant.SKILL.md
SKILL.md
---
name: contract-template-filler
description: Use when filling a vetted contract template (MSA, SOW, NDA, DPA) with deal-specific fields. Triggers on "fill this contract", "fill the MSA", "generate SOW PDF", or pasted template + variables.
---
# Contract Template Filler
Fill placeholder fields in a vetted contract template and output a clean PDF. Do NOT draft legal language — that's the lawyer's job. This skill is for filling, not writing.
## Required inputs
1. **The template** — markdown, DOCX, or text with clearly marked placeholders (`{{customer_name}}`, `[CUSTOMER NAME]`, etc.)
2. **The variables** — every placeholder mapped to a value (or explicitly null)
3. **Effective date** — and any derived dates (notice period, term end, renewal date)
4. **Parties** — full legal names, jurisdictions, registered addresses, signatory names + titles
5. **Schedules / exhibits** — if the template references "Schedule A — Pricing", that schedule must be supplied
## Hard rules
- **Never invent legal language.** If a clause has `[LAWYER TO DRAFT]` or is empty, leave it as a flagged TODO. Don't fill it with plausible-sounding text.
- **Never modify clause language** even if asked. Filling a placeholder is allowed; rewriting "indemnification" is not.
- **Never alter dollar amounts, term lengths, or termination notice periods** beyond what the user explicitly provided. If a number is missing, flag it.
- **Always preserve the template's exact structure**. Don't reorder, don't reformat clauses, don't "improve" headings.
## Approach
For Markdown / text templates: render via Pandoc to PDF (using `--pdf-engine=xelatex` or `weasyprint`). Pandoc preserves formatting and handles signature blocks well.
For DOCX templates: use python-docx or docxtpl with Jinja-style placeholders, then convert via LibreOffice headless (`libreoffice --convert-to pdf`) or upload-to-PDF service. Avoid converting to HTML first — it loses formatting fidelity.
For HTML templates: simple variable substitution + headless Chrome render. Works for templates already designed for HTML.
If no PDF rendering is available: produce the filled markdown/HTML and tell the user explicitly that this is the filled draft, not a final PDF. Don't pretend.
## Structure
The output preserves whatever structure the template has. Standard contract structure usually:
1. **Cover / preamble** — parties, effective date, recitals
2. **Definitions** — defined terms in alphabetical order
3. **Operative clauses** — services, fees, term, IP, confidentiality, indemnification, liability, termination
4. **Boilerplate** — governing law, notices, entire agreement, severability
5. **Signature block** — printed name, title, date, signature line per party
6. **Schedules / exhibits** — pricing, scope, DPA addendum, etc.
## Style guidance
- Page size: US Letter for US-jurisdiction contracts, A4 for EU/UK/elsewhere
- Margins: 25mm all around (legal convention)
- Font: serif body (Times, Source Serif) at 11pt — courts expect this
- Numbered clauses: `1.`, `1.1`, `1.1.1` — keep the template's numbering scheme exactly
- Page footer: contract title (left), page X of Y (right)
- Signature page: forced `page-break-before` so signatures don't get orphaned
## Field-flagging output
After filling, ALWAYS produce a "Field Audit" summary alongside the PDF:
```
Filled fields: 18
Missing required fields: 2
- Schedule A: Pricing table not provided
- Section 8.2: Notice address for Customer is blank
Lawyer-flagged clauses (left as-is): 1
- Section 12: [LAWYER TO DRAFT — INDEMNIFICATION CARVEOUTS]
Computed values:
- Term end date: 2027-04-29 (24 months from effective date)
- First renewal notice: 2027-01-29 (90 days prior)
```
## Common pitfalls
- **Smart quotes vs straight quotes** in the rendered PDF: courts have rejected contracts with mismatches. Pick one and lint.
- **Date format inconsistency**: "April 29, 2026" vs "29/04/2026" vs "2026-04-29" — match the template's existing convention.
- **Missing signature lines**: every signing party needs name, title, signature, date. Multi-party contracts often miss the third party.
- **Page-break inside a clause**: avoid `orphans` and `widows` issues with CSS, or LaTeX's `\samepage`.
- **Wrong jurisdiction header**: Delaware MSA filled for a Stockholm AB? Flag it. Different jurisdictions have different boilerplate requirements.
## What to recommend after generating
Always end with: "This is a filled template, not legal advice. Have counsel review before sending — especially if this is the first use of this template against this jurisdiction or counterparty."
Example prompts
Once installed, try these prompts in Claude:
- Fill our standard MSA template with this customer info: [paste]. Flag missing fields.
- Fill the SOW template for the Acme deal. Scope: [...]. Fees: $45k. Term: 6 months.