Generate Invoice
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 PDF invoice with company header, itemized table, tax calculation, and payment details.
Arguments
Format: <invoice-number> [--company <name>] [--client <name>]
- invoice-number: Invoice reference number (required)
- --company: Your company name (optional)
- --client: Client name (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:
- Company info: name, address, email, phone
- Client info: name, address, email
- Date and due date
- Line items: description, quantity, unit price for each
- Tax rate or amount (if applicable)
- Discount (if applicable)
- Payment details: bank, IBAN, SWIFT (optional)
- Notes (optional)
Read template:
cat "${CLAUDE_PLUGIN_ROOT}/templates/invoice_template.json"Build JSON input: Calculate totals:
item.total = qty * unitPrice,subtotal = sum(totals),total = subtotal + tax - discount. Write to.doc_input.json.Generate PDF:
node "${CLAUDE_PLUGIN_ROOT}/scripts/generate_pdf.js" /absolute/path/.doc_input.jsonDeliver result: Parse output, show file path, size, and invoice summary table.
Example Usage
/document-generator-ops:generate-invoice "INV-2026-001" --company "TechCo" --client "Acme Corp"
/document-generator-ops:generate-invoice "INV-042"