Trigger
Use when user receives invoices (email, photo, PDF) and wants them organized automatically.
Key difference: This skill MANAGES received invoices. The invoice skill CREATES invoices to send.
Storage
CODEBLOCK0
Quick Reference
| Topic | File |
|---|
| Capture and extraction workflow | INLINECODE1 |
| Fields to extract |
extraction.md |
| Search queries and reports |
search.md |
| Legal requirements by country |
legal.md |
Process Summary
- 1. Capture — Receive invoice (email attachment, photo, direct PDF). Copy to
inbox/. - Extract — OCR if needed, parse fields (provider, date, amounts, tax).
- Validate — Check required fields, detect duplicates.
- Organize — Rename, move to
archive/YYYY/MM/, update entries.json. - Confirm — Show extracted data, allow corrections.
See process.md for detailed workflow.
Critical Rules
- - Never delete originals — Keep PDFs permanently. Legal requirement (4-6 years depending on country).
- Detect duplicates — Same invoice number + provider = duplicate. Alert, don't overwrite.
- Validate tax math — Base + tax should equal total. Flag discrepancies.
- Provider normalization — "HETZNER ONLINE GMBH" = "Hetzner". Maintain provider aliases.
Alerts
- - Invoice pending >48h in inbox
- Payment due in <7 days
- Unusual amount (>50% higher than same provider average)
- Missing expected recurring invoice
触发器
当用户收到发票(电子邮件、照片、PDF)并希望自动整理时使用。
关键区别: 此技能管理收到的发票。invoice 技能创建要发送的发票。
存储结构
~/invoices/
├── inbox/ # 待处理的文件,等待提取
├── archive/ # 按年/月整理
│ └── 2026/
│ └── 02/
│ └── 2026-02-13HetznerINV-12345_89.50.pdf
├── providers/ # 供应商元数据
│ └── index.json
├── entries.json # 所有发票元数据(可搜索)
└── state.json # 处理状态
快速参考
| 主题 | 文件 |
|---|
| 捕获和提取工作流程 | process.md |
| 要提取的字段 |
extraction.md |
| 搜索查询和报告 | search.md |
| 各国法律要求 | legal.md |
流程摘要
- 1. 捕获 — 接收发票(电子邮件附件、照片、直接PDF)。复制到 inbox/。
- 提取 — 如有需要则进行OCR,解析字段(供应商、日期、金额、税费)。
- 验证 — 检查必填字段,检测重复项。
- 整理 — 重命名,移动到 archive/YYYY/MM/,更新 entries.json。
- 确认 — 显示提取的数据,允许更正。
详细工作流程请参见 process.md。
关键规则
- - 切勿删除原件 — 永久保留PDF。法律要求(根据国家不同,保留4-6年)。
- 检测重复项 — 相同发票号 + 供应商 = 重复项。发出警报,不要覆盖。
- 验证税费计算 — 基数 + 税费应等于总额。标记差异。
- 供应商名称标准化 — HETZNER ONLINE GMBH = Hetzner。维护供应商别名。
警报
- - 发票在收件箱中待处理超过48小时
- 付款到期日少于7天
- 异常金额(比同一供应商平均金额高50%以上)
- 缺少预期的定期发票