Directory SKILL
SKILLbundledHermes Bundled Skills

Docx

Create, read, edit, and template Word .docx files

worddocxdocumentsofficetemplatesBundledHermes skill
Last registry verification2026-08-18v1.0.0Nous Research
Plain meaning

What does it add to Hermes?

Create, read, edit, and template Word .docx files

Docx is a skill related to files and documents. It can let the agent read, organize, or create documents within the folder or account scope you grant.

This plain-language explanation is based on the publisher description. The original text remains visible for verification.

Use it when

Use it when your goal in files and documents is clear and you can limit it to the data and actions it actually needs.

Skip it when

Do not add it merely to experiment when Hermes already has a simpler path, or when you cannot review its source and permissions.

Who is it for?

Best for users who want a repeatable way of working inside Hermes.

Safe first test

Use a test folder containing copies of non-sensitive files and begin with one read operation.

Original publisher description

Create, read, edit, and template Word .docx files

Data source

This entry was indexed from Hermes Bundled Skills. Our explanation interprets the type and domain without inventing a capability not present upstream.

!
Security review

The source is official or editorially reviewed, but you still need to review permissions and version compatibility.

Safe setup path

Inspect, install, then test.

  1. 01
    Open the source

    Match the publisher, license, and description to your need. Check the real update history.

  2. 02
    Review permissions and secrets

    Never paste a secret value into this site. Use environment-variable names and grant the smallest scope.

  3. 03
    Copy setup only after review

    The controls below copy text. They do not execute commands on your device.

  4. 04
    Test with a non-sensitive task

    Inspect the visible tools, then exclude write or delete tools you do not need.

Setup method

Already installed with Hermes.

This skill ships with Hermes and loads when the agent decides it is relevant. There is nothing to install; read the definition below so you know what it will do.

Open the official page
The full skill definition

Exactly what Hermes loads when this skill runs.

Reproduced from the official documentation. Read it before enabling the skill: this text becomes the agent's instructions.

Create, read, edit, and template Word .docx files.

Skill metadata

A lookup table. Do not read it all; find the row that applies to you.

SourceBundled (installed by default)
Pathskills/productivity/docx
Version1.0.0
AuthorNous Research
LicenseMIT
Platformslinux, macos, windows
Tagsword, docx, documents, office, templates
Related skillspdf, xlsx, powerpoint

Reference: full SKILL.md

Explains the idea itself. Read it slowly; the later sections build on it.

Create, read, edit, and template Microsoft Word .docx files with python-docx via four small CLIs. It handles text, styles, lists, tables, images, headers/footers, and {{token}} templating. It does not render documents to PDF, edit legacy .doc binaries, or accept/reject tracked changes (it only detects them — see Pitfalls).

When to Use

Explains the idea itself. Read it slowly; the later sections build on it.

  • The user asks to generate a Word document (report, letter, contract).
  • You need the text, outline, styles, or embedded images of a .docx.
  • You must change an existing .docx: replace text, edit table cells, insert/delete paragraphs, apply styles.
  • You have a .docx template with {{placeholders}} to fill from data.
  • Not for: .doc (legacy), .odt, PDF conversion, or WYSIWYG layout work.

Prerequisites

Explains the idea itself. Read it slowly; the later sections build on it.

  • Python 3.10+ with python-docx installed: pip install python-docx (import name is docx).
  • For image blocks: the image files must exist locally (PNG/JPEG).

How to Run

Explains the idea itself. Read it slowly; the later sections build on it.

All helpers live in scripts/ next to this file. Run them with the terminal tool; each supports --help and prints JSON to stdout.

Shell4 lines
python scripts/docx_create.py spec.json out.docx
python scripts/docx_read.py out.docx --text
python scripts/docx_edit.py replace out.docx --find old --replace new
python scripts/docx_template.py tpl.docx values.json filled.docx

Quick Reference

A lookup table. Do not read it all; find the row that applies to you.

