docx-format-replicator

Extract Word document formatting and generate new .docx files with identical layouts.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/bingo-taiwan/claude-code-skills --skill docx-format-replicator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx-format-replicator
Source: https://github.com/bingo-taiwan/claude-code-skills/tree/main/docx-format-replicator
Command: npx skills add https://github.com/bingo-taiwan/claude-code-skills --skill docx-format-replicator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-docx, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill enables you to extract formatting from any Word document and generate new documents that share the same layout, typography, and styles, ensuring brand consistency across multiple files.

Core Features & Use Cases

  • Extracts style definitions (fonts, sizes, colors, alignment), paragraph and table styles from a source .docx.
  • Generates new documents by applying the extracted format to new content data, enabling template-based document production.
  • Use cases include creating multiple reports, proposals, or templates that must maintain corporate formatting across content.

Quick Start

  • Step 1: Run python scripts/extract_format.py "SourceTemplate.docx" template_format.json to capture the formatting.
  • Step 2: Prepare content data in a JSON file that matches the format_config schema, e.g., content.json.
  • Step 3: Run python scripts/generate_document.py template_format.json content.json output.docx to produce a new document with consistent formatting.

Frequently Asked Questions about docx-format-replicator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract formatting from an existing Word document to use as a template?

You can extract Word formatting by running a Python script that captures style definitions, paragraph layouts, and table styles from the source .docx file and saves them into a JSON configuration file for later use.

Can I generate multiple Word documents with identical corporate styles automatically?

Yes, you can automate the generation of multiple Word documents with identical corporate styles by applying an extracted format configuration to new content data, ensuring brand consistency across reports and proposals.

Do I need python-docx to replicate Word template formatting?

Yes, python-docx is a required dependency to render formatting when generating new documents, as it provides the necessary functions to programmatically apply extracted styles to new content.

What is the best way to apply an existing Word layout to new content data?

The best way to apply an existing Word layout to new content is to first extract the template formatting into a JSON file, then use a generation script to map new content data against that configuration to produce a formatted .docx.

Does this template replication process support paragraph and table styles?

Yes, the template replication process supports extracting and applying both paragraph and table styles, along with fonts, sizes, colors, and alignment, to ensure the new document shares the same layout as the source.

Why are my generated Word documents not matching the original template formatting?

Generated documents may not match the original template formatting if the content data JSON does not align with the extracted format configuration schema, causing styles to be applied incorrectly during the document generation step.