# Docx Editor

> Safely inspect, search, render, edit, diff, validate, and commit Microsoft Word DOCX files with the dedicated docx_* tools. Use for DOCX/DOTX/DOCM/DOTM document work; enforces dry-run-first edits, active-content refusal, preservation checks, and save-as by default.

- **Type:** Skill
- **Install:** `agentstack add skill-firstp1ck-pi-coding-agent-forge-docx-editor`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Firstp1ck](https://agentstack.voostack.com/s/firstp1ck)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Firstp1ck](https://github.com/Firstp1ck)
- **Source:** https://github.com/Firstp1ck/pi-coding-agent-forge/tree/main/pi-extension-docx/skills/docx-editor

## Install

```sh
agentstack add skill-firstp1ck-pi-coding-agent-forge-docx-editor
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Firstp1ck](https://github.com/Firstp1ck)
- **Source:** [Firstp1ck/pi-coding-agent-forge](https://github.com/Firstp1ck/pi-coding-agent-forge)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-firstp1ck-pi-coding-agent-forge-docx-editor
- Seller: https://agentstack.voostack.com/s/firstp1ck
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
