Invoice Processor
Skill0 starsChanged 29 days agoApache-2.0View on GitHub
Turn a batch of invoice PDFs into one normalized CSV (vendor, invoice_no, date, currency, subtotal, tax, total), validating subtotal+tax against total and flagging mismatches and missing fields.
In this repository61 other files it gives its agents.
- AGENTS.mdAGENTS.md
- Contact DeduperSkill
- Csv CleanerSkill
- Expense CategorizerSkill
- Json WranglerSkill
- Log AnalyzerSkill
- Pdf ExtractorSkill
- Report Chart BuilderSkill
- Spreadsheet AnalyzerSkill
- Survey SummarizerSkill
- delegate-agentSkill
- Approval Request TriageSkill
- Backup RunnerSkill
- Channel BroadcastSkill
- Dependency AuditorSkill
- Memory KeeperSkill
- Repo OnboarderSkill
- Scheduled Job DoctorSkill
- Web Form FillerSkill
- Web ScraperSkill
- Website MonitorSkill
- Brain Dump To TasksSkill
- Calendar Day PlannerSkill
- Daily BriefingSkill
- Email TriageSkill
- Follow Up TrackerSkill
- Meeting MinutesSkill
- Recurring Digest SetupSkill
- Standup ReporterSkill
- Task Board GroomerSkill
- Weekly ReviewSkill
- Arxiv Paper ScannerSkill
- Comparison MatrixSkill
- Competitor WatchSkill
- Deep Research BriefSkill
- Fact CheckerSkill
- News DigestSkill
- People Company BriefSkill
- Product Price ScoutSkill
- Stock Price CheckerSkill
- Trending Topic DigestSkill
- Senior Software EngineerSkill
- Skill CreatorSkill
- Social CommentsSkill
- Social CoreSkill
- Social DMSkill
- Social EngageSkill
- Social HealthSkill
- Social InsightSkill
- Social ProspectSkill
- Social WatchSkill
- Blog Post WriterSkill
- Documentation WriterSkill
- Email DrafterSkill
- Executive SummarySkill
- Press Release WriterSkill
- Proposal WriterSkill
- Release Notes WriterSkill
- Social Media RepurposerSkill
- Tone RewriterSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 36
Never guess a missing value.
- Very specific: line 38
Write all rows to the output CSV with write_file (header + one row per PDF, including failed ones — flags make them visible).
- Distinctive: line 60
Never "fix" a printed amount to make the math work — report the mismatch.
- Distinctive: line 68
Do not mix decimal conventions within one document (checklist rule).
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Invoice Processor
You read a batch of invoice PDFs and produce ONE normalized CSV plus a flag list of everything that did not validate.
Inputs
- Invoice PDFs in the working folder (if unnamed,
globfor*.pdfand confirm the file list before processing). - Output filename: default
invoices.csv. - Fixed columns, always in this order:
source_file, vendor, invoice_no, date, currency, subtotal, tax, total, flags.
Steps
- Load the field guide first:
load_skill_resource({"slug": "invoice-processor", "path": "references/field-checklist.md"})— it defines each field, the date/currency normalization rules, and label synonyms (English + Indonesian: Faktur, Jumlah, PPN, Tanggal, ...). Apply it throughout; do not improvise your own normalization. - For each PDF, call
document_read(path). Extract the seven fields using the checklist's synonyms. Values come from the document text only. - Normalize per the checklist: dates to ISO
YYYY-MM-DD, amounts to plain dot-decimal numbers, currency to a 3-letter code. - Validate each invoice:
subtotal + tax ≈ total(tolerance per the checklist).- Passes →
flagsempty. - Fails → keep the printed values, set
flagsto the mismatch note. - A field absent → leave its cell empty and add
missing:<field>toflags. Never guess a missing value; derive one only when the checklist's derivation rule applies, and flag it as derived.
- Passes →
- Write all rows to the output CSV with
write_file(header + one row per PDF, including failed ones — flags make them visible). - Summarize in chat: totals per currency for clean rows only, then every flagged row with its reason.
Output format
invoices.csvin the working folder, exact columns from Inputs.- Chat summary:
Processed <n> invoices → invoices.csv
Clean: <k> · Flagged: <m>
Sum of clean totals: <amount> <CUR> (per currency)
Flagged:
- <file>: <flag> (e.g. sum mismatch: subtotal+tax=110 but total=115)
- <file>: missing:invoice_no, date ambiguous (DD/MM assumed)Rules
- Never "fix" a printed amount to make the math work — report the mismatch; the source document is the truth, the flag is your judgment.
- One row per PDF, always, even unreadable ones (empty fields +
flags=unreadable), so the CSV reconciles 1:1 with the input folder. - A PDF that is clearly not an invoice (report, contract): row with
flags=not_an_invoice, fields empty; mention it in chat. - Multi-invoice PDFs (several invoices in one file): one row per invoice, same
source_file, and note it in the summary. - Do not mix decimal conventions within one document (checklist rule).
- Local-first: no network egress; the CSV stays in the working folder.
- Reply in the user's language; keep vendor names verbatim.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

