invoice-processor
Automatically process invoices (发票) from PDFs/images to Excel spreadsheets using AI vision recognition. Use this skill when users mention "发票", "invoice", "处理发票", "识别发票", "提取发票", or need to convert invoice files to Excel format.
Best use case
invoice-processor is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Automatically process invoices (发票) from PDFs/images to Excel spreadsheets using AI vision recognition. Use this skill when users mention "发票", "invoice", "处理发票", "识别发票", "提取发票", or need to convert invoice files to Excel format.
Teams using invoice-processor should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/invoice-processor/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How invoice-processor Compares
| Feature / Agent | invoice-processor | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Automatically process invoices (发票) from PDFs/images to Excel spreadsheets using AI vision recognition. Use this skill when users mention "发票", "invoice", "处理发票", "识别发票", "提取发票", or need to convert invoice files to Excel format.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Invoice Processor Fully automated workflow for processing invoice files using AI vision models to extract structured information and generate formatted Excel reports. ## When to Use **Auto-trigger when users mention:** - "处理发票" / "识别发票" / "提取发票信息" / "发票转Excel" - Processing invoice files (PDF, JPG, PNG) - Converting invoices to Excel format ## Execution Environment Notes **⚠️ CRITICAL: Path handling for non-ASCII directory names** When the project directory contains Chinese or other non-ASCII characters (e.g., "发票助手agent"), you MUST use full relative paths from project root: ```bash # ❌ WRONG - Will fail with encoding errors python scripts/check_env.py # ✅ CORRECT - Use full paths from .claude/skills/ python .claude/skills/invoice-processor/scripts/check_env.py ``` **Cross-platform compatibility:** - Use Unix-style commands (Git Bash, Linux, macOS) - ❌ `dir /b` → ✅ `ls` ## Setup Create a `.env` file in the `invoice-processor` directory: ```bash # Copy from template cp .env.example .env # Edit with your API key # .env content: GLM_API_KEY=your_actual_api_key_here ``` Get your API key from: https://open.bigmodel.cn/ ## Workflow ### Step 1: Environment Check (Recommended) ```bash python .claude/skills/invoice-processor/scripts/check_env.py ``` Verifies: GLM_API_KEY is set, required packages installed (aiohttp, PyMuPDF, openpyxl) ### Step 2: Recognize Invoices ```bash # Default: process 'invoices' directory → 'invoice_results.json' python .claude/skills/invoice-processor/scripts/invoice_ocr.py # Custom paths python .claude/skills/invoice-processor/scripts/invoice_ocr.py -i <input_path> -o <output.json> ``` **What it does:** - Scans for invoice files (JPG, JPEG, PNG, PDF) - Converts PDFs to images (200 DPI) - Processes up to 5 files concurrently - Extracts 9 fields: type, number, date, buyer/seller names, amounts (excl/incl tax), tax, items - Saves to JSON with success/error status **Arguments:** - `-i, --input`: Input path (default: `invoices`) - `-o, --output`: Output JSON (default: `invoice_results.json`) **Prerequisites:** - `.env` file with `GLM_API_KEY` (see Setup below) - `pip install aiohttp PyMuPDF` ### Step 3: Generate Excel Report ```bash # Default: 'invoice_results.json' → 'invoice_results.xlsx' python .claude/skills/invoice-processor/scripts/convert_to_excel.py # Custom paths python .claude/skills/invoice-processor/scripts/convert_to_excel.py -i <input.json> -o <output.xlsx> ``` **What it does:** - Reads JSON from Step 2 - Creates formatted Excel with 12 columns - Auto-deletes input JSON after successful conversion **Arguments:** - `-i, --input`: Input JSON (default: `invoice_results.json`) - `-o, --output`: Output Excel (default: `invoice_results.xlsx`) **Prerequisites:** - `pip install openpyxl` ## Usage Examples ### Basic (Non-ASCII directory names) ```bash # Full 3-step workflow python .claude/skills/invoice-processor/scripts/check_env.py python .claude/skills/invoice-processor/scripts/invoice_ocr.py -i invoices -o invoice_results.json python .claude/skills/invoice-processor/scripts/convert_to_excel.py -i invoice_results.json -o invoice_results.xlsx ``` ### Custom Paths ```bash python .claude/skills/invoice-processor/scripts/invoice_ocr.py -i invoices_2024 -o results_2024.json python .claude/skills/invoice-processor/scripts/convert_to_excel.py -i results_2024.json -o report_2024.xlsx ``` ## Troubleshooting ### Script Not Found / Encoding Errors **Error:** `can't open file '...\��Ʊ����agent\scripts\...'` **Cause:** Short paths (`scripts/`) fail in non-ASCII directories **Solution:** Use full paths: `.claude/skills/invoice-processor/scripts/...` ### Command Not Found **Error:** `dir: cannot access '/b'` **Cause:** Windows CMD command in Unix shell **Solution:** Use `ls` instead of `dir` ### API Key Not Set **Error:** `错误: 请在 .env 文件中设置 GLM_API_KEY` **Solution:** Create `.env` file in `invoice-processor` directory with `GLM_API_KEY=your_key` ### PDF Support Disabled **Warning:** `未安装 PyMuPDF,PDF 支持已禁用` **Solution:** `pip install PyMuPDF` ## Notes - GLM API limit: 5 concurrent requests, 60s timeout per request - Image limits: 5MB max, 6000x6000 pixels - PDFs auto-converted to images (temp files cleaned up) - **Path Best Practice:** Always use full relative paths (`.claude/skills/invoice-processor/scripts/`) when project directory contains non-ASCII characters --- For detailed design principles, customization options, and architecture guidelines, see [README.md](README.md).
Related Skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
slack-gif-creator
Toolkit for creating animated GIFs optimized for Slack, with validators for size constraints and composable animation primitives. This skill applies when users request animated GIFs or emoji animations for Slack from descriptions like "make me a GIF for Slack of X doing Y".
remotion-best-practices
Best practices for Remotion - Video creation in React
image-enhancer
Improves the quality of images, especially screenshots, by enhancing resolution, sharpness, and clarity. Perfect for preparing images for presentations, documentation, or social media posts.
canvas-design
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
algorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
raffle-winner-picker
Picks random winners from lists, spreadsheets, or Google Sheets for giveaways, raffles, and contests. Ensures fair, unbiased selection with transparency.
nlm-skill
Expert guide for the NotebookLM CLI (`nlm`) and MCP server - interfaces for Google NotebookLM. Use this skill when users want to interact with NotebookLM programmatically, including: creating/managing notebooks, adding sources (URLs, YouTube, text, Google Drive), generating content (podcasts, reports, quizzes, flashcards, mind maps, slides, infographics, videos, data tables), conducting research, chatting with sources, or automating NotebookLM workflows. Triggers on mentions of "nlm", "notebooklm", "notebook lm", "podcast generation", "audio overview", or any NotebookLM-related automation task.
md-to-pdf
Use this skill when users want to convert Markdown files to PDF. Handles workflows like "Convert this markdown to PDF", "转换为PDF", "批量转换MD文件". Supports single file and batch directory conversion with excellent CJK (Chinese) font support, image embedding, and clean typography.
markdown-to-epub-converter
Convert markdown documents and chat summaries into formatted EPUB ebook files that can be read on any device or uploaded to Kindle.
xlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
pptx
Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks