Communitygithub.com

主協議產生器

根據一個模板和一個 JSON 規格檔案,產生交易對手主協議的審閱草稿,包含依角色選取的條款和僅限已簽署協議的 Schedule A 工作流程。

主協議產生器 是什麼?

此「主協議產生器」技能可讓您從單一 Markdown 模板和按交易對手提供的 JSON 規格,自動產生標準框架協議(如保密協議、轉介費協議、主服務協議等)的草稿。它支援根據交易對手的角色(買方、供應商、雙方)動態選取條款,並能處理 Schedule A(附錄 A)的新增條目工作流程。所有輸出檔案均強制標示為「草稿」,不會取代已簽署的協議。此技能主要用於 Claude Code 等基於終端機的 AI 代理,但也可作為程式庫使用。它依賴 Pandoc 進行 DOCX 轉換,並包含多項安全檢查,例如驗證檔名、驗證規格中的嵌入式陣列,以及在寫入任何檔案前檢查符號連結。其運作原理是讀取透過預留位置區塊配置的模板,並從 JSON 檔案填入交易對手特定資料,最終產生可檢視差異的 Markdown 檔案,以及(可選的)DOCX 檔案。此工具需要經過人為審查的模板和規格,特別是在 Schedule A 工作流程中,必須先確認已簽署協議中明載的通知授權,才能執行。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/master-agreement-generator

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

主協議產生器 是做什麼的?

一個主模板、每個交易對手一份小型規格、一個草稿建置步驟。 產生器始終將輸出標示為草稿,包括從已完成的模板產生的文件。成功的轉換僅證明文件產生的技術可行性,不具法律完整性、簽約授權,也不代表可直接寄送或簽署。已簽署的協議可能允許透過通知指定特定機會;在使用 Schedule A 工作流程之前,必須先確認此授權已確立。

使用時機

  • 您需要向許多交易對手發行一份框架協議(如保密協議、轉介或尋源費用協議、非規避協議、主服務協議),且條款相同,僅少數幾個交易對手特定欄位不同。
  • 交易會隨著時間推移而增加,而對每筆交易重新起草文件已成為瓶頸。
  • 文件必須可從有版本控制的原始檔重現、可進行差異比對,且不受手動編輯影響。
  • 簽名欄位由自動化工具放置,需要穩定的頁面佈局。

運作方式

模板

一個使用 {{PLACEHOLDER}} 欄位的單一 Markdown 模板。每個交易對手特定的值都是一個預留位置;其餘皆為固定文字。範例骨架位於 references/master-template.example.md。將其通用句子替換為經您法律顧問核准的條款。

參考腳本會填入的預留位置:

預留位置來源
{{DATE}}spec.date,預設為今天
{{CP_SHORT}}spec.short
{{CP_LEGAL}}、{{CP_JURIS}}、{{CP_ADDR}}規格欄位,若交易對手在簽署時填寫,則為空白行
{{ROLE_CLAUSE}}、{{FEE_TITLE}}、{{FEE_CLAUSE}}根據 spec.role 從角色表格選取
{{SCHEDULE_ROWS}}spec.schedule,或一行「簽署時無條目」
{{SUPPLEMENT_CLAUSE}}spec.supplement,呈現時加上結尾分隔符號,或留空
{{CP_SIGBLOCK}}、{{CP_SIGNER}}、{{CP_TITLE}}、{{CP_EMAIL}}簽名區塊欄位,未知時留空

規格

每個交易對手一個 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": "[email protected]",
  "schedule": [["1", "2026-09-01", "Lot A (16 nodes)", "introducer", "12 months", "standard"]],
  "supplement": "the Data Processing Addendum dated 2026-09-01"
}

草稿僅需要 file、short 和 role。遺漏的簽名欄位在進行審閱和補全時會呈現為空白行。請參閱 references/spec.example.json。

file 必須是非空的、可移植的檔名,例如 AcmeSupplier 或 Acme Supplier,且不得包含目錄元件。建置工具會拒絕任何包含路徑分隔符號、磁碟機代號或 UNC 語法、控制字元、Windows 保留標點符號或裝置名稱,以及結尾的點號或空格的檔名。無效的檔名會在建置工具建立輸出或呼叫 pandoc 之前被拒絕,不會進行清理或重新命名。

省略 schedule 或使用 [] 來表示「簽署時無條目」的預留位置。提供的 schedule 必須是一個由六個元素組成的陣列(元素本身也是陣列),順序為:編號、日期、受保護的交易對手或批次、角色、條款、費用。每個元素必須是有效的 Unicode 字串或有限數字;允許使用空字串表示故意留空。Null、布林值、物件、巢狀元素陣列、遺漏的元素以及非有限數字都會在寫入任何產出檔案或呼叫 pandoc 之前,連同行/列索引一併被拒絕。不成對的 UTF-16 代理字元也會被拒絕,而不會在 UTF-8 輸出中被替換;有效的補充字元(例如表情符號)仍受支援。

