davidpobi

InvoiceAgent — Development skill for Claude Code

Development community

A small invoice chase agent in Python.

How to install InvoiceAgent

This entry records only its repository, not the path inside it, so there is no exact command to give. Open davidpobi/InvoiceAgent and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What InvoiceAgent does

A small invoice chase agent in Python. Reads unpaid invoices from a CSV and from images with Claude vision, drafts reminders and follows up on client replies. Own agent loop on the Anthropic Messages API, fake mailbox, offline replay tests.

Alternatives in Development

  • Ecpay Invoice — 串接綠界電子發票(B2C / B2B / 離線) 169 ★
  • Remind — Set or manage custom reminders that surface in Claude Code while you work 100 ★
  • Check Approvals — Check pending approvals and send reminders where overdue 39 ★

README

invoice chase agent

a small agent that chases unpaid invoices for an agency. it reads invoices from a csv and from images, drafts polite reminders and follows up on replies.

all data is fake. the mailbox is a json file. no real email is sent.

how it works

  • plain code loops over the ledger.
  • each invoice gets its own agent run. the loop is our own code on the anthropic messages api. no agent sdk.
  • the agent calls six tools: list_unpaid, extract_invoice, draft_reminder, send_email, check_reply, mark_paid.
  • images are read by claude vision. each result has a confidence field.
  • tests use a stub model with fake token usage. they run offline.

quick start

pip install -r requirements.txt
python make_samples.py        # builds the fake data
pytest                        # offline, no key needed
python agent.py --demo        # offline run with a rule-based stub model
python agent.py --reset       # clears state.json and outbox.json

live run:

cp .env.example .env          # then fill in ANTHROPIC_API_KEY and ANTHROPIC_MODEL
python agent.py --only INV-001       # one invoice first
python agent.py --only inv_clean.png # one image
python agent.py                      # the whole ledger

each tool call prints as it runs. add `--quiet` for the summary only.

a live run allows up to 50 model calls per invoice and uses your api credit. try the demo first.

files

file purpose
agent.py the agent loop, model adapters, stub models, cli
tools.py the six tools, shared context, injectable clock
extract.py image to invoice fields. real extractor and an offline one
make_samples.py builds invoices.csv, inbox.json, invoices_in/, samples_labels.json
test_replay.py replay tests with stub models

data files:

  • invoices.csv: 36 fake invoices. read-only seed data.
  • inbox.json: scripted client replies.
  • invoices_in/: 8 fake invoice files. clean, blurry, rotated,