技能圖譜SKILLSGROVE
技能圖譜/辦公文件/TheCraigHewitt/skills/expense-report

expense-report

安裝

$npx skills add https://github.com/TheCraigHewitt/skills --skill expense-report
$git clone --depth 1 https://github.com/TheCraigHewitt/skills.git /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/cowork/expense-report ~/.claude/skills/expense-report
請幫我安裝這個 Agent Skill:https://github.com/TheCraigHewitt/skills/tree/fdbf39b61fbc8cb7cea67949bfb5e8fc567bbc51/cowork/expense-report ,先閱讀它的 SKILL.md 和指令碼,確認安全後再安裝到我的技能目錄。

簡介

原文描述 · MITScan a folder of receipts (PDFs, images, screenshots) and produce a categorized expense spreadsheet plus a dashboard summarizing the period. Use this whenever the user says 'process my receipts,' 'expense report,' 'categorize these expenses,' 'tax prep,' 'monthly/quarterly expenses,' 'bookkeeping,' or points you at a folder of receipts. The skill works on whatever's in the folder — no setup required — but improves over time as it learns the user's category structure. Often paired with a scheduled task that runs weekly or monthly.
以下 SKILL.md 內容轉載自 TheCraigHewitt/skills(提交 fdbf39b),依據 MIT 許可證轉載正文(文字未改動;僅省略檔案頭後設資料、將圖片顯示為連結,超長內容會截斷);版權歸 2026 Craig Hewitt 所有。許可證:LICENSE。僅展示說明檔案,附帶指令碼請在原倉庫檢視。

Expense Report

You scan a folder of receipts and produce two things: a categorized spreadsheet of every line item, and an HTML dashboard summarizing the period. The user drops receipts in a folder throughout the month; you handle the rest.

Before you start

Identify the folder of receipts. The user may point at:

  • A dedicated receipts/ or expenses/ folder
  • A Downloads/receipts/ folder
  • A specific date-range subfolder
  • A cloud-synced folder (Drive, Dropbox)

Check if expense-config.md exists. If yes, read it — it should define:

  • The user's expense categories (e.g., Software / SaaS, Travel, Meals, Marketing, Contractors, Office, Other)
  • Personal vs business split rules (if mixed)
  • Default currency
  • Tax-relevant categories (deductible, reimbursable)
  • Anything to auto-exclude (personal Amazon receipts, recurring subscriptions already tracked elsewhere)

If no config exists, run a one-time setup based on a sample of receipts:

  1. Scan 10–20 receipts to understand the user's spending shape
  2. Propose a category list
  3. Confirm with the user
  4. Save to expense-config.md

Process the receipts

For each receipt file:

  1. Extract — vendor name, date, total amount, tax (if shown), payment method (if shown), individual line items if itemized
  2. Categorize — assign to one of the user's categories. If a vendor has been categorized before (e.g., AWS = Software), use the prior categorization for consistency.
  3. Flag — receipts that are unclear (image too dark, partially cropped, unclear total) get flagged for user review rather than guessed
  4. Detect duplicates — same vendor + same amount + within 3 days = likely duplicate. Flag, don't auto-merge.

If a receipt has multiple categories (e.g., a Costco run with both office supplies and personal items), either split into multiple line items or flag for the user to review.

Output 1: The spreadsheet

Save as expenses-YYYY-MM.xlsx (or .csv if Excel isn't available). Columns:

| Date | Vendor | Description | Category | Subcategory | Amount | Tax | Total | Payment method | Receipt file | Notes |

Sorted by date descending. Include a totals row at the bottom and subtotals by category in a second sheet.

Also include a "Flagged for review" sheet with anything you couldn't confidently categorize.

Output 2: The dashboard

Save as expense-dashboard-YYYY-MM.html. Interactive HTML dashboard with:

  1. Headline strip — total spend, vs prior period, count of receipts, average receipt size
  2. Spend by category — donut or bar chart, with totals and percentages
  3. Spend over time — line or bar chart showing daily/weekly spend in the period
  4. Top vendors — table, ranked by total spend, with count of receipts
  5. Trends — any category trending up or down vs prior period, with your read on why if obvious
  6. Tax-relevant subtotals — total of categories marked deductible/reimbursable
  7. Flagged items — anything that needs the user's eyes

Output 3: A short chat summary

In the chat reply, print:

📊 Expense report — [month/period]

Total spend: $X,XXX across [N] receipts
Biggest category: [Category] at $XXX ([%])
Notable: [one specific observation — "you tripled software spend this month," "5 meal receipts over $200 in 3 days," etc.]
Tax-relevant: $X,XXX deductible

Flagged for review: [N] items
Spreadsheet: [path]
Dashboard: [path]

Running on a schedule

After the first manual run, suggest scheduling:

"Want me to run this every Sunday and roll up the week, then send you a Slack summary? At the end of the month, I'll produce the full report."

If yes, set up a recurring task. The weekly version is short (just the chat summary + spreadsheet update). The monthly version is the full dashboard + report.

Edge cases

  • Receipts in non-English languages — translate vendor and item descriptions but keep totals in original currency, then convert.
  • Receipts that are actually invoices — distinguish: a receipt = paid, an invoice = owed. Don't lump unpaid invoices into the expense report.
  • Crypto / unusual payment methods — extract what you can but flag.
  • Tips on restaurant receipts — include in the total, note tip separately if shown.
  • Subscription receipts (Stripe, etc.) — categorize as recurring software unless context suggests otherwise.
  • Sales tax handling — separate sales tax in its own column. Some jurisdictions need it reported separately for accounting.

Why this works the way it does

Most bookkeeping software requires manual entry or fragile OCR pipelines. By dropping receipts in a folder and having a skill that re-processes the whole folder every run, you get a system that's idempotent and self-correcting: if a categorization is wrong, re-run after editing expense-config.md and it'll re-categorize cleanly. The user owns the data (it's just files in a folder) and the dashboard is regenerable on demand.

Rules

  1. Don't guess when unsure. Flag for review. A flagged item is recoverable; a wrongly categorized expense compounds.
  2. Use consistent vendor naming. "Amazon," "amazon.com," and "AMZN Mktp US" should all be normalized to "Amazon." Maintain a vendor-name map in expense-config.md and grow it over time.
  3. Don't reprocess from scratch every run unless asked. Cache extracted data so re-runs are fast.
  4. Surface anomalies in the dashboard. A 5x jump in a category, an unusually large single receipt, a new vendor — these deserve a callout.
  5. Don't moralize. This is an accounting tool, not a financial advisor. If the user spent $4K on meals last month, report it; don't comment.
檢視許可證全文(MIT)
MIT License

Copyright (c) 2026 Craig Hewitt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.