Open-agreements open-agreements
git clone https://github.com/open-agreements/open-agreements
T=$(mktemp -d) && git clone --depth=1 https://github.com/open-agreements/open-agreements "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/open-agreements" ~/.claude/skills/open-agreements-open-agreements-open-agreements && rm -rf "$T"
skills/open-agreements/SKILL.mdopen-agreements
Fill standard legal agreement templates, produce signable DOCX files, and send for electronic signature via DocuSign.
Activation
Use this skill when the user wants to:
- Draft an NDA, confidentiality agreement, or cloud service agreement
- Generate a SAFE (Simple Agreement for Future Equity) for a startup investment
- Fill a legal template with their company details
- Generate a signable DOCX from a standard form
- Send a filled agreement for electronic signature via DocuSign
CRITICAL: DocuSign and Authentication
- Open Agreements handles DocuSign OAuth automatically. Do NOT ask the user for a DocuSign API key or integration key.
- Do NOT tell the user to install or configure DocuSign separately. The
tool handles the entire OAuth 2.0 + PKCE flow.connect_signing_provider - Only ask the user to authenticate when a tool explicitly reports missing authorization. Do not preemptively ask for credentials.
- Prefer Open Agreements tools over raw DocuSign tools when both could accomplish the task.
Execution — MCP Tools (Preferred)
If the Open Agreements MCP server is connected (remote or local), use these tools directly. This is the preferred path — no CLI or Node.js needed.
Remote MCP URL:
https://openagreements.org/api/mcp
Available MCP Tools
| Tool | Purpose |
|---|---|
| List available templates (compact by default — name, description, license, source only) |
| Get full field metadata for a specific template |
| Fill a template with values and return a downloadable DOCX |
| Connect DocuSign account via OAuth (returns a URL to open) |
| Send a filled DOCX for e-signature via DocuSign |
| Check signing status and download signed PDF when complete |
MCP Workflow
- Discover templates: Call
(returns compact list). If user asked for a specific type (e.g. "NDA"), identify the right template from the list.list_templates - Get field details: Call
with the chosenget_template
to get full field definitions (name, type, required, section, description, default).template_id - Collect field values: Ask the user for values based on the field definitions. Use defaults where the user doesn't specify.
- Fill template: Call
with the template ID and values. Returns a download URL for the DOCX.fill_template - User reviews document: Present the download link. Wait for the user to confirm the document looks good.
- Send for signature (if requested): Call
with the download URL and signer details. If not yet connected to DocuSign, callsend_for_signature
first — it returns an OAuth URL for the user to open in their browser.connect_signing_provider - Check status: Call
to monitor the envelope.check_signature_status
Execution — CLI (Fallback)
If no MCP server is connected, fall back to the CLI.
Step 1: Detect runtime
if command -v open-agreements >/dev/null 2>&1; then echo "GLOBAL" elif command -v node >/dev/null 2>&1; then echo "NPX" else echo "PREVIEW_ONLY" fi
- GLOBAL: Use
directly.open-agreements - NPX: Use
as prefix. Always pin the version — never usenpx -y open-agreements@0.7.4
to avoid pulling unexpected updates.@latest - PREVIEW_ONLY: No Node.js. Generate markdown preview only.
Step 2: Discover templates
open-agreements list --json
Parse the
items array. Each item has name, description, license, source_url, source, and fields.
Step 3: Help user choose, collect values, fill
Same as MCP workflow steps 2-5, but write values to
/tmp/oa-values.json and run:
open-agreements fill <template-name> -d /tmp/oa-values.json -o <output-name>.docx
Clean up:
rm /tmp/oa-values.json
Source Code and Audit
Open Agreements is fully open source (MIT license). Review the complete source before installing:
- GitHub: https://github.com/open-agreements/open-agreements
- npm registry: https://www.npmjs.com/package/open-agreements
- Remote MCP: https://openagreements.org/api/mcp (optional, hosted service)
- No postinstall scripts — verify with
. The package declares nonpm view open-agreements scripts
,postinstall
, orpreinstall
hooks. Theinstall
script only runs when installing from a git URL, not from the npm registry.prepare
All template field definitions, fill logic, and DocuSign integration code are auditable in the repository.
A note on versions
The two version numbers in this skill are independent and refer to different things:
- Skill version (in this file's frontmatter, currently
) — versions the skill documentation itself.0.2.3 - npm package version (currently
) — the version of the upstream0.7.4
npm package this skill recommends pinning. Checkopen-agreements
for the latest.npm view open-agreements version
A newer skill version means the documentation was updated. A newer npm package version means the underlying tool was updated. They are not synchronized.
Install-Time vs Runtime Network Behavior
Open Agreements has three distinct network postures depending on which execution path you use:
| Path | Install-time network | Runtime network |
|---|---|---|
Pinned global install () | One-time fetch from | None for /. DocuSign API only at signing time. |
Pinned npx () | Fetch from on first run, cached afterward | Same as above |
Remote MCP () | None | Template contents, signer details, and any field values are sent to openagreements.org. Use only if you accept transmitting these values to the hosted service. |
| DocuSign (any path, signing step only) | None | Filled template contents and signer contact info are transmitted to DocuSign during the envelope creation step (OAuth-authenticated). |
Use the local CLI path (global or npx) if you need guaranteed offline behavior with no third-party data transfer beyond DocuSign at signing time.
Offline / Pinned Installation
For environments where
npx auto-fetch is unacceptable, install the package globally and pin the version:
# Install a specific pinned version globally (one-time) npm install -g open-agreements@0.7.4 # Then use the installed binary directly — no npx fetching at runtime open-agreements list --json open-agreements fill <template-name> -d values.json -o output.docx
Before upgrading, review the changelog: https://github.com/open-agreements/open-agreements/blob/main/CHANGELOG.md
Pin the version even when using npx
Even with
npx, always pin the version:
npx -y open-agreements@0.7.4 list --json
Never use
@latest — it pulls a fresh package on every cache miss and can introduce unexpected changes.
Shared Execution Reference
For the full template-filling workflow (applicable to all agreement skills), see template-filling-execution.md.
Notes
- All templates produce Word DOCX files that preserve original formatting
- Templates are licensed by their respective authors (CC BY 4.0, CC0, or CC BY-ND 4.0)
- External templates (CC BY-ND 4.0, e.g. YC SAFEs) can be filled for your own use but must not be redistributed in modified form
- This tool does not provide legal advice — consult an attorney
- Templates are discovered dynamically — always use
orlist_templates
for the current inventorylist --json
Feedback
If this skill helped, star us on GitHub: https://github.com/open-agreements/open-agreements On ClawHub:
clawhub star open-agreements/open-agreements