invoice-generator
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.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- invoice-generator
- metadata
- { "clawdbot": { "emoji": "?", "requires": { "env": [ "INVOICE_DIR" ], "bins": [ "node", "jq", "weasyprint" ] }, "primaryEnv": "INVOICE_DIR" } }
- 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.
02 资源文件 5
- 参考文档_meta.json287 B
- 参考文档package-lock.json2.6 KB
- 参考文档package.json133 B
- 参考文档references/data-schema.md3.0 KB
- 脚本scripts/generate.sh3.2 KB
03 SKILL.md 正文
Invoice Generator
Generate PDF invoices from structured JSON data.
Setup
- Install Node.js dependencies:
cd invoice-generator && npm install
- Set
INVOICE_DIRenvironment variable (or inskills.entries.invoice-generator.env):
export INVOICE_DIR="/path/to/your/invoices"
This creates the directory structure:
$INVOICE_DIR/
├── configs/ # Optional: saved invoice configs
└── invoices/ # Generated PDF output
Usage
# 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:
{
"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 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
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.