docx

docx is a skill for Claude Code, Codex from tamnguyendinh/Anvien. It costs 17 tokens per session (2,411 once invoked), scanned B, a copy of docx, MIT.

Guidance for creating, editing, and analyzing Microsoft Word .docx documents. It covers extracting text, working with the document's internal XML, and handling tracked changes.

In plain words
What is it for?
Use it to read document contents, create Word files, make simple edits, or review another person's changes with tracked revisions.
Why use it?
It provides a clear workflow for inspecting documents and preserving or reviewing edits, including in legal, academic, business, and government files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to read document contents, create Word files, make simple edits, or review another person's changes with tracked revisions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tamnguyendinh/anvien/docx
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tamnguyendinh/Anvien --skill docx
Clone the repo
git clone --depth 1 https://github.com/tamnguyendinh/Anvien

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for docx

README.md
[![agentmods](https://agentmods.dev/badge/skills/tamnguyendinh/anvien/docx/github.svg)](https://agentmods.dev/skills/tamnguyendinh/anvien/docx)
Your own site
<a href="https://agentmods.dev/skills/tamnguyendinh/anvien/docx"><img src="https://agentmods.dev/badge/skills/tamnguyendinh/anvien/docx/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for docx

Your own site · 80×15
<a href="https://agentmods.dev/skills/tamnguyendinh/anvien/docx"><img src="https://agentmods.dev/badge/skills/tamnguyendinh/anvien/docx.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,411 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 98% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.02411
Opus 5 $0.00009 $0.01205
Sonnet 5 $0.00003 $0.00482
Haiku 4.5 $0.00002 $0.00241

Measured 11d ago against content hash ef741ecb6243, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

docx scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 11 executable files (ooxml/scripts/pack.py, ooxml/scripts/unpack.py, ooxml/scripts/validate.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- **pandoc**: `sudo apt-get install pandoc` (for text extraction)
Origin

This is a copy

98% identical to docx — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

internal/aicontext/skills/document-skills/docx/SKILL.md · 198 lines

How it starts

The opening of the file, as written. The whole thing — 198 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DOCX creation, editing, and analysis

Overview

A user may ask you to create, edit, or analyze the contents of a .docx file. A .docx file is essentially a ZIP archive containing XML files and other resources that you can read or edit. You have different tools and workflows available for different tasks.

Workflow Decision Tree

Reading/Analyzing Content

Use "Text extraction" or "Raw XML access" sections below

Creating New Document

Use "Creating a new Word document" workflow

Editing Existing Document

  • Your own document + simple changes Use "Basic OOXML editing" workflow

  • Someone else's document Use "Redlining workflow" (recommended default)

  • Legal, academic, business, or government docs Use "Redlining workflow" (required)

Reading and analyzing content

Text extraction

If you just need to read the text contents of a document, you should convert the document to markdown using pandoc. Pandoc provides excellent support for preserving document structure and can show tracked changes:

# Convert document to markdown with tracked changes
pandoc --track-changes=all path-to-file.docx -o output.md
# Options: --track-changes=accept/reject/all

Raw XML access

You need raw XML access for: comments, complex formatting, document structure, embedded media, and metadata. For any of these features, you'll need to unpack a document and read its raw XML contents.

Unpacking a file

python ooxml/scripts/unpack.py <office_file> <output_directory>

Key file structures
  • word/document.xml - Main document contents
  • word/comments.xml - Comments referenced in document.xml
  • word/media/ - Embedded images and media files
  • Tracked changes use <w:ins> (insertions) and <w:del> (deletions) tags

Creating a new Word document

When creating a new Word document from scratch, use docx-js, which allows you to create Word documents using JavaScript/TypeScript.

Workflow

  1. MANDATORY - READ ENTIRE FILE: Read docx-js.md (~500 lines) completely from start to finish. NEVER set any range limits when reading this file. Read the full file content for detailed syntax, critical formatting rules, and best practices before proceeding with document creation.
  2. Create a JavaScript/TypeScript file using Document, Paragraph, TextRun components (You can assume all dependencies are installed, but if not, refer to the dependencies section below)
  3. Export as .docx using Packer.toBuffer()

Read the full file on GitHub · 198 lines

Files

What ships with it

58 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 198 lines · 17 tokens per session scan B ef741ecb6243

Subscribe to this mod's changes

docx is a skill published in the GitHub repository tamnguyendinh/Anvien (9 stars, last pushed 2d ago), licensed MIT. It adds 17 tokens to every session and 2,411 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). It is 98% identical to docx, differing in 4 lines, and is treated as a copy.

Related

Other skills, from other repositories

booboo-vault

Emit a Booboo brain as a wiki-linked markdown vault for Obsidian, author authored edges with double-bracket links, and read the ingestion quality gate. Use when someone wants their system as plain files, an Obsidian second brain generated from real data, a portable insurance copy, or wants to know why their orphan…

jessymariau/booboo · 76 tokens

potpie-source-ingestion

Use when the user explicitly asks to ingest, refresh, or deeply understand a repository, PR, issue, ticket, runbook, incident report, document, or web link into Potpie. The harness performs todo-driven discovery, uses local/GitHub/integration tools and read-only subagents when available, builds evidence-backed…

potpie-ai/potpie · 82 tokens

publication-chart-skill

This skill should be used when the user asks for a publication-quality scientific figure or table, wants help choosing the right chart for results, needs a paper-ready pubfig or pubtab workflow, wants a figure + companion table for a results section, wants an Excel sheet turned into publication-ready LaTeX, or wants…

Galaxy-Dawn/claude-scholar · 77 tokens

obsidian-source-ingestion

Use this skill to ingest external materials into the current project-scoped Obsidian KB as source notes under Sources/Papers, Sources/Web, Sources/Docs, Sources/Data, Sources/Interviews, or Sources/Notes.

Galaxy-Dawn/claude-scholar · 51 tokens

memstack-business-scope-of-work

Use this skill when the user says 'scope of work', 'SOW', 'define scope', 'project scope', 'write SOW', 'scope document', or is defining project boundaries, deliverables, and acceptance criteria for a formal engagement. Do NOT use for proposals, contracts, or invoicing.

cwinvestments/memstack · 70 tokens

memstack-business-invoice-generator

Use this skill when the user says 'invoice', 'generate invoice', 'create invoice', 'bill client', 'line items', 'payment terms', or needs professional invoices with tax calculations and payment instructions. Do NOT use for contracts or financial projections.

cwinvestments/memstack · 57 tokens