New advertisers: 50% off your first month with code FIRSTMONTHSee slots
jwynia avatar

Docx Generator

Programmatic Word DOCX generation from JSON specs or branded templates, with placeholder replacement and content extraction.

skills.sh installs
738
GitHub stars
191
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers two modes: template-based generation that fills {{PLACEHOLDER}} and ${var} tags, and from-scratch creation from a JSON specification
  • Includes 3 scripts: analyze-template.ts for extraction, generate-from-template.ts for replacement, and generate-scratch.ts for building documents
  • Preserves corporate styling in templates, including headers, footers, and tables, when populating dynamic content
  • Designed for automating reports, contracts, and letters, and requires Deno with read and write permissions

Install

$ npx -y skills add jwynia/agent-skills --skill docx-generator -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

DOCX Generator

When to Use This Skill

Use this skill when:

  • Creating Word documents programmatically from data or specifications
  • Populating branded templates with dynamic content while preserving corporate styling
  • Extracting text, tables, and structure from existing DOCX files for analysis
  • Finding and replacing placeholder text like {{TITLE}} or ${author}
  • Automating document generation workflows (reports, contracts, letters)

Do NOT use this skill when:

  • User wants to open/view documents (use native Word or viewer)
  • Complex mail merge with data sources (use native Word mail merge)
  • Working with older .doc format (DOCX only)
  • PDF output is needed (use pdf-generator skill instead)

Prerequisites

  • Deno installed (https://deno.land/)
  • Input DOCX files for template-based operations
  • JSON specification for scratch generation

Quick Start

Two Modes of Operation

  1. Template Mode: Modify existing branded templates

    • Analyze template to find placeholders
    • Replace {{PLACEHOLDERS}} with actual content
  2. Scratch Mode: Create documents from nothing using JSON specifications

Instructions

Mode 1: Template-Based Generation

Details

Repository
github.com/jwynia/agent-skills
Category
Office Files & Slides
First seen
May 16, 2026

More from jwynia/agent-skills

All 118

Similar to Docx Generator

More Office Files & Slides