docx-editing
БесплатноБез исполняемых скриптовНе проверенSurgically edit existing (brownfield) .docx files with formatting preservation and tracked changes via the Safe-DOCX MCP server. Use when user says "edit this…
от lxyeternal★ 68 звёзд на GitHubОб этом скилле
Editing .docx Files with Safe-DOCX
Safe-DOCX is a local MCP server for surgically editing existing .docx files. It preserves formatting, generates tracked-changes redlines, and — once installed — runs entirely on the local filesystem with zero network activity.
Source Code and Audit
Safe-DOCX is fully open source (MIT license). Review the complete source before installing:
- GitHub: https://github.com/UseJunior/safe-docx
- npm registry: https://www.npmjs.com/package/@usejunior/safe-docx
- Code coverage: Published via Codecov on every release
- Conformance harness: Automated spec coverage tests run in CI on every commit
- No postinstall scripts — verify:
npm view @usejunior/safe-docx scriptsshows nopostinstallorinstallhooks
All security claims below are verifiable by reading the source.
Runtime Requirements
Safe-DOCX requires these binaries to be available on the host:
| Binary | Minimum version | Why |
|---|---|---|
node |
18.0.0 | Authoritative version from packages/safe-docx/package.json engines field |
npx |
Bundled with npm | Used by the recommended MCP connector to launch the server |
If you prefer not to use npx, see Offline / Pinned Installation below for alternatives.
Safety Model
Safe-DOCX's safety model has two distinct phases: install time (when the package is fetched) and runtime (when the MCP server is running).
Install-Time Behavior (network required, one-time)
- npm registry fetch — the recommended connector command
npx -y @usejunior/safe-docxdownloads the package fromregistry.npmjs.orgon first run. Subsequent runs use the cached copy unless the cache is cleared. - No postinstall scripts — the package declares no
postinstall,preinstall, orinstallhooks. Verify withnpm view @usejunior/safe-docx scripts. - Provenance — releases are published with npm provenance (
--provenance), so you can verify the package was built from the public GitHub repo via GitHub Actions. - If you need guaranteed offline install — pin a specific version and vendor it locally. See the next section.
Runtime Behavior (zero network)
- Local-only stdio runtime — the MCP server runs as a child process, never binds a port. Verify: the entry point (
src/server.ts) usesStdioServerTransportwith no HTTP listener. (source) - No outbound network calls — at runtime, the package makes zero outbound HTTP requests. Verify:
grep -r "fetch\|http\.\|https\.\|net\." packages/safe-docx/src/returns no matches in application code (test fixtures excluded). - Path policy — only files under
~/(home directory) and system temp directories are accessible. Symlinks must resolve to allowed roots. - Archive guardrails — zip bomb detection and hostile payload rejection protect against malformed
.docxinputs.
Offline / Pinned Installation
For high-security environments where npx auto-fetch is unacceptable, install the package manually and pin the version:
# Option 1: Pin a specific version globally
npm install -g @usejunior/[email protected]
# Then configure your MCP client to invoke it by path:
# command: "safe-docx"
# args: []
# Option 2: Vendor the package into your project
npm pack @usejunior/[email protected]
# Inspect the tarball, then install it from disk:
npm install -g ./usejunior-safe-docx-0.9.0.tgz
# Option 3: Build from source (most auditable)
git clone https://github.com/UseJunior/safe-docx.git
cd safe-docx
git checkout <release-tag>
npm ci
npm run build
npm link packages/safe-docx
After any of these, your MCP client config becomes:
{
"mcpServers": {
"safe-docx": {
"command": "safe-docx",
"args": []
}
}
}
Using command: "safe-docx" (the installed binary) instead of command: "npx" eliminates the install-time network fetch on every invocation.
Always pin the version
Even with npx, you can pin the version to prevent unexpected updates:
{
"mcpServers": {
"safe-docx": {
"command": "npx",
"args": ["-y", "@usejunior/[email protected]"]
}
}
}
Before upgrading, review the changelog: https://github.com/UseJunior/safe-docx/blob/main/CHANGELOG.md
When to Use This Skill
Use Safe-DOCX when you need to:
- Change clauses or paragraphs in an existing
.docx - Insert or delete content with formatting preservation
- Add comments or footnotes for reviewers
- Produce a tracked-changes redline from edits
- Compare two
.docxfiles into a redline - Extract revisions to structured JSON
- Apply layout formatting (spacing, row heights, cell padding)
Not for From-Scratch Generation
Safe-DOCX edits already-existing .docx files — it does not create documents from blank. For new document generation, use a template-filling workflow (e.g. OpenAgreements). Safe-DOCX can refine generated docs downst
Установить docx-editing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл docx-editing?
Surgically edit existing (brownfield) .docx files with formatting preservation and tracked changes via the Safe-DOCX MCP server. Use when user says "edit this docx," "change the contract," "redline the document," "compare these Word files," "add a comment to the docx," "read this Word file," or "mark up the agreement." Not for from-scratch document generation.
Как установить скилл docx-editing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл docx-editing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic