officecli-docx

Create, edit, and validate Word documents with styles, headers, footers, and dynamic fields.

1|Updated May 10, 2026
One-click install
npx skills add https://github.com/lizhihuajob/OceanOfficeCLI --skill officecli-docx-lizhihuajob
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: officecli-docx
Source: https://github.com/lizhihuajob/OceanOfficeCLI/tree/main/OfficeCLI-main/skills/officecli-docx
Command: npx skills add https://github.com/lizhihuajob/OceanOfficeCLI --skill officecli-docx-lizhihuajob

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the creation, editing, and validation of Word documents, eliminating manual formatting and structural inconsistencies.

Core Features & Use Cases

  • Document Construction: Generate styled headings, formatted paragraphs, and structured tables automatically.
  • Content Extraction & Modification: Read, parse, and update text, comments, headers, footers, and embedded fields in existing documents.
  • Use Case: A legal team can automate contract generation with predefined clauses, style consistency, and dynamically updated page numbers and TOC.

Quick Start

Use the officecli-docx skill to create a new document, add a title heading, insert a paragraph of text, and set a footer with the current page number.

Frequently Asked Questions about officecli-docx

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

FAQPage Schema
How do I automate Word document generation with dynamic fields and styles?

Automate Word document generation by using scripts to construct styled headings, formatted paragraphs, and structured tables. This ensures style consistency and automatically updates dynamic fields like page numbers and TOC.

Can I extract and update text, comments, and headers in existing Word files?

Yes, you can extract and update text, comments, headers, footers, and embedded fields in existing Word files. The tool parses document content and applies modifications while maintaining structural compliance for professional reports.

What is the best way to automate legal contract creation with consistent formatting?

Automate legal contract creation by generating documents with predefined clauses, style consistency, and dynamically updated page numbers. This eliminates manual formatting errors and ensures structural validation across legal contracts.

How do I insert a table of contents and set page number footers in Word programmatically?

Insert a TOC and set page number footers programmatically by leveraging document automation features. This handles document structure, content updates, and field update standards without manual formatting.

Does this approach support creating structured tables and formatted paragraphs in Word?

Yes, document construction supports generating styled headings, formatted paragraphs, and structured tables automatically. This simplifies creating professional reports, legal contracts, or technical documentation.

Why do my dynamically generated Word documents have inconsistent styles?

Inconsistent styles often result from manual formatting. Automating document creation with predefined styles and validation ensures compliance with styling, linking, and field update standards across all generated Word files.