Generate Contract
Follow the document-rules skill (${CLAUDE_PLUGIN_ROOT}/skills/document-rules/SKILL.md) and the document-generator skill (${CLAUDE_PLUGIN_ROOT}/skills/document-generator/SKILL.md): the first holds the mandatory rules, the second the generation process. Read both before Step 1.
Generate a professional contract with numbered clauses, party details, and signature blocks.
Arguments
Format: <title> [--format <docx|pdf>] [--type <service|nda|employment>]
- title: Contract title (required)
- --format: Output format -- docx (default, editable) or pdf (final version)
- --type: Contract type for suggested clause structure (optional)
Parse from "$ARGUMENTS".
Process
Plugin directory: Scripts and templates live under
${CLAUDE_PLUGIN_ROOT}(Claude Code substitutes it with the installed plugin path). Use it as is; do not search for the plugin.Check dependencies:
node "${CLAUDE_PLUGIN_ROOT}/scripts/check_deps.js"If
readyis false, show what is missing and ask permission to run the listedinstallCommands. (readycovers Node, the npm modules and the Playwright browser; pandoc and the PDF engines are optional extras listed inmissing.)Gather required data from user:
- Contract number (optional)
- Date
- Party 1: name, address, registration number
- Party 2: name, address, registration number
- Clause content:
- Definitions (key terms)
- Scope of services
- Payment terms (amount, schedule, method)
- Duration and termination conditions
- Confidentiality terms
- Governing law (jurisdiction)
- Optional: IP rights, liability limits, force majeure, dispute resolution
Read template:
cat "${CLAUDE_PLUGIN_ROOT}/templates/contract_template.json"Build JSON input: Structure clauses with numbered format. Each clause can have multiple paragraphs (sub-clauses). Write to
.doc_input.json.Generate document: For DOCX (default):
node "${CLAUDE_PLUGIN_ROOT}/scripts/generate_docx.js" /absolute/path/.doc_input.jsonFor PDF (final version):
node "${CLAUDE_PLUGIN_ROOT}/scripts/generate_pdf.js" /absolute/path/.doc_input.jsonDeliver result: Show file path and size. Remind user this is a template -- recommend legal review before signing.
Example Usage
/document-generator-ops:generate-contract "Service Agreement" --type service
/document-generator-ops:generate-contract "Non-Disclosure Agreement" --type nda
/document-generator-ops:generate-contract "Employment Contract"