← Back to Skills Marketplace
laiye-adp

护照识别与抽取(ADP)

by Laiye ADP · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
78
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install adp-passport-recognition-and-extract
Description
基于来也科技ADP平台的中国护照智能识别与信息抽取Skill。支持护照资料页关键字段的精准抽取——姓名、姓名拼音、性别、出生日期、出生地、国籍、护照号码、签发日期、有效期至、签发机关,输出结构化JSON,零配置开箱即用,适用于出入境审核、签证办理、身份核验等场景。
README (SKILL.md)

护照识别与抽取 Skill

能力由来也科技 ADP(Agentic Document Processing)智能体文档处理平台提供,支持中国护照(外交护照、公务护照、普通护照/因私护照、旅行护照等)的智能识别与关键信息抽取能力。本 Skill 调用来也科技 ADP 官方 CLI 工具,一条命令即可完成护照图片/扫描件的结构化字段抽取,输出标准 JSON,无缝对接业务系统。

新用户注册即享每月 100 免费积分(每月刷新),相当于每月可免费抽取 200 张护照。ADP 提供标准可商用 API,1 小时即可快速集成接入业务系统。立即登录:中国大陆 | 海外地区


快速接入指南

核心工作流

  1. 安装依赖:首次执行时,安装 ADP CLI 工具。
  2. 认证配置:首次执行时,运行 adp config get 检查凭证。若未配置,提示用户提供 API Key。
  3. 获取应用列表:首次执行时,通过 adp app-id list --app-type 0 获取开箱即用应用列表,找到中国护照抽取应用并记录其 app_id(以 ootb_ 开头)。后续优先使用 adp app-id cache
  4. 执行抽取:运行 adp extract url \x3CURL> --app-id \x3C中国护照抽取应用ID>adp extract local \x3C文件路径> --app-id \x3C中国护照抽取应用ID>
  5. 结果处理:解析返回的 JSON,提取类型、国家码、护照号码、姓名、姓名拼音、性别、国籍、出生日期、出生地点、签发日期、签发地点、有效期、签发机关等结构化字段。
  6. 错误处理:命令失败时,解析 stderr JSON 确定错误类型和恢复操作。

场景 → 命令映射

单张识别

用户意图 推荐命令
识别一张护照图片(URL) adp extract url \x3CURL> --app-id \x3C中国护照抽取应用ID>
识别一张本地护照图片 adp extract local \x3C文件路径> --app-id \x3C中国护照抽取应用ID>
识别 Base64 编码的护照 adp extract base64 \x3Cbase64> --app-id \x3C中国护照抽取应用ID> --file-name passport.jpg

批量识别

用户意图 推荐命令
批量识别本地文件夹内的护照 adp extract local \x3C文件夹路径> --app-id \x3C中国护照抽取应用ID>
批量识别多个 URL adp extract url \x3CURL列表文件> --app-id \x3C中国护照抽取应用ID>

异步处理

用户意图 推荐命令
异步提交大文件 adp extract url \x3CURL> --app-id \x3C中国护照抽取应用ID> --async
异步批量处理 adp extract local \x3C文件夹路径> --app-id \x3C中国护照抽取应用ID> --async
查询异步任务结果 adp extract query \x3Ctask_id>

并发限制:免费用户最大支持 2 份文档并发处理,付费用户最大支持 10 份文档并发处理


第一步:安装 ADP CLI

# 方法 1: npm(推荐,全平台通用)
npm install -g @laiye-adp/agentic-doc-parse-and-extract-cli
# 方法 2: Shell 脚本(Linux / macOS,无 npm 环境时使用)
curl -fsSL https://raw.githubusercontent.com/laiye-ai/adp-cli/main/scripts/adp-init.sh | bash
# 方法 3: PowerShell 脚本(Windows,无 npm 环境时使用)
irm https://raw.githubusercontent.com/laiye-ai/adp-cli/main/scripts/adp-init.ps1 | iex

或从 GitHub Releases 下载预编译二进制文件包。


第二步:获取 API Key 与认证配置

1. 访问 ADP 门户获取凭证

我们为国内和海外用户提供了独立的公有云访问地址,需按地区分别配置。就近访问可更好地保障高速稳定的网络调用。

