← 返回 Skills 市场
jisuapi

Bank Card Recognition OCR - 银行卡识别

作者 极速数据 · GitHub ↗ · v1.0.4 · MIT-0
cross-platform ✓ 安全检测通过
261
总下载
10
收藏
0
当前安装
5
版本数
在 OpenClaw 中安装
/install bankcardcognition
功能描述
对银行卡图片 OCR,返回卡号、银行与卡类型等。当用户说:银行卡卡号从照片里读出来、识别这张卡哪家银行,或类似银行卡 OCR 时,使用本技能。
使用说明 (SKILL.md)

\r \r

极速数据银行卡识别(Jisu BankCardCognition)\r

\r

数据由 极速数据(JisuAPI) 提供 — 国内专业的 API 数据服务平台,提供生活常用、交通出行、工具万能等数据接口。\r \r

  • number:银行卡号\r
  • type:银行卡类型(借记卡/信用卡等)\r
  • bankname:银行名称\r
  • bankno:银行编号\r \r 使用前需要在极速数据官网申请服务,文档见:https://www.jisuapi.com/api/bankcardcognition/\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/bankcardcognition/bankcardcognition.py`\r
\r
## 使用方式与请求参数\r
\r
当前脚本封装了 `/bankcardcognition/recognize` 接口,统一通过一段 JSON 调用。\r
\r
### 1. 从本地图片识别银行卡(推荐)\r
\r
```bash\r
python3 skills/bankcardcognition/bankcardcognition.py '{"path":"bankcard.jpg"}'\r
```\r
\r
- `path`:本地银行卡图片路径(脚本会读取并转为 base64),建议使用较清晰的 JPG/PNG,大小不超过 500K。\r
\r
### 2. 直接传 base64 图片内容\r
\r
如果前置流程已经将图片转为 base64,可以直接传 `pic` 字段:\r
\r
```bash\r
python3 skills/bankcardcognition/bankcardcognition.py '{\r
  "pic": "\x3Cbase64_string>"\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
\r
`path/image/file` 与 `pic` 至少提供一个,同时存在时优先使用 `pic`。\r
\r
## 返回结果说明\r
\r
原始接口返回结构示例(参考官网文档):\r
\r
```json\r
{\r
  "status": 0,\r
  "msg": "ok",\r
  "result": {\r
    "number": "9559980210010631815",\r
    "type": "借记卡",\r
    "bankname": "农业银行",\r
    "bankno": "01030000"\r
  }\r
}\r
```\r
\r
本技能会直接输出 `result` 对象,例如:\r
\r
```json\r
{\r
  "number": "9559980210010631815",\r
  "type": "借记卡",\r
  "bankname": "农业银行",\r
  "bankno": "01030000"\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/bankcardcognition/):\r
\r
| 代号 | 说明               |\r
|------|--------------------|\r
| 201  | 图片为空           |\r
| 202  | 图片格式错误       |\r
| 204  | 图片大小超过限制   |\r
| 208  | 识别失败           |\r
| 210  | 没有信息           |\r
\r
系统错误码 101–108 与其它极速数据接口一致。\r
\r
## 推荐用法\r
\r
1. 用户上传一张银行卡照片,希望确认卡号、银行名称或卡类型。  \r
2. 代理将图片保存为本地文件或转为 base64,调用:`python3 skills/bankcardcognition/bankcardcognition.py '{"path":"bankcard.jpg"}'`。  \r
3. 从返回结果中读取 `number/type/bankname/bankno` 字段,用自然语言总结,并根据场景提醒注意隐私和安全,仅在安全环境下展示或存储卡号信息。\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
安全使用建议
This skill appears coherent, but be aware: using it uploads full card images to JisuAPI (an external service) along with your JISU_API_KEY, so only use it if you trust that provider and accept that sensitive data (card numbers) will be transmitted and processed remotely. The script restricts file reads to the current working directory, which reduces risk, but ensure the working directory doesn't contain unrelated sensitive files. Install the Python 'requests' package if missing. Treat the API key like a secret: provide a dedicated/limited key if possible and rotate it if you stop using the skill. If you need purely local/offline OCR for higher privacy, consider an on-device OCR alternative instead.
功能分析
Type: OpenClaw Skill Name: bankcardcognition Version: 1.0.4 The skill provides bank card OCR functionality by interfacing with the JisuAPI service. The implementation in bankcardcognition.py includes proactive security measures, such as a path normalization function that explicitly prevents directory traversal and absolute path access, ensuring the agent can only read image files from the designated working directory. The code is well-structured, follows the stated purpose, and contains no evidence of malicious intent or prompt injection.
能力评估
Purpose & Capability
Name/description match the implementation: the script posts a base64-encoded image to JisuAPI's bankcardcognition endpoint and returns the result. Required items (python3 binary and JISU_API_KEY) are appropriate for this purpose.
Instruction Scope
Runtime instructions and script behavior are limited to reading a local image (or using provided base64), encoding it, and calling the remote API. The code enforces path restrictions (disallows absolute paths and '..') to limit file access to the current working directory and subdirectories.
Install Mechanism
There is no install spec (lowest-risk), but the script imports the 'requests' library while SKILL.md metadata only declares python3. The environment may need 'requests' installed (pip) for the script to run; this missing dependency declaration is a minor inconsistency.
Credentials
Only JISU_API_KEY is required and used as the appkey for the documented JisuAPI endpoint. No other secrets or unrelated environment variables or config paths are requested.
Persistence & Privilege
The skill is not always-enabled and does not request elevated or persistent system privileges. It does not modify other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install bankcardcognition
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /bankcardcognition 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.4
Version 1.0.4 - Updated skill name and description for improved clarity and trigger matching. - Enhanced introduction, attribution, and API provider details in documentation. - Added an "About JisuAPI" section outlining available API categories and use cases. - Slightly restructured usage guidance and formatting for better readability. - No code changes; documentation improvements only.
v1.0.3
- No changes detected in this version; documentation and functionality remain the same.
v1.0.2
- No changes in code or documentation detected in this version. - Functionality, usage, and interface remain the same as previous release.
v1.0.1
- No code or documentation changes detected in this version. - Functionality, usage instructions, and API details remain the same as the previous release.
v1.0.0
- Initial release of jisu-bankcardcognition skill for OpenClaw. - Provides rapid bank card OCR recognition using Jisu API; extracts card number, type, bank name, and bank code from card images. - Supports input via local image path or direct base64 string. - Flexible parameter options: accepts path/image/file or pic fields in JSON. - Returns structured recognition results or detailed error messages for failed requests. - Includes guides for environment variable setup and typical error codes.
元数据
Slug bankcardcognition
版本 1.0.4
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 5
常见问题

Bank Card Recognition OCR - 银行卡识别 是什么?

对银行卡图片 OCR,返回卡号、银行与卡类型等。当用户说:银行卡卡号从照片里读出来、识别这张卡哪家银行,或类似银行卡 OCR 时,使用本技能。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 261 次。

如何安装 Bank Card Recognition OCR - 银行卡识别?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install bankcardcognition」即可一键安装,无需额外配置。

Bank Card Recognition OCR - 银行卡识别 是免费的吗?

是的,Bank Card Recognition OCR - 银行卡识别 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Bank Card Recognition OCR - 银行卡识别 支持哪些平台?

Bank Card Recognition OCR - 银行卡识别 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Bank Card Recognition OCR - 银行卡识别?

由 极速数据(@jisuapi)开发并维护,当前版本 v1.0.4。

💬 留言讨论