invoice-reimbursement

Parse PDF invoices, classify travel expenses, and generate Excel reimbursement summaries.

1|Updated Jul 13, 2026
One-click install
npx skills add https://github.com/HalseyYang/Skills-HY --skill invoice-reimbursement-halseyyang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: invoice-reimbursement
Source: https://github.com/HalseyYang/Skills-HY/tree/main/invoice-reimbursement
Command: npx skills add https://github.com/HalseyYang/Skills-HY --skill invoice-reimbursement-halseyyang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pdfplumber, openpyxl, jieba, and includes scripts (resource) and references (resource) components.

What problem does it solve? Business trip reimbursement requires manually reading dozens of PDF invoices, categorizing them as train tickets, hotels, or taxi fares, and calculating per-diem allowances by city tier. This Skill automates that entire workflow into a single Excel summary. ## Core Features & Use Cases - Automatic Invoice Classification: Extracts amounts from PDF invoices using pdfplumber and classifies them into train/flight tickets, accommodation, taxi fares, and insurance via keyword matching, with special handling for Didi trip slips to avoid double-counting. - Per-Diem Allowance Calculation: Matches destination cities against a built-in tier table (A/B/C/D/E) and computes allowances at 150-200 CNY per day, supporting multi-city trips and half-day rounding. - Formatted Excel Output: Generates a two-sheet workbook with categorized line items, subtotals, allowance details, and a grand total. - Use Case: After a business trip to Beijing and Shanghai, drop all your PDF invoices into the conversation, state the cities and days, and receive a ready-to-submit reimbursement spreadsheet. ## Quick Start Use the invoice-reimbursement skill to process my attached PDF invoices for a 2.5-day trip to Beijing and generate the Excel reimbursement summary.

Frequently Asked Questions about invoice-reimbursement

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract amounts from PDF invoices in Python?

Use pdfplumber to extract text from each PDF page, then apply regex patterns targeting labels like 价税合计 or 合计金额 to capture the total. The script prioritizes explicit total fields and falls back to the largest decimal amount found.

How to automatically classify Chinese travel invoices by type?

Classification uses keyword scoring against category dictionaries for train tickets, hotels, taxis, and insurance. Insurance keywords take priority to prevent aviation accident policies from being misclassified as flight tickets, and Didi receipts with transport wording map to taxi fares.

Can pdfplumber process scanned or image-based PDF invoices?

No, pdfplumber only extracts embedded text layers and returns empty results for scanned image PDFs. The script detects this case and flags the file as requiring OCR preprocessing before it can be classified.

How is the travel per-diem allowance calculated for multiple cities?

Each city is matched to a tier (A/B at 200 CNY/day, C/D/E at 150 CNY/day) via a lookup table, then multiplied by the days spent there. Partial days round to 0.5, and multi-city totals are summed. Unlisted cities default to tier D.

Why are Didi trip itinerary slips excluded from the reimbursement total?

Trip itinerary slips (行程单) are supporting attachments, not invoices, and their amounts duplicate the corresponding electronic invoice. The script detects them by checking for itinerary wording without invoice markers and records them with zero amount.