Contract Drafter について
Contract Drafterは、テンプレートから契約書や合意書を作成するスキルで、一般的な法務文書を一貫して作成するチーム向けです。変数置換、条件条項、完全性チェックに対応しますが、法的助言は行わず、弁護士による確認が必要です。
主な機能
- 01テンプレートから契約書を作成
- 02変数置換と条件条項の処理
- 03NDAとサービス契約の作成
- 04再利用可能な条項ライブラリの管理
- 05必須項目と未置換プレースホルダーの確認
活用シーン
- 01二者間のNDAを作成する
- 02サービス内容と支払条件に基づく契約を作成する
- 03カスタムテンプレートから契約書を一括作成する
- 04作成後に契約項目と署名欄を確認する
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ jmsktm/ claude-settings --skill contract-drafterインストール後、Claude Code で/contract-drafterを入力して読み込まれたか確認します。
詳細
契約書作成
契約書作成スキルは、テンプレートから法的契約書や合意書を自動生成します。変数の置換、条件付き条項、署名欄、文書の書式設定に対応しています。このスキルは、秘密保持契約、サービス契約、雇用契約、その他の法的文書を、一貫性と効率性を保って作成するために不可欠です。
重要な免責事項: このスキルはテンプレートから文書を生成するものであり、法的助言を提供するものではありません。生成された契約書は、使用前に必ず資格を有する弁護士の確認を受けてください。このスキルは文書作成を効率化するためのものであり、法律専門家の助言に代わるものではありません。
主なワークフロー
ワークフロー 1:標準テンプレートから生成
目的: 変数を置換し、事前定義されたテンプレートから契約書を作成します
手順:
- 契約書の種類を選択します(秘密保持契約、サービス契約など)
- プレースホルダーを含むテンプレートを読み込みます
- 必要な情報(当事者、日付、条件)を収集します
- 必須項目がすべて入力されていることを検証します
- テンプレート内の変数を置換します
- パラメーターに基づいて条件付き条項を処理します
- 最終文書(PDF または DOCX)を生成します
- 署名欄と締結に関する詳細を追加します
実装:
const Docxtemplater = require('docxtemplater');
const PizZip = require('pizzip');
const fs = require('fs');
function generateContract(templatePath, contractData, outputPath) {
// Load template
const content = fs.readFileSync(templatePath, 'binary');
const zip = new PizZip(content);
const doc = new Docxtemplater(zip, {
paragraphLoop: true,
linebreaks: true
});
// Prepare data with defaults and calculations
const data = {
// Party information
party1Name: contractData.party1.name,
party1Address: contractData.party1.address,
party1Email: contractData.party1.email,
party2Name: contractData.party2.name,
party2Address: contractData.party2.address,
party2Email: contractData.party2.email,
// Contract details
effectiveDate: contractData.effectiveDate,
expirationDate: contractData.expirationDate,
term: contractData.term || 'one (1) year',
// Financial terms (if applicable)
paymentAmount: contractData.paymentAmount,
paymentSchedule: contractData.paymentSchedule,
currency: contractData.currency || 'USD',
// Specific terms
scope: contractData.scope,
deliverables: contractData.deliverables,
// Conditional clauses
includeNonCompete: contractData.includeNonCompete || false,
nonCompetePeriod: contractData.nonCompetePeriod || '12 months',
nonCompeteRadius: contractData.nonCompeteRadius || '50 miles',
includeConfidentiality: contractData.includeConfidentiality !== false,
confidentialityPeriod: contractData.confidentialityPeriod || '5 years',
// Governing law
governingState: contractData.governingState || 'Delaware',
governingCountry: contractData.governingCountry || 'United States',
// Dates
currentDate: new Date().toLocaleDateString(),
currentYear: new Date().getFullYear()
};
// Render template
doc.setData(data);
doc.render();
// Save output
const buf = doc.getZip().generate({
type: 'nodebuffer',
compression: 'DEFLATE'
});
fs.writeFileSync(outputPath, buf);
return {
outputPath,
contractType: contractData.contractType,
parties: [data.party1Name, data.party2Name],
effectiveDate: data.effectiveDate
};
}
ワークフロー 2:秘密保持契約ジェネレーター
目的: 標準条件または独自条件で秘密保持契約を作成します
手順:
- 秘密保持契約の種類を特定します(相互または一方向)
- 当事者の情報を収集します
- 秘密情報の範囲を定義します
- 開示期間と契約期間を設定します
- 秘密保持の対象外となる情報を指定します
- 救済措置と管轄に関する条項を追加します
- 署名ページを生成します
- 最終版の秘密保持契約書を作成します
実装:
function generateNDA(ndaData, outputPath) {
const templatePath = ndaData.type === 'mutual'
? './templates/mutual-nda.docx'
: './templates/one-way-nda.docx';
const contractData = {
contractType: 'Non-Disclosure Agreement',
// Parties
party1: ndaData.disclosingParty,
party2: ndaData.receivingParty,
// NDA-specific terms
effectiveDate: ndaData.effectiveDate || new Date().toISOString().split('T')[0],
confidentialityPeriod: ndaData.confidentialityPeriod || '3 years',
// Purpose of disclosure
purpose: ndaData.purpose || 'evaluation of a potential business relationship',
// Scope definition
confidentialDefinition: ndaData.confidentialDefinition || `any non-public information disclosed by the Disclosing Party to the Receiving Party, whether orally, in writing, or in any other form`,
// Exclusions
exclusions: [
'Information that is publicly available through no breach of this Agreement',
'Information rightfully received from a third party without breach of any confidentiality obligation',
'Information independently developed without use of Confidential Information',
'Information required to be disclosed by law or court order'
],
// Return of materials clause
includeReturnClause: ndaData.includeReturnClause !== false,
returnPeriod: ndaData.returnPeriod || '30 days',
// Governing law
governingState: ndaData.governingState,
arbitration: ndaData.arbitration || false
};
return generateContract(templatePath, contractData, outputPath);
}
// Example usage:
const nda = generateNDA({
type: 'mutual',
disclosingParty: {
name: 'Acme Corp',
address: '123 Business St, City, State 12345',
email: '[email protected]'
},
receivingParty: {
name: 'Widget LLC',
address: '456 Commerce Ave, City, State 67890',
email: '[email protected]'
},
purpose: 'evaluation of potential partnership for joint product development',
confidentialityPeriod: '5 years',
governingState: 'California'
}, './output/nda-acme-widget.docx');
ワークフロー 3:サービス契約ジェネレーター
目的: 業務範囲、成果物、支払条件を含むサービス契約を作成します
手順:
- サービス提供者とクライアントの情報を定義します
- サービスの業務範囲を詳しく指定します
- 成果物とスケジュールを列挙します
- 支払条件(定額、時間制、マイルストーンベース)を設定します
- 知的財産権の帰属を定義します
- 契約解除条項を追加します
- 責任制限を含めます
- すべての条件を含む契約書を生成します
実装:
function generateServiceAgreement(serviceData, outputPath) {
const contractData = {
contractType: 'Service Agreement',
party1: serviceData.serviceProvider,
party2: serviceData.client,
effectiveDate: serviceData.effectiveDate,
term: serviceData.term || 'ongoing until completion',
// Scope of services
scope: serviceData.services.map(s => s.description).join('\n'),
deliverables: serviceData.deliverables,
// Payment terms
paymentStructure: serviceData.paymentStructure, // 'fixed', 'hourly', 'milestone'
totalAmount: serviceData.totalAmount,
hourlyRate: serviceData.hourlyRate,
milestones: serviceData.milestones || [],
paymentSchedule: serviceData.paymentSchedule,
paymentTerms: serviceData.paymentTerms || 'Net 30',
// Intellectual property
ipOwnership: serviceData.ipOwnership || 'client', // 'client', 'provider', 'shared'
includeWorkForHire: serviceData.includeWorkForHire !== false,
// Termination
terminationNotice: serviceData.terminationNotice || '30 days',
includeTerminationForConvenience: serviceData.includeTerminationForConvenience !== false,
// Liability
liabilityLimit: serviceData.liabilityLimit || 'total amount paid under this Agreement',
includeIndemnification: serviceData.includeIndemnification !== false,
// Confidentiality
includeConfidentiality: true,
confidentialityPeriod: '3 years',
governingState: serviceData.governingState
};
return generateContract('./templates/service-agreement.docx', contractData, outputPath);
}
ワークフロー 4:条項ライブラリの管理
目的: さまざまな状況で再利用できる契約条項を管理します
手順:
- カテゴリ別に条項ライブラリを定義します
- 変数を含む標準条項を保存します
- さまざまな状況に応じた条項のバリエーションを作成します
- 管轄区域と種類で条項にタグを付けます
- 契約書の生成時に条項を選択できるようにします
- 独自の条項の挿入に対応します
- 条項のバージョン履歴を維持します
実装:
const clauseLibrary = {
confidentiality: {
standard: `The Receiving Party shall hold in strict confidence and not disclose to any third parties any Confidential Information disclosed by the Disclosing Party, except as approved in writing by the Disclosing Party.`,
withExceptions: `The Receiving Party shall hold in strict confidence and not disclose to any third parties any Confidential Information disclosed by the Disclosing Party, except: (a) to its employees, contractors, and advisors who have a legitimate need to know and are bound by confidentiality obligations; or (b) as required by law.`,
mutual: `Each Party agrees to hold the other Party's Confidential Information in strict confidence and to use such information solely for the purposes of {purpose}.`
},
termination: {
forConvenience: `Either Party may terminate this Agreement at any time, with or without cause, upon {terminationNotice} written notice to the other Party.`,
forCause: `Either Party may terminate this Agreement immediately upon written notice if the other Party materially breaches this Agreement and fails to cure such breach within {cureperiod} days after receiving written notice thereof.`,
combined: `Either Party may terminate this Agreement: (a) for convenience upon {terminationNotice} written notice; or (b) immediately for cause if the other Party materially breaches this Agreement and fails to cure within {curePeriod} days.`
},
liability: {
limitation: `IN NO EVENT SHALL EITHER PARTY'S LIABILITY UNDER THIS AGREEMENT EXCEED {liabilityLimit}.`,
exclusion: `NEITHER PARTY SHALL BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS, LOSS OF DATA, OR BUSINESS INTERRUPTION.`,
combined: `IN NO EVENT SHALL EITHER PARTY'S LIABILITY EXCEED {liabilityLimit}. NEITHER PARTY SHALL BE LIABLE FOR INDIRECT, INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES.`
},
payment: {
net30: `Client shall pay all undisputed invoices within thirty (30) days of the invoice date.`,
upfront: `Client shall pay {percentage}% of the total fees upon execution of this Agreement, with the remainder due upon {milestone}.`,
milestone: `Payments shall be made according to the following milestones:\n{milestoneList}`
}
};
function insertClause(clauseCategory, clauseType, variables = {}) {
let clause = clauseLibrary[clauseCategory][clauseType];
// Replace variables
Object.keys(variables).forEach(key => {
const regex = new RegExp(`{${key}}`, 'g');
clause = clause.replace(regex, variables[key]);
});
return clause;
}
ワークフロー 5:契約書レビュー用チェックリスト
目的: 必須要素のチェックリストに照らして、生成された契約書を検証します
手順:
- 契約書の種類に応じたチェックリストを定義します
- 生成された契約書を解析します
- 必須セクションの有無を確認します
- 当事者情報に不足がないか検証します
- 日付に矛盾がないことを確認します(発効日が終了日より前であること)
- 署名欄があることを確認します
- 置換されていないプレースホルダーテキストがないか確認します
- レビューレポートを生成します
実装:
function reviewContract(contractPath, contractType) {
const content = fs.readFileSync(contractPath, 'utf8');
const checklist = {
nda: [
{ item: 'Party names and addresses', required: true },
{ item: 'Effective date', required: true },
{ item: 'Definition of confidential information', required: true },
{ item: 'Obligations of receiving party', required: true },
{ item: 'Exclusions from confidentiality', required: true },
{ item: 'Term/duration of confidentiality', required: true },
{ item: 'Return of materials clause', required: false },
{ item: 'Governing law and jurisdiction', required: true },
{ item: 'Signature blocks', required: true }
],
serviceAgreement: [
{ item: 'Party names and addresses', required: true },
{ item: 'Scope of services', required: true },
{ item: 'Deliverables', required: true },
{ item: 'Payment terms and amounts', required: true },
{ item: 'Timeline/term', required: true },
{ item: 'Intellectual property ownership', required: true },
{ item: 'Termination provisions', required: true },
{ item: 'Limitation of liability', required: true },
{ item: 'Governing law', required: true },
{ item: 'Signature blocks', required: true }
]
};
const items = checklist[contractType] || checklist.nda;
const results = [];
items.forEach(checkItem => {
// Simple text search (in production, use more sophisticated parsing)
const found = content.toLowerCase().includes(checkItem.item.toLowerCase());
results.push({
item: checkItem.item,
required: checkItem.required,
present: found,
status: found ? 'PASS' : (checkItem.required ? 'FAIL' : 'WARN')
});
});
// Check for unreplaced placeholders
const placeholders = content.match(/\{[^}]+\}/g) || [];
return {
contractType,
checklistResults: results,
passedRequired: results.filter(r => r.required).every(r => r.present),
unreplacedPlaceholders: placeholders,
review: {
passed: results.filter(r => r.status === 'PASS').length,
failed: results.filter(r => r.status === 'FAIL').length,
warnings: results.filter(r => r.status === 'WARN').length
}
};
}
クイックリファレンス
| 操作 | コマンド/トリガー |
|---|---|
| 契約書を生成 | 「[当事者]向けの[契約書の種類]を作成」 |
| 秘密保持契約 | 「[party1]と[party2]の間の秘密保持契約を生成」 |
| サービス契約 | 「サービス契約を作成」 |
| 条項を追加 | 「[条項の種類]条項を挿入」 |
| 契約書をレビュー | 「契約書の完全性を確認」 |
| カスタムテンプレート | 「カスタム契約書テンプレートを使用」 |
| 一括生成 | 「[リスト]の契約書を作成」 |
ベストプラクティス
- 法務レビュー: 使用前に必ず弁護士に契約書を確認してもらってください
- バージョン管理: テンプレートのバージョンと変更内容を記録してください
- 管轄区域への対応: 契約を規律する管轄区域に適したテンプレートを使用してください
- 平易な表現: 可能な限り、明確で理解しやすい表現を使用してください
- 定義: 契約書内のすべての重要用語を明確に定義してください
- 完全性: 最終確定の前に、必要なすべてのセクションが含まれていることを確認してください
- 変数: 最終文書を生成する前に、すべての変数が置き換えられていることを検証してください
- 書式: 専門的な外観を保つため、書式を統一してください
- 署名: 日付と役職の欄を含む適切な署名欄を設けてください
- バックアップ: 生成したすべての契約書を安全に保管してください
- 監査証跡: 契約書をいつ、どのように生成したかの記録を維持してください
- 個別レビュー: 契約書ごとに、個別の事情を踏まえてレビューしてください
よくあるパターン
雇用契約書:
const employmentData = {
contractType: 'Employment Agreement',
employer: { name: 'Acme Corp', address: '...' },
employee: { name: 'John Doe', address: '...' },
position: 'Senior Developer',
startDate: '2025-02-01',
salary: 120000,
benefits: ['Health insurance', '401k matching', 'PTO'],
probationPeriod: '90 days',
includeNonCompete: true,
nonCompetePeriod: '12 months'
};
コンサルティング契約書:
const consultingData = {
serviceProvider: { name: 'Jane Smith Consulting', ... },
client: { name: 'Widget Inc', ... },
services: [
{ description: 'Strategic planning consultation', hours: 20 },
{ description: 'Market analysis', hours: 40 }
],
paymentStructure: 'hourly',
hourlyRate: 250,
term: '3 months',
ipOwnership: 'client'
};
依存関係
必要なパッケージをインストールします:
npm install docxtemplater pizzip
npm install pdf-lib # For PDF manipulation
npm install handlebars # Alternative templating
エラー処理
- 必須項目の不足: 生成前に必要なデータがすべて揃っていることを検証してください
- 無効な日付: 発効日が有効期限より前であることを確認してください
- テンプレートが見つからない: 処理前にテンプレートファイルが存在することを確認してください
- 変数の不一致: すべてのテンプレート変数にデータが設定されていることを確認してください
- ファイルのアクセス権限: 読み取り/書き込みエラーを適切に処理してください
- 法令遵守: 法務レビューが必要である旨の免責事項を含めてください
高度な機能
電子署名の統合:
const docusign = require('docusign-esign');
async function sendForSignature(contractPath, signers) {
// DocuSign or other e-signature integration
// Send contract for electronic signature
}
契約書のバージョン管理:
const contractVersion = {
version: '1.2',
templateId: 'service-agreement-v1.2',
changes: 'Updated liability clause per legal review',
approvedBy: 'Legal Team',
approvedDate: '2025-01-01'
};
複数の管轄区域への対応:
const jurisdictionClauses = {
california: {
governingLaw: 'This Agreement shall be governed by the laws of the State of California.',
arbitration: 'Mandatory arbitration under California law'
},
newYork: {
governingLaw: 'This Agreement shall be governed by the laws of the State of New York.',
arbitration: 'JAMS arbitration in New York County'
}
};
コメント
Markdown 対応