Skills

DOCX

Use this skill whenever the user wants to create, read, edit, or manipulate Word...

Install

npx skills add mateaix/mateclaw --skill docx -g -a claude-code -y
Repository
mateaix/mateclaw1.2k
Category
Documents
Updated
5d ago
License
Apache-2.0
Context cost
Mediumabout 3,000 tokens
Runs scripts
Yes, review before use

What it does

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). For CREATING new documents (report, memo, letter, résumé, contract from scratch), call the built-in tool `renderDocx` instead, it renders Markdown to .docx in milliseconds without forking Node.js. This skill remains authoritative for EDITING existing .docx (unpack/edit XML/pack), tracked changes, comments, image manipulation, find-and-replace, and conversions. Triggers include: \"Word doc\", \"word document\", \".docx\", or requests to edit/extract/restructure existing Word files. Do NOT use for PDFs, spreadsheets, or general coding tasks unrelated to document generation.

Important: All scripts/ paths are relative to this skill directory. Use run_skill_script tool to execute scripts, or run with: cd {this_skill_dir} && python scripts/...

DOCX creation, editing, and analysis

Quick Start, Pick the Right Tool

TaskRecommended Tool
Create a new document (report / résumé / contract / memo)renderDocx(), millisecond render, no subprocess
Edit an existing .docx (content / formatting)unpack → edit XML → pack workflow below
Add tracked changes / commentsunpack → edit XML → pack workflow below
GB/T 9704 official documentwriteGongwen() (BmacClaw only)

Create a new document (recommended path)

Call the in-process Java tool, no Node.js install, no fork, no disk round-trip:

renderDocx(
  markdown="# Title\n\nBody paragraph...",
  filename="monthly-report",
  pageSize="A4"
)

Returns a clickable link of the form [monthly-report.docx](/api/v1/files/generated/<uuid>) valid for 10 minutes. The user clicks it to download, no follow-up Agent step needed.

renderDocx supports headings (# ## ###), bold (**text**), bullet lists (- item), numbered lists (1. item), pipe-style tables, and plain paragraphs. For images, headers/footers, or precise OOXML control, fall back to the docx-js workflow below.

Prerequisites

  • python-docx (pip install python-docx): direct structure reading and light editing (paragraphs, styles, tables)
  • docx (npm install -g docx): new document creation
  • LibreOffice (soffice): .doc -> .docx conversion, tracked-changes acceptance, and PDF export
  • pandoc: text extraction
  • pdftoppm (poppler-utils): document-to-image workflows
  • If pdftoppm is unavailable, a Python fallback path may use pdf2image.
  • On Windows, dependencies must be installed and available in PATH; if missing, report the dependency issue and stop (do not keep retrying).

Overview

Read the whole SKILL.md on GitHub

More in Documents