# DOCX

> Word document manipulation with python-docx - handling split placeholders, headers/footers, nested tables

- Skill: `bishal-pdmsft/docx-2` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx get-skill add bishal-pdmsft/docx-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/bishal-pdmsft/docx-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: bishal-pdMSFT (https://skillmd.com/u/bishal-pdmsft)
- Updated: 2026-11-15
- Page: https://skillmd.com/skills/bishal-pdmsft/docx-2

---


# Word Document Manipulation with python-docx

This skill covers robust Word template manipulation with `python-docx`,
including split placeholders, headers/footers, nested tables, and
conditional sections.

## How to Use This Skill

The complete, actionable workflow for this skill lives in the companion
file [`DOCX_WORKFLOW_GUIDE.pdf`](./DOCX_WORKFLOW_GUIDE.pdf). That document contains every concrete
procedure, code example, and step-by-step guide you need to use this
skill. You must read `DOCX_WORKFLOW_GUIDE.pdf` in full before beginning any
template-fill task; this `SKILL.md` is an index, not a standalone guide.

## Scope

This skill covers:

- Replacing `{{PLACEHOLDER}}` tokens in `.docx` templates.
- Handling placeholders split across multiple XML runs.
- Traversing headers, footers, and nested tables.
- Evaluating `{{IF_...}} ... {{END_IF_...}}` conditional blocks.

Refer to `DOCX_WORKFLOW_GUIDE.pdf` for the detailed procedures.

