Agent skill

Master Agreement Generator

by affaan-m in affaan-m/ECC

Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.

MITAuto-check passedLegal & Compliance

Install Master Agreement Generator

skills CLI
$ npx skills add affaan-m/ECC --skill master-agreement-generator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install affaan-m/ECC master-agreement-generator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/master-agreement-generator .claude/skills/master-agreement-generator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
master-agreement-generator
GitHub stars
277k
Token cost
~2.9k tokens
SKILL.md length
1,354 words
Files
4 (incl. scripts, references)
Skills in repo
683
Repo updated
First seen
Licence
MIT

At a glance

Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.

  • Works in 5 steps: Review opportunity economics and… → Confirm that the proposed entry, role,… → Draft an approved, counterparty-specific… → …
  • Sending the same NDA or referral-fee agreement to many counterparties
  • SKILL.md covers When to Use, How It Works and Examples
  • Runs JavaScript scripts from its folder; calls node

What it does

You keep one markdown master template whose party-specific values are placeholder fields, and write a small JSON spec for each counterparty. The script scripts/build-agreement.js fills in the date, party names, jurisdiction, address and signature block, and picks the role, fee title and fee clause that match the role named in the spec. Only the file name, short name and role are required; anything else that is unknown is left as a blank line for review.

Every output is labeled DRAFT, even when it is built from a finished template, and the skill is explicit that a successful build says nothing about whether the contract is legally complete, whether anyone has authority to sign it, or whether it is ready to go out. A separate Schedule A workflow adds deals to an executed agreement, and it should only be used after you have confirmed that the signed agreement allows additions by notice. The references folder has a skeleton template and a sample spec; the generic sentences in the skeleton are meant to be replaced with clauses your counsel has approved.

When your agent uses it

  • Sending the same NDA or referral-fee agreement to many counterparties
  • Adding deals to a framework agreement over time without re-papering each one
  • Producing contract drafts that can be diffed and rebuilt from tracked source
  • Preparing drafts whose signature fields need a stable page layout

Example prompts

  • “Build a draft master services agreement for Acme Supplier from the spec in ./specs/acme.json.”
  • “Write a new counterparty spec for a referral fee agreement and generate its draft.”
  • “Swap the generic clauses in references/master-template.example.md for the wording from our approved NDA.”

Requirements

  • A master template in markdown with approved clauses
  • One JSON spec per counterparty

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Review opportunity economics and negotiation strategy in an internal
  2. Confirm that the proposed entry, role, terms, fee and effective date fall
  3. Draft an approved, counterparty-specific dated notice for the recipient and
  4. File the exact notice for operator approval before sending; see
  5. Record the authorized delivery evidence, effective date and any objection

What it can do on your machine

Read from SKILL.md and the folder at commit 2d515e4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Master Agreement Generator loads about 2.9k tokens when it runs, and up to ~4.1k if it reads all its reference files. Until then it costs about 78 tokens; SKILL.md has 1,354 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~78
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from affaan-m/ECC at commit 2d515e4, republished under its MIT licence (© affaan-m). 1,354 words, ~2,887 tokens.

Download SKILL.mdSave it as .claude/skills/master-agreement-generator/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
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. Replace its generic sentences with your counsel-approved clauses.

Placeholders the reference script fills:

PlaceholderSource
{{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:

json
{
  "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.

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.

RoleWho paysShape of the clause
buyerThe counterparty pays on transactions with introduced partiesCounterparty appoints us on a non-exclusive basis to source and introduce
supplierThe counterparty pays on transactions with introduced parties; where we buy as principal we contract on the schedule termsCounterparty offers capacity to us and to buyers we introduce
mutualWhoever closes with the other's introduction paysEach 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.

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

Show full SKILL.md (412 more words)Show less
Signature page geometry

The template ends the body with an OpenXML page break so the signature block requests a fresh page in a compatible DOCX renderer:

markdown
```{=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.

Schedule A append workflow

Use the executed agreement's actual authority and notice requirements:

  1. Review opportunity economics and negotiation strategy in an internal negotiation/approval channel. Obtain commitment approval before sending contractual content. A shared counterparty channel is not an internal channel.
  2. Confirm that the proposed entry, role, terms, fee and effective date fall within the agreement's express Schedule A notice authority. Changes to standing terms, or variations outside that authority, require the applicable amendment procedure; a notice cannot create its own exception.
  3. Draft an approved, counterparty-specific dated notice for the recipient and notice channel authorized by the executed agreement. Include useful business content: the protected counterparty or lot, authorized role, commercial terms and applicable fee. Exclude internal margins, negotiation strategy, other parties' economics, system traces, raw errors and internal filing notices.
  4. File the exact notice for operator approval before sending; see operator-approval-loop. Preserve silence in the counterparty channel while approval or participation authority is absent. Approval is distinct from evidence that an authorized sender actually delivered the notice.
  5. Record the authorized delivery evidence, effective date and any objection under the executed agreement's actual requirements. Example periods are not defaults. Keep the executed document immutable; update the tracked schedule record and rebuild a draft consolidated view for internal review, with a reference to the executed version and approved notice. This rebuild does not replace the signed agreement or prove legal effect.

Examples

Notice text

Illustrative draft only: use these terms and dates solely when the executed agreement authorizes them and the operator approves this exact recipient notice.

text
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.
Adding the entry to the spec
json
"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.

Counterparty fills its own details at signing

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.

© affaan-m, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in skills/master-agreement-generator of affaan-m/ECC.

  • SKILL.md
  • references/master-template.example.md
  • references/spec.example.json
  • scripts/build-agreement.js

Open the folder on GitHubat commit 2d515e4

Compare with similar skills

Master Agreement Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Master Agreement Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Master Agreement Generator this skillaffaan-m/ECC277k—~2.9kAutomated safety check: PassMIT
Legal Document Producerrohasnagpal/legal-ai-skills180—~1.4kAutomated safety check: PassMIT
Pii Contract Analyzegregmos/PII-Shield150—~8.9kAutomated safety check: NotesMIT
Privacy Eukimlawtech/korean-privacy-terms587—~968Automated safety check: PassApache-2.0
Agents In The Teamborghei/Claude-Skills891—~4.2kAutomated safety check: PassMIT
Terms Of Service Generatorzubair-trabzada/ai-legal-claude1.8k—~2.9kAutomated safety check: PassNone

Similar skills

  • Legal Document Producer

    rohasnagpal/legal-ai-skills

    Produces polished legal deliverables from completed or supplied content by applying an authorised template, styles, numbering, headers, footers, signature blocks, schedules and exhibits; creates or…

    180 GitHub stars~1.4k tokensUpdated today
    Legal & ComplianceAuto-check passed
  • Pii Contract Analyze

    gregmos/PII-Shield

    Universal legal document processor with PII anonymization. An agent skill from gregmos/PII-Shield.

    150 GitHub stars~8.9k tokensUpdated 3 mo ago
    Legal & ComplianceAuto-check: notes
  • Privacy Eu

    kimlawtech/korean-privacy-terms

    EU 사용자 대상 서비스용 Privacy Notice·Terms of Service·Consent Modal·Cookie Banner 자동 생성.

    587 GitHub stars~968 tokensUpdated 1 mo ago
    Legal & ComplianceAuto-check passed
  • Agents In The Team

    borghei/Claude-Skills

    Run delivery when AI coding and ops agents take tickets. An agent skill from borghei/Claude-Skills.

    891 GitHub stars~4.2k tokensUpdated 4 days ago
    Legal & ComplianceAuto-check passed
  • Terms Of Service Generator

    zubair-trabzada/ai-legal-claude

    Generates complete, GDPR/CCPA-compliant Terms of Service for a website or SaaS product, with plain English summaries for each section

    1.8k GitHub stars~2.9k tokensUpdated 6 mo ago
    Legal & ComplianceAuto-check passed
  • Tos Clause Scanner

    zebbern/claude-code-guide

    Audit Terms of Service, user agreements, and privacy policies for consumer risks, producing a structured report that flags unfair clauses, data traps, and liability issues.

    4.7k GitHub starsUsed in 1 repo~3.3k tokens
    Legal & ComplianceAuto-check passed

More from affaan-m/ECC

All 682 skills in this repo
  • Skill Stocktake

    affaan-m/ECC

    Audits your installed Claude skills and commands for quality, with a quick mode for recently changed skills and a full mode that evaluates all of them through subagents.

    277k GitHub starsUsed in 5 repos~3.1k tokens
    Auto-check passed
  • Ingests, indexes, searches, edits and monitors video, audio and live streams through the VideoDB Python SDK, returning stream links, clips and timestamps.

    277k GitHub starsUsed in 3 repos~3.5k tokens
    Auto-check: notes
  • Docs Governance

    affaan-m/ECC

    Route broad documentation-governance requests to existing ECC skills and run an opt-in, read-only audit of mapped documentation roles, links, ADR indexes, and evidence references.

    277k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Rules Distillation

    affaan-m/ECC

    Scans installed skills for principles that recur across them and proposes rule-file changes: append, revise, add a section, create a file or leave as covered.

    277k GitHub starsUsed in 2 repos~2.3k tokens
    Auto-check passed
  • Set an ECC-specific frontend design direction for production UI work.

    277k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Measures whether agents actually follow a skill, rule or agent definition by generating scenarios at three strictness levels and scoring tool-call traces.

    277k GitHub starsUsed in 1 repo~623 tokens
    Auto-check passed

Questions about Master Agreement Generator

What does Master Agreement Generator do?

Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role. You keep one markdown master template whose party-specific values are placeholder fields, and write a small JSON spec for each counterparty.js fills in the date, party names, jurisdiction, address and signature block, and picks the role, fee title and fee clause that match the role named in the spec.

When should I use Master Agreement Generator?

Master Agreement Generator fits situations like: sending the same NDA or referral-fee agreement to many counterparties; adding deals to a framework agreement over time without re-papering each one; producing contract drafts that can be diffed and rebuilt from tracked source; preparing drafts whose signature fields need a stable page layout.

How do I install Master Agreement Generator in Claude Code?

Run `npx skills add affaan-m/ECC --skill master-agreement-generator -a claude-code`. Or copy the skill folder (skills/master-agreement-generator in affaan-m/ECC) into .claude/skills/master-agreement-generator in your project. Claude Code loads it when a task matches its description.

How do I install Master Agreement Generator in Codex?

Run `npx skills add affaan-m/ECC --skill master-agreement-generator -a codex`. Or copy the skill folder (skills/master-agreement-generator in affaan-m/ECC) into .agents/skills/master-agreement-generator in your project. Codex loads it when a task matches its description.

Can I use Master Agreement Generator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add affaan-m/ECC --skill master-agreement-generator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/master-agreement-generator, .gemini/skills/master-agreement-generator, .github/skills/master-agreement-generator and .opencode/skills/master-agreement-generator in your project.

What does Master Agreement Generator need to run?

Going by SKILL.md and its folder, Master Agreement Generator needs JavaScript for the scripts in its folder and the command-line tools its instructions call (node). Our summary lists: A master template in markdown with approved clauses; One JSON spec per counterparty.

Does Master Agreement Generator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Master Agreement Generator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Master Agreement Generator use?

Master Agreement Generator is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Master Agreement Generator use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.2k tokens, read only when the agent opens those files.

What are the alternatives to Master Agreement Generator?

Skills that share tags, products or a category with Master Agreement Generator: Legal Document Producer (rohasnagpal/legal-ai-skills, 180 stars), Pii Contract Analyze (gregmos/PII-Shield, 150 stars), Privacy Eu (kimlawtech/korean-privacy-terms, 587 stars) and Agents In The Team (borghei/Claude-Skills, 891 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Master Agreement Generator?

affaan-m (a GitHub user) maintains it in affaan-m/ECC, which has 276,673 GitHub stars. The repository holds 683 skills in this directory. The repository was last updated on October 11, 2026.

Source: affaan-m/ECC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.