docx-format-replicator — docx-format-replicator install for AI agents docx-format-replicator, happy-claude-skills, community, docx-format-replicator install for AI agents, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for Document Automation Agents needing precise Word document formatting replication. docx-format-replicator is a skill that extracts formatting information from existing Word documents (.docx) to generate new documents with identical formatting but different content.

Features

Extracts formatting information from existing Word documents (.docx)
Generates new documents with identical formatting but different content
Enables creating document templates with consistent formatting
Replicates complex Word document structures
Maintains consistent formatting across multiple documents

# Core Topics

iamzhihuix iamzhihuix
[0]
[0]
Updated: 3/8/2026

Agent Capability Analysis

The docx-format-replicator skill by iamzhihuix is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for docx-format-replicator install for AI agents.

Ideal Agent Persona

Perfect for Document Automation Agents needing precise Word document formatting replication.

Core Value

Empowers agents to extract and replicate complex .docx formatting, enabling consistent branding and templating across multiple documents using Microsoft Word's OpenXML format.

Capabilities Granted for docx-format-replicator

Replicating company report templates
Generating contracts with identical formatting
Automating document formatting for bulk content creation

! Prerequisites & Limits

  • Requires existing .docx files for formatting extraction
  • Limited to .docx file format
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

docx-format-replicator

Install docx-format-replicator, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

DOCX Format Replicator

Overview

Extract formatting information from existing Word documents (.docx) and use it to generate new documents with identical formatting but different content. This skill enables creating document templates, maintaining consistent formatting across multiple documents, and replicating complex Word document structures.

When to Use This Skill

Use this skill when the user:

  • Wants to extract formatting from an existing Word document
  • Needs to create multiple documents with the same format
  • Has a template document and wants to generate similar documents with new content
  • Asks to "replicate", "copy format", "use the same style", or "create a document like"
  • Mentions document templates, corporate standards, or format consistency

Workflow

Step 1: Extract Format from Template

Extract formatting information from an existing Word document to create a reusable format configuration.

bash
1python scripts/extract_format.py <template.docx> <output.json>

Example:

bash
1python scripts/extract_format.py "HY研制任务书.docx" format_template.json

What Gets Extracted:

  • Style definitions (fonts, sizes, colors, alignment)
  • Paragraph and character styles
  • Numbering schemes (1, 1.1, 1.1.1, etc.)
  • Table structures and styles
  • Header and footer configurations

Output: JSON file containing all format information (see references/format_config_schema.md for details)

Step 2: Prepare Content Data

Create a JSON file with the actual content for the new document. The content must follow the structure defined in references/content_data_schema.md.

Content Structure:

json
1{ 2 "metadata": { 3 "title": "Document Title", 4 "author": "Author Name", 5 "version": "1.0", 6 "date": "2025-01-15" 7 }, 8 "sections": [ 9 { 10 "type": "heading", 11 "content": "Section Title", 12 "level": 1, 13 "number": "1" 14 }, 15 { 16 "type": "paragraph", 17 "content": "Paragraph text content." 18 }, 19 { 20 "type": "table", 21 "rows": 3, 22 "cells": [ 23 ["Header 1", "Header 2"], 24 ["Data 1", "Data 2"] 25 ] 26 } 27 ] 28}

Supported Section Types:

  • heading - Headings with optional numbering
  • paragraph - Text paragraphs
  • table - Tables with configurable rows and columns
  • page_break - Page breaks

See assets/example_content.json for a complete example.

Step 3: Generate New Document

Generate a new Word document using the extracted format and prepared content.

bash
1python scripts/generate_document.py <format.json> <content.json> <output.docx>

Example:

bash
1python scripts/generate_document.py format_template.json new_content.json output_document.docx

Result: A new .docx file with the format from the template applied to the new content.

Complete Example Workflow

User asks: "I have a research task document. I need to create 5 more documents with the same format but different content."

  1. Extract the format:
bash
1python scripts/extract_format.py research_task_template.docx template_format.json
  1. Create content files for each new document (content1.json, content2.json, etc.)

  2. Generate documents:

bash
1python scripts/generate_document.py template_format.json content1.json document1.docx 2python scripts/generate_document.py template_format.json content2.json document2.docx 3# ... repeat for all documents

Common Use Cases

