← 返回 Skills 市场
发票识别(invoice-ocr-xy)翔云平台
作者
liudengkui
· GitHub ↗
· v2.0.0
· MIT-0
126
总下载
1
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install invoice-ocr-xy
功能描述
发票 OCR 识别技能。扫描文件夹中的发票文件(PDF/图片),调用翔云 OCR API 识别发票信息。支持 40+ 种发票类型(增值税发票、火车票、出租车票、机票行程单、定额发票、机动车销售发票、过路过桥费发票等)。使用场景:(1) 用户提到"发票识别" (2) 用户需要批量处理发票 (3) 用户提到翔云 OC...
使用说明 (SKILL.md)
发票 OCR 识别技能
批量识别发票。
⚠️ 首次使用必须配置凭证
此技能需要翔云 OCR 服务,使用前必须先配置凭证!
方式一:向用户提供凭证(推荐)
主动询问用户:
"使用此技能需要翔云 netocr_key 和 netocr_secret,请提供这两个凭证。
获取方式:翔云个人中心"
然后运行:
python scripts/recognize_invoices.py --config
方式二:引导用户自行配置
告诉用户:
"请先运行以下命令配置翔云凭证:"
python ~/.openclaw/skills/invoice-ocr/scripts/recognize_invoices.py --config
特点
- ✅ 40+ 发票类型 - 自动识别发票类型
- ✅ 支持 PDF/OFD - 电子发票友好
支持的发票类型
| 票种名称 | 票种代码 |
|---|---|
| 增值税专用发票 | 01 |
| 机动车销售统一发票 | 03 |
| 增值税普通发票 | 04 |
| 增值税专用电子发票 | 08 |
| 增值税电子普通发票 | 10 |
| 增值税普通发票(卷票) | 11 |
| 通行费增值税电子普通发票 | 14 |
| 二手车销售统一发票 | 15 |
| 数电发票(增值税专用发票) | 09 |
| 数电发票(普通发票) | 83 |
| 数电发票(航空运输电子客票行程单) | 61 |
| 数电发票(铁路电子客票) | 62 |
| 电子发票(机动车销售统一发票) | 63 |
| 数电发票(二手车销售统一发票) | 64 |
| 电子发票(普通发票) 通行费 | 72 |
| 数电纸质发票(增值税专用发票) | 91 |
| 数电纸票发票(普通发票) | 92 |
| 数电纸质发票(机动车销售统一发票) | 93 |
| 数电纸票发票(二手车销售统一发票) | 94 |
| 火车票 | 20 |
| 区块链发票 | 21 |
| 船票 | 22 |
| 定额发票 | 23 |
| 机打发票 | 24 |
| 出租车发票 | 25 |
| 客运汽车 | 26 |
| 航空运输电子客票行程单 | 27 |
| 过路费 | 28 |
| 打车行程单 | 31 |
| 货物清单 | 33 |
| 财政电子票据 | 34 |
| 海关缴款书 | 35 |
| 通用电子发票 | 36 |
| 完税证明 | 37 |
| 医疗票据 | 38 |
| 退票费报销凭证 | 39 |
| 非税收入一般缴款书(电子) | 40 |
| 车辆通行费通用(电子)发票 | 41 |
| 银行回单 | 42 |
支持的文件格式
| 格式 | 扩展名 |
|---|---|
| OFD | .ofd |
| 图片 | .jpg, .jpeg, .png, .bmp |
使用方法
识别发票
# 识别文件夹中的所有发票
python scripts/recognize_invoices.py /path/to/invoices
\r
# 识别单张发票\r
python scripts/recognize_invoices.py /path/to/invoices/123.png
配置管理
# 设置翔云凭证
python scripts/recognize_invoices.py --config
# 查看当前配置
python scripts/recognize_invoices.py --list-config
获取 netocr_key 和 netocr_secret
- 登录翔云
- 在个人中心获得
详细 API 说明见 翔云 OCR API 参考
工作流程
发票文件 → OCR识别 → 返回结果
↓ ↓ ↓
PDF/图片 混贴识别 JSON结构
注意事项
- 图片需清晰,建议长宽 > 500px
- 单个文件不超过 10MB
- 翔云 OCR 按次计费,注意费用控制
- 配置文件保存在技能目录下的 config.json
安全使用建议
This skill appears to do what it claims (upload invoice images to 翔云/NetOCR and return JSON/Excel). Before installing or using it: (1) only provide a NetOCR API key/secret that you trust and consider creating a limited/quota-limited key for this purpose; (2) be aware credentials are stored in plaintext in the skill's config.json (inspect and move to a safer storage if needed); (3) the script may auto-install openpyxl from PyPI at runtime — if you prefer, pre-install dependencies in a controlled environment; (4) review the script yourself (or run it in an isolated environment) if you have high security/privacy requirements; (5) verify the netocr.com endpoint and your account billing settings to avoid unexpected charges.
功能分析
Type: OpenClaw Skill
Name: invoice-ocr-xy
Version: 2.0.0
The skill provides legitimate invoice OCR functionality using the Xiangyun (netocr.com) API. The main script `scripts/recognize_invoices.py` handles file scanning, multipart API requests via `urllib`, and result exportation to Excel or JSON. It includes a helper function to auto-install the `openpyxl` library using `subprocess`, which is hardcoded and limited to that specific package. The `SKILL.md` instructions correctly guide the AI agent to request necessary API credentials from the user for local storage in `config.json`. No evidence of data exfiltration to unauthorized endpoints or malicious execution was found.
能力评估
Purpose & Capability
Name/description match the code and SKILL.md: the script scans files, encodes them, and posts to netocr.com. No unrelated credentials, endpoints, or binaries are requested.
Instruction Scope
SKILL.md explicitly instructs the agent to ask the user for netocr_key and netocr_secret or to run --config; the script reads files from user-specified paths and sends image data to the declared NetOCR endpoint. This is within scope, but the skill requires the user to disclose sensitive API keys.
Install Mechanism
There is no declared install spec, but the script will attempt to pip-install openpyxl at runtime via subprocess.check_call if needed. Runtime automatic installs fetch code from PyPI and execute it locally, which increases risk compared with an instruction-only skill.
Credentials
The skill requests no environment variables but requires the user to supply netocr_key and netocr_secret. That is appropriate for this integration, but those credentials are stored in a plain config.json under the skill folder (unencrypted), which may be undesirable for sensitive accounts.
Persistence & Privilege
always:false and user-invocable:true. The skill writes a local config.json in its own directory and may install Python packages on demand; it does not request elevated system privileges or modify other skills.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install invoice-ocr-xy - 安装完成后,直接呼叫该 Skill 的名称或使用
/invoice-ocr-xy触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
更改名称
v1.0.2
No user-facing changes in this version.
- No file changes detected.
- Documentation, features, and usage remain unchanged.
v1.0.1
- 移除了本地 API 参考文档 xiangyun-ocr-api.md
- API 参考链接改为翔云官网在线文档
- 用法示例增加了对单张发票识别的说明
v1.0.0
Initial release of invoice-ocr-xy.
- Supports batch OCR recognition of 40+ invoice types (VAT, train tickets, taxi, airline, quota invoices, vehicle sales, toll, etc.) using the Xiangyun OCR API.
- Handles PDF, OFD, and image formats (.pdf, .ofd, .jpg, .jpeg, .png, .bmp).
- Requires Xiangyun credentials (netocr_key and netocr_secret) to be configured on first use.
- Provides command-line tools for recognition and credential management.
- Includes guides for both end-users and admins for setup and usage.
元数据
常见问题
发票识别(invoice-ocr-xy)翔云平台 是什么?
发票 OCR 识别技能。扫描文件夹中的发票文件(PDF/图片),调用翔云 OCR API 识别发票信息。支持 40+ 种发票类型(增值税发票、火车票、出租车票、机票行程单、定额发票、机动车销售发票、过路过桥费发票等)。使用场景:(1) 用户提到"发票识别" (2) 用户需要批量处理发票 (3) 用户提到翔云 OC... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 126 次。
如何安装 发票识别(invoice-ocr-xy)翔云平台?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install invoice-ocr-xy」即可一键安装,无需额外配置。
发票识别(invoice-ocr-xy)翔云平台 是免费的吗?
是的,发票识别(invoice-ocr-xy)翔云平台 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
发票识别(invoice-ocr-xy)翔云平台 支持哪些平台?
发票识别(invoice-ocr-xy)翔云平台 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 发票识别(invoice-ocr-xy)翔云平台?
由 liudengkui(@liudengkui)开发并维护,当前版本 v2.0.0。
推荐 Skills