Invoice Generator
You produce a polished, ready-to-send PDF invoice from a short prompt. The first run sets up the user's defaults so future invoices are one-sentence requests.
First-run setup
Check if invoice-config.md exists in the working folder. If not, run setup:
Ask once for:
- Your business — name, logo path (optional), address, email, phone, website
- Your tax / business ID — EIN, ABN, VAT number, depending on country
- Payment details — bank transfer details, Stripe payment link, PayPal email, check mailing address, or all of the above
- Default payment terms — Net 7? Net 15? Net 30? Due on receipt?
- Default tax handling — none / sales tax / VAT / GST, and rate
- Late fee policy — flat fee, percentage, or none
- Invoice number format — sequential (INV-001, INV-002), date-based (2026-001), or custom
- Currency — USD, EUR, GBP, AUD, etc.
- Brand color (optional) — one accent color for the invoice design
Save all of this to invoice-config.md. Don't ask again.
Also create invoice-log.md to track invoice numbers issued so the next one auto-increments.
Generating an invoice
The user will say something like:
"Invoice Acme Corp $5,000 for the November consulting retainer"
Or longer:
"Invoice ABC Inc — 40 hours of design work at $150/hr, plus a $500 rush fee, due in 7 days"
Parse the request for:
- Recipient — name, company, billing address, email
- Line items — description, quantity, rate, total
- Discounts or rush fees
- Due date (use default terms if not specified)
- Payment method preference (if specified)
- Special notes (e.g., PO number, reference number, project name)
If recipient billing details aren't on file, ask once and save to clients/[client-slug].md for future invoices.
The invoice format
Generate a clean, single-page PDF saved as invoice-[number]-[client-slug].pdf. Layout:
Header
- Business logo (top left, if provided)
- "INVOICE" in large type (top right)
- Invoice number, issue date, due date (top right, below "INVOICE")
Parties
- "From:" — your business info, left column
- "Bill to:" — client info, right column
Line items table
| Description |
Quantity |
Rate |
Amount |
- Right-aligned numeric columns
- Subtotal below the table
- Tax line if applicable
- Discount line if applicable
- Total in larger, bolder type
Payment section
- Payment methods accepted (with details — bank info, Stripe link, etc.)
- Due date in plain English ("Payment due by [date]")
- Late fee policy if applicable
Footer
- "Thank you" line (one sentence, warm but not effusive)
- Notes / PO number / project reference
- Small contact info
Visual style
- Clean, professional, minimal
- One accent color (from config) used for headers and the total line
- White or near-white background
- One sans-serif font (Inter, Helvetica, or system stack)
- Plenty of whitespace — don't cram
Avoid: gradients, drop shadows, clipart, watermarks, "PAID" / "OVERDUE" stamps unless the user asks.
After generating
- Save the PDF to the working folder
- Update
invoice-log.md with the new invoice (number, date, client, amount, status: sent / paid / overdue)
- Tell the user: file path, summary of the invoice, and offer to:
- Draft an email to send the invoice
- Set a reminder to follow up if unpaid
- Generate a recurring invoice schedule if this is a retainer
Edge cases
- Multiple currencies — note the currency clearly. If converting, show both amounts.
- International tax — VAT handling differs by country and customer status (B2B reverse charge in EU, etc.). Ask if unsure rather than guess.
- Discounts — apply before or after tax depending on jurisdiction. Default: discount before tax unless told otherwise.
- Time tracking integration — if the user has time-tracking data in the folder (Toggl export, Harvest CSV), offer to use it directly rather than re-typing hours.
- Retainer invoices — if this is a recurring retainer, note "Retainer for [month/period]" in the description and suggest a scheduled task to auto-generate next month's.
Rules
- The first run takes 2 minutes. Every subsequent run takes 10 seconds. Setup is intentional — invest once, save forever.
- Don't surprise the user with custom design choices. Invoices should look like invoices, not graphic design experiments.
- Auto-increment the invoice number. Never reuse a number.
- Round to whole units. Cents are fine; fractional hours are not. If the user says "37.5 hours," use it — but don't introduce sub-unit precision they didn't.
- Save client details after first invoice. Every repeat client should be a one-word reference next time ("invoice Acme for $4,000 retainer").
1---2name: invoice-generator3description: Generate a professional PDF invoice from a one-sentence description, with line items, totals, tax, and payment terms. Use this whenever the user says 'create an invoice,' 'invoice [name] for,' 'generate a bill,' 'bill [client] for [amount],' 'invoice template,' or describes work that needs to be billed. The first run sets up the user's invoice template (their business info, payment details, default terms); subsequent runs produce invoices in seconds. Output is a polished PDF saved to the working folder.4---56# Invoice Generator78You produce a polished, ready-to-send PDF invoice from a short prompt. The first run sets up the user's defaults so future invoices are one-sentence requests.910## First-run setup1112Check if `invoice-config.md` exists in the working folder. If not, run setup:1314Ask once for:15161. **Your business** — name, logo path (optional), address, email, phone, website172. **Your tax / business ID** — EIN, ABN, VAT number, depending on country183. **Payment details** — bank transfer details, Stripe payment link, PayPal email, check mailing address, or all of the above194. **Default payment terms** — Net 7? Net 15? Net 30? Due on receipt?205. **Default tax handling** — none / sales tax / VAT / GST, and rate216. **Late fee policy** — flat fee, percentage, or none227. **Invoice number format** — sequential (INV-001, INV-002), date-based (2026-001), or custom238. **Currency** — USD, EUR, GBP, AUD, etc.249. **Brand color** (optional) — one accent color for the invoice design2526Save all of this to `invoice-config.md`. Don't ask again.2728Also create `invoice-log.md` to track invoice numbers issued so the next one auto-increments.2930## Generating an invoice3132The user will say something like:3334> "Invoice Acme Corp $5,000 for the November consulting retainer"3536Or longer:3738> "Invoice ABC Inc — 40 hours of design work at $150/hr, plus a $500 rush fee, due in 7 days"3940Parse the request for:4142- **Recipient** — name, company, billing address, email43- **Line items** — description, quantity, rate, total44- **Discounts or rush fees**45- **Due date** (use default terms if not specified)46- **Payment method preference** (if specified)47- **Special notes** (e.g., PO number, reference number, project name)4849If recipient billing details aren't on file, ask once and save to `clients/[client-slug].md` for future invoices.5051## The invoice format5253Generate a clean, single-page PDF saved as `invoice-[number]-[client-slug].pdf`. Layout:5455**Header**5657- Business logo (top left, if provided)58- "INVOICE" in large type (top right)59- Invoice number, issue date, due date (top right, below "INVOICE")6061**Parties**6263- "From:" — your business info, left column64- "Bill to:" — client info, right column6566**Line items table**6768| Description | Quantity | Rate | Amount |69|-------------|----------|------|--------|7071- Right-aligned numeric columns72- Subtotal below the table73- Tax line if applicable74- Discount line if applicable75- **Total** in larger, bolder type7677**Payment section**7879- Payment methods accepted (with details — bank info, Stripe link, etc.)80- Due date in plain English ("Payment due by [date]")81- Late fee policy if applicable8283**Footer**8485- "Thank you" line (one sentence, warm but not effusive)86- Notes / PO number / project reference87- Small contact info8889## Visual style9091- Clean, professional, minimal92- One accent color (from config) used for headers and the total line93- White or near-white background94- One sans-serif font (Inter, Helvetica, or system stack)95- Plenty of whitespace — don't cram9697Avoid: gradients, drop shadows, clipart, watermarks, "PAID" / "OVERDUE" stamps unless the user asks.9899## After generating1001011. Save the PDF to the working folder1022. Update `invoice-log.md` with the new invoice (number, date, client, amount, status: sent / paid / overdue)1033. Tell the user: file path, summary of the invoice, and offer to:104 - Draft an email to send the invoice105 - Set a reminder to follow up if unpaid106 - Generate a recurring invoice schedule if this is a retainer107108## Edge cases109110- **Multiple currencies** — note the currency clearly. If converting, show both amounts.111- **International tax** — VAT handling differs by country and customer status (B2B reverse charge in EU, etc.). Ask if unsure rather than guess.112- **Discounts** — apply before or after tax depending on jurisdiction. Default: discount before tax unless told otherwise.113- **Time tracking integration** — if the user has time-tracking data in the folder (Toggl export, Harvest CSV), offer to use it directly rather than re-typing hours.114- **Retainer invoices** — if this is a recurring retainer, note "Retainer for [month/period]" in the description and suggest a scheduled task to auto-generate next month's.115116## Rules1171181. **The first run takes 2 minutes. Every subsequent run takes 10 seconds.** Setup is intentional — invest once, save forever.1192. **Don't surprise the user with custom design choices.** Invoices should look like invoices, not graphic design experiments.1203. **Auto-increment the invoice number.** Never reuse a number.1214. **Round to whole units.** Cents are fine; fractional hours are not. If the user says "37.5 hours," use it — but don't introduce sub-unit precision they didn't.1225. **Save client details after first invoice.** Every repeat client should be a one-word reference next time ("invoice Acme for $4,000 retainer").