PluginBench
Skill
Pass
Audit score 90

invoice-template

claude-office-skills/skills

Generate professional PDF invoices from structured data and templates with company branding and calculations.

What is invoice-template?

This skill creates polished PDF invoices from templates and structured data, handling itemization, tax calculations, and payment details. Use it when you need to generate single or batch invoices with consistent formatting and branding.

  • Generate PDF invoices from invoice data structures with automatic calculations
  • Support itemized line items with quantity, rate, and amount fields
  • Calculate subtotals, taxes, and totals automatically
  • Include company and client information with addresses and contact details
  • Create invoices using ReportLab or HTML/Jinja2 templating approaches
  • Batch generate multiple invoices from order or billing data

How to install invoice-template

npx skills add https://github.com/claude-office-skills/skills --skill invoice-template
Prerequisites
  • Python with reportlab, jinja2, python-docx, and weasyprint installed
  • Structured invoice data (invoice number, dates, from/to details, line items)
Claude Code
Cursor
Windsurf
Cline

How to use invoice-template

  1. 1.Prepare invoice data in the required structure with invoice number, dates, from/to information, and itemized line items
  2. 2.Provide the data to the skill along with any customization requirements
  3. 3.The skill will calculate subtotals, taxes, and totals automatically
  4. 4.Specify output format (ReportLab for direct PDF or HTML template for styled invoices)
  5. 5.Retrieve the generated PDF invoice file

Use cases

Good for
  • Generate invoices from order data with automatic formatting
  • Create recurring or monthly invoices for clients
  • Batch process multiple invoices with consistent branding
  • Customize invoice templates per client while maintaining standard structure
  • Generate invoices with tax calculations and payment terms
Who it's for
  • Finance and accounting professionals
  • Small business owners managing billing
  • Billing departments processing multiple invoices
  • Service-based businesses with itemized billing needs

invoice-template FAQ

What data structure does the invoice need?

Invoices require: invoice_number, date, due_date, from (company details), to (client details), items array with description/quantity/rate, tax_rate, and optional notes.

Can I customize the invoice template?

Yes, you can customize templates using HTML/Jinja2 for styling or ReportLab for programmatic control. Templates support company branding and custom fields.

Does it calculate taxes and totals automatically?

Yes, the skill auto-calculates line item amounts, subtotals, taxes based on the tax_rate, and final totals. Manual calculations are not trusted.

Can I batch generate multiple invoices?

Yes, you can provide multiple invoice data objects and generate them in batch, useful for monthly billing or order processing.

What output formats are supported?

The skill generates PDF files. It supports both ReportLab (direct PDF generation) and HTML/WeasyPrint (styled HTML-to-PDF conversion) approaches.

Full instructions (SKILL.md)

Source of truth, from claude-office-skills/skills.


═══════════════════════════════════════════════════════════════════════════════

CLAUDE OFFICE SKILL - Enhanced Metadata v2.0

═══════════════════════════════════════════════════════════════════════════════

Basic Information

name: invoice-template description: "Generate professional PDF invoices from templates" version: "1.0" author: claude-office-skills license: MIT

Categorization

category: finance tags:

  • invoice
  • template
  • billing department: Finance

AI Model Compatibility

models: recommended: - claude-sonnet-4 - claude-opus-4 compatible: - claude-3-5-sonnet - gpt-4 - gpt-4o

MCP Tools Integration

mcp: server: office-mcp tools: - create_docx - fill_docx_template - docx_to_pdf

Skill Capabilities

capabilities:

  • template_creation
  • invoice_formatting

Language Support

languages:

  • en
  • zh

Invoice Template Skill

Overview

This skill generates professional PDF invoices from structured data and templates. Create invoices with company branding, itemized lists, tax calculations, and payment details.

How to Use

  1. Describe what you want to accomplish
  2. Provide any required input data or files
  3. I'll execute the appropriate operations

Example prompts:

  • "Generate invoices from order data"
  • "Create recurring invoices"
  • "Batch generate monthly invoices"
  • "Customize invoice templates per client"

Domain Knowledge

Invoice Data Structure

invoice_data = {
    "invoice_number": "INV-2026-001",
    "date": "2026-01-30",
    "due_date": "2026-02-28",
    
    "from": {
        "name": "Your Company",
        "address": "123 Business St",
        "email": "billing@company.com"
    },
    
    "to": {
        "name": "Client Name",
        "address": "456 Client Ave",
        "email": "client@example.com"
    },
    
    "items": [
        {"description": "Consulting", "quantity": 10, "rate": 150.00},
        {"description": "Development", "quantity": 20, "rate": 100.00}
    ],
    
    "tax_rate": 0.08,
    "notes": "Payment due within 30 days"
}

PDF Generation with ReportLab

from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas
from reportlab.lib.units import inch

def create_invoice(data: dict, output_path: str):
    c = canvas.Canvas(output_path, pagesize=letter)
    width, height = letter
    
    # Header
    c.setFont("Helvetica-Bold", 24)
    c.drawString(1*inch, height - 1*inch, "INVOICE")
    
    # Invoice details
    c.setFont("Helvetica", 12)
    c.drawString(1*inch, height - 1.5*inch, f"Invoice #: {data['invoice_number']}")
    c.drawString(1*inch, height - 1.75*inch, f"Date: {data['date']}")
    
    # From/To
    y = height - 2.5*inch
    c.drawString(1*inch, y, f"From: {data['from']['name']}")
    c.drawString(4*inch, y, f"To: {data['to']['name']}")
    
    # Items table
    y = height - 4*inch
    c.setFont("Helvetica-Bold", 10)
    c.drawString(1*inch, y, "Description")
    c.drawString(4*inch, y, "Qty")
    c.drawString(5*inch, y, "Rate")
    c.drawString(6*inch, y, "Amount")
    
    c.setFont("Helvetica", 10)
    subtotal = 0
    for item in data['items']:
        y -= 0.3*inch
        amount = item['quantity'] * item['rate']
        subtotal += amount
        c.drawString(1*inch, y, item['description'])
        c.drawString(4*inch, y, str(item['quantity']))
        c.drawString(5*inch, y, f"${item['rate']:.2f}")
        c.drawString(6*inch, y, f"${amount:.2f}")
    
    # Totals
    tax = subtotal * data['tax_rate']
    total = subtotal + tax
    
    y -= 0.5*inch
    c.drawString(5*inch, y, f"Subtotal: ${subtotal:.2f}")
    y -= 0.25*inch
    c.drawString(5*inch, y, f"Tax ({data['tax_rate']*100}%): ${tax:.2f}")
    y -= 0.25*inch
    c.setFont("Helvetica-Bold", 12)
    c.drawString(5*inch, y, f"Total: ${total:.2f}")
    
    c.save()
    return output_path

HTML Template Approach

from weasyprint import HTML
from jinja2 import Template

invoice_template = """
<!DOCTYPE html>
<html>
<head>
    <style>
        body { font-family: Arial; margin: 40px; }
        .header { display: flex; justify-content: space-between; }
        table { width: 100%; border-collapse: collapse; margin: 20px 0; }
        th, td { border: 1px solid #ddd; padding: 10px; text-align: left; }
        .total { font-weight: bold; font-size: 18px; }
    </style>
</head>
<body>
    <div class="header">
        <h1>INVOICE</h1>
        <div>
            <p>Invoice #: {{ invoice_number }}</p>
            <p>Date: {{ date }}</p>
        </div>
    </div>
    <table>
        <tr><th>Description</th><th>Qty</th><th>Rate</th><th>Amount</th></tr>
        {% for item in items %}
        <tr>
            <td>{{ item.description }}</td>
            <td>{{ item.quantity }}</td>
            <td>${{ "%.2f"|format(item.rate) }}</td>
            <td>${{ "%.2f"|format(item.quantity * item.rate) }}</td>
        </tr>
        {% endfor %}
    </table>
    <p class="total">Total: ${{ "%.2f"|format(total) }}</p>
</body>
</html>
"""

def create_invoice_html(data: dict, output_path: str):
    template = Template(invoice_template)
    
    # Calculate total
    total = sum(i['quantity'] * i['rate'] for i in data['items'])
    total *= (1 + data.get('tax_rate', 0))
    data['total'] = total
    
    html = template.render(**data)
    HTML(string=html).write_pdf(output_path)
    return output_path

Best Practices

  1. Validate required fields before generation
  2. Use templates for consistent branding
  3. Auto-calculate totals (don't trust input)
  4. Include payment instructions and terms

Installation

# Install required dependencies
pip install python-docx openpyxl python-pptx reportlab jinja2

Resources