Skip to content
Back to skills

Invoice Generator

ASecurity

Generate professional PDF invoices from JSON data. Use when the user needs to create an invoice, billing document, or payment request with company/client details and line items.

  • 651 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 10, 2026
documentationgobashnodedocumentation

Works with

  • cli

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 5 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add sundial-org/awesome-openclaw-skills --skill invoice-generator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Invoice Generator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Invoice Generator
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/sundial-org-invoice-generator/badge)](https://www.skillsdirectory.com/skills/sundial-org-invoice-generator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: invoice-generator
description: Generate professional PDF invoices from JSON data. Use when the user needs to create an invoice, billing document, or payment request with company/client details and line items.
metadata: {"clawdbot":{"emoji":"🧾","requires":{"bins":["node","jq","weasyprint"],"env":["INVOICE_DIR"]},"primaryEnv":"INVOICE_DIR"}}
---

# Invoice Generator

Generate PDF invoices from structured JSON data.

## Setup

1. Install Node.js dependencies:

```bash
cd invoice-generator && npm install
```

2. Set `INVOICE_DIR` environment variable (or in `skills.entries.invoice-generator.env`):

```bash
export INVOICE_DIR="/path/to/your/invoices"
```

This creates the directory structure:
```
$INVOICE_DIR/
β”œβ”€β”€ configs/    # Optional: saved invoice configs
└── invoices/   # Generated PDF output
```

## Usage

```bash
# From stdin (on-the-fly)
cat invoice-data.json | {baseDir}/scripts/generate.sh

# From a full file path
{baseDir}/scripts/generate.sh /path/to/invoice-data.json

# From a saved config (looks in $INVOICE_DIR/configs/)
{baseDir}/scripts/generate.sh client-template
# Loads: $INVOICE_DIR/configs/client-template.json

# Output goes to: $INVOICE_DIR/invoices/invoice-{number}.pdf (auto-versions if exists)
```

## Input Data Format

The JSON input must contain these fields:

```json
{
  "company": {
    "name": "Your Company",
    "address": "123 Main St",
    "cityStateZip": "City, State, 12345",
    "country": "Country"
  },
  "client": {
    "name": "Client Name",
    "address": "456 Client Ave",
    "cityStateZip": "City, State, 67890",
    "country": "Country",
    "taxId": "TAX123"
  },
  "invoice": {
    "number": "INV-2025.01",
    "date": "Jan 15 2025",
    "dueDate": "Jan 30 2025"
  },
  "items": [
    {
      "description": "Service description",
      "rate": "1000.00",
      "currency": "USD"
    }
  ],
  "totals": {
    "currency": "USD",
    "total": "1,000.00"
  }
}
```

See [references/data-schema.md](references/data-schema.md) for complete field documentation.

## Output

The script outputs the path to the generated PDF file on success:

```
$INVOICE_DIR/invoices/invoice-INV-2025.01.pdf
# If that filename already exists, the script will write:
# $INVOICE_DIR/invoices/invoice-INV-2025.01-2.pdf (then -3, etc.)
```

## Error Handling

- Exits with code 1 if JSON is invalid or missing required fields
- Exits with code 2 if weasyprint fails to generate PDF
- Error messages are written to stderr

Files in this skill

  • SKILL.md2.4 KB
  • package-lock.json2.6 KB
  • package.json133 B
  • references/data-schema.md3 KB
  • scripts/generate.sh3.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.