Generate review drafts of counterparty master agreements from one template plus a JSON spec, with role-selected clauses and a Schedule A workflow limited to the executed agreement's notice authority. Use when you need reproducible drafting and separately reviewed execution preparation.
Ships in yus-operations. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
One master template, one small spec per counterparty, one draft build step. The generator always labels output DRAFT, including documents generated from a completed template. A successful conversion proves artifact generation, not legal completeness, authority to contract, or readiness to send or sign. An executed agreement may permit designated opportunities to be added by notice; that authority must be established before using the Schedule A workflow.
A single markdown template with {{PLACEHOLDER}} fields. Every party-specific
value is a placeholder; everything else is fixed text. A skeleton lives at
references/master-template.example.md.
Replace its generic sentences with your counsel-approved clauses.
Placeholders the reference script fills:
| Placeholder | Source |
|---|---|
{{DATE}} | spec.date, default today |
{{CP_SHORT}} | spec.short |
{{CP_LEGAL}}, {{CP_JURIS}}, {{CP_ADDR}} | spec fields, or a blank line when the counterparty completes them at signing |
{{ROLE_CLAUSE}}, {{FEE_TITLE}}, {{FEE_CLAUSE}} | selected by spec.role from the role table |
{{SCHEDULE_ROWS}} | spec.schedule, or one "no entries at signing" row |
{{SUPPLEMENT_CLAUSE}} | spec.supplement, rendered with a trailing separator or empty |
{{CP_SIGBLOCK}}, {{CP_SIGNER}}, {{CP_TITLE}}, {{CP_EMAIL}} | signature block fields, blanks when unknown |
One JSON file per counterparty:
{
"file": "AcmeSupplier",
"short": "Acme",
"role": "supplier",
"legal": "Acme Compute Ltd",
"juris": "England and Wales company",
"addr": "1 Example Street, London",
"signer": "A. Person",
"title": "Director",
"email": "[email protected]",
"schedule": [["1", "2026-09-01", "Lot A (16 nodes)", "introducer", "12 months", "standard"]],
"supplement": "the Data Processing Addendum dated 2026-09-01"
}
Only file, short, and role are required for a draft. Missing signature fields
render as blank lines for review and completion. See
references/spec.example.json.
file must be a nonempty portable filename, such as AcmeSupplier or
Acme Supplier, without directory components. The builder rejects either path
separator, drive/UNC syntax, control characters, Windows-reserved punctuation
or device names, and trailing dots or spaces. Invalid names are rejected without
sanitizing or renaming them, before creating output or invoking pandoc.
Omit schedule or use [] for the “no entries at signing” placeholder. A supplied
schedule must otherwise be a dense array of six-cell arrays, in this order:
number, date, protected counterparty or lot, role, terms, fee. Each cell must be
a valid Unicode string or finite number; empty strings are allowed for intentional blanks.
Nulls, booleans, objects, nested cell arrays, missing cells and non-finite numbers
are rejected with a row/cell index before any artifact write or pandoc activity.
Unpaired UTF-16 surrogates are also rejected rather than replaced during UTF-8
output; valid supplementary characters, such as emoji, remain supported.
Cells are plain text, not Markdown or HTML. The builder encodes syntax characters so literal pipes, backslashes, backticks and markup stay in their original fields. Each CRLF, bare CR or LF becomes a space; text around line breaks is retained. Other whitespace and literal punctuation are preserved in the rendered cells. The source spec is not modified. An ordinary valid schedule retains its six columns; malformed input is never silently replaced with an empty schedule.
spec.role selects three strings: the standing-arrangement clause, the fee
section title, and the fee clause opener.
| Role | Who pays | Shape of the clause |
|---|---|---|
| buyer | The counterparty pays on transactions with introduced parties | Counterparty appoints us on a non-exclusive basis to source and introduce |
| supplier | The counterparty pays on transactions with introduced parties; where we buy as principal we contract on the schedule terms | Counterparty offers capacity to us and to buyers we introduce |
| mutual | Whoever closes with the other's introduction pays | Each party may introduce; the closing party pays |
Unknown roles are rejected at build time.
Use operator-reviewed templates and specs only. Ordinary template substitutions outside Schedule A are markup-capable, not a sanitizer for untrusted documents. Pandoc can read referenced local or remote resources; this generator does not sandbox the converter's filesystem or network access. Review those references and run conversion in your own appropriately restricted environment. The focused tests use a synthetic converter and do not certify real DOCX layout or isolation.
node skills/operations/master-agreement-generator/scripts/build-agreement.js \
skills/operations/master-agreement-generator/references/master-template.example.md \
specs/AcmeSupplier.json \
out/
The script fills placeholders, renders the schedule table, and writes
out/<file> MASTER.md with a mandatory DRAFT notice. By default (or with
--require-docx) it requires installed pandoc to produce a nonempty regular
.docx artifact. Missing pandoc, failed conversion or missing/empty output
returns exit code 1. Each pandoc probe or conversion is bounded to ten seconds.
Unknown, duplicate or conflicting flags return exit code 2.
Use --markdown-only explicitly for a successful Markdown-only draft. This mode
never probes or invokes pandoc, returns docxSkipped: true from the library,
and provides no DOCX for an e-sign workflow. Library callers must pass
{ markdownOnly: true }; { pandoc: false } alone now fails the DOCX requirement.
The result always reports documentStatus: 'draft'. Existing generated DOCX is
removed when rebuilding its Markdown, and failed conversion leaves no partial
DOCX, so an earlier artifact cannot masquerade as the current output. Keep
both generated files out of version control; the template and specs are source.
There is no execution-copy mode. The example deliberately contains unresolved
bracketed drafting directives; filling {{PLACEHOLDER}} tokens does not complete
those legal provisions. Before preparing an execution document, obtain separate
review of the completed clauses, party details, authorized signer, commercial
terms and exact document version. Preserve the draft and the reviewed execution
copy as distinct records. Even a successful DOCX conversion does not authorize an
upload, send or signature. See the esign-field-placement approval workflow.
Both output destinations must be direct children of the resolved output directory. An existing symlink at either destination, including a dangling link, is rejected before either artifact is written, even when DOCX conversion is disabled. Ordinary regular files can be rebuilt. Use an output directory you control; these checks do not provide isolation against concurrent hostile filesystem changes. Returned artifact paths are absolute.
The template ends the body with an OpenXML page break so the signature block requests a fresh page in a compatible DOCX renderer:
```{=openxml}
<w:p><w:r><w:br w:type="page"/></w:r></w:p>
```
The signature page structure (our block, then the counterparty block, each with By, Name, Title, Email, Date) is consistent, but pagination can change with text, fonts, renderer or format. Inspect the actual reviewed document and its page geometry before placing fields; see the esign-field-placement skill.
Use the executed agreement's actual authority and notice requirements:
Illustrative draft only: use these terms and dates solely when the executed agreement authorizes them and the operator approves this exact recipient notice.
Schedule A notice, 2026-09-02
Agreement: Master Agreement dated 2026-08-14 between Us and Acme
Entry 2: Lot B, 8 nodes, region EU-West
Role: introducer
Terms: 6 month term, start no later than 2026-10-01
Fee: standard
This entry takes effect today unless you object within ten business days
with dated written evidence of a prior relationship with the counterparty.
"schedule": [
["1", "2026-08-20", "Lot A (16 nodes)", "introducer", "12 months", "standard"],
["2", "2026-09-02", "Lot B (8 nodes, EU-West)", "introducer", "6 months", "standard"]
]
Rebuild, diff the draft Markdown, and attach the consolidated draft to the internal record alongside the unchanged executed document and notice evidence.
For drafting, omit legal, juris, addr, signer, title, email from the
spec to render blank lines. A separately reviewed execution workflow must decide
which details may be completed by the counterparty and verify the actual fields;
the generator does not create or approve an e-sign envelope.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
21 skills in this plugin
/automation-audit-opsEvidence-first automation inventory and overlap audit workflow for yus. Use when the user wants to know which jobs, hooks, connectors, MCP servers, or wrappers are live, broken, redundant, or missing before fixing anything./counterparty-channel-disciplinePer-channel strict prompts, mention gating, silent observation, and a communication autonomy policy for agents that sit in shared channels with external counterparties. Use when an agent joins group chats, shared channels, or DMs where outsiders can read every message and you need it to speak only when addressed, never leak internal context, and route risky content to draft-only approval./customer-billing-opsOperate customer billing workflows such as subscriptions, refunds, churn triage, billing-portal recovery, and plan analysis using connected billing tools like Stripe. Use when the user needs to help a customer, inspect subscription state, or manage revenue-impacting billing operations./dashboard-builderBuild monitoring dashboards that answer real operator questions for Grafana, SigNoz, and similar platforms. Use when turning metrics into a working dashboard instead of a vanity board./email-opsEvidence-first mailbox triage, drafting, send verification, and sent-mail-safe follow-up workflow for yus. Use when the user wants to organize email, draft or send through the real mail surface, or prove what landed in Sent./esign-field-placementDeterministic method for placing signature, date, and text fields in a web e-signature composer through a browser automation session, using a fixed signature page, numeric Location panel coordinates instead of drag, and a save-as-draft default. Use when automating envelope preparation for generated agreements and you need repeatable field positions, correct per-recipient ownership, and a hard gate before anything is sent or signed./yus-operations:master-agreement-generatorfrom yus-operations
npx claudepluginhub yusei21/yus --plugin yus-operations3 plugins in one repository ship this exact skill · first indexed Nov 17, 2026