---
name: "python-docx-contract-builder"
description: "Generate and populate professional Word contracts and agreements with python-docx."
metadata:
  author: "python-openxml"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "generate word contract python"
  - "replace variables in docx template"
  - "style table in python-docx"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# python-docx Legal Contract Builder

Builds commercial contracts, non-disclosure agreements, and statements of work: paragraph styling, table border formatting, bulleted lists, and dynamic variable placeholder substitution.

## When to Invoke
Invoke this skill whenever you need to:
- generate word contract python
- replace variables in docx template
- style table in python-docx

## Execution SOP & Rules
1. Open templates with doc = Document("template.docx") to inherit corporate typography styles.
2. Search and replace template placeholders (e.g. {{CLIENT_NAME}}) across paragraphs and table cells.
3. Apply consistent styles using doc.add_paragraph("Clause text", style="List Bullet").
4. Save finalized output documents cleanly using doc.save("final_contract.docx").

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
