officecli-docx

Edit and analyze .docx files via officecli batch JSON operations.

575|90|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/oneclaw/oneclaw --skill officecli-docx-oneclaw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: officecli-docx
Source: https://github.com/oneclaw/oneclaw/tree/main/builtin-skills/officecli-docx
Command: npx skills add https://github.com/oneclaw/oneclaw --skill officecli-docx-oneclaw

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the problem of reliably creating and editing .docx files without brittle, shell-specific commands—by using deterministic officecli operations and batch JSON inputs for bulk edits.

Core Features & Use Cases

  • Create and edit Word documents: build new content or update existing sections, paragraphs, tables, charts, images, headers/footers, and more using officecli primitives.
  • Bulk modifications via officecli batch: drive large sets of paragraph/table edits through JSON ops passed with --input, avoiding platform quoting/piping issues.
  • Structured inspection + validation: read text/outline/stats, detect issues, and run officecli validate to ensure the resulting DOCX is well-formed.
  • Windows PowerShell-safe command contract: enforces single-line officecli ... argv usage and forbids shell constructs that commonly break on PowerShell.

Quick Start

Use the officecli-docx skill to generate and verify changes in a Word file by first analyzing it with officecli view doc.docx outline, then applying a small edit like adding a paragraph to /body, and finally running officecli validate doc.docx to confirm the document is clean.

Frequently Asked Questions about officecli-docx

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

FAQPage Schema
How do I automate editing Word documents in bulk without shell quoting issues?

Bulk Word document editing is handled by passing JSON operations to `officecli batch --input <file>`, routing large paragraph and table edits safely while avoiding platform-specific shell quoting issues.

Can I use the officecli CLI to create Word documents with tables and charts?

Yes, creating Word documents with tables, charts, headers, footers, and images is supported through `officecli` primitives, allowing automated generation of reports and letters from the command line.

What is the best way to validate a DOCX file after automated edits from the command line?

Validating a DOCX file is done by running `officecli validate <file>`, which inspects the document structure to ensure it remains well-formed after applying automated content updates.

Does this Word automation approach work on Windows PowerShell?

Yes, this approach enforces a PowerShell-safe command contract by mandating single-line `officecli` argv usage and forbidding shell constructs that commonly break scripts on Windows PowerShell.

How do I inspect an existing DOCX file outline before applying batch modifications?

Inspecting a DOCX file outline requires running `officecli view <file> outline`, which reads the text, outline, and document statistics to identify sections before applying batch-driven content updates.

Why do my batch JSON updates to Word documents fail on different operating systems?

Cross-platform batch JSON updates fail when using shell-specific piping or quoting constructs; using `officecli batch --input <file>` ensures deterministic execution across different shells and operating systems.