Invoice Agent — Development skill for Claude Code
Invoice extraction tool: upload PDFs, scans or Excel files, and Claude pulls out structured fields.
How to install Invoice Agent
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open anucodes-01/invoice-agent and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Invoice Agent does
Invoice extraction tool: upload PDFs, scans or Excel files, and Claude pulls out structured fields. Validation, retries and arithmetic checks flag uncertain results for human review. Node/Express/TypeScript, Supabase Postgres, React/Tailwind.
Alternatives in Development
- Learn From Materials — Turn PDFs, books and papers into interactive learning webpages|将复杂材料转化为可追溯、可测验、可做笔记的学习网页 225 ★
- Ecpay Invoice — 串接綠界電子發票(B2C / B2B / 離線) 169 ★
- Content OS — A self-improving daily content system — pulls from high-quality sources every morning and drafts posts in your 103 ★
README
Messy Invoice Extraction
Upload a vendor invoice (PDF, scanned PDF/image, or Excel) → Claude extracts structured fields → a human reviews and corrects anything the system flagged.
**Stack:** Node + Express + TypeScript · Postgres (Supabase) · Claude API · React + TypeScript + Tailwind (Vite).
Setup
# 1. Database: run server/schema.sql in the Supabase SQL editor (or any Postgres)
# 2. API
cd server && cp .env.example .env # add ANTHROPIC_API_KEY and DATABASE_URL
npm install && npm run dev # http://localhost:3001
# 3. Web
cd ../web && npm install && npm run dev # http://localhost:5173 (proxies /api)
# Sample files: python3 samples/generate.py | Sample outputs: cd server && npm run samples
Architecture
React ──POST /api/invoices──▶ Express ──▶ saves file + row (status=processing) ──▶ 202 {id}
└─ background: extract() ─▶ Claude ─▶ Zod validate ─▶ checks ─▶ DB
React polls GET /api/invoices every 1.5s while any row is processing
PUT /api/invoices/:id = human correction → status=reviewed
| Endpoint | Purpose |
|---|---|
POST /api/invoices |
upload (multipart), starts extraction |
GET /api/invoices / :id |
list / detail with line items, flags, confidence |
GET /api/invoices/:id/file |
original file, for side-by-side checking |
PUT /api/invoices/:id |
save human corrections |
**Input handling.** PDFs and images go to Claude natively (no separate OCR step, so a scanned PDF takes the same path as a text PDF). Excel is flattened to CSV text per sheet; it never touches vision, which is cheaper and exact.
How unreliable model output is handled
- Strict schema (Zod). Output must parse as JSON and match the schema. Fences/prose around the JSON are stripped.
- Repair loop. On parse/validation failure the model is shown its own bad output plus the error and asked to fix it (max 3 attempts). If still invalid, the record is saved as
failedwith a flag and emp
Related Skills
Chem Properties Excel
Claude Code Skill: Extract chemicals from any input, query 14 property fields across 12 sources, generate Exce
Bibclean
Clean and validate a BibTeX file: check required fields, normalize author names, detect duplicates, enrich mis
Image SEO
Optimise an image, convert to WebP, upload to WordPress, and set all 4 SEO metadata fields (alt text, title, c
Kdp Package
Assemble the KDP upload folder — PDFs plus a file naming exactly what goes in which field of the form
Ats Friend
Upload your CV and get a brutally honest review based on how Bangladeshi companies actually hire. This assista
Lane Verify
Out-of-domain verification lane. Independently REFUTE other lanes' done-claims, defaulting to refuted when unc
Related Agents
Conversion Funnel Analyst
Read-only analyst that pulls funnel metrics (signups → first upload → first download → paid) week-over-week an
Ade CLI
Coding agents asked to read contracts, claims, or financial PDFs hallucinate structure unless the extraction t
Extractor
Cheap structured extraction. Capabilities - extract, classify, summarise-single-source, structured-output. Use