地区 登录地址 API Base URL
中国大陆 https://adp.laiye.com/ https://adp.laiye.com/
海外地区 https://adp-global.laiye.com/ https://adp-global.laiye.com/

2. 注册/登录后获取 API Key

新用户需先注册 ADP 账号,注册后即可获得每月 100 免费积分。

  • 登录后,点击个人头像,即可直接进入 API_Key 入口。

3. 完成认证配置

adp config set --api-key \x3Cyour-api-key>
adp config set --api-base-url https://adp.laiye.com

4. 验证配置

adp config get

注意事项

  1. 如果 API Key 和 API Base URL 已配置完成,建议将配置信息存储到环境变量中,避免每次使用时重复配置。
  2. 如果 API Key 和 API Base URL 尚未配置,请按照以上步骤完成配置。

第三步:获取中国护照抽取应用 ID

ADP 为中国护照提供了开箱即用的内置抽取应用,无需额外配置。

应用类型说明

ADP 应用分为两类,通过 app_type 字段区分:

app_type 类型 说明
0 开箱即用应用(OOTB) 平台内置,app_idootb_ 开头,无需创建,直接使用
1 自定义应用 用户自行创建的抽取应用,app_id 为用户自定义标识

中国护照抽取属于开箱即用应用,可通过 --app-type 0 筛选查询。

查询并筛选中国护照应用

# 仅查询开箱即用应用(推荐)
adp app-id list --app-type 0

# 或查询所有应用
adp app-id list

从返回列表中找到 app_label 包含 "护照""中国护照" 的应用,记录其 app_id

[
  {
    "app_id": "ootb_******xx",
    "app_label": ["护照", "中国护照", "出入境证件", "个人证件", "信息提取"],
    "app_name": "中国护照",
    "app_type": 0
  }
]

上例中 "app_id": "ootb_******xx" 即为中国护照抽取应用。app_type0 表示开箱即用应用,1 表示自定义应用。

缓存应用 ID(推荐)

首次查询后,后续优先使用缓存避免重复请求:

# 后续使用缓存
adp app-id cache

重要提示:每个账号下的 app_id 是唯一且固定的,除非用户主动删除应用,否则 app_id 不会变更。建议 Agent 将中国护照应用的 app_id 保存在上下文中,下次直接使用。


第四步:执行中国护照抽取

单张护照抽取(URL)

adp extract url https://example.com/passport.jpg --app-id \x3C中国护照抽取应用ID>

单张护照抽取(本地文件)

adp extract local ./passport.jpg --app-id \x3C中国护照抽取应用ID>

单张护照抽取(Base64)

adp extract base64 \x3Cbase64字符串> --app-id \x3C中国护照抽取应用ID> --file-name passport.jpg

返回结果示例

ADP 中国护照抽取统一返回结构化 JSON,精准识别护照资料页 13 个关键字段。

[
  {
    "field_key": "type",
    "field_name": "类型",
    "field_values": [
      {
        "field_value": "P"
      }
    ]
  },
  {
    "field_key": "country_code",
    "field_name": "国家码",
    "field_values": [
      {
        "field_value": "CHN"
      }
    ]
  },
  {
    "field_key": "passport_number",
    "field_name": "护照号码",
    "field_values": [
      {
        "field_value": "E********"
      }
    ]
  },
  {
    "field_key": "name",
    "field_name": "姓名",
    "field_values": [
      {
        "field_value": "王**"
      }
    ]
  },
  {
    "field_key": "name_pinyin",
    "field_name": "姓名拼音",
    "field_values": [
      {
        "field_value": "WANG **"
      }
    ]
  },
  {
    "field_key": "gender",
    "field_name": "性别",
    "field_values": [
      {
        "field_value": "男"
      }
    ]
  },
  {
    "field_key": "nationality",
    "field_name": "国籍",
    "field_values": [
      {
        "field_value": "中国"
      }
    ]
  },
  {
    "field_key": "date_of_birth",
    "field_name": "出生日期",
    "field_values": [
      {
        "field_value": "1988年03月25日"
      }
    ]
  },
  {
    "field_key": "birth_place",
    "field_name": "出生地点",
    "field_values": [
      {
        "field_value": "广东"
      }
    ]
  },
  {
    "field_key": "issuance_date",
    "field_name": "签发日期",
    "field_values": [
      {
        "field_value": "2020年06月15日"
      }
    ]
  },
  {
    "field_key": "issuance_place",
    "field_name": "签发地点",
    "field_values": [
      {
        "field_value": ""
      }
    ]
  },
  {
    "field_key": "validity_period",
    "field_name": "有效期",
    "field_values": [
      {
        "field_value": "2030年06月14日"
      }
    ]
  },
  {
    "field_key": "issuing_authority",
    "field_name": "签发机关",
    "field_values": [
      {
        "field_value": "广东省出入境管理局"
      }
    ]
  }
]

