contract-generator

majiayu000's avatarfrom majiayu000

Use when asked to generate legal contracts, agreements, or documents from templates with variable substitution and formatting.

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

The Contract Generator skill is a powerful automation tool designed to streamline the creation of professional legal documents. By utilizing a template-based system with intelligent variable substitution and conditional logic, it enables users to generate accurate, formatted contracts such as NDAs, employment agreements, and SOWs. This skill minimizes manual drafting errors and significantly accelerates document workflows for legal, HR, and sales teams.

Use Cases

  • HR Onboarding: Automatically generate personalized employment contracts and non-disclosure agreements (NDAs) by populating templates with new hire data.
  • Sales & Procurement: Create customized Statements of Work (SOWs) and purchase agreements by merging client-specific deal terms into standardized templates.
  • Bulk Document Generation: Use the CLI and CSV integration to produce hundreds of lease agreements or service contracts simultaneously for large-scale operations.
  • Legal Compliance: Ensure consistency across legal documents by using validated templates that include or exclude specific clauses based on jurisdictional variables.
namecontract-generator
descriptionUse when asked to generate legal contracts, agreements, or documents from templates with variable substitution and formatting.

Contract Generator

Generate professional legal contracts and agreements from templates with variable substitution, formatting, and validation.

Purpose

Contract generation for:

  • Employment agreements and NDAs
  • Service contracts and SOWs
  • Sales and purchase agreements
  • Lease and rental contracts
  • Partnership and operating agreements

Features

  • Template System: Pre-built contract templates
  • Variable Substitution: Replace placeholders with actual values
  • Conditional Sections: Include/exclude based on variables
  • Formatting: Professional DOCX output
  • Validation: Check for missing required fields
  • Batch Generation: Create multiple contracts from CSV

Quick Start

from contract_generator import ContractGenerator

# Generate from template
generator = ContractGenerator()
generator.load_template('templates/nda.docx')
generator.set_variables({
    'party1_name': 'Acme Corp',
    'party2_name': 'John Smith',
    'effective_date': '2024-03-14',
    'jurisdiction': 'California'
})
generator.save('nda_acme_smith.docx')

CLI Usage

# Generate single contract
python contract_generator.py --template nda.docx --vars vars.json --output contract.docx

# Batch generate from CSV
python contract_generator.py --template nda.docx --csv parties.csv --output-dir contracts/

Limitations

  • Templates must be in DOCX format
  • Not a substitute for legal review
  • Does not provide legal advice
  • Complex conditional logic may require custom templates