legal-billing-ops

v1.0.0 MIT legal updated 2026-09-27

Build a client invoice from a time-entries CSV (date, task, hours, rate) and a trust-ledger CSV (date, description, amount in/out), with hours×rate line items and a trust-balance accounting section. Use when billing a client and reporting trust activity for the matter. Practice-management tooling, not legal advice.

$ skillbank install legal-billing-ops@1.0.0
# pins exactly 1.0.0 · README + changelog included

Legal Billing Ops

Overview

Practice-management tooling, not legal advice. Verify all deadlines, fees, and procedures against your jurisdiction's current rules.

This skill builds a client invoice from two CSVs: time entries (date,task,hours,rate) become hours × rate line items with a total, and a trust ledger (date,description,amount_in,amount_out) becomes a trust-account activity section with per-transaction running balances, totals deposited and disbursed, and the current trust balance — with a loud warning if the balance goes negative (overdraft or data-entry error). IOLTA rules vary by state — confirm with your bar; see references/iolta-basics.md for the practice playbook. All data stays local — nothing is uploaded.

Installation

1. Copy the legal-billing-ops/ directory anywhere convenient. 2. Make the script executable (Unix):


   chmod +x scripts/invoice.py

No pip install needed — standard library only (Python 3.9+).

Configuration

No config files. Client, matter, and firm names are passed as flags. Sample CSVs ship at references/samples/time-entries.csv and references/samples/trust-ledger.csv.

Inputs

| Command / flag | Arguments | Returns | |---|---|---| | invoice.py --entries time.csv --ledger trust.csv --out invoice.md [--client "Name"] [--matter "ID"] [--firm "Name"] | time.csv: date,task,hours,rate (hours and rate > 0); trust.csv: date,description,amount_in,amount_out (each ≥ 0, at least one > 0 per row) | Invoice Markdown: line items with totals + trust activity with running balances |

Missing columns, empty data rows, non-numeric hours/rates, or invalid dates produce a clear stderr message and a nonzero exit — never a traceback.

Worked example

Practice-management tooling, not legal advice. Verify all deadlines, fees, and procedures against your jurisdiction's current rules.

Sample inputs (shipped in references/samples/) — four time entries at $250/hr and a three-row trust ledger:

time-entries.csv:


date,task,hours,rate
2026-09-02,Initial client consultation,1.5,250
2026-09-05,Legal research — noncompete enforceability,3.25,250
2026-09-09,Draft demand letter,2.0,250
2026-09-12,Phone conference with opposing counsel,0.5,250

trust-ledger.csv:


date,description,amount_in,amount_out
2026-09-01,Client retainer deposit,5000,0
2026-09-10,Filing fee disbursement,0,350
2026-09-12,Copying and postage,0,42.50

Run it:


$ ./scripts/invoice.py --entries references/samples/time-entries.csv --ledger references/samples/trust-ledger.csv --out /tmp/invoice.md --client "Jane Doe" --matter "2026-014" --firm "Smith Law LLC"
wrote invoice (4 entries, 3 ledger rows) -> /tmp/invoice.md

/tmp/invoice.md contains the line-item table:


| Date | Task | Hours | Rate | Amount |
| 2026-09-02 | Initial client consultation | 1.50 | $250.00 | $375.00 |
| 2026-09-05 | Legal research — noncompete enforceability | 3.25 | $250.00 | $812.50 |
| 2026-09-09 | Draft demand letter | 2.00 | $250.00 | $500.00 |
| 2026-09-12 | Phone conference with opposing counsel | 0.50 | $250.00 | $125.00 |
|  | **Total** | **7.25** |  | **$1,812.50** |

**Amount due this invoice: $1,812.50**

…followed by the trust activity section with running balances and the summary line:


Total deposited: $5,000.00  |  Total disbursed: $392.50  |  **Trust balance: $4,607.50**

Verify all figures against your own records before sending.

Version history

Changelog

1.0.0 — 2026-09-27

  • Initial release: scripts/invoice.py — client invoice with hours×rate line items + trust-balance accounting from CSVs; references/iolta-basics.md playbook; sample CSVs in references/samples/.

← back to catalog