Skip to content
Back to skills

Edit Docx Agreement

ASecurity

Make bespoke edits to a DOCX agreement generated by OpenAgreements (or any existing DOCX), using Safe Docx MCP tools for surgical, formatting-preserving edits and tracked-changes outputs. Use when user says "edit this contract," "change a clause," "modify the agreement," "custom edits to the docx," or "bespoke changes to the document."

  • 59 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 26, 2026
ai-agentsrustsecurity

Works with

  • cli
  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 2, 2026

npx -y skills add open-agreements/open-agreements --skill edit-docx-agreement --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Edit Docx Agreement?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Edit Docx Agreement
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/open-agreements-edit-docx-agreement/badge)](https://www.skillsdirectory.com/skills/open-agreements-edit-docx-agreement)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: edit-docx-agreement
description: >-
  Make bespoke edits to a DOCX agreement generated by OpenAgreements (or any
  existing DOCX), using Safe Docx MCP tools for surgical, formatting-preserving
  edits and tracked-changes outputs. Use when user says "edit this contract,"
  "change a clause," "modify the agreement," "custom edits to the docx," or
  "bespoke changes to the document."
license: Apache-2.0
compatibility: >-
  Works with any agent. Requires a separately configured Safe Docx MCP server for document editing.
  OpenAgreements fill capabilities require the OpenAgreements remote MCP or local CLI.
metadata:
  author: open-agreements
  version: "0.2.0"
catalog_group: Editing And Client Workflows
catalog_order: 10
---

# edit-docx-agreement

Use this skill when a user asks for **custom edits that are not exposed as template fields** in an OpenAgreements-generated (or any existing) DOCX agreement.

> **Interactivity note**: Always ask the user for missing inputs (file path, change intent, output preferences).

## Security model

This skill bridges two separate systems:
- **OpenAgreements** (remote MCP or local CLI) — for template filling. Follows the OpenAgreements zero-download security model.
- **Safe Docx** (local MCP server) — for surgical DOCX editing. Requires separate setup. This is **not** part of the OpenAgreements skill set and has its own trust/security model.

The agent must have Safe Docx MCP tools available to perform edits. If Safe Docx tools are not detected, inform the user and provide setup guidance (see Connectors).

## Decision rule: refill vs edit vs both

1. **Field-only changes** (e.g., party name, date, amount, valuation cap):
   Re-run OpenAgreements `fill_template` with the updated field values. No Safe Docx needed.

2. **Boilerplate-only changes** (e.g., custom clause, modified standard language):
   Use Safe Docx MCP tools to surgically edit the existing DOCX.

3. **Mixed changes** (field updates + bespoke edits):
   Re-fill via OpenAgreements first (to get a clean base with updated fields), save the output locally, then use Safe Docx to apply bespoke edits on the fresh file.

## Execution

### Step 0: Confirm you have a local .docx file path

- If OpenAgreements was run via remote MCP, the fill response returns a download URL (with `expires_at`). Save the DOCX to a local path immediately.
- If the download link has expired, re-run `fill_template` to get a fresh URL.
- If OpenAgreements was run via local CLI, use the output file path directly.

### Step 1: Verify Safe Docx MCP is available

Check whether Safe Docx tools (e.g., `read_file`, `replace_text`, `apply_plan`) are available in the current session.

- **If available**: proceed to Step 2.
- **If not available**: inform the user that Safe Docx MCP is required for bespoke edits and provide setup instructions from [CONNECTORS.md](./CONNECTORS.md). Stop here until the user configures it.

### Step 2: Apply the decision rule

Follow the routing logic above (field-only / boilerplate-only / mixed).

For Safe Docx edits:
- Use `read_file` to locate target paragraphs
- Use `replace_text` or `insert_paragraph` for surgical changes
- Use `apply_plan` for batch edits (fails safely if any step is invalid)
- Re-read edited paragraphs to verify changes

### Step 3: Deliver reviewable outputs

Use Safe Docx `download` to save:
- A **tracked-changes** DOCX for legal review
- A **clean** DOCX for signing (optional but recommended)

Summarize edits for the user (paragraph IDs, before/after text).

## Licensing note

Some templates (notably YC SAFEs) are licensed under CC-BY-ND-4.0. You can fill them for your own use but must not redistribute modified versions of the template itself. The filled output may constitute an "adapted work" — do not redistribute your filled output publicly without reviewing the license terms. See `docs/licensing.md` for details.

This tool does not provide legal advice — consult an attorney.

## Connectors

For MCP server setup (OpenAgreements remote MCP + Safe Docx local MCP), see [CONNECTORS.md](./CONNECTORS.md).

Files in this skill

  • CONNECTORS.md813 B
  • SKILL.md4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.