Corporate Document Templates

Extract format from a company template and generate reports, proposals, or specifications with consistent branding.

bash
1# One-time: Extract company template 2python scripts/extract_format.py "Company Template.docx" company_format.json 3 4# For each new document: 5python scripts/generate_document.py company_format.json new_report.json "Monthly Report.docx"

Technical Documentation Series

Create multiple technical documents (specifications, test plans, manuals) with identical formatting.

bash
1# Extract from specification template 2python scripts/extract_format.py spec_template.docx spec_format.json 3 4# Generate multiple specs 5python scripts/generate_document.py spec_format.json product_a_spec.json "Product A Spec.docx" 6python scripts/generate_document.py spec_format.json product_b_spec.json "Product B Spec.docx"

Research Task Documents

The included example template (assets/hy_template_format.json) demonstrates a complete research task document format with:

  • Approval/review table in header
  • Multi-level numbering (1, 1.1, 1.1.1)
  • Technical specification tables
  • Structured sections

Use this as a starting point for similar technical documents.

Advanced Usage

Customizing Extraction

Modify scripts/extract_format.py to extract additional properties not covered by default:

  • Custom XML elements
  • Advanced table features (merged cells, borders)
  • Embedded objects
  • Custom properties

Extending Content Types

Add new section types in scripts/generate_document.py:

  • Images with captions
  • Bulleted or numbered lists
  • Footnotes and endnotes
  • Custom content blocks

See references/content_data_schema.md for extension guidelines.

Batch Processing

Create a wrapper script to generate multiple documents:

python
1import json 2import subprocess 3 4format_file = "template_format.json" 5content_files = ["content1.json", "content2.json", "content3.json"] 6 7for i, content_file in enumerate(content_files, 1): 8 output = f"document_{i}.docx" 9 subprocess.run([ 10 "python", "scripts/generate_document.py", 11 format_file, content_file, output 12 ])

Dependencies

The scripts require:

  • Python 3.7+
  • python-docx library: pip install python-docx

No additional dependencies are needed for the core functionality.

Resources

scripts/

  • extract_format.py - Extract formatting from Word documents
  • generate_document.py - Generate new documents from format + content

Both scripts include built-in help:

bash
1python scripts/extract_format.py --help 2python scripts/generate_document.py --help

references/

  • format_config_schema.md - Complete schema for format configuration files
  • content_data_schema.md - Complete schema for content data files

Read these for detailed information on file structures and available options.

assets/

  • hy_template_format.json - Example extracted format from a technical research task document
  • example_content.json - Example content data showing all section types

Use these as references when creating your own format and content files.

Troubleshooting

Missing styles in output: Ensure style IDs in content data match those in format config. Check format.json for available style IDs.

Table formatting issues: Verify table dimensions (rows/columns) match between content data and format config. See format_config_schema.md for table structure.

Font not displaying correctly: Some fonts may not be available on all systems. Check that referenced fonts are installed.

Dependencies missing: Install required Python packages:

bash
1pip install python-docx

Tips

  1. Test with examples first: Use the included hy_template_format.json and example_content.json to understand the workflow before extracting your own formats.

  2. Start simple: Begin with basic headings and paragraphs, then add tables and complex formatting.

  3. Validate JSON: Use a JSON validator to check content data files before generating documents.

  4. Keep format configs: Store extracted format configurations for reuse across multiple projects.

  5. Version control: Track both format configs and content data in version control for reproducible document generation.

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is docx-format-replicator?

Perfect for Document Automation Agents needing precise Word document formatting replication. docx-format-replicator is a skill that extracts formatting information from existing Word documents (.docx) to generate new documents with identical formatting but different content.

How do I install docx-format-replicator?

Run the command: npx killer-skills add iamzhihuix/happy-claude-skills/docx-format-replicator. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for docx-format-replicator?

Key use cases include: Replicating company report templates, Generating contracts with identical formatting, Automating document formatting for bulk content creation.

Which IDEs are compatible with docx-format-replicator?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for docx-format-replicator?

Requires existing .docx files for formatting extraction. Limited to .docx file format.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add iamzhihuix/happy-claude-skills/docx-format-replicator. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use docx-format-replicator immediately in the current project.

Related Skills

Looking for an alternative to docx-format-replicator or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI