docx-editor

A workflow for safely inspecting, editing, rendering, comparing, and validating Microsoft Word documents. It supports DOCX and related Word file types while checking for active content and preserving the original by default.

In plain words
What is it for?
Making controlled changes to Word documents, checking paragraphs and formatting, previewing layout, comparing revisions, and saving a validated copy.
Why use it?
It reduces the risk of damaging document structure, formatting, macros, or other content during automated edits.

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/firstp1ck/pi-coding-agent-forge/docx-editor
Any agent
npx skills add Firstp1ck/pi-coding-agent-forge --skill docx-editor
Clone the repo
git clone --depth 1 https://github.com/Firstp1ck/pi-coding-agent-forge

Made for: Claude Code, Codex.

Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 605 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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.00069 $0.00605
Opus 5 $0.00034 $0.00302
Sonnet 5 $0.00014 $0.00121
Haiku 4.5 $0.00007 $0.00060

Measured 3d ago against content hash b2cac48233b2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docx-editor scanned grade A with 0 findings 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 3d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

pi-extension-docx/skills/docx-editor/SKILL.md · 34 lines

How it starts

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

DOCX editor

Required workflow

  1. Call docx_inspect before editing an unfamiliar document. Keep sourceSha256, feature/security inventory, and capability report.
  2. Call docx_read for only the relevant stories/blocks. Use returned paragraph IDs, paths, hashes, bookmarks, controls, or strict text anchors.
  3. Call docx_render when pagination, layout, tables, images, headers/footers, or formatting matter. Keep page selections small.
  4. Call docx_edit with dryRun: true; use exact preconditions and expected counts. Resolve ambiguity rather than broadening an edit.
  5. Call docx_edit with dryRun: false and expectedSourceSha256 to create a staged revision. This tool must not receive a destination.
  6. Call docx_validate and docx_diff against source and staged paths. Render focused before/after pages for visually sensitive operations.
  7. Call docx_commit to a new .docx path by default.
  8. Overwrite the source only when the user explicitly asked, hashes still agree, every gate passes, and interactive confirmation is available. Require a recovery path in the result.

Safety rules

  • Never use built-in text edit or write on DOCX/DOCM/DOTX/DOTM.
  • Never execute macros, OLE, fields, links, DDE, or attached templates. Never claim they were executed or refreshed.
  • Treat .docm/.dotm, active content, and signatures as read/render only. Do not bypass SIGNED_DOCUMENT or ACTIVE_CONTENT_BLOCKED.
  • Do not mutate raw XML, XPath, arbitrary ZIP parts, or page-number selectors.
  • Do not silently convert formats. Legacy/template conversion must create a new .docx and report losses.
  • Stop on LOSSY_OPERATION, protected-part changes, unavailable mandatory engines, validation failures, source/destination conflicts, or ambiguous selectors.
  • Keep hidden/deleted metadata out of model-visible output unless the user explicitly asks to inspect it.

Verification

A successful tool return is not enough. Confirm source and staged/output hashes, declared changed parts, protected-part stability, Open XML validation, independent reopen, semantic diff, and required render checks. Report renderer/font warnings and any host gate that was not run.

Read the full file on GitHub · 34 lines

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. 3d ago First seen · 34 lines · 69 tokens per session scan A b2cac48233b2

Subscribe to this mod's changes

docx-editor is a skill published in the GitHub repository Firstp1ck/pi-coding-agent-forge (74 stars, last pushed 3d ago), licensed MIT. It adds 69 tokens to every session and 605 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

clinical-reports

Write comprehensive clinical reports including case reports (CARE guidelines), diagnostic reports (radiology/pathology/lab), clinical trial reports (ICH-E3, SAE, CSR), and patient documentation (SOAP, H&P, discharge summaries). Full support with templates, regulatory compliance (HIPAA, FDA, ICH-GCP), and validation…

synthetic-sciences/openscience · 71 tokens

clinical-decision-support

Generate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading…

synthetic-sciences/openscience · 97 tokens

treatment-plans

Generate concise (3-4 page), focused medical treatment plans in LaTeX/PDF format for all clinical specialties. Supports general medical treatment, rehabilitation therapy, mental health care, chronic disease management, perioperative care, and pain management. Includes SMART goal frameworks, evidence-based…

synthetic-sciences/openscience · 86 tokens

google-docs

Google Docs via gws: read, append text, structured batch edits.

Open-Curiosity/gini-agent · 19 tokens

google-sheets

Google Sheets via gws: read/write cells, append rows, structured batch edits.

Open-Curiosity/gini-agent · 21 tokens

document-parsing

Extract readable Markdown from local Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and text-based PDF files using the preinstalled AnyDoc runtime.

Cloudgeni-ai/opengeni · 39 tokens