TaskCommand
Create from JSON specdocx_create.py spec.json out.docx
Full text (body+tables+headers/footers)docx_read.py f.docx --text
Heading outline + table shapesdocx_read.py f.docx --structure
Styles actually useddocx_read.py f.docx --styles
Extract embedded imagesdocx_read.py f.docx --images outdir/
Detect tracked changes/commentsdocx_read.py f.docx --revisions
Find/replace (formatting kept)docx_edit.py replace f.docx --find A --replace B -o out.docx
Set a table celldocx_edit.py set-cell f.docx --table 0 --row 1 --col 2 --text X
Insert paragraph before index Ndocx_edit.py insert f.docx --index N --text X --style Normal
Delete paragraph Ndocx_edit.py delete f.docx --index N
Apply style to paragraph Ndocx_edit.py style f.docx --index N --style "Heading 1"
Fill {{tokens}}docx_template.py tpl.docx values.json out.docx --strict

Procedure

Explains the idea itself. Read it slowly; the later sections build on it.

  1. Create. Write a JSON spec with write_file, then run scripts/docx_create.py. The spec supports: page (size + margins in mm), header/footer strings, styles (custom paragraph styles with font, size, bold/italic, hex color), and blocksheading (level 1-9), paragraph (either text or a runs list where each run may set bold/italic/underline), bullet_list, numbered_list, table (header row rendered bold, rows, optional built-in table style such as Table Grid), image (path, optional width_mm), and page_break. The full spec format is documented at the top of scripts/docx_create.py — read it with read_file when composing.
  2. Read. Use scripts/docx_read.py with exactly one mode flag. --text returns body paragraphs, all table cell text, and header/footer text as JSON. --structure returns the heading outline plus paragraph/table/section counts. --images DIR copies every file under word/media/ out of the package.
  3. Edit. Use scripts/docx_edit.py. replace walks body, tables (nested included), headers and footers, and preserves run formatting; add --body-only to skip headers/footers. Pass -o out.docx to keep the original; omit it to edit in place. Paragraph indices for insert/delete/style refer to --structure/--text body order.
  4. Template. Put {{name}}-style tokens in the document (letters, digits, _, ., -; optional inner spaces like {{ name }} are accepted). Run scripts/docx_template.py with a JSON object of values. Use --strict to fail when tokens remain unfilled; the JSON output lists filled counts and unfilled_tokens either way.
  5. Verify (always): re-read the output with --text or --structure and confirm the expected content is present.

Pitfalls

Explains the idea itself. Read it slowly; the later sections build on it.

  • Tokens split across runs. Word often fragments {{name}} into several runs. The replace helpers handle this by collapsing the runs; the replacement inherits the formatting of the run where the match starts. Mid-token formatting changes are therefore flattened.
  • Tracked changes. --revisions only detects insertions, deletions, format changes, and comments. Text extraction returns the as-is body (insertions included, deletions omitted, i.e. roughly the accepted view), but this skill cannot accept/reject revisions or read comment text. Say so to the user rather than guessing.
  • Style names must exist. Applying a style that isn't defined in the document raises KeyError. Built-ins like Heading 1, List Bullet, List Number, Table Grid exist in the default template; custom styles must be declared in the create spec first.
  • Numbered lists restart. List Number relies on Word's default numbering; separate lists in one document may continue numbering instead of restarting. Acceptable for simple docs; warn users needing precise multi-list numbering.
  • Cell writes replace formatting. set-cell uses cell.text = ..., which resets runs in that cell to plain formatting.
  • Encoding. All JSON specs/values files are read as UTF-8 explicitly; never rely on locale defaults when writing your own glue code.
  • Don't unzip-and-sed the XML. Edit through the scripts (or python-docx); raw text substitution in document.xml corrupts files easily. Use patch/write_file only for the JSON inputs, never on the .docx itself.

Verification

Explains the idea itself. Read it slowly; the later sections build on it.

  • After create/edit/template, run docx_read.py out.docx --text and check the expected strings appear (and old strings are gone).
  • For templates run with --strict, or check unfilled_tokens == [].
  • Structure checks: --structure should show the expected heading outline and table shapes; --styles confirms custom styles applied.
  • A valid .docx opens with Document(path) without exception — the read script exiting 0 is itself a sanity check.