mcpField
C
contract-template

contract-template

github.com/claude-office-skills文档处理5455.1k 次安装39 周前更新
代码仓库

关于 contract-template

contract-template 是一项基于 Accord Project 的技能,可按合同条款生成包含自然语言模板、数据模型和业务逻辑的智能合同模板,适用于需要结构化合同自动执行的场景。

主要功能

  1. 01生成 Accord Project 合同模板
  2. 02编写 TemplateMark 自然语言模板
  3. 03定义 Concerto 数据模型
  4. 04添加 Ergo 业务逻辑
  5. 05使用 Cicero 解析和触发模板

适用场景

  1. 01创建含可变条款的 NDA
  2. 02制作带付款里程碑的服务协议
  3. 03生成租赁或咨询合同模板

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/claude-office-skills/skills --skill contract-template

安装后在 Claude Code 中输入/contract-template确认已加载。

详细介绍

合同模板技能

概览

此技能可使用 Accord Project 创建智能合同模板。Accord Project 是一个开源框架,用于创建具有法律效力且机器可读的合同。创建包含嵌入式逻辑的模板,以自动执行合同。

使用方法

  1. 描述合同类型和条款
  2. 指定变量和逻辑规则
  3. 我将生成 Accord Project 模板

示例提示词:

  • “创建一个包含可变条款的 NDA 模板”
  • “创建一份包含付款里程碑的服务协议”
  • “生成一个租赁协议模板”
  • “设计一份包含终止条款的咨询合同”

领域知识

模板结构
contract-template/
├── package.json           # Metadata
├── grammar/
│   └── template.tem.md    # Natural language template
├── model/
│   └── model.cto          # Data model
├── logic/
│   └── logic.ergo         # Business logic
└── text/
    └── sample.md          # Sample contract
模板语法(TemplateMark)
# Service Agreement

This Agreement is made between [{supplier}] ("Supplier") 
and [{buyer}] ("Buyer").

## Services
The Supplier agrees to provide [{serviceDescription}].

## Payment
The Buyer shall pay [{paymentAmount}] within 
[{paymentDays}] days of invoice.

## Term
This Agreement begins on [{startDate as "MMMM DD, YYYY"}] 
and continues for [{termMonths}] months.

{{#if latePenalty}}
## Late Payment
A penalty of [{penaltyPercent}]% applies to late payments.
{{/if}}
数据模型(Concerto)
namespace org.example.service

import org.accordproject.time.*

asset ServiceAgreement extends Contract {
  o String supplier
  o String buyer
  o String serviceDescription
  o Double paymentAmount
  o Integer paymentDays
  o DateTime startDate
  o Integer termMonths
  o Boolean latePenalty optional
  o Double penaltyPercent optional
}

transaction PaymentRequest {
  o Double amount
  o DateTime dueDate
}

transaction PaymentResponse {
  o Double amount
  o Double penalty
  o DateTime paymentDue
}
业务逻辑(Ergo)
namespace org.example.service

import org.accordproject.time.*

contract ServiceContract over ServiceAgreement {
  
  clause payment(request : PaymentRequest) : PaymentResponse {
    let dueDate = addDuration(request.dueDate, 
                              Duration{ amount: contract.paymentDays, unit: ~org.accordproject.time.TemporalUnit.days });
    
    let penalty = 
      if contract.latePenalty
      then request.amount * contract.penaltyPercent / 100.0
      else 0.0;
    
    return PaymentResponse{
      amount: request.amount,
      penalty: penalty,
      paymentDue: dueDate
    }
  }
}
使用 Cicero CLI
# Install
npm install -g @accordproject/cicero-cli

# Parse contract
cicero parse --template ./contract-template --sample ./text/sample.md

# Execute logic
cicero trigger --template ./contract-template \
  --sample ./text/sample.md \
  --request ./request.json

# Draft new contract
cicero draft --template ./contract-template --data ./data.json

示例:NDA 模板

template.tem.md
# Non-Disclosure Agreement

This Non-Disclosure Agreement ("Agreement") is entered into 
as of [{effectiveDate as "MMMM DD, YYYY"}] by and between:

**Disclosing Party:** [{disclosingParty}]
**Receiving Party:** [{receivingParty}]

## 1. Confidential Information

"Confidential Information" means all non-public information 
disclosed by the Disclosing Party, including but not limited to:
[{confidentialScope}].

## 2. Obligations

The Receiving Party agrees to:
- Maintain confidentiality for [{termYears}] years
- Use information only for [{permittedPurpose}]
- Not disclose to third parties without written consent

## 3. Exclusions

This Agreement does not apply to information that:
{{#if hasExclusions}}
[{exclusions}]
{{else}}
- Is or becomes publicly available
- Was known prior to disclosure
- Is independently developed
{{/if}}

## 4. Return of Materials

Upon termination, the Receiving Party shall return or destroy 
all Confidential Information within [{returnDays}] days.

## 5. Remedies

{{#if monetaryPenalty}}
Breach of this Agreement shall result in liquidated damages 
of [{penaltyAmount}].
{{else}}
The Disclosing Party shall be entitled to seek injunctive relief.
{{/if}}

**SIGNATURES**

Disclosing Party: ____________________
Date: ____________________

Receiving Party: ____________________
Date: ____________________
data.json
{
  "effectiveDate": "2024-01-15",
  "disclosingParty": "Tech Corp",
  "receivingParty": "Consultant LLC",
  "confidentialScope": "trade secrets, customer lists, and technical specifications",
  "termYears": 3,
  "permittedPurpose": "evaluating a potential business relationship",
  "hasExclusions": false,
  "returnDays": 30,
  "monetaryPenalty": true,
  "penaltyAmount": "$50,000"
}

资源

评论

支持 Markdown