Terminal.skills
Use Cases/Automate Freelancer Billing and Expense Tracking

Automate Freelancer Billing and Expense Tracking

Build an end-to-end system that tracks billable hours, generates invoices, and categorizes expenses for independent consultants.

Business#billing#invoicing#payments#automation#expense
Works with:claude-codeopenai-codexgemini-clicursor
$

The Problem

A freelance software consultant works with 8 clients simultaneously on hourly and fixed-rate contracts. At the end of each month, she spends an entire Sunday creating invoices in a spreadsheet, cross-referencing time logs from three different tools, calculating taxes for two states and one international client, and manually categorizing 60-80 business expenses for tax deductions. She missed billing a client for 12 hours last quarter because the time entry was in Toggl but the invoice was built from her calendar. Her accountant also flagged that she is under-claiming deductible expenses because categorization is inconsistent.

The Solution

Using billing-automation to consolidate time tracking into billable line items, invoice-generator to produce professional branded invoices with correct tax calculations, and expense-report to categorize and summarize business expenses, the consultant replaces a full day of monthly admin with a 10-minute automated run.

Step-by-Step Walkthrough

1. Consolidate billable hours from multiple sources

Pull time entries from different tracking tools and reconcile them into a single billing ledger.

Use billing-automation to import time entries from Toggl (API export), calendar events tagged "billable" from Google Calendar, and manual entries from /data/time_log.csv. Reconcile overlapping entries, flag any day with more than 10 billable hours for review, and compute totals per client. Apply each client's rate: Acme Corp at $175/hr, Beta Labs at $200/hr, Gamma Inc at fixed $8,000/month. Output a billing summary to /billing/2026-02/summary.csv.

2. Generate invoices with per-client tax handling

Produce branded PDF invoices with correct tax calculations based on each client's jurisdiction.

Use invoice-generator to create February 2026 invoices for all 8 clients. Apply tax rules: California clients get 7.25% sales tax on services, New York clients get 8% sales tax, the UK client gets reverse-charge VAT (0% with a note citing the reverse charge mechanism). Each invoice should include: my business logo, invoice number (sequential from INV-2026-0023), itemized time entries with dates and descriptions, payment terms (Net 15), and bank transfer details. Save PDFs to /invoices/2026-02/.

The generator produces a batch summary with totals and tax breakdowns per client:

Invoice Generation — February 2026
====================================
INV-2026-0023  Acme Corp         42.5 hrs x $175   $7,437.50 + $539.22 tax (CA)  = $7,976.72
INV-2026-0024  Beta Labs         38.0 hrs x $200   $7,600.00 + $608.00 tax (NY)  = $8,208.00
INV-2026-0025  Gamma Inc         fixed              $8,000.00 + $580.00 tax (CA)  = $8,580.00
INV-2026-0026  Delta Health      28.0 hrs x $175   $4,900.00 + $355.25 tax (CA)  = $5,255.25
INV-2026-0027  Epsilon UK        35.0 hrs x $200   $7,000.00 + $0.00 (reverse)   = $7,000.00
INV-2026-0028  Zeta Finance      22.0 hrs x $200   $4,400.00 + $352.00 tax (NY)  = $4,752.00
INV-2026-0029  Eta Robotics      31.0 hrs x $175   $5,425.00 + $393.31 tax (CA)  = $5,818.31
INV-2026-0030  Theta Ventures    19.5 hrs x $200   $3,900.00 + $312.00 tax (NY)  = $4,212.00

Total billed:  $48,662.50 gross | $3,139.78 tax | $51,802.28 with tax
PDFs saved:    /invoices/2026-02/ (8 files)

3. Categorize and summarize monthly expenses

Process credit card and bank statements to categorize business expenses and flag deductible items.

Use expense-report to process 73 transactions from /data/february_transactions.csv. Categorize each expense: software subscriptions (GitHub, AWS, Figma), travel (client site visits), home office (internet, electricity pro-rated at 30%), meals (client meetings only, under $75 per person), and professional development (courses, books, conference tickets). Flag any expense over $500 for receipt verification. Generate a monthly expense summary with totals by category and a running annual total for estimated quarterly tax payments.

4. Produce a monthly financial snapshot

Combine billing and expense data into a single financial report for the accountant.

Combine the billing and expense data into a monthly P&L snapshot: gross revenue from all 8 clients, total expenses by category, net income, estimated tax liability (federal + state), and year-to-date comparison. Highlight the top 3 clients by revenue and flag any clients with outstanding unpaid invoices from previous months. Export as both PDF (for the accountant) and CSV (for QuickBooks import).

Real-World Example

The consultant ran her first automated billing cycle on March 1st. The system pulled 347 time entries from three sources, flagged 4 duplicate entries she would have double-billed, and generated 8 invoices in 3 minutes. The expense categorizer processed 73 transactions and identified $1,240 in deductible expenses she had been missing -- specifically, a co-working space day pass habit that added up to $480/month and was categorized as "office space" instead of her previous manual categorization of "miscellaneous." Her accountant estimated the improved expense tracking will save approximately $2,800 in taxes annually. The Sunday billing session went from 6 hours to 10 minutes of reviewing auto-generated outputs.

Tips

  • Export time tracking data on the last day of the month, not the first day of the next month. Toggl and similar tools sometimes adjust entries retroactively during their nightly sync, and running the export too early can miss corrections.
  • Keep a separate CSV for manual time entries that do not fit neatly into a tracking tool, such as quick 15-minute phone calls or travel time between client sites.
  • Set invoice numbers to include the year and month (INV-2026-02-001) rather than a plain sequence. This makes it easier for clients to reference specific invoices and prevents numbering collisions if you ever reset your system.
  • Review the expense categorization rules quarterly. Tax law changes, new subscription tools, and shifts in your work patterns can all introduce categories that the original rules do not cover.