{"id":"ea35fb9d-b350-4213-bdc6-25a1c616e1b6","shortId":"4XPugz","kind":"skill","title":"lovstudio:expense-report","tagline":"Extract invoice data from images or text descriptions and generate a categorized Excel expense report. Supports receipt photos, scanned invoices, and manual text input. Auto-classifies into: business entertainment (客户餐费), travel-transport (机票/火车票/打车), travel-accommodation (酒店), t","description":"# expense-report — Invoice → Categorized Excel\n\nExtract invoice information from images or text, classify expenses, and generate\na professional Excel report with subtotals per category.\n\n## When to Use\n\n- User has invoice photos / scanned receipts to process\n- User describes expenses in text and wants them organized\n- User needs a categorized reimbursement report (报销单)\n- User mentions 发票报销, 报销汇总, 发票整理, expense report\n\n## Expense Categories\n\n| Category | Keywords / Examples |\n|----------|-------------------|\n| 业务招待 | 客户餐费, 商务宴请, 礼品, 招待 |\n| 差旅-交通 | 机票, 火车票, 高铁, 出租车, 打车, 网约车, 加油, 过路费, 停车费 |\n| 差旅-住宿 | 酒店, 住宿, 宾馆 |\n| 差旅-餐饮 | 出差期间餐费, 工作餐 |\n| 办公用品 | 文具, 打印, 办公耗材, 办公设备 |\n| 通讯费 | 话费, 流量, 网费, 宽带 |\n| 其他 | 不属于以上类别的费用 |\n\n## Workflow (MANDATORY)\n\n### Step 1: Collect Invoice Data\n\nAccept input in any of these forms:\n\n- **Images**: Read invoice photos using the Read tool. Extract: date, vendor, amount, item type, notes.\n- **Text descriptions**: Parse the user's text for the same fields.\n- **Mixed**: Multiple images + supplementary text.\n\nFor each invoice, extract these fields:\n\n```json\n{\n  \"date\": \"2026-04-15\",\n  \"vendor\": \"海底捞(国贸店)\",\n  \"item\": \"客户餐费\",\n  \"amount\": 486.00,\n  \"category\": \"业务招待\",\n  \"note\": \"与XX公司李总晚餐\"\n}\n```\n\n### Step 2: Classify\n\nAssign each invoice to a category from the table above. Rules:\n\n1. If the user explicitly states the category, use it.\n2. If the item/vendor clearly matches a category keyword, auto-assign.\n3. For ambiguous items (e.g., \"餐费\" could be 业务招待 or 差旅-餐饮):\n   - If the note mentions a client/customer → 业务招待\n   - If the context is a business trip → 差旅-餐饮\n   - If unclear, ask the user.\n\n### Step 3: Confirm with User\n\nBefore generating, show the extracted data as a table:\n\n```\n| # | 日期 | 商户 | 项目 | 金额 | 分类 | 备注 |\n|---|------|------|------|------|------|------|\n| 1 | 2026-04-15 | 海底捞 | 客户餐费 | 486.00 | 业务招待 | 与XX公司李总 |\n| 2 | 2026-04-14 | 滴滴出行 | 打车 | 45.50 | 差旅-交通 | 机场→酒店 |\n```\n\nAsk: \"以上信息是否正确? 需要修改或补充吗?\"\n\n### Step 4: Generate Excel\n\nWrite the confirmed data to a temp JSON file, then run:\n\n```bash\npython expense-report-skill/scripts/generate_report.py \\\n  --input /tmp/invoices.json \\\n  --output \"发票报销汇总-YYYYMMDD.xlsx\"\n```\n\n**JSON format** (array of objects):\n\n```json\n[\n  {\"date\": \"2026-04-15\", \"vendor\": \"海底捞\", \"item\": \"客户餐费\", \"amount\": 486.0, \"category\": \"业务招待\", \"note\": \"与XX公司李总\"},\n  {\"date\": \"2026-04-14\", \"vendor\": \"滴滴出行\", \"item\": \"打车\", \"amount\": 45.5, \"category\": \"差旅-交通\", \"note\": \"机场→酒店\"}\n]\n```\n\n### Step 5: Deliver\n\nTell the user:\n- Output file path\n- Total amount and breakdown by category\n- Remind them to review the \"分类汇总\" sheet for the summary\n\n## Output Format\n\nThe Excel file contains two sheets:\n\n1. **发票报销汇总** — Full detail, grouped by category with subtotals\n2. **分类汇总** — Summary table: category, count, subtotal\n\nStyle: Lovstudio warm-academic (terracotta headers #CC785C, warm cream accents).\n\n## Edge Cases\n\n- **Blurry/unreadable image**: Tell the user which fields couldn't be extracted; ask them to provide manually.\n- **Foreign currency**: Note the currency; convert to CNY if user provides rate, otherwise keep original with note.\n- **Duplicate invoices**: Flag potential duplicates (same date + vendor + amount) before generating.\n- **No date on invoice**: Use the date the user provides, or mark as \"日期不详\".","tags":["expense","report","skills","lovstudio","agent-skills","ai-coding-assistant","cjk","claude-code","cursor","gemini-cli","markdown-to-docx","markdown-to-pdf"],"capabilities":["skill","source-lovstudio","skill-expense-report","topic-agent-skills","topic-ai-coding-assistant","topic-cjk","topic-claude-code","topic-cursor","topic-gemini-cli","topic-markdown-to-docx","topic-markdown-to-pdf"],"categories":["skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/lovstudio/skills/expense-report","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add lovstudio/skills","source_repo":"https://github.com/lovstudio/skills","install_from":"skills.sh"}},"qualityScore":"0.470","qualityRationale":"deterministic score 0.47 from registry signals: · indexed on github topic:agent-skills · 40 github stars · SKILL.md body (3,279 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T00:56:34.346Z","embedding":null,"createdAt":"2026-04-18T22:18:56.556Z","updatedAt":"2026-04-22T00:56:34.346Z","lastSeenAt":"2026-04-22T00:56:34.346Z","tsv":"'-04':205,311,320,370,384 '-14':321,385 '-15':206,312,371 '/scripts/generate_report.py':354 '/tmp/invoices.json':356 '1':154,232,309,432 '2':219,242,318,441 '2026':204,310,319,369,383 '3':254,290 '4':334 '45.5':391 '45.50':324 '486.0':377 '486.00':213,315 '5':400 'academ':452 'accent':458 'accept':158 'accommod':44 'ambigu':256 'amount':176,212,376,390,409,502 'array':364 'ask':286,330,472 'assign':221,253 'auto':30,252 'auto-assign':251 'auto-classifi':29 'bash':348 'blurry/unreadable':461 'breakdown':411 'busi':33,279 'case':460 'categor':16,51,95 'categori':71,107,108,214,226,239,249,378,392,413,438,445 'cc785c':455 'classifi':31,60,220 'clear':246 'client/customer':272 'cni':484 'collect':155 'confirm':291,339 'contain':429 'context':276 'convert':482 'could':260 'couldn':468 'count':446 'cream':457 'currenc':478,481 'data':7,157,299,340 'date':174,203,368,382,500,506,511 'deliv':401 'describ':84 'descript':12,181 'detail':435 'duplic':494,498 'e.g':258 'edg':459 'entertain':34 'exampl':110 'excel':17,52,66,336,427 'expens':3,18,48,61,85,104,106,351 'expense-report':2,47 'expense-report-skil':350 'explicit':236 'extract':5,53,173,199,298,471 'field':190,201,467 'file':345,406,428 'flag':496 'foreign':477 'form':164 'format':363,425 'full':434 'generat':14,63,295,335,504 'group':436 'header':454 'imag':9,57,165,193,462 'inform':55 'input':28,159,355 'invoic':6,24,50,54,77,156,167,198,223,495,508 'item':177,210,257,374,388 'item/vendor':245 'json':202,344,362,367 'keep':490 'keyword':109,250 'lovstudio':1,449 'mandatori':152 'manual':26,476 'mark':516 'match':247 'mention':100,270 'mix':191 'multipl':192 'need':93 'note':179,216,269,380,396,479,493 'object':366 'organ':91 'origin':491 'otherwis':489 'output':357,405,424 'pars':182 'path':407 'per':70 'photo':22,78,168 'potenti':497 'process':82 'profession':65 'provid':475,487,514 'python':349 'rate':488 'read':166,171 'receipt':21,80 'reimburs':96 'remind':414 'report':4,19,49,67,97,105,352 'review':417 'rule':231 'run':347 'scan':23,79 'sheet':420,431 'show':296 'skill':353 'skill-expense-report' 'source-lovstudio' 'state':237 'step':153,218,289,333,399 'style':448 'subtot':69,440,447 'summari':423,443 'supplementari':194 'support':20 'tabl':229,302,444 'tell':402,463 'temp':343 'terracotta':453 'text':11,27,59,87,180,186,195 'tool':172 'topic-agent-skills' 'topic-ai-coding-assistant' 'topic-cjk' 'topic-claude-code' 'topic-cursor' 'topic-gemini-cli' 'topic-markdown-to-docx' 'topic-markdown-to-pdf' 'total':408 'transport':38 'travel':37,43 'travel-accommod':42 'travel-transport':36 'trip':280 'two':430 'type':178 'unclear':285 'use':74,169,240,509 'user':75,83,92,99,184,235,288,293,404,465,486,513 'vendor':175,207,372,386,501 'want':89 'warm':451,456 'warm-academ':450 'workflow':151 'write':337 'xlsx':361 'yyyymmdd':360 '不属于以上类别的费用':150 '与xx公司李总':317,381 '与xx公司李总晚餐':217 '业务招待':111,215,262,273,316,379 '交通':118,327,395 '以上信息是否正确':331 '住宿':130,132 '停车费':127 '其他':149 '出差期间餐费':137 '出租车':122 '分类':307 '分类汇总':419,442 '办公用品':139 '办公耗材':142 '办公设备':143 '加油':125 '发票报销':101 '发票报销汇总':359,433 '发票报销汇总-yyyymmdd':358 '发票整理':103 '商务宴请':113 '商户':304 '国贸店':209 '备注':308 '客户餐费':35,112,211,314,375 '宽带':148 '宾馆':133 '工作餐':138 '差旅':117,129,135,265,282,326,394 '差旅-交通':116,325,393 '差旅-住宿':128 '差旅-餐饮':134,264,281 '打印':141 '打车':41,123,323,389 '报销单':98 '报销汇总':102 '招待':115 '文具':140 '日期':303 '日期不详':518 '机场':328,397 '机票':39,119 '流量':146 '海底捞':208,313,373 '滴滴出行':322,387 '火车票':40,120 '礼品':114 '网约车':124 '网费':147 '话费':145 '过路费':126 '通讯费':144 '酒店':45,131,329,398 '金额':306 '需要修改或补充吗':332 '项目':305 '餐费':259 '餐饮':136,266,283 '高铁':121","prices":[{"id":"5520cb44-1c06-4c15-9a0c-f6f2c6e717dc","listingId":"ea35fb9d-b350-4213-bdc6-25a1c616e1b6","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"lovstudio","category":"skills","install_from":"skills.sh"},"createdAt":"2026-04-18T22:18:56.556Z"}],"sources":[{"listingId":"ea35fb9d-b350-4213-bdc6-25a1c616e1b6","source":"github","sourceId":"lovstudio/skills/expense-report","sourceUrl":"https://github.com/lovstudio/skills/tree/main/skills/expense-report","isPrimary":false,"firstSeenAt":"2026-04-18T22:18:56.556Z","lastSeenAt":"2026-04-22T00:56:34.346Z"}],"details":{"listingId":"ea35fb9d-b350-4213-bdc6-25a1c616e1b6","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"lovstudio","slug":"expense-report","github":{"repo":"lovstudio/skills","stars":40,"topics":["agent-skills","ai-coding-assistant","cjk","claude-code","cursor","gemini-cli","markdown-to-docx","markdown-to-pdf"],"license":"mit","html_url":"https://github.com/lovstudio/skills","pushed_at":"2026-04-21T15:57:51Z","description":"Agent skills for AI coding assistants — Markdown to PDF/DOCX with 14 themes, CJK support","skill_md_sha":"4e41be815b1dd544229cd59e71d79b6f6f132a00","skill_md_path":"skills/expense-report/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/lovstudio/skills/tree/main/skills/expense-report"},"layout":"multi","source":"github","category":"skills","frontmatter":{"name":"lovstudio:expense-report","license":"MIT","description":"Extract invoice data from images or text descriptions and generate a categorized Excel expense report. Supports receipt photos, scanned invoices, and manual text input. Auto-classifies into: business entertainment (客户餐费), travel-transport (机票/火车票/打车), travel-accommodation (酒店), travel-meals, office supplies, communication, and other. Use when the user mentions \"发票报销\", \"expense report\", \"报销单\", \"发票整理\", \"invoice\", \"报销汇总\", \"发票分类\", \"reimbursement\", or has invoice images to process.","compatibility":"Requires Python 3.8+ and openpyxl (`pip install openpyxl`). Cross-platform: macOS, Windows, Linux."},"skills_sh_url":"https://skills.sh/lovstudio/skills/expense-report"},"updatedAt":"2026-04-22T00:56:34.346Z"}}