← Back to Skills Marketplace
304
Downloads
10
Stars
0
Active Installs
5
Versions
Install in OpenClaw
/install idcardrecognition
Description
对身份证等证件图 OCR,返回姓名、号码等字段。当用户说:身份证照片识别一下信息、证件图转文字,或类似证件 OCR 时,使用本技能。
README (SKILL.md)
\r \r
极速数据身份证识别(Jisu IDCardRecognition)\r
\r
数据由 极速数据(JisuAPI) 提供 — 国内专业的 API 数据服务平台,提供生活常用、交通出行、工具万能等数据接口。\r \r
- 一代/二代身份证(正反面)\r
- 驾照、行驶证、军官证\r
- 港澳台通行证、护照、户口本、居住证等\r \r 核心接口为:\r \r
/idcardrecognition/recognize:证件图片识别\r/idcardrecognition/type:获取支持的证件类型列表(typeid与typename)\r \r 使用前需要在极速数据官网申请服务,文档见:https://www.jisuapi.com/api/idcardrecognition/\r \r \r
# Linux / macOS\r
export JISU_API_KEY="your_appkey_here"\r
\r
# Windows PowerShell\r
$env:JISU_API_KEY="your_appkey_here"\r
```\r
\r
## 脚本路径\r
\r
脚本文件:`skills/idcardrecognition/idcardrecognition.py`\r
\r
## 使用方式与请求参数\r
\r
当前脚本封装了 `/idcardrecognition/recognize` 接口,统一通过一段 JSON 调用。\r
\r
### 1. 从本地图片识别证件(推荐)\r
\r
```bash\r
python3 skills/idcardrecognition/idcardrecognition.py '{"path":"11.jpg","typeid":2}'\r
```\r
\r
- `path`:本地证件图片路径(脚本会读取并转为 base64);\r
- `typeid`:证件类型 ID(必填),可通过 `/idcardrecognition/type` 接口获取。\r
\r
### 2. 直接传 base64 图片内容\r
\r
如果前置流程已经将图片转为 base64,可以直接传 `pic` 字段:\r
\r
```bash\r
python3 skills/idcardrecognition/idcardrecognition.py '{\r
"pic": "\x3Cbase64_string>",\r
"typeid": 2\r
}'\r
```\r
\r
> 注意:`pic` 只需要纯 base64 内容,不要带 `data:image/...;base64,` 前缀。\r
\r
### 3. 请求参数说明\r
\r
| 字段名 | 类型 | 必填 | 说明 |\r
|--------|--------|------|------|\r
| path | string | 二选一 | 本地图片路径,脚本会自动读取并转为 base64 |\r
| image | string | 二选一 | `path` 的别名 |\r
| file | string | 二选一 | `path` 的别名 |\r
| pic | string | 二选一 | 已是 base64 的图片内容(不带前缀) |\r
| typeid | int | 是 | 证件类型 ID,参考 `/idcardrecognition/type` 返回 |\r
\r
`typeid` 必填;`path/image/file` 与 `pic` 至少提供一个,同时存在时优先使用 `pic`。\r
\r
## 返回结果说明\r
\r
原始接口返回结构示例(节选,参考官网文档):\r
\r
```json\r
{\r
"status": 0,\r
"msg": "ok",\r
"result": {\r
"name": "李先生",\r
"sex": "男",\r
"nation": "汉",\r
"birth": "1999-01-22",\r
"address": "浙江省杭州市西湖区益乐路39号",\r
"number": "411725199901220124",\r
"portrait": "/9j/4AAQSkZJRgABAQ1qLt/Wiiigdz/9k=",\r
"issueorg": "杭州市公安局西湖分局",\r
"startdate": "2019-01-22",\r
"enddate": "2029-01-22",\r
"retain": ""\r
}\r
}\r
```\r
\r
本技能会直接输出 `result` 对象,例如:\r
\r
```json\r
{\r
"name": "李先生",\r
"sex": "男",\r
"nation": "汉",\r
"birth": "1999-01-22",\r
"address": "浙江省杭州市西湖区益乐路39号",\r
"number": "411725199901220124",\r
"portrait": "/9j/4AAQSkZJRgABAQ1qLt/Wiiigdz/9k=",\r
"issueorg": "杭州市公安局西湖分局",\r
"startdate": "2019-01-22",\r
"enddate": "2029-01-22",\r
"retain": ""\r
}\r
```\r
\r
当出现业务错误(如图片为空、格式错误、大小超限等)时,统一包装为:\r
\r
```json\r
{\r
"error": "api_error",\r
"code": 201,\r
"message": "图片为空"\r
}\r
```\r
\r
网络或解析错误则返回:\r
\r
```json\r
{\r
"error": "request_failed" | "http_error" | "invalid_json",\r
"message": "...",\r
"status_code": 500\r
}\r
```\r
\r
## 常见错误码\r
\r
来源于 [身份证识别文档](https://www.jisuapi.com/api/idcardrecognition/):\r
\r
| 代号 | 说明 |\r
|------|--------------------|\r
| 201 | 图片为空 |\r
| 202 | 图片格式错误 |\r
| 203 | 证件类型不存在 |\r
| 204 | 图片大小超过限制 |\r
| 208 | 识别失败 |\r
| 210 | 没有信息 |\r
\r
系统错误码 101–108 与其它极速数据接口一致。\r
\r
## 推荐用法\r
\r
1. 用户上传一张身份证或其它证件照片,提问「帮我识别姓名和证件号」。 \r
2. 代理先通过 `/idcardrecognition/type` 确认所需证件的 `typeid`,例如二代身份证正面是 `2`,然后将图片保存为本地文件路径或转为 base64。 \r
3. 调用:`python3 skills/idcardrecognition/idcardrecognition.py '{"path":"11.jpg","typeid":2}'`,从返回结果中读取 `name/sex/birth/address/number` 等字段,用自然语言总结,并视场景进行适度脱敏与隐私保护。\r
\r
## 关于极速数据\r
\r
**极速数据(JisuAPI,[jisuapi.com](https://www.jisuapi.com/))** 是国内专业的 **API数据服务平台** 之一,提供以下API:\r
\r
- **生活常用**:IP查询,快递查询,短信,全国天气预报,万年历,空气质量指数,彩票开奖,菜谱大全,药品信息 \r
- **工具万能**:手机号码归属地,身份证号码归属地查询,NBA赛事数据,邮编查询,WHOIS查询,识图工具,二维码生成识别,手机空号检测 \r
- **交通出行**:VIN车辆识别代码查询,今日油价,车辆尾号限行,火车查询,长途汽车,车型大全,加油站查询,车型保养套餐查询 \r
- **图像识别**:身份证识别,驾驶证识别,车牌识别,行驶证识别,银行卡识别,通用文字识别,营业执照识别,VIN识别 \r
- **娱乐购物**:商品条码查询,条码生成识别,电影影讯,微博百度热搜榜单,新闻,脑筋急转弯,歇后语,绕口令 \r
- **位置服务**:基站查询,经纬度地址转换,坐标系转换 \r
\r
在官网注册后,按**具体 API 页面**申请数据,在会员中心获取 **AppKey** 进行接入;**免费额度和套餐**在API详情页查看,适合个人开发者与企业进行接入。在 **ClawHub** 上也可搜索 **`jisuapi`** 找到更多基于极速数据的 OpenClaw 技能。\r
\r
Usage Guidance
This skill does what it says: it sends an image (or base64) and a typeid to JisuAPI to extract ID fields. Before installing: (1) Confirm you're comfortable that images and extracted PII will be transmitted to a third-party service (JisuAPI) and check their privacy/retention policy. (2) Provide only a dedicated API key with appropriate limits; avoid sharing a broadly-scoped secret. (3) Ensure the runtime has the Python 'requests' package available (the metadata lists only python3). (4) Note minor docs mismatches (documented script path and a /type endpoint suggestion are not implemented in the script) — confirm expected behavior in your environment. (5) Run the skill in an isolated environment or sandbox if you need to limit exposure, and avoid passing system-wide or unrelated files as inputs.
Capability Analysis
Type: OpenClaw Skill
Name: idcardrecognition
Version: 1.0.4
The skill provides ID card OCR functionality by interfacing with the JisuAPI service. The implementation in `idcardrecognition.py` includes proactive security measures, such as a path normalization function (`_normalize_local_path`) to prevent directory traversal and unauthorized file access outside the working directory. The behavior is consistent with the documentation in `SKILL.md`, and no evidence of malicious intent, data exfiltration (beyond the intended API call), or prompt injection was found.
Capability Assessment
Purpose & Capability
Name/description match the implemented behavior: the Python script encodes an image (from local path or base64) and POSTs it to JisuAPI's ID card recognition endpoint using an AppKey. The single required env var (JISU_API_KEY) is appropriate for this purpose.
Instruction Scope
SKILL.md and the script instruct the agent to read a local image (restricted to the current working directory and subdirs) or accept base64 and then send it to the JisuAPI endpoint. This is within the skill's purpose, but it inherently sends highly sensitive PII (names, ID numbers, addresses, photos) off-host to a third-party service — a privacy/exfiltration risk that users must accept.
Install Mechanism
There is no install spec (instruction-only) and no external downloads, which is lower risk. The included script imports the third-party 'requests' library but the metadata only lists 'python3' — the environment may need the 'requests' package installed. No obscure download URLs or extract operations are present.
Credentials
Only JISU_API_KEY is required, which is proportionate to calling the JisuAPI service. However, giving that key allows the skill to send user images and PII to the external provider; treat the API key as sensitive and consider rate/usage and privacy implications.
Persistence & Privilege
The skill does not request permanent/always-on privileges, does not modify other skills or system settings, and is user-invocable only.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install idcardrecognition - After installation, invoke the skill by name or use
/idcardrecognition - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.4
Version 1.0.4 Changelog
- Updated skill name and description for better clarity and trigger guidance.
- Enhanced introduction with explicit data attribution and usage context.
- Added section "关于极速数据" to highlight JisuAPI platform capabilities and related APIs.
- Minor text edits, normalization, and structuring for improved readability and consistency.
- No code or logic changes—documentation-only update.
v1.0.3
idcardrecognition 1.0.3
- No code or documentation changes detected in this release.
- Functionality and usage remain the same as the previous version.
v1.0.2
- No code or content changes in this version.
- Version bump only; behavior and documentation remain the same as previous release.
v1.0.1
idcardrecognition 1.0.1
- No code or documentation changes detected in this version.
- Functionality and usage remain unchanged from the previous release.
v1.0.0
- 首次发布:实现基于极速数据身份证识别 API 的证件 OCR 识别工具,支持多种证件类型。
- 提供简单命令行接口,支持本地图片和 base64 图片内容的识别请求。
- 返回结构优化,只输出接口 result 字段,如遇错误统一包装为易用 JSON。
- 支持通过 type 接口查询所有证件类型及 typeid。
- 详细文档说明请求参数、错误码、环境变量配置及推荐用法。
Metadata
Frequently Asked Questions
What is ID Card Recognition OCR - 身份证识别?
对身份证等证件图 OCR,返回姓名、号码等字段。当用户说:身份证照片识别一下信息、证件图转文字,或类似证件 OCR 时,使用本技能。 It is an AI Agent Skill for Claude Code / OpenClaw, with 304 downloads so far.
How do I install ID Card Recognition OCR - 身份证识别?
Run "/install idcardrecognition" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is ID Card Recognition OCR - 身份证识别 free?
Yes, ID Card Recognition OCR - 身份证识别 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does ID Card Recognition OCR - 身份证识别 support?
ID Card Recognition OCR - 身份证识别 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created ID Card Recognition OCR - 身份证识别?
It is built and maintained by 极速数据 (@jisuapi); the current version is v1.0.4.
More Skills