Xpersona
P

personal_card_ocr

CLAWHUB · Unverified

将图片中的文字、身份证、银行卡、社保卡、户口本、出生医学证明、往来港澳通行证、往来台湾通行证、台湾居民来往大陆通行证、港澳居民来往内地通行证、中国香港身份证、外国人永久居留身份证、结婚证、不动产权证书、机动车行驶证正页、机动车行驶证副页、机动车驾驶证正页、机动车驾驶证副页、中国护照、学历证书、学历证书电子注册备案表、学位证书等信息识别并提取出来。本技能仅在用户明确要求对图片进行 OCR 识别,并同意将图片上传到第三方 OCR 服务(Scnet)处理时触发。只处理用户主动提供的本地图片路径,不会主动扫描或枚举文件系统。 Skill: personal_card_ocr Owner: scnet-sugon Summary: 将图片中的文字、身份证、银行卡、社保卡、户口本、出生医学证明、往来港澳通行证、往来台湾通行证、台湾居民来往大陆通行证、港澳居民来往内地通行证、中国香港身份证、外国人永久居留身份证、结婚证、不动产权证书、机动车行驶证正页、机动车行驶证副页、机动车驾驶证正页、机动车驾驶证副页、中国护照、学历证书、学历证书电子注册备案表、学位证书等信息识别并提取出来。本技能仅在用户明确要求对图片进行 OCR 识别,并同意将图片上传到第三方 OCR 服务(Scnet)处理时触发。只处理用户主动提供的本地图片路径,不会主动扫描或枚举文件系统。 Tags: latest:1.0.6 Version history: v1.0.6 | 2026-08-12T03:39:31.313Z | user - 增强隐私保护说明,明确告知图片将上传至第三方 OCR

62
Rank
84
Safety
1.4k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.4K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17aan1jdk93c5398r3ypc523d83hqys:personal-card-ocr
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-scnet-sugon-personal-card-ocr/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

123,719 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: personal_card_ocr
description: 将图片中的文字、身份证、银行卡、社保卡、户口本、出生医学证明、往来港澳通行证、往来台湾通行证、台湾居民来往大陆通行证、港澳居民来往内地通行证、中国香港身份证、外国人永久居留身份证、结婚证、不动产权证书、机动车行驶证正页、机动车行驶证副页、机动车驾驶证正页、机动车驾驶证副页、中国护照、学历证书、学历证书电子注册备案表、学位证书等信息识别并提取出来。本技能仅在用户明确要求对图片进行 OCR 识别,并同意将图片上传到第三方 OCR 服务(Scnet)处理时触发。只处理用户主动提供的本地图片路径,不会主动扫描或枚举文件系统。
version: 1.0.5
author: SCNet
license: MIT
tags:
  - OCR
  - 证件识别
  - 发票识别
  - 文字提取
required_env_vars:
  - SCNET_API_KEY
optional_env_vars:
  - SCNET_API_BASE
primary_credential: SCNET_API_KEY
dependencies:
  - python3
  - requests
input:
  - ocrType : 识别类型,可选值见下文
  - filePath : 待识别图片的本地路径
output: 结构化的 JSON 数据,包含识别结果和置信度
---
# Sugon-Scnet 个人证照识别 OCR 技能

> **⚠️ 隐私与安全警告(必读)**
>
> 本技能会将您提供的图片上传到第三方 OCR 服务提供商 **Scnet(https://api.scnet.cn)** 进行识别。
> 图片及其中可能包含的身份证、银行卡、护照、户口本、结婚证、学历证书等个人敏感信息均会离开本地设备,由 Scnet 服务器进行处理。
>
> - 请在明确了解上述风险并同意后再使用本技能。
> - 请勿上传非必要或他人的敏感证件图片。建议仅上传当前任务所需的最小数据。
> - 本技能不会在本地持久化保存您上传的图片或识别结果;识别完成后是否保留原图由您自行决定。
> - 关于 Scnet 对数据的处理、存储和安全策略,请参阅 [Scnet 官方隐私政策/服务条款](https://www.scnet.cn)。

本技能封装了个人证照识别的 OCR 服务,通过单一接口即可调用 21 种识别能力,高效提取居民身份证、银行卡、社保卡、户口本、出生医学证明、往来港澳通行证、往来台湾通行证、台湾居民来往大陆通行证、港澳居民来往内地通行证、中国香港身份证、外国人永久居留身份证、结婚证、不动产权证书、机动车行驶证正页、机动车行驶证副页、机动车驾驶证正页、机动车驾驶证副页、中国护照、学历证书、学历证书电子注册备案表、学位证书等核心信息。

## 功能特性

- **个人证照识别**:支持识别多种个人证件,包括居民身份证、银行卡、社保卡、户口本、出生医学证明、往来港澳通行证、往来台湾通行证、台湾居民来往大陆通行证、港澳居民来往内地通行证、中国香港身份证、外国人永久居留身份证、结婚证、不动产权证书、机动车行驶证正页、机动车行驶证副页、机动车驾驶证正页、机动车驾驶证副页、中国护照、学历证书、学历证书电子注册备案表、学位证书等,自动提取证件核心信息。


## 前置配置

> **⚠️ 重要**:使用前需要申请 Scnet API Token

### 申请 API Token

1. 访问 [Scnet 官网](https://www.scnet.cn) 注册/登录
2. 在控制台申请 API 密钥(格式:`sc-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`)
3. 复制密钥备用

### 配置 Token

**手动配置(推荐)**
1. 在技能目录下创建 `config/.env` 文件,内容如下:
```ini
# =====  Sugon-Scnet OCR API 配置 =====
# 申请地址:https://www.scnet.cn
SCNET_API_KEY=your_scnet_api_key_here

# API 基础地址(一般无需修改)
SCNET_API_BASE=https://api.scnet.cn/api/llm/v1
```
2. 添加:`SCNET_API_KEY=你的密钥`
3. 设置文件权限为 600(仅所有者可读写)
**⚠️ 安全警告**:切勿将 API Key 直接粘贴到聊天对话中,否则可能被记录或泄露。

### Token 更新

Token 过期后调用会返回 401 或 403 错误。更新方法:重新申请 Token 并替换 config/.env 中的 SCNET_API_KEY。

### 依赖安装

本技能需要 Python 3.6+ 和 requests 库。请运行以下命令:

```bash
   pip install requests
```
---
### 使用方法

### 参数说明

| 参数名 | 类型 | 必填 | 描述 |
|--------|------|------|------|
| ocrType | string | 是 | 识别类型枚举。必须为以下之一:<br>• ID_CARD(大陆身份证)<br>• BANK_CARD(银行卡)<br>• SOCIAL_SECURITY_CARD(社保卡)<br>• HOUSEHOLD_REGISTER(户口本)<br>• BIRTH_CERTIFICATE(出生医学证明)<br>• HK_MACAU_PASS(往来港澳通行证)<br>• TAIWAN_PASS(往来台湾通行证)<br>• TAIWAN_MAINLAND_PASS(台湾居民来往大陆通行证)<br>• HK_MAINLAND_PASS(港澳居民来往内地通行证)<br>• HONG_KONG_IDENTITY_CARD(中国香港身份证)<br>• PERMANENT_RESIDENCE_ID_CARD_FOR(外国人永久居留身份证)<br>• MARRIAGE_CERTIFICATE(结婚证)<br>• REAL_ESTATE_OWNERSHIP_CERTIFICAT(不动产权证书)<br>• FRONT_PAGE_OF_MOTOR_VEHICLE_DRIV(机动车行驶证正页)<br>• SECOND_SHEET_OF_MOTOR_VEHICLE_DR(机动车行驶证副页)<br>• MOTOR_VEHICLE_DRIVING_LICENSE(机动车驾驶证正页)<br>• MOTOR_VEHICLE_DRIVING_LICENSE_SU(机动车驾驶证副页)<br>• CHINESE_PASSPORT(中国护照)<br>• ACADEMIC_CERTIFICATE(学历证书)<br>• ONLINE_VERIFICATION_REPORT_OF_HE(学历证书电子注册备案表)<br>• DIPLOMA(学位证书) |
| fileP

README.md

# personal_card_ocr



## Getting started

To make it easy for you to get started with GitLab, here's a list of recommended next steps.

Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!

## Add your files

* [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
* [Add files using the command line](https://docs.gitlab.com/topics/git/add_files/#add-files-to-a-git-repository) or push an existing Git repository with the following command:

```
cd existing_repo
git remote add origin https://github.com/SCNet-sugon/personal_card_ocr.git
git branch -M main
git push -uf origin main
```


## Collaborate with your team

* [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
* [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
* [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
* [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
* [Set auto-merge](https://docs.gitlab.com/user/project/merge_requests/auto_merge/)

## Test and Deploy

Use the built-in continuous integration in GitLab.

* [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/)
* [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
* [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
* [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
* [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)

***

# Editing this README

When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.

## Suggestions for a good README

Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.

## Name
Choose a self-explaining name for your project.

## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitor

_meta.json

{
  "ownerId": "kn7ax58mnefnavcfwakqxpsgqn82tacy",
  "slug": "personal-card-ocr",
  "version": "1.0.6",
  "publishedAt": 1786505971313
}

references/api-docs.md

# Sugon-Scnet OCR API 文档摘要

## 接口地址
`POST https://api.scnet.cn/api/llm/v1/ocr/recognize`

## 请求头
- `Content-Type: multipart/form-data`
- `Authorization: Bearer <你的 API Key>`

## 请求参数(表单)
| 参数名  | 类型 | 必填 | 描述                                   |
| ------- | ---- | ---- | -------------------------------------- |
| file    | File | 是   | 需要识别的图片文件                     |
| ocrType | str  | 是   | 识别类型枚举,详见 SKILL.md 参数说明   |

## 响应结构
```json
{
  "code": "0",          // 应答码,0 表示成功
  "msg": "success",     // 应答信息
  "data": [             // 应答数据体
    {
        "traceId": "1234567890",
        "originalFilename": "id-card.jpg",
        "cosPath": "scnetAPIService/20260323/2e204eb284bb438ba7863f5e65470c40.jpg",
        "result": [
          {
            "status": 200,
            "originFilename": "id-card.jpg",
            "cosPath": "scnetAPIService/20260323/2e204eb284bb438ba7863f5e65470c40_cut_1.jpg",
            "fileIndex": 1,
            "cutIndex": 1,
            "coordinate": [ 88, 734, 88, 61, 1115, 61, 1115, 734 ],
            "classifyCode": "",
            "confidence": 1.0,
            "elements": {
              "address": "湖南省衡东县**镇**村1组11号",
              "gender": "男",
              "nation": "汉",
              "confidence": "1.0",
              "name": "张示例",
              "bornDate": "1990年9月4日",
              "IDNumber": "2300***********311"
            },
            "stamps": []
          }
        ]
    }
  ]
}
```
## 错误码
- `401 / 403: Token 无效或过期`
- `其他 4xx/5xx: 请检查请求参数或联系服务商`
- `业务错误码(如 code 非 0):见返回的 msg 字段`

## 注意事项
- `支持单张图片、PDF 或多页压缩包(自动解压识别)`
- `识别结果位于 data[0].result[0].elements 中`
- `不同 ocrType 返回的 elements 字段不同,详见 assets/templates/fields-summary.md`

assets/templates/fields-summary.md

# 各识别类型的字段说明(elements 内容)

根据 ocrType 不同,返回的 `elements` 对象包含以下字段:

## ID_CARD (居民身份证)
- `name`: 姓名
- `gender`: 性别
- `nation`: 民族
- `bornDate`: 出生日期
- `address`: 住址
- `IDNumber`: 公民身份号码
- `issueInstitution`: 签发机关
- `validityPeriod`: 有效期

## BANK_CARD (银行卡)
- `bankName`: 银行名称
- `cardNumber`: 卡号
- `validThru`: 有效期
- `cardHolder`: 持卡人

## SOCIAL_SECURITY_CARD (社保卡)
- `name`: 姓名
- `gender`: 性别
- `nation`: 民族
- `bornDate`: 出生日期
- `socialSecurityNumber`: 社会保障号码
- `cardNumber`: 社会保障卡号
- `issueDate`: 发卡日期
- `bankCardNumber`: 银行卡号
- `validityPeriod`: 有效期限
- `issueInstitution`: 发卡机关

## HOUSEHOLD_REGISTER (户口本)
- `title`: 标题
- `houseNo`: 户号
- `householdType`: 户别
- `fullName`: 姓名
- `householdRelation`: 户主或与户主关系
- `formerName`: 曾用名
- `gender`: 性别
- `birthPlace`: 出生地
- `nation`: 民族
- `nativePlace`: 籍贯
- `birthDate`: 出生日期
- `otherAddress`: 本市(县)其他住址
- `religion`: 宗教信仰
- `idNumber`: 公民身份证件编号
- `height`: 身高
- `bloodType`: 血型
- `educationLevel`: 文化程度
- `maritalStatus`: 婚姻状况
- `militaryService`: 兵役状况
- `workUnit`: 服务处所
- `occupation`: 职业
- `moveInCityDate`: 何时何地迁来本市
- `moveInAddressDate`: 何时何地迁来本址
- `registerDate`: 登记日期

## BIRTH_CERTIFICATE (出生医学证明)
- `title`: 标题
- `newbornName`: 新生儿姓名
- `gender`: 性别
- `birthTime`: 出生时间
- `gestationalWeeks`: 出生孕周
- `birthWeight`: 出生体重
- `birthLength`: 出生身长
- `birthPlace`: 出生地点
- `medicalInstitutionName`: 医疗机构名称
- `motherName`: 母亲姓名
- `motherAge`: 母亲年龄
- `motherNationality`: 母亲国籍
- `motherEthnicGroup`: 母亲民族
- `motherAddress`: 母亲住址
- `motherIdType`: 母亲身份证件类别
- `motherIdNumber`: 母亲身份证件号码
- `fatherName`: 父亲姓名
- `fatherAge`: 父亲年龄
- `fatherNationality`: 父亲国籍
- `fatherEthnicGroup`: 父亲民族
- `fatherAddress`: 父亲住址
- `fatherIdType`: 父亲身份证件类别
- `fatherIdNumber`: 父亲身份证件号码
- `issuingAuthority`: 签发机构
- `issueDate`: 签发日期
- `certificateNumber`: 证书编号

## HK_MACAU_PASS (往来港澳通行证)
- `title`: 标题
- `documentNumber`: 证件号码
- `chineseName`: 中文姓名
- `englishName`: 英文姓名
- `birthDate`: 出生日期
- `gender`: 性别
- `validityPeriod`: 有效期限
- `issuingAuthority`: 签发机关
- `issuingPlace`: 签发地点
- `machineReadableCode`: 机读码

## TAIWAN_PASS (往来台湾通行证)
- `title`: 标题
- `documentNumber`: 证件号码
- `chineseName`: 中文姓名
- `englishName`: 英文姓名
- `birthDate`: 出生日期
- `gender`: 性别
- `validityPeriod`: 有效期限
- `issuingAuthority`: 签发机关
- `issuingPlace`: 签发地点
- `machineReadableCode`: 机读码

## HK_MAINLAND_PASS (港澳居民来往内地通行证)
- `title`: 标题
- `chineseName`: 中文姓名
- `englishName`: 英文姓名
- `birthDate`: 出生日期
- `gender`: 性别
- `nationality`: 国籍
- `validityPeriod`: 有效期限
- `issuingAuthority`: 签发机关
- `documentNumber`: 证件号码
- `renewalTimes`: 换证次数

## TAIWAN_RESIDENT_PASS (台湾居民来往大陆通行证)
- `title`: 标题
- `chineseName`: 中文姓名
- `englishName`: 英文姓名
- `birthDate`: 出生日期
- `gender`: 性别
- `validityPeriod`: 有效期限
- `issuingAuthority`: 签发机关
- `issuingPlace`: 签发地点
- `documentNumber`: 证件号码
- `issuingTimes`: 签发次数

## HONG_KONG_IDENTITY_CARD (中国香港身份证)
- `title`: 标题
- `cnName`: 中文姓名
- `enName`: 英文姓

Sponsored

Ads related to personal_card_ocr and adjacent AI workflows.