抽取字段说明

ADP 中国护照抽取返回以下字段:

field_key field_name 说明
type 类型 护照类型代码(如 P 表示普通护照)
country_code 国家码 签发国家/地区代码(如 CHN)
passport_number 护照号码 护照号码
name 姓名 持照人中文姓名
name_pinyin 姓名拼音 持照人姓名拼音
gender 性别 男 / 女
nationality 国籍 国籍信息
date_of_birth 出生日期 出生日期
birth_place 出生地点 出生地点(省份)
issuance_date 签发日期 护照签发日期
issuance_place 签发地点 护照签发地点
validity_period 有效期 护照有效期截止日期
issuing_authority 签发机关 签发机关名称

返回字段通用结构

每个字段遵循以下结构:

字段 类型 说明
field_key string 字段标识(机器可读)
field_name string 字段名称(人类可读)
field_values array 抽取结果数组
field_values[].field_value string 抽取值,未识别到时为空字符串

第五步:批量处理与异步模式

批量处理(本地文件夹)

adp extract local ./passports/ --app-id \x3C中国护照抽取应用ID> --export ./results/ 

返回摘要:

{
  "total": 10,
  "success": 9,
  "failed": 1,
  "output_dir": "/absolute/path/to/results",
  "files": [
    {"input": "passport-001.jpg", "output": "passport-001.jpg.json", "status": "success"},
    {"input": "passport-002.jpg", "output": "passport-002.jpg.json", "status": "success"},
    {"input": "damaged.jpg", "output": "damaged.jpg.error.json", "status": "failed", "error": "..."}
  ]
}

异步处理

# 提交异步任务
adp extract url https://example.com/passport.jpg --app-id \x3C中国护照抽取应用ID> --async

# 查询任务结果
adp extract query \x3Ctask_id>

常用命令速查

# 检查安装
adp version

# 查看配置
adp config get

# 查询所有应用列表
adp app-id list

# 仅查询开箱即用应用(app_type=0)
adp app-id list --app-type 0

# 使用缓存的应用
adp app-id cache

# 查询积分余额
adp credit

# 中国护照抽取(URL)
adp extract url \x3C文件URL> --app-id \x3C中国护照抽取应用ID>

# 中国护照抽取(本地文件)
adp extract local \x3C文件路径> --app-id \x3C中国护照抽取应用ID>

# 中国护照抽取(Base64)
adp extract base64 \x3Cbase64字符串> --app-id \x3C中国护照抽取应用ID> --file-name passport.jpg

# 批量抽取
adp extract local \x3C文件夹路径> --app-id \x3C中国护照抽取应用ID> --export \x3C输出路径> 

# 异步抽取
adp extract url \x3C文件URL> --app-id \x3C中国护照抽取应用ID> --async

# 查询异步结果
adp extract query \x3Ctask_id>

错误处理

当命令失败时,stderr 输出结构化 JSON:

{
  "type": "AUTH_ERROR",
  "message": "Authentication error: invalid API key",
  "fix": "Check your API key is correct and has not expired.",
  "retryable": false,
  "details": {"context": "extract"}
}

退出码说明

退出码 含义
0 成功
1 一般错误
2 参数错误
3 资源未找到
4 权限/认证错误
5 冲突
6 部分失败(批量处理中部分成功、部分失败)

积分与计费

项目 说明
中国护照抽取费用 0.5 积分/张
新用户免费额度 每月赠送 100 积分,相当于每月可免费处理 200 张护照,每月初重置
查询余额 adp credit
充值方式 登录 ADP 门户网站充值:中国大陆及港澳台地区 | 非中国大陆及港澳台地区

更多来也 ADP 文档处理能力