儲存格為純文字,而非 Markdown 或 HTML。建置工具會對語法字元進行編碼,以使文字中的垂直線 (|)、反斜線 (\)、反引號 (`) 和標記原始保持在各自的欄位中。每個 CRLF、獨立的 CR 或 LF 都會被轉換為空格;換行符號前後的文字會被保留。其他空白字元和字面標點符號在呈現的儲存格中會被保留。原始規格檔案不會被修改。一個普通的有效 schedule 會保留其六個欄位;格式錯誤的輸入絕不會被悄悄替換為空的 schedule。

角色表格

spec.role 會選取三個字串:長期安排條款、費用章節標題,以及費用條款開場白。

角色誰付費條款的樣式
buyer(買方)交易對手就與被引介方進行的交易付費交易對手以非獨家方式委任我們尋找並引介
supplier(供應方)交易對手就與被引介方進行的交易付費;當我們以當事人身分購買時,我們依 schedule 條款簽約交易對手向我們以及我們引介的買方提供服務或產能
mutual(雙方)與對方引介對象達成交易的一方付費任一方均可引介;達成交易的一方付費

未知角色在建置階段會被拒絕。

建置

僅使用經操作員審查過的模板和規格。Schedule A 以外的普通模板替換具備標記能力,並非不受信任文件的清理工具。Pandoc 可以讀取參考的本機或遠端資源;此產生器不會對轉換器的檔案系統或網路存取進行沙箱隔離。請審查這些參考資源,並在您自己適當限制的環境中執行轉換。焦點測試使用合成轉換器,不保證真實的 DOCX 版面或隔離性。

node skills/master-agreement-generator/scripts/build-agreement.js \
  skills/master-agreement-generator/references/master-template.example.md \
  specs/AcmeSupplier.json \
  out/

該腳本會填入預留位置、呈現 schedule 表格,並寫入 out/<file> MASTER.md,其中包含強制性的草稿聲明。預設情況下(或使用 --require-docx 時),它需要已安裝的 pandoc 來產生非空的常規 .docx 產出檔案。缺少 pandoc、轉換失敗或產出檔案遺失/空白時,會回傳結束代碼 1。每次 pandoc 探測或轉換都有十秒鐘的時間限制。未知、重複或衝突的旗標會回傳結束代碼 2。

明確使用 --markdown-only 以僅成功產生 Markdown 草稿。此模式絕不會探測或呼叫 pandoc,會從程式庫回傳 docxSkipped: true,並且不提供用於電子簽名工作流程的 DOCX 檔案。程式庫呼叫者必須傳遞 { markdownOnly: true };單獨使用 { pandoc: false } 現在會導致 DOCX 要求失敗。結果總是回報 documentStatus: 'draft'。在重新建置其 Markdown 檔案時,現有的已產生 DOCX 檔案會被移除,且失敗的轉換不會留下部分 DOCX 檔案,因此先前的產出檔案無法冒充為當前輸出。將這兩個產出檔案保留在版本控制之外;模板和規格才是原始檔。

沒有執行副本模式。範例刻意包含未解決的、用括號包圍的起草指示;填寫 {{PLACEHOLDER}} 代號並不會完成這些法律條款。在準備執行文件之前,請對已完成的條款、當事人詳細資訊、授權簽署人、商業條款和確切的文件版本進行單獨審查。將草稿和經過審查的執行副本作為不同的記錄保存。即使 DOCX 轉換成功,也不代表授權上傳、寄送或簽署。請參閱電子簽名欄位放置核准工作流程。

兩個輸出目的地都必須是解析後輸出目錄的直接子項目。在任一個目的地存在符號連結(包括懸空連結)時,即使 DOCX 轉換已停用,也會在寫入任何產出檔案之前被拒絕。普通的常規檔案可以重新建置。使用您控制的輸出目錄;這些檢查無法提供針對併發的惡意檔案系統變更的隔離。回傳的產出檔案路徑是絕對路徑。

簽名頁面幾何

模板以 OpenXML 分頁符號結束主體,以使簽名區塊在相容的 DOCX 渲染器中要求一個新頁面:

```{=openxml}
<w:p><w:r><w:br w:type="page"/></w:r></w:p>
```

簽名頁面結構(我們的區塊,然後是交易對手的區塊,每個區塊包含 By、Name、Title、Email、Date)是一致的,但分頁會因文字、字型、渲染器或格式而改變。在放置欄位之前,請檢查實際審閱過的文件及其頁面幾何形狀;請參閱電子簽名欄位放置技能。

Schedule A 新增條目工作流程

使用已簽署協議的實際授權和通知要求:

  1. 在內部談判/核准管道中審查機會的經濟效益和談判策略。在發送合約內容之前取得承諾核准。與交易對手共用的管道不是內部管道。
  2. 確認提議的條目、角色、條款、費用和生效日期屬於協議中明確的 Schedule A 通知授權範圍。對標準條款的更改,或超出該授權範圍的變更,需要適用的修訂程序;通知不能自行建立例外。
  3. 為已簽署協議授權的接收者和通知管道起草一份經核准的、針對特定交易對手並標明日期的通知。包含有用的業務內容:受保護的交易對手或批次、授權角色、商業條款和適用的費用。排除內部利潤率、談判策略、其他當事方的經濟效益、系統追蹤、原始錯誤和內部歸檔通知。
  4. 在發送之前,將確切的通知歸檔以供操作員核准;請參閱 operator-approval-loop。在獲得核准或參與授權之前,在與交易對手的管道中保持緘默。核准與授權寄件人實際送達通知的證據是兩回事。
  5. 根據已簽署協議的實際要求,記錄授權送達的證據、生效日期以及任何異議。範例期限並非預設值。保持已執行文件不可變更;更新受追蹤的 schedule 記錄,並為內部審查重建一個統整草稿檢視,並引用已執行版本和核准的通知。此重建不會取代已簽署的協議或證明其法律效力。

範例

通知文字

僅供說明用的草稿:僅在已簽署協議授權且操作員核准此特定接收者通知時,才使用這些條款和日期。

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

重新建置、比對草稿 Markdown 的差異,並將統整草稿附加到內部記錄中,同時保留未經變更的已執行文件和通知證據。

交易對手在簽署時自行填寫詳細資料

在起草時,從規格中省略 legal、juris、addr、signer、title、email 欄位,以呈現空白行。一個單獨審查的執行工作流程必須決定哪些詳細資料可以由交易對手填寫,並驗證實際欄位;此產生器不會建立或核准電子簽名信封。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

相關技能