← Back to Skills Marketplace
liudengkui

发票识别(invoice-ocr-xy)翔云平台

by liudengkui · GitHub ↗ · v2.0.0 · MIT-0
cross-platform ✓ Security Clean
126
Downloads
1
Stars
0
Active Installs
4
Versions
Install in OpenClaw
/install invoice-ocr-xy
Description
发票 OCR 识别技能。扫描文件夹中的发票文件(PDF/图片),调用翔云 OCR API 识别发票信息。支持 40+ 种发票类型(增值税发票、火车票、出租车票、机票行程单、定额发票、机动车销售发票、过路过桥费发票等)。使用场景:(1) 用户提到"发票识别" (2) 用户需要批量处理发票 (3) 用户提到翔云 OC...
README (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

支持的文件格式

格式 扩展名
PDF .pdf
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

  1. 登录翔云
  2. 在个人中心获得

详细 API 说明见 翔云 OCR API 参考

工作流程

发票文件 → OCR识别 → 返回结果
   ↓           ↓         ↓
 PDF/图片   混贴识别   JSON结构

注意事项

  1. 图片需清晰,建议长宽 > 500px
  2. 单个文件不超过 10MB
  3. 翔云 OCR 按次计费,注意费用控制
  4. 配置文件保存在技能目录下的 config.json
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install invoice-ocr-xy
  3. After installation, invoke the skill by name or use /invoice-ocr-xy
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug invoice-ocr-xy
Version 2.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 4
Frequently Asked Questions

What is 发票识别(invoice-ocr-xy)翔云平台?

发票 OCR 识别技能。扫描文件夹中的发票文件(PDF/图片),调用翔云 OCR API 识别发票信息。支持 40+ 种发票类型(增值税发票、火车票、出租车票、机票行程单、定额发票、机动车销售发票、过路过桥费发票等)。使用场景:(1) 用户提到"发票识别" (2) 用户需要批量处理发票 (3) 用户提到翔云 OC... It is an AI Agent Skill for Claude Code / OpenClaw, with 126 downloads so far.

How do I install 发票识别(invoice-ocr-xy)翔云平台?

Run "/install invoice-ocr-xy" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 发票识别(invoice-ocr-xy)翔云平台 free?

Yes, 发票识别(invoice-ocr-xy)翔云平台 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 发票识别(invoice-ocr-xy)翔云平台 support?

发票识别(invoice-ocr-xy)翔云平台 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 发票识别(invoice-ocr-xy)翔云平台?

It is built and maintained by liudengkui (@liudengkui); the current version is v2.0.0.

💬 Comments