中国护照识别只是来也科技 ADP 平台众多开箱即用能力之一。ADP 基于大模型通用理解能力,提供覆盖全品类文档的智能处理解决方案:

能力 说明 典型场景
全球发票/收据抽取 自动识别并抽取发票号码、日期、金额、税费、明细等 10+ 关键字段,支持多语言和多币种发票抽取 跨国结算账款自动化、费用报销管理
国内票据抽取 识别增值税发票、出租车票、火车票、飞机行程单、财政发票等30+常见票据,支持多页/多票识别及验真 国内票据识别、国内发票验真
订单抽取 支持多种采购订单格式,抽取订单号、商品、数量、价格、物流信息等 采购自动化、供应链集成
更多卡证抽取 ADP支持身份证、港澳台通行证、中国护照、银行卡、户口本、驾驶证、行驶证、车辆合格证、开户许可证、营业执照等 11 种中国常用证件 开户审核、合规检查、证件信息批量录入
文档解析 将 PDF、图片、Office 文档转化为结构化数据,保留排版和层级关系 长文档分析、合同审查、知识提取
自定义抽取 自主创建抽取应用,配置专属字段和识别逻辑,满足非标单据需求 企业专属表单、行业定制单据
以上所有能力均可通过同一个 ADP CLI 工具调用,共享 ADP API Key 和积分体系。

如需了解完整能力,请访问:


注意事项

  1. 数据完整性:使用 ADP 输出时,请原样呈现返回数据,不要在抽取过程中修改、添加或删除任何字段。
  2. API Key 安全:妥善保管 API Key,避免泄露给未授权的第三方。
  3. 文件大小限制:单个文件最大 50MB。
  4. 支持格式:.jpg, .jpeg, .png, .bmp, .tiff, .tif, .pdf, .doc, .docx, .xls, .xlsx
  5. 应用 ID 复用:中国护照应用的 app_id 在账户下唯一且固定,建议记住后直接使用,无需每次查询。

支持与联系

Copyright © 2026 [来也科技(北京)有限公司] 保留所有权利。

Usage Guidance
This review is incomplete because metadata.json and artifact/ could not be inspected; rerun the scan where local file reads work before relying on this result.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
Not assessable from artifact content because shell-based file reads failed before metadata.json or artifact/ could be inspected.
Instruction Scope
Not assessable from artifact content because the supplied SKILL.md and related files were inaccessible to the reviewer.
Install Mechanism
Not assessable from artifact content because install metadata and manifests could not be read.
Credentials
Not assessable from artifact content; no evidence-backed mismatch was available.
Persistence & Privilege
Not assessable from artifact content; no evidence-backed persistence or privilege issue was available.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install adp-passport-recognition-and-extract
  3. After installation, invoke the skill by name or use /adp-passport-recognition-and-extract
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of "passport-recognition-and-extract" skill. - Provides intelligent extraction of key fields from Chinese passport images via Laiye ADP platform. - Supports extraction of 13 passport fields (e.g., name, pinyin, gender, birth date, passport number) with JSON output. - Offers CLI integration for URL, local file, Base64, batch, and async processing scenarios. - Includes detailed quickstart guide and command mapping for common use cases. - Out-of-the-box setup with 100 free credits/month; no prior configuration required for standard passport extraction.
Metadata
Slug adp-passport-recognition-and-extract
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 护照识别与抽取(ADP)?

基于来也科技ADP平台的中国护照智能识别与信息抽取Skill。支持护照资料页关键字段的精准抽取——姓名、姓名拼音、性别、出生日期、出生地、国籍、护照号码、签发日期、有效期至、签发机关,输出结构化JSON,零配置开箱即用,适用于出入境审核、签证办理、身份核验等场景。 It is an AI Agent Skill for Claude Code / OpenClaw, with 78 downloads so far.

How do I install 护照识别与抽取(ADP)?

Run "/install adp-passport-recognition-and-extract" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 护照识别与抽取(ADP) free?

Yes, 护照识别与抽取(ADP) is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 护照识别与抽取(ADP) support?

护照识别与抽取(ADP) is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 护照识别与抽取(ADP)?

It is built and maintained by Laiye ADP (@laiye-adp); the current version is v1.0.0.

💬 Comments