unityclaw-data-extract-id-card

从一张或两张中国身份证图片中提取结构化字段,包括姓名、居民身份证号、地址、性别、民族、出生日期、签发机关、有效期限和检测到的证件面。用于转录或审核提供的身份证字段,保留原始值、标识不完整的 OCR,并保存本地 JSON 结果。

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "unityclaw-data-extract-id-card":https://skillpi.com/zh/skills/deepskill-5fca34bc63662dabf395c1a11fe00da402de0d2fae2066def7f0fa753cda1fc1。安装前核对上游来源和版本:https://skillhub.cn/skills/user_fabd0a58/unityclaw-data-extract-id-card。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

skillhub.cn

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

从一张或两张中国身份证图片中提取结构化字段,包括姓名、居民身份证号、地址、性别、民族、出生日期、签发机关、有效期限和检测到的证件面。用于转录或审核提供的身份证字段,保留原始值、标识不完整的 OCR,并保存本地 JSON 结果。

0 下载

介绍来源: third_party · user_fabd0a58 · 1.0.0 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
适合谁
来源文档未说明。
输入和输出
翻译待完成,请参阅来源文档。
软件、账号及付费要求
来源文档未说明。
限制与区别
来源文档未说明。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: unityclaw-data-extract-id-card
description: Extract structured fields from one or two Chinese identity-card images, including name, citizen ID number, address, gender, ethnicity, birth date, issuing authority, validity dates, and detected side. Use to transcribe or review supplied ID-card fields, preserve raw values, identify incomplete OCR, and save a local JSON result.
version: 1.2.5
metadata:
  openclaw:
    requires:
      env:
        - UNITYCLAW_KEY
      bins:
        - node
        - npm
    primaryEnv: UNITYCLAW_KEY
    install:
      - kind: node
        package: "@unityclaw/sdk"
        bins: []

UnityClaw ID Card Extraction

Extract structured data from one side or both sides of a Chinese identity card. Preserve raw values, flag incomplete or suspicious OCR, and save the result as id-card.json.

Agent Workflow

1. Check the source images

Accept one or two JPG, JPEG, PNG, or BMP images. Use one image for a single side, or repeat --attachment for front and back. Keep the front/back order supplied by the user. Reject duplicates and more than two files.

Prefer complete, upright, readable images without glare, fingers, watermarks over critical fields, or cropped edges. If a field is obscured or masked, treat it as unknown instead of guessing.

2. Execute extraction

Run scripts/generate.js with --json and a dedicated --output-dir. Quote every path or URL and select --lang from the conversation language. Allow the CLI to perform transient retries; do not submit the same document concurrently.

3. Preserve evidence

Use data as the raw OCR result. Do not silently correct, normalize, translate, mask, or derive raw values. Use localized fields only for presentation; every entry retains its raw key.

Never infer a citizen ID number, name, birth date, address, validity period, ethnicity, or issuing authority from other fields. Missing values remain unknown.

4. Validate critical fields

Inspect missingCoreFields, qualityFlags, and warnings. For a detected front side, review identity_name and identity_code. For a detected back side, review issued_by and validity dates. With two attachments, review both sets. A citizen ID that does not match the 15- or 18-character structural pattern receives identity_code_format without being altered.

This skill performs OCR only. It does not verify authenticity, liveness, ownership, legal identity, document validity, or eligibility. Do not use its output alone for identity verification, access control, employment, credit, insurance, housing, or other high-impact decisions.

5. Deliver the result

Accept completion only when success is true and resultPath points to a non-empty id-card.json. Present the fields requested by the user and provide the local result file.

6. Handle failures deliberately

Retry only when error.retryable is true; respect the CLI retry limit. Fix authentication, missing-file, unsupported-format, and output-validation errors before trying again. For incomplete OCR, request a clearer image instead of repeatedly processing the same source.

Configuration

Provide the API key through the fixed UNITYCLAW_KEY environment variable. Obtain a key from UnityClaw if needed. The runtime installation declaration installs @unityclaw/sdk; for manual execution, run npm install @unityclaw/sdk when the package is unavailable.

Usage

node scripts/generate.js --attachment ./id-card-front.jpg
node scripts/generate.js --attachment ./id-card-front.jpg --attachment ./id-card-back.jpg --lang zh --json --output-dir ./private-tasks

Parameters

Parameter Short Required Default Description
--attachment -a Yes - One or two ID-card image URLs or local paths; repeat for front and back
--lang -l No auto Presentation-label language: auto, zh, en, or ja; locale variants are accepted
--output-dir - No ./tasks Task output directory; resolved to an absolute path
--timeout - No 900000 SDK request timeout in milliseconds, from 1,000 to 3,600,000
--retries - No 1 Retry count for transient failures, from 0 to 3
--json - No false Emit one machine-readable JSON result without progress output
--help -h No - Show help

Known Fields

Raw key Meaning
identity_code Citizen ID number
identity_name Name
address Address
valid_date_start Validity start date
valid_date_end Validity end date or long-term marker
gender Gender printed on the card
race Ethnicity printed on the card
issued_by Issuing authority
birth Date of birth
side Detected front or back side
logID Processing log ID

Extra fields returned by the service are preserved.

Output Contract

With --json, the command emits exactly one JSON object. A successful result contains task metadata, resultPath, resultBytes, attachmentCount, language, raw data, localized fields, missingCoreFields, qualityFlags, and warnings. The task folder contains id-card.json plus SDK request and response logs.

A failed result contains a stable error.code, human-readable error.message, error.retryable, attempts, and available task or log information. The process exits non-zero on failure.

Resource Index

  • Run scripts/generate.js for ID-card extraction.

当前收录版本

1.0.0

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值82/100

亮点

  • 提供中文身份证结构化信息提取,解决 OCR 转录与字段校验的实际需求
  • 支持单面或双面图像处理,保留原始值并标识不完整 OCR,增强结果可信度
触发精准85/100

亮点

  • description 清晰完整,涵盖输入输出格式与核心能力,触发边界明确
结构规范88/100

待提升项

  • 缺少 When to Use 章节 原报告严重程度:轻微

    文档未显式提供 'When to Use' 使用场景说明

    改进建议:建议补充 'When to Use' 章节,明确适用场景(如证件录入、信息核验等)以提升可读性

亮点

  • Agent Workflow 六步流程清晰,含出口条件与端到端示例
  • frontmatter 完整,参数表格详尽,输出契约明确
执行可靠90/100

亮点

  • 工具来源明确(@unityclaw/sdk),参数定义准确,重试与错误处理机制健全
  • 明确区分 OCR 能力边界,不进行身份验证,降低误用风险
证据可验 (前四项均值)86/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 安装或获取外部依赖

    使用官方来源并锁定版本,在隔离环境检查安装脚本。当前文档检查不覆盖后续下载的代码。

    主文档提及 · 第 58 行
  • 账号、密钥或授权

    使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。

    主文档提及 · 第 58 行
文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • unityclaw.com

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

来源文档未说明。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。