# Generate Contract

> Generate a contract or agreement (DOCX/PDF) Arguments: <title> [--format <docx|pdf>] [--type <service|nda|employment>].

- Skill: `agents-store/generate-contract` (Agent Skill)
- Install (CLI): `npx get-skill add agents-store/generate-contract`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agents-store/generate-contract/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: agents-store (https://skillmd.com/u/agents-store)
- Updated: 2026-11-16
- Page: https://skillmd.com/skills/agents-store/generate-contract

---


# 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

1. **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.

2. **Check dependencies:**
   ```bash
   node "${CLAUDE_PLUGIN_ROOT}/scripts/check_deps.js"
   ```
   If `ready` is false, show what is missing and ask permission to run the listed `installCommands`. (`ready` covers Node, the npm modules and the Playwright browser; pandoc and the PDF engines are optional extras listed in `missing`.)

3. **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

4. **Read template:**
   ```bash
   cat "${CLAUDE_PLUGIN_ROOT}/templates/contract_template.json"
   ```

5. **Build JSON input:**
   Structure clauses with numbered format. Each clause can have multiple paragraphs (sub-clauses). Write to `.doc_input.json`.

6. **Generate document:**
   For DOCX (default):
   ```bash
   node "${CLAUDE_PLUGIN_ROOT}/scripts/generate_docx.js" /absolute/path/.doc_input.json
   ```
   For PDF (final version):
   ```bash
   node "${CLAUDE_PLUGIN_ROOT}/scripts/generate_pdf.js" /absolute/path/.doc_input.json
   ```

7. **Deliver 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"
```
