docx

docx is a skill for Claude Code, Codex from rangerrick337/operator-os. It costs 77 tokens per session (2,462 once invoked), scanned B, a copy of docx, MIT.

A toolkit and workflow for creating, editing, and examining Microsoft Word DOCX files. DOCX files are packaged documents that can contain text, formatting, comments, and tracked edits.

In plain words
What is it for?
Use it to create documents, extract their text, edit formatting, add or review tracked changes, and work with comments.
Why use it?
It helps preserve document structure and review history when changing professional documents, instead of treating them as plain text.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/rangerrick337/operator-os/docx
Any agent
npx skills add rangerrick337/operator-os --skill docx
Clone the repo
git clone --depth 1 https://github.com/rangerrick337/operator-os

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/rangerrick337/operator-os/docx.svg)](https://agentmods.dev/skills/rangerrick337/operator-os/docx)
Your own site
<a href="https://agentmods.dev/skills/rangerrick337/operator-os/docx"><img src="https://agentmods.dev/badge/skills/rangerrick337/operator-os/docx.svg" alt="Measured on agentmods" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,462 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin 95% 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 $0.00077 $0.02462
Opus 5 $0.00039 $0.01231
Sonnet 5 $0.00015 $0.00492
Haiku 4.5 $0.00008 $0.00246

Measured 4d ago against content hash 0cb9b8d89e6a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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

95% identical to docx — 5 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.

Operator Team OS/3. Skills/docx/SKILL.md · 195 lines

How it starts

The opening of the file, as written. The whole thing — 195 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 · 195 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. 4d ago First seen · 195 lines · 77 tokens per session scan B 0cb9b8d89e6a

Subscribe to this mod's changes

docx is a skill published in the GitHub repository rangerrick337/operator-os (10 stars, last pushed today), licensed MIT. It adds 77 tokens to every session and 2,462 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). It is 95% identical to docx, differing in 5 lines, and is treated as a copy.

Related

Other skills, from other repositories

pdf-processing

Process and extract information from PDF documents. Use this skill when the user asks to read, analyze, or extract data from PDF files.

MervinPraison/PraisonAI · 30 tokens

skillshare-changelog

Generate CHANGELOG.md entry from recent commits in conventional format. Also syncs the website changelog page. Use this skill whenever the user asks to: generate a changelog, document what changed between tags, or create a new CHANGELOG entry. If you see requests like "write the changelog for v0.17", "what changed…

runkids/skillshare · 134 tokens

skillshare-update-docs

Update website docs to match recent code changes, cross-validating every flag against source. Use this skill whenever the user asks to: update documentation, sync docs with code, document a new flag or command, fix stale docs, or update the README. This skill covers all website/docs/ categories (commands, reference…

runkids/skillshare · 123 tokens

cloudbase-document-database-in-wechat-miniprogram

Use CloudBase document database WeChat MiniProgram SDK to query, create, update, and delete data. Supports complex queries, pagination, aggregation, and geolocation queries.

TencentCloudBase/CloudBase-AI-Toolkit · 46 tokens

dashscope

DashScope (Alibaba Cloud Bailian / 阿里云百炼) integration — image generation (qwen-image-2.0-pro), text-to-speech (qwen3-tts-flash), and ASR with word-level timestamps (qwen3-asr-flash-filetrans). Use when generating images via Qwen-Image, narrating via Qwen-TTS, or transcribing with word-level timestamps via Qwen-ASR.

calesthio/OpenMontage · 93 tokens

visual-qa

MUST USE after building/changing any UI or when asked whether a page, component, or TUI looks right. Rigorous visual QA across web/page, terminal, and paginated-document surfaces. Prefer browser:control-in-app-browser for unauthenticated browser/page QA in Codex, then Playwright/agent-browser/dev-browser. Captures…

code-yeongyu/oh-my-openagent · 161 tokens