{"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\nUse `AskUserQuestion` to ask: \"以上信息是否正确? 需要修改或补充吗?\"\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.477","qualityRationale":"deterministic score 0.48 from registry signals: · indexed on github topic:agent-skills · 54 github stars · SKILL.md body (3,304 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-05-18T18:57:48.539Z","embedding":null,"createdAt":"2026-04-18T22:18:56.556Z","updatedAt":"2026-05-18T18:57:48.539Z","lastSeenAt":"2026-05-18T18:57:48.539Z","tsv":"'-04':205,311,320,373,387 '-14':321,388 '-15':206,312,374 '/scripts/generate_report.py':357 '/tmp/invoices.json':359 '1':154,232,309,435 '2':219,242,318,444 '2026':204,310,319,372,386 '3':254,290 '4':337 '45.5':394 '45.50':324 '486.0':380 '486.00':213,315 '5':403 'academ':455 'accent':461 'accept':158 'accommod':44 'ambigu':256 'amount':176,212,379,393,412,505 'array':367 'ask':286,333,475 'askuserquest':331 'assign':221,253 'auto':30,252 'auto-assign':251 'auto-classifi':29 'bash':351 'blurry/unreadable':464 'breakdown':414 'busi':33,279 'case':463 'categor':16,51,95 'categori':71,107,108,214,226,239,249,381,395,416,441,448 'cc785c':458 'classifi':31,60,220 'clear':246 'client/customer':272 'cni':487 'collect':155 'confirm':291,342 'contain':432 'context':276 'convert':485 'could':260 'couldn':471 'count':449 'cream':460 'currenc':481,484 'data':7,157,299,343 'date':174,203,371,385,503,509,514 'deliv':404 'describ':84 'descript':12,181 'detail':438 'duplic':497,501 'e.g':258 'edg':462 'entertain':34 'exampl':110 'excel':17,52,66,339,430 'expens':3,18,48,61,85,104,106,354 'expense-report':47 'expense-report-skil':353 'explicit':236 'extract':5,53,173,199,298,474 'field':190,201,470 'file':348,409,431 'flag':499 'foreign':480 'form':164 'format':366,428 'full':437 'generat':14,63,295,338,507 'group':439 'header':457 'imag':9,57,165,193,465 'inform':55 'input':28,159,358 'invoic':6,24,50,54,77,156,167,198,223,498,511 'item':177,210,257,377,391 'item/vendor':245 'json':202,347,365,370 'keep':493 'keyword':109,250 'lovstudio':2,452 'lovstudio-expense-report':1 'mandatori':152 'manual':26,479 'mark':519 'match':247 'mention':100,270 'mix':191 'multipl':192 'need':93 'note':179,216,269,383,399,482,496 'object':369 'organ':91 'origin':494 'otherwis':492 'output':360,408,427 'pars':182 'path':410 'per':70 'photo':22,78,168 'potenti':500 'process':82 'profession':65 'provid':478,490,517 'python':352 'rate':491 'read':166,171 'receipt':21,80 'reimburs':96 'remind':417 'report':4,19,49,67,97,105,355 'review':420 'rule':231 'run':350 'scan':23,79 'sheet':423,434 'show':296 'skill':356 'skill-expense-report' 'source-lovstudio' 'state':237 'step':153,218,289,336,402 'style':451 'subtot':69,443,450 'summari':426,446 'supplementari':194 'support':20 'tabl':229,302,447 'tell':405,466 'temp':346 'terracotta':456 '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':411 'transport':38 'travel':37,43 'travel-accommod':42 'travel-transport':36 'trip':280 'two':433 'type':178 'unclear':285 'use':74,169,240,330,512 'user':75,83,92,99,184,235,288,293,407,468,489,516 'vendor':175,207,375,389,504 'want':89 'warm':454,459 'warm-academ':453 'workflow':151 'write':340 'xlsx':364 'yyyymmdd':363 '不属于以上类别的费用':150 '与xx公司李总':317,384 '与xx公司李总晚餐':217 '业务招待':111,215,262,273,316,382 '交通':118,327,398 '以上信息是否正确':334 '住宿':130,132 '停车费':127 '其他':149 '出差期间餐费':137 '出租车':122 '分类':307 '分类汇总':422,445 '办公用品':139 '办公耗材':142 '办公设备':143 '加油':125 '发票报销':101 '发票报销汇总':362,436 '发票报销汇总-yyyymmdd':361 '发票整理':103 '商务宴请':113 '商户':304 '国贸店':209 '备注':308 '客户餐费':35,112,211,314,378 '宽带':148 '宾馆':133 '工作餐':138 '差旅':117,129,135,265,282,326,397 '差旅-交通':116,325,396 '差旅-住宿':128 '差旅-餐饮':134,264,281 '打印':141 '打车':41,123,323,392 '报销单':98 '报销汇总':102 '招待':115 '文具':140 '日期':303 '日期不详':521 '机场':328,400 '机票':39,119 '流量':146 '海底捞':208,313,376 '滴滴出行':322,390 '火车票':40,120 '礼品':114 '网约车':124 '网费':147 '话费':145 '过路费':126 '通讯费':144 '酒店':45,131,329,401 '金额':306 '需要修改或补充吗':335 '项目':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-05-18T18:57:48.539Z"}],"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":54,"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-05-17T09:28:31Z","description":"Top-level index for the Lovstudio skills ecosystem","skill_md_sha":"b510e9f8c5621e4cdc9553386c2812abdd255d43","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-05-18T18:57:48.539Z"}}