unityclaw-data-extract-id-card

Extracts 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 card side. Used to transcribe or review supplied ID-card fields, preserve raw values, identify incomplete OCR, and save a local JSON result.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "unityclaw-data-extract-id-card" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-5fca34bc63662dabf395c1a11fe00da402de0d2fae2066def7f0fa753cda1fc1. Verify the upstream source and version against https://skillhub.cn/skills/user_fabd0a58/unityclaw-data-extract-id-card before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Extracts 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 card side. Used to transcribe or review supplied ID-card fields, preserve raw values, identify incomplete OCR, and save a local JSON result.

0 Downloads

Introduction source: third_party · user_fabd0a58 · 1.0.0 Reference

SkillPi interpretation

Tasks
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.
Audience
Not specified in the source documentation.
Inputs and outputs
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.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
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.

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value82/100

Highlights

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

Highlights

  • description 清晰完整,涵盖输入输出格式与核心能力,触发边界明确
Structure and Standards88/100

Areas to improve

  • 缺少 When to Use 章节 Reported severity: Minor

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

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

Highlights

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

Highlights

  • 工具来源明确(@unityclaw/sdk),参数定义准确,重试与错误处理机制健全
  • 明确区分 OCR 能力边界,不进行身份验证,降低误用风险
Evidence Verifiability (mean of the first four)86/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

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

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 58
  • Accounts, secrets or authorization

    Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.

    Mentioned in main document · lines 58
Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • unityclaw.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.