Skip to content

/master-agreement-generator

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

From plugin
affaan-m-ecc
257k200 skills68 agents109 commands7 hooks
+1
Install
$ npx -y skills add affaan-m/everything-claude-code --skill master-agreement-generator --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/master-agreement-generator

Context preview

The summary Claude sees to decide when to auto-load this skill.

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

SKILL.md

master-agreement-generator.SKILL.md
name: master-agreement-generator
description: 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.

Master Agreement Generator

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.

When to Use

  • You issue a framework agreement (NDA, referral or sourcing fee,

non-circumvention, master services) to many counterparties with the same terms and a few party-specific fields.

  • Deals are added over time and re-papering each one is the bottleneck.
  • Documents must be reproducible from tracked source, diffable, and free of

hand edits.

  • Signature fields are placed by automation and need a stable page layout.

How It Works

Template

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](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 |

Spec

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": "signer@example.com",
  "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](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.

Role table

`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.

Build

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/master-agreement-generator/scripts/build-agreement.js \
  skills/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 `-

Read more
Ships withaffaan-m-ecc

Your agent can write code, but ECC gives it a coordinated engineering system and toolbox: it plans before it builds, verifies changes with tests, reviews its own work from a fresh context, remembers what matters, and turns repeated wins into reusable skills

Get the whole plugin, auto-invoked

Other skills on affaan-m-ecc.