edit-docx-agreement
npx skills add https://github.com/open-agreements/open-agreements --skill edit-docx-agreement
Agent 安装分布
Skill 文档
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
-
Field-only changes (e.g., party name, date, amount, valuation cap): Re-run OpenAgreements
fill_templatewith the updated field values. No Safe Docx needed. -
Boilerplate-only changes (e.g., custom clause, modified standard language): Use Safe Docx MCP tools to surgically edit the existing DOCX.
-
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_templateto 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 the Connectors file. 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_fileto locate target paragraphs - Use
replace_textorinsert_paragraphfor surgical changes - Use
apply_planfor 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.