发票归集自动台账工具
本地离线OCR识别图片/PDF发票,自动分类专票/普票/电子普票,生成月度报销台账,断网可用,财务数据不向外传输。采用「本地OCR取字为主 + 本地多模态大模型(VLM)辅助字段定位」的混合路线,兼顾数字准确率与版式适应性。 Skill: 发票归集自动台账工具 Owner: vincent-chao-lang Summary: 本地离线OCR识别图片/PDF发票,自动分类专票/普票/电子普票,生成月度报销台账,断网可用,财务数据不向外传输。采用「本地OCR取字为主 + 本地多模态大模型(VLM)辅助字段定位」的混合路线,兼顾数字准确率与版式适应性。 Tags: latest:2.0.1 Version history: v2.0.1 | 2026-07-09T01:29:59.897Z | user 优化跨平台说明:SKILL.md 第3步(自动唤醒专家 Agent)标注为「可选·仅 WorkBuddy 环境」,OpenClaw 等非 WorkBuddy 平台跳过此步即可,台账与异常清单已完整生成,不影响主流程。 v2.0.0 | 2026-07-09T01:16:35.463Z | user 本地离线发票归集与台账生成:本地OCR(PaddleOC
Rank
62
Safety
84
Downloads
1.3k
Updated
Oct 10, 2026
Version
2.0.1
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.3K downloads reported by the source. Last updated 10/10/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 10, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 10, 2026
- Adoption signal
- 1.3K downloadsadoption · observed Oct 10, 2026
- Latest release
- 2.0.1release · observed Jul 9, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: medium.
clawhub skill install s177hp4y3h42aryk6e9yprkbwh8a45ts:tax-invoice-skill- Python environment detected. Create a strict virtual environment (`python -m venv .venv`) before installing dependencies to prevent system-level package conflicts.
- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-vincent-chao-lang-tax-invoice-skill/snapshot"
Documentation
CLAWHUB
17,018 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: 发票归集自动台账工具
version: 2.0.0
description: 本地离线OCR识别图片/PDF发票,自动分类专票/普票/电子普票,生成月度报销台账,断网可用,财务数据不向外传输。采用「本地OCR取字为主 + 本地多模态大模型(VLM)辅助字段定位」的混合路线,兼顾数字准确率与版式适应性。
agent_created: true
bind_agent: 小微企业财税专家
triggers: ["整理发票", "票据汇总", "生成报销台账", "统计进项票据"]
tools: [read_file, write_file, terminal]
working_mode: Craft
only_local_data: true
allow_network_upload: false
file_limit: 100
depends:
python: ">=3.10"
ocr_engine: "PaddleOCR (本地)"
vlm: "本地多模态模型,通过 Ollama 提供 (如 qwen2.5vl:7b / minicpm-v / llava)"
excel: "openpyxl"
metadata:
openclaw:
requires:
bins:
- python3
- ollama
envVars:
- name: OLLAMA_API
required: false
description: 本地 Ollama 多模态模型服务地址,默认 http://localhost:11434/api/chat
- name: VLM_MODEL
required: false
description: 本地多模态模型名,默认 qwen2.5vl:7b
emoji: "🧾"
---
# 一、设计路线(混合架构)
**核心原则:本地 OCR 为主,本地 VLM 辅助。**
| 环节 | 负责方 | 说明 |
|------|--------|------|
| 取字(字符级) | **本地 OCR(PaddleOCR)** | 逐字识别发票号码、税号、价税合计等长数字串,确定性强、不幻觉 |
| 字段定位/归类 | OCR规则优先;**本地 VLM 辅助兜底** | 标准票用关键词+正则直接定位;版式异常/缺字段时调本地多模态模型从图定位字段 |
| 校验 | 脚本(validate) | 价税合计≈不含税+税额、发票号码正则、必填项、分类 |
| 出表 | 脚本(ledger_builder) | openpyxl 生成「月度财税台账.xlsx」+「异常票据清单」 |
> ⚠️ VLM 仅作为**辅助**:只负责"这段OCR文字归到哪个字段",不负责从零读数字;数字以 OCR 结果为基准。
> ⚠️ 所有模型必须**本地运行**(Ollama 加载多模态模型),严禁把发票图片/金额发往任何云端接口。
# 二、技能执行流程
1. 仅当用户明确提供了票据存放文件夹路径时才继续;**若用户未提供目录,直接退出,不追问、不扫描电脑任何目录**。
2. 用 `python scripts/run_pipeline.py "<文件夹路径>"` 在本地执行整套流程:
a. 遍历目录内 PDF / JPG / JPEG / PNG(上限 `file_limit` 个,超出提示分批)。
b. **本地 OCR** 逐张取字(PDF 先渲染首页为图像)。
c. **字段抽取**:先用关键词+正则从 OCR 文本定位字段;若关键数字字段缺失或置信度低,调**本地 VLM** 辅助定位(仍以南向 OCR 数字为准)。
d. **校验**:勾稽关系 + 格式校验 + 分类,生成「风险备注」,不可读/对不上的标记为「异常」。
e. **按月分组**统计总收入、总税额、各类票据数量。
f. 在票据目录生成「月度财税台账.xlsx」(固定表头)+ 独立「异常票据清单」页。
3. (可选 · 仅 WorkBuddy 环境)输出完成后,自动唤醒【小微企业财税专家】Agent,同步台账数据做税务测算与风险分析。若运行环境不支持 Agent 绑定(如 OpenClaw 等非 WorkBuddy 平台),跳过此步即可——台账与异常清单已完整生成,不影响主流程。
运行脚本前确认依赖已装:`pip install -r scripts/requirements.txt`,且 Ollama 已加载本地多模态模型(默认 `qwen2.5vl:7b`,可用环境变量 `VLM_MODEL` / `OLLAMA_API` 覆盖)。
# 三、容错&安全规则
1. 损坏、模糊无法识别的发票单独列入「异常票据清单」写入 Excel,不丢弃源文件。
2. 全程禁止将发票原图、金额、企业信息上传任何云端接口;VLM 必须走本地 Ollama。
3. 不修改、删除客户原始发票文件,仅读取解析。
4. 含个人身份证、隐私抬头的票据信息仅本地缓存,任务结束自动清空内存数据。
5. 中文路径、带空格文件夹自动兼容,无乱码。
6. VLM 调用失败(本地模型未就绪等)时降级为「OCR+正则」,缺失字段进入异常清单,不中断整体流程。
7. 运行前自动检测本地环境(PaddleOCR 是否安装、Ollama 服务是否运行且已拉取所需模型);任一缺失则打印明确的安装命令提示后退出,**绝不静默联网安装或拉取模型**(坚持全本地离线)。
# 四、Excel台账固定表头
开票日期 | 发票类型 | 销售方 | 不含税金额 | 税额 | 价税合计 | 发票号码 | 票据状态 | 所属月份 | 风险备注README.md
# 小微企业财税套装 使用说明书 套装包含:**小微企业财税专家 Agent** + **发票归集自动台账 Skill** 核心优势:全本地离线运行,发票、收支数据全程不出本机,杜绝财务信息泄露。 发票识别采用「本地 OCR 取字为主 + 本地多模态大模型(VLM)辅助字段定位」的混合路线, 兼顾长数字串的识别准确率与各种版式的适应能力。 --- ## 一、安装导入步骤 1. 关闭 WorkBuddy,将整个 `tax-invoice-skill` 文件夹放入技能目录: - Windows:`C:\Users\你的用户名\.workbuddy\skills\` - Mac:`~/.workbuddy/skills/` 2. 重启 WorkBuddy,左侧技能栏会自动加载本套工具。 3. 导入 `tax-expert.agent`:快捷键 `Ctrl+Shift+P` 打开代理面板 → 创建代理 → 粘贴文件全部内容保存。 4. 按第二节「手动安装步骤」装好本机运行环境(Python 依赖 + Ollama 模型)。 --- ## 二、本地运行依赖(离线必需) 本技能自带 Python 实现(`scripts/` 目录),运行时不依赖任何云端接口,但本机需具备以下环境: 1. **Python >= 3.10** 2. **OCR 引擎(本地)**:`PaddleOCR`,用于逐字识别发票号码、税号、价税合计等长数字串(数字来源基准)。 3. **本地多模态模型(VLM,辅助)**:通过 **Ollama** 提供,仅用于补 OCR 规则未能定位的字段。 必须使用支持图像输入的本地模型,例如 `qwen2.5vl:7b`(默认)/ `minicpm-v` / `llava` 等。 > 注意:必须是**本地多模态模型**,不能偷接任何云端 VLM(如 GPT-4V),否则「数据不上传」的承诺即被打破。 4. **Excel 导出**:`openpyxl` > 运行前脚本会自动检测上述环境;若 PaddleOCR 未装、Ollama 未启动或模型未拉取,会**打印明确的安装命令提示后退出**,不会静默联网安装。因此请务必先按下方步骤手动装好。 ### 手动安装步骤 **第 1 步:安装 Python 依赖(OCR 引擎 + Excel 导出)** ```bash # 建议在项目内建虚拟环境(可选但推荐) python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate # 安装全部 Python 依赖(含 paddleocr / paddlepaddle / PyMuPDF / opencv-python / openpyxl / requests) pip install -r scripts/requirements.txt # 注:requests 已包含在 requirements.txt 中,无需单独安装;仅当环境异常缺失时才需 pip install requests ``` > 首次运行 `PaddleOCR` 会自动下载中文识别模型(约几百 MB),需联网一次;模型落本地后后续断网可用。 **第 2 步:安装并启动 Ollama(本地 VLM 运行时)** ```bash # 1) 下载安装 Ollama:https://ollama.com (按系统指引安装,Windows/Mac 均为图形安装包) # 2) 启动 Ollama 服务(安装后通常开机自启;也可手动启动) ollama serve # 终端常驻,监听 http://localhost:11434 ``` **第 3 步:拉取本地多模态模型** ```bash # 拉取默认模型(约 4~6 GB,需联网一次,落本地后断网可用) ollama pull qwen2.5vl:7b ``` > 验证模型已就位:`ollama list` 应能看到 `qwen2.5vl:7b`。 **第 4 步(可选):自定义模型或地址** ```bash # 若使用其他本地多模态模型,或 Ollama 不在默认地址,用环境变量覆盖: export VLM_MODEL=minicpm-v # 模型名,需先 ollama pull 对应模型 export OLLAMA_API=http://localhost:11434/api/chat # 默认地址,一般无需改 ``` **完成上述 4 步后**,即可在 WorkBuddy 中触发技能整理发票(见第三节)。若某步缺失,运行时会立即得到对应的安装提示。 --- ## 三、使用方法 ### 1. 自动批量整理发票(生成台账) 聊天输入:`整理发票`,按提示选择存放票据的文件夹(仅读取该目录,PDF/JPG/JPEG/PNG)。 技能会通过终端执行本地脚本完成全流程: ```bash python scripts/run_pipeline.py "<票据文件夹路径>" # 可选参数: # --out "<输出xlsx路径>" 指定台账保存位置(默认在票据目录生成「月度财税台账.xlsx」) # --limit N 单批处理上限(默认 100) ``` 执行后在该目录生成 `月度财税台账.xlsx`,含两个工作表: - **月度财税台账**:固定 10 列表头(开票日期、发票类型、销售方、不含税金额、税额、价税合计、发票号码、票据状态、所属月份、风险备注)+ 合计行。 - **异常票据清单**:勾稽不符、字段缺失、格式异常或类型无法识别的票据,供人工复核。 ### 2. 财税风险 & 报税测算 聊天输入:`财税咨询`,读取上一步生成的台账文件,专家自动做成本核算、季度算税、风险排查。 --- ## 四、容错与安全 - 损坏、模糊无法识别的发票单独列入「异常票据清单」,不丢弃源文件。 - 全程禁止将发票原图、金额、企业信息上传任何云端接口;VLM 必须走本地 Ollama。 - 不修改、删除客户原始发票文件,仅读取解析。 - VLM 调用失败(本地模型未就绪等)时自动降级为「OCR + 正则」,缺失字段进入异常清单,整体流程不中断。 --- ## 五、售后与更新 购买享 1 年免费更新:财税新政更新、台账模板优化、新增票据识别兼容格式。 如需企业定制:定制公司专属报表、对接内部进销存表格可单独付费开发。
_meta.json
{
"ownerId": "kn77jyhe7q3wey5zz82edswxe98a5pnj",
"slug": "tax-invoice-skill",
"version": "2.0.1",
"publishedAt": 1783560599897
}scripts/requirements.txt
paddleocr>=2.7.0 paddlepaddle>=2.6.0 PyMuPDF>=1.23.0 opencv-python>=4.8.0 openpyxl>=3.1.0 requests>=2.31.0
skill-card.md
## Description: 本技能在本地使用 OCR 和本地多模态模型辅助定位字段,从图片或 PDF 发票中抽取票面信息并生成月度报销台账。 This skill is ready for commercial/non-commercial use. ## Publisher: [vincent-chao-lang](https://clawhub.ai/user/vincent-chao-lang) ### License/Terms of Use: MIT-0 ## Use Case: Small-business finance users and agent workflows use this skill to process user-selected invoice folders, extract invoice fields, classify invoice types, flag exceptions, and build a monthly tax ledger for reimbursement and review. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: The skill processes sensitive financial documents and the local-only network boundary is not enforced by policy controls. Mitigation: Run it only in an isolated virtual environment, keep OLLAMA_API fixed to a loopback Ollama endpoint, and avoid proxy inheritance. Risk: Spreadsheet output handling may allow unsafe formulas or cell content from invoice data. Mitigation: Do not process invoices from untrusted sources until spreadsheet formula sanitization is added and reviewed. Risk: Runtime dependencies are not locked to exact versions. Mitigation: Pin and review dependencies before deployment, then install from a controlled package source. ## Reference(s): - [ClawHub skill page](https://clawhub.ai/vincent-chao-lang/skills/tax-invoice-skill) - [Publisher profile](https://clawhub.ai/user/vincent-chao-lang) - [Ollama](https://ollama.com) ## Skill Output: **Output Type(s):** [text, shell commands, configuration, guidance, files] **Output Format:** [Text guidance with shell commands; generated Excel workbook files] **Output Parameters:** [1D] **Other Properties Related to Output:** [Writes a monthly ledger workbook and an exception sheet in the user-provided invoice directory.] ## Skill Version(s): 2.0.1 (source: server release evidence) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/vincent-chao-lang/skills/tax-invoice-skill",
"sourceUrl": "https://clawhub.ai/vincent-chao-lang/skills/tax-invoice-skill",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T20:10:19.036Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-vincent-chao-lang-tax-invoice-skill/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-vincent-chao-lang-tax-invoice-skill/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-10T20:10:19.036Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.3K downloads",
"href": "https://clawhub.ai/vincent-chao-lang/tax-invoice-skill",
"sourceUrl": "https://clawhub.ai/vincent-chao-lang/tax-invoice-skill",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T20:10:19.036Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "2.0.1",
"href": "https://clawhub.ai/vincent-chao-lang/tax-invoice-skill",
"sourceUrl": "https://clawhub.ai/vincent-chao-lang/tax-invoice-skill",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-09T01:29:59.897Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-vincent-chao-lang-tax-invoice-skill/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-vincent-chao-lang-tax-invoice-skill/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 2.0.1",
"description": "优化跨平台说明:SKILL.md 第3步(自动唤醒专家 Agent)标注为「可选·仅 WorkBuddy 环境」,OpenClaw 等非 WorkBuddy 平台跳过此步即可,台账与异常清单已完整生成,不影响主流程。",
"href": "https://clawhub.ai/vincent-chao-lang/tax-invoice-skill",
"sourceUrl": "https://clawhub.ai/vincent-chao-lang/tax-invoice-skill",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-09T01:29:59.897Z",
"isPublic": true
}
]
}Record generated Oct 10, 2026.
