Invoice Generator
Generates professional invoices with line items, tax calculations, payment terms, and exports to PDF via pandoc. Tracks invoice numbers and calculates totals. Prerequisites: python3, pandoc.
MCP get_skill({ skillId: "invoice-generator-ff661939" })Use this skill with your agent
Create a free account and connect via MCP
# Invoice Generator
Generate professional invoices with line items, tax, payment terms, and PDF export.
## When to Use
- "Create an invoice for {client}"
- "I need to bill {client} for {N} hours"
- "Generate an invoice for this project"
## Requirements
- **python3** for calculations and invoice numbering
- **pandoc** for PDF export
## Workflow
### Step 1 — Invoice Details
- **Your business name and address**
- **Client name and address**
- **Line items** (description, hours/quantity, rate)
- **Tax rate** (if applicable)
- **Payment terms** (net 15, net 30, due on receipt)
- **Notes** (project reference, PO number, etc.)
### Step 2 — Calculate Totals
```bash
python3 << 'PYEOF'
import datetime
import json
import os
# Invoice number tracking
invoice_dir = "outputs/invoices"
os.makedirs(invoice_dir, exist_ok=True)
counter_file = os.path.join(invoice_dir, ".invoice_counter")
if os.path.exists(counter_file):
with open(counter_file) as f:
counter = int(f.read().strip()) + 1
else:
counter = 1001
with open(counter_file, "w") as f:
f.write(str(counter))
invoice_number = f"INV-{counter}"
date = datetime.date.today().isoformat()
due_date = (datetime.date.today() + datetime.timedelta(days={NET_DAYS})).isoformat()
line_items = [
{"desc": "{Description 1}", "qty": {QTY}, "rate": {RATE}},
{"desc": "{Description 2}", "qty": {QTY}, "rate": {RATE}},
]
tax_rate = {TAX_RATE} # e.g., 0.0 for no tax, 0.08 for 8%
subtotal = sum(item["qty"] * item["rate"] for item in line_items)
tax = subtotal * tax_rate
total = subtotal + tax
print(f"Invoice: {invoice_number}")
print(f"Date: {date}")
print(f"Due: {due_date}")
print(f"Subtotal: ${subtotal:,.2f}")
print(f"Tax ({tax_rate*100:.0f}%): ${tax:,.2f}")
print(f"Total: ${total:,.2f}")
PYEOF
```
### Step 3 — Generate Invoice
```markdown
# INVOICE
**Invoice #:** {INV-NUMBER}
**Date:** {DATE}
**Due:** {DUE_DATE}
---
**From:**
{YOUR_BUSINESS_NAME}
{YOUR_ADDRESS}
{YOUR_EMAIL}
**Bill To:**
{CLIENT_NAME}
{CLIENT_COMPANY}
{CLIENT_ADDRESS}
---
| Description | Qty/Hours | Rate | Amount |
|-------------|-----------|------|--------|
| {Description 1} | {QTY} | ${RATE} | ${AMOUNT} |
| {Description 2} | {QTY} | ${RATE} | ${AMOUNT} |
| | | | |
| | | **Subtotal** | **${SUBTOTAL}** |
| | | **Tax ({RATE}%)** | **${TAX}** |
| | | **TOTAL** | **${TOTAL}** |
---
**Payment Terms:** {TERMS}
**Payment Methods:**
- Bank transfer: {DETAILS}
- PayPal: {EMAIL}
**Notes:** {PROJECT_REFERENCE}
---
*Thank you for your business!*
```
### Step 4 — Export to PDF
```bash
mkdir -p outputs/invoices
pandoc "outputs/invoices/{INV_NUMBER}.md" -o "outputs/invoices/{INV_NUMBER}.pdf" --pdf-engine=wkhtmltopdf -V geometry:margin=1in
echo "Invoice saved: outputs/invoices/{INV_NUMBER}.pdf"
```
## Important Rules
- Auto-increment invoice numbers — never reuse or skip
- Always include payment terms and due date
- Calculate tax correctly based on user's jurisdiction
- Include at least one payment method
- Keep records — save both .md and .pdf
## Example Prompts
- "Create an invoice for Acme Corp — 40 hours at $150/hr"
- "Generate an invoice for my web design project, $3000 flat rate"
- "I need to bill {client} for October work"Related Skills
More skills in Business & Freelance
Business Plan One-Pager
Creates a concise one-page business plan covering value proposition, market, revenue model, and key metrics. Researches market data via Brave Search and generates a Mermaid business model canvas. Prerequisites: brave-search MCP, python3.
Client Proposal Writer
Builds professional client proposals with scope, timeline, pricing, and terms — researches market rates via Brave Search and generates pandoc-ready documents. Prerequisites: brave-search MCP, python3, pandoc.
Competitor Analysis Report
Researches competitors via Brave Search and builds a comprehensive competitive landscape analysis with positioning, pricing, strengths/weaknesses, and strategic recommendations. Prerequisites: brave-search MCP, python3.
Pricing Strategy Calculator
Helps freelancers and businesses set pricing using cost-plus, value-based, and competitive analysis methods. Researches market rates via Brave Search and runs breakeven calculations. Prerequisites: brave-search MCP, python3.
Statement of Work Generator
Generates formal Statements of Work (SOW) with project scope, milestones, acceptance criteria, payment schedule, and legal terms. Exports to PDF via pandoc. Prerequisites: python3, pandoc.
Explore Other Categories
Skills from other categories with shared topics
Invoice Template Skill
Generate professional PDF invoices from templates
Ab Test Setup
When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "conversion experiment," "statistical significance," or "test this." For tracking implementation, see analytics-tracking.
Academic Search
Search and analyze academic literature. Find papers, understand research methodologies, and synthesize academic findings for research projects.