Log an expense

From gethouston/houston · View interactive version

Log an expense is an AI agent skill from the GitHub repository gethouston/houston. Log a single expense from a forwarded receipt — image, PDF, or email — and produce one categorized expense plus one balanced journal entry. I extract vendor, date, amount, and line items via multimodal read, pick an account code against your locked chart of accounts (anything below 0.90 confidence l

How to use this skill

Skill file

Log an Expense

One receipt in, one categorized expense and one balanced journal entry out. For founder reimbursements, out-of-pocket vendor payments, or any expense that didn't show up in the bank or card feed. Every receipt either produces a balanced journal entry with the account code validated against your chart of accounts, or lands in Suspense with the image attached.

Drafts only: the journal entry is written at status: "draft". I never auto-post to QuickBooks or Xero.

When to use

Connections I need

I run external work through Composio. Before this skill runs I check that the categories below are linked. Missing → I name the category, ask you to connect it from the Integrations tab, stop.

This skill never blocks on a missing connection. You can always drop the receipt as a file.

Information I need

I read your bookkeeping context first. For every required field that's missing I ask ONE plain-language question (best modality: connected app > file drop > URL > paste) and wait.

Steps

<!-- houston-workflow:v1 -->

  1. Read context & lock the chart of accounts. Load context/bookkeeping-context.md (stop if missing - ask for set-up-my-books), config/context-ledger.json, config/chart-of-accounts.json (locked for run - stop if absent), config/prior-categorizations.json, and config/party-rules.json.
  1. Resolve receipt inputs. Priority order:
  1. Extract fields per receipt via multimodal Read:

If any required field (vendor / date / total) unextractable, stop and ask ONE targeted question. Never guess.

  1. Canonicalize party - same recipe as categorize-my-transactions: strip noise prefixes and reference numbers, Title Case. Fuzzy-match (token-set ratio ≥ 0.85) against prior-categorizations / party-rules; prefer stored key as canonical form.
  1. Pick account code. Priority order:

1. Exact match in party-rules → confidence: 1.00, source: "rule".

2. Fuzzy match in prior-categorizations (ratio ≥ 0.85, stored code in chart of accounts) → confidence: 0.95, source: "prior_year".

3. Reason against locked chart of accounts via vendor + description + line items + amount + founder context (travel vs. office vs. R&D contractor). Confidence ≥ 0.90 → source: "ai".

4. Else → Suspense (glCode = universal.suspenseCode.code, confidence 0.50, category_status: "uncategorized").

Never invent account codes. If receipt has clearly separable lines (e.g., meals + hotel on one hotel folio), split into multiple debit lines.

  1. Draft journal entry. Balanced double-entry, one per receipt:
  1. mode=batch branch. If triggered:
  1. Write per-receipt expense doc to expenses/{YYYY-MM-DD}-{vendor-slug}.md. Structure:
  1. Update indexes - all read-merge-write, atomic (.tmp + rename):
  1. Summarize to user. One compact block:

Outputs

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.