专业的票据 OCR 识别技能,支持增值税发票、火车票等各类票据的识别。
Scanned 9/11/2026
Install to Claude Code
npx -y skills add lxyeternal/MalSkillBench --skill rapid-ocr --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Rapid Ocr?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/lxyeternal-rapid-ocr)More formats (shields.io, HTML) on the badges page.
# RapidOCR Skill (v1.3.0)
## 描述
专业的票据 OCR 识别技能,支持增值税发票、火车票等各类票据的识别。
## ⚠️ 重要说明
**首次运行需要网络下载模型(约 13MB),后续使用完全离线。**
**安全元数据说明**:
- ✅ 技能代码本身**不发起任何网络请求**
- ⚠️ 依赖包 `rapidocr-onnxruntime` 首次调用时**会自动下载模型**
- 这是依赖包的行为,不是技能代码的行为
## 核心特性
- ✅ **轻量代码** - 约 4KB,无内置大文件
- ✅ **首次下载** - 首次运行自动下载 OCR 模型(~13MB)
- ✅ **离线推理** - 模型下载后完全离线使用
- ✅ **安全透明** - 无 exec/eval,无运行时网络请求,代码可审计
- ✅ **快速识别** - ~500ms/张
## 网络需求
| 阶段 | 网络 | 数据量 |
|------|------|--------|
| 安装依赖 | 需要 | ~50 MB |
| 首次运行 | 需要 | ~13 MB |
| 后续使用 | **不需要** | 0 |
## 外部依赖
- **PyPI 包**: `rapidocr-onnxruntime`
- **模型来源**: PaddleOCR (Apache 2.0)
- **模型行为**: 首次运行自动下载到本地缓存
## 文件结构
```
rapid-ocr/
├── rapidocr_minimal.py # 主程序入口 (~4KB)
├── test_ocr.py # 测试套件
├── README.md # 用户文档
├── TRANSPARENCY.md # 透明度说明
├── SKILL.md # 本文件
├── claw.json # OpenClaw 配置
├── requirements.txt # Python 依赖
└── models/
└── README.md # 模型说明
```
## 使用方式
### CLI
```bash
python rapidocr_minimal.py ocr image.jpg
python rapidocr_minimal.py invoice invoice.jpg
python rapidocr_minimal.py train ticket.jpg
```
### Python API
```python
from rapidocr_minimal import RapidOCRSkill
skill = RapidOCRSkill()
result = skill.ocr_image("image.jpg")
print(result['full_text'])
# 发票识别
invoice_data = skill.ocr_invoice("invoice.jpg")
print(invoice_data['structured_data'])
```
## 测试
```bash
python test_ocr.py
```
## 许可证
MIT License
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!