Personal Card Ocr

v1.0.3

将图片中的文字、身份证、银行卡、社保卡、户口本、出生医学证明、往来港澳通行证、往来台湾通行证、台湾居民来往大陆通行证、港澳居民来往内地通行证等信息识别并提取出来。本技能应在用户需要 OCR 识别图片中的文字,或识别身份证、银行卡、社保卡、户口本、出生医学证明、往来港澳通行证、往来台湾通行证、台湾居民来往大陆通行证...

0· 131·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for scnet-sugon/personal-card-ocr.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Personal Card Ocr" (scnet-sugon/personal-card-ocr) from ClawHub.
Skill page: https://clawhub.ai/scnet-sugon/personal-card-ocr
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install personal-card-ocr

ClawHub CLI

Package manager switcher

npx clawhub@latest install personal-card-ocr
Security Scan
Capability signals
CryptoCan make purchasesRequires sensitive credentials
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description request OCR for personal documents and the skill requires a single SCNET_API_KEY and optional SCNET_API_BASE, and calls an OCR endpoint; the required credential and network access match the stated purpose.
Instruction Scope
SKILL.md and scripts/main.py instruct the agent to read a local image file and POST it to https://api.scnet.cn/api/llm/v1/ocr/recognize. This is within purpose, but the behavior transmits sensitive PII (IDs, bank cards, etc.) to an external service — expected for a cloud OCR integration but high-sensitivity and worth highlighting.
Install Mechanism
No install spec; this is instruction-only plus a small Python script that uses the requests library. No downloads from untrusted URLs or extraction steps are present.
Credentials
Only one required credential (SCNET_API_KEY) and an optional SCNET_API_BASE are declared and actually used. The script reads a config/.env or suggests env var usage; the credential request is proportionate to calling a third-party OCR API.
Persistence & Privilege
always:false and no code modifies other skills or system-wide configs. The skill stores/reads a local config/.env if the user places it there, which is normal and limited in scope.
Assessment
Before installing, note these practical points: - Privacy: This skill uploads images (IDs, bank cards, birth certificates, etc.) to the Scnet API (https://api.scnet.cn). If you cannot share such sensitive PII with an external provider, do not use it. - API key handling: The skill requires SCNET_API_KEY. Prefer setting it as an environment variable rather than placing it in config/.env tracked by a repository; if you use a file, set file permissions (chmod 600) and avoid committing it to source control. - Provider verification: The skill's homepage in skill.yaml is a placeholder GitHub URL; the source/origin is 'unknown' in the registry metadata. Verify the Scnet service and the repository/maintainer before trusting the API or sending real documents. - Operational notes: The script respects rate limits and retries on 429. It prints OCR JSON to stdout; the script removes 'confidence' fields from results (harmless but notable). - Alternatives: If privacy is a priority, consider on-device OCR solutions or an OCR provider with an explicit enterprise privacy / data-retention policy. If you want more assurance, ask the author for the canonical repository/homepage, their privacy policy, or for an option to run a local/offline OCR model instead.

Like a lobster shell, security has layers — review code before you run it.

latestvk97dwmbqq0fjv101tgp30dtxjn84y3sr
131downloads
0stars
3versions
Updated 1w ago
v1.0.3
MIT-0

Sugon-Scnet 个人证照识别 OCR 技能

本技能封装了个人证照识别的 OCR 服务,通过单一接口即可调用 9 种识别能力,高效提取居民身份证、银行卡、社保卡、户口本、出生医学证明、往来港澳通行证、往来台湾通行证、台湾居民来往大陆通行证、港澳居民来往内地通行证等,核心信息。

功能特性

  • 个人证照识别:支持识别多种个人证件,包括居民身份证、银行卡、社保卡、户口本、出生医学证明、往来港澳通行证、往来台湾通行证、台湾居民来往大陆通行证、港澳居民来往内地通行证等,自动提取证件核心信息。

前置配置

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

申请 API Token

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

配置 Token

手动配置(推荐)

  1. 在技能目录下创建 config/.env 文件,内容如下:
# =====  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
  1. 添加:SCNET_API_KEY=你的密钥
  2. 设置文件权限为 600(仅所有者可读写) ⚠️ 安全警告:切勿将 API Key 直接粘贴到聊天对话中,否则可能被记录或泄露。

Token 更新

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

依赖安装

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

   pip install requests

使用方法

参数说明

参数名类型必填描述
ocrTypestring识别类型枚举。必须为以下之一:<br>• ID_CARD(大陆身份证)<br>• BANK_CARD(银行卡)<br>• SOCIAL_SECURITY_CARD(社保卡)<br>• HOUSEHOLD_REGISTER(户口本)<br>• BIRTH_CERTIFICATE(出生医学证明)<br>• HK_MACAU_PASS(往来港澳通行证)<br>• TAIWAN_PASS(往来台湾通行证)<br>• HK_MAINLAND_PASS(港澳居民来往内地通行证)<br>• TAIWAN_RESIDENT_PASS(台湾居民来往大陆通行证)
filePathstring待识别图片的本地绝对路径。支持 jpg、png、pdf 等常见格式。

命令行调用示例

   python .claude/skills/personal_card_ocr/scripts/main.py ID_CARD /path/to/invoice.jpg

在 AI 对话中使用

用户可以说:

  • “帮我识别这张身份证,图片在 /Users/name/Downloads/id.jpg”
  • “OCR 这个图片里的文字,图片在 /Users/name/Desktop/text.png”

AI 会根据 description 中的关键词自动触发本技能。

AI 调用建议

为避免触发 API 速率限制(10 QPS),请串行调用本技能,即等待前一个识别完成后再发起下一个请求。 如果使用 OpenClaw 的 exec 工具,建议设置 timeout 或 yieldMs 参数,让命令同步执行,避免多个命令同时运行导致并发。

配置选项

编辑 config/.env 文件:

变量名默认值说明
SCNET_API_KEY必需Scnet API 密钥
SCNET_API_BASEhttps://api.scnet.cn/api/llm/v1API 基础地址(一般无需修改)

输出

  • 标准输出:识别结果的 JSON 数据,结构与 API 文档一致,位于 data 字段内。
  • 识别结果位于 data[0].result[0].elements 中,具体字段取决于 ocrType。
  • 错误信息:如果发生错误,会输出以 错误: 开头的友好提示。

注意事项

  • 本技能调用的 OCR API 有 10 QPS 的速率限制。
  • 如果遇到 429 错误,请等待 2-3 秒后重试,不要连续发起请求。
  • 建议在调用前确保图片已准备就绪,避免因网络问题导致重复调用。

故障排除

问题解决方案
配置文件不存在创建 config/.env 并填入 Token(参考前置配置)
API Key 无效/过期重新申请 Token 并更新 .env 文件
文件不存在检查提供的文件路径是否正确
网络连接失败检查网络连接或防火墙设置
不支持的文件类型确保文件扩展名为允许的类型(参考 API 文档)
401/403/UnauthorizedToken 无效或过期,重新申请并配置
429 Too Many Requests请求过于频繁,技能会自动等待并重试(最多 3 次)。若持续失败,请降低调用频率或联系服务方提高限额。

Comments

Loading comments...