Open-source CLI uses Claude Haiku to automate Xero expense auditing

A developer has built an open-source Python CLI tool that uses Claude Haiku to automate expense auditing for Xero accounting software. The tool is designed to reduce time spent on manual expense checking tasks like verifying descriptions, tax codes, currency conversions, and receipt matching.
Design approach and cost
The tool follows a "deterministic code first, then AI to fill in the gaps" design principle. Users configure rules for common issues like missing fields, invalid tax rates, duplicates, and zero amounts. Claude Haiku is only called when structured data is lacking, such as with unstructured receipts. This approach keeps LLM usage costs to a few cents per audit run.
Specific Haiku use cases
- Triaging flagged bills: After rules flag issues, Haiku reviews bills and returns structured JSON suggestions with confidence scores. Suggestions below 0.7 confidence are filtered out.
- Receipt vision: Haiku reads receipt/invoice images to extract supplier names and line item descriptions. Supplier names are matched against existing Xero contacts.
- Foreign currency detection: Haiku identifies currency from receipts, then deterministic code fetches historical ECB rates, converts amounts, and attaches rate CSV files as audit evidence.
- Natural-language bill editing: Instead of clicking through Xero's interface, users can type English instructions like "set description to monthly subscription fee," and Haiku converts these to JSON patches.
Implementation details
The tool runs on Claude Haiku 4.5 and includes a human-in-the-loop approach where nothing auto-applies unless the user explicitly uses the --auto-correct flag. The developer notes this pattern of "rules first, LLM as fallback" has worked well for structured-but-messy business automation tasks.
The project is available on GitHub at https://github.com/logicalicy/xero-expense-audit, and the developer has written a detailed explanation of their approach at https://blog.mariohayashi.com/p/using-ai-to-make-xero-expense-auditing.
📖 Read the full source: r/ClaudeAI
👀 See Also

Claude-Code v2.1.63 adds HTTP hooks, slash commands, and fixes memory leaks
Claude-Code v2.1.63 introduces HTTP hooks for JSON-based external calls, adds /simplify and /batch slash commands, and fixes multiple memory leaks in long-running sessions. The release also improves MCP server handling and VSCode integration.

General Bots: Open-source AI agent platform for self-hosted enterprise automation
General Bots is an open-source platform started in 2019 that provides AI agents, workflow automation, document processing, and integrations with local AI model support, designed for organizations needing full control over their infrastructure.

Visual Prompting Framework Replaces Text Prompts with Single Image for Claude AI
The Carrying Capacity Principle v9 is a bidirectional structural framework that uses a single flowchart image instead of text prompts for Claude AI. It provides structural diagnosis or generative construction plans based on system parameters or goals.

sandboxd: Open-Source Tool to Run Multiple Claude Code Agents in Isolated Containers
sandboxd is an open-source (MIT) tool that runs each Claude Code project in its own Docker container with isolated workspace, Claude Code session, and preview URL. It supports parallel agents, auto-sleep, and keeps API keys out of containers.