jwangkun/claude-for-financial-services-cn

china-kyc-doc-parse

Parse and extract data from Chinese identity documents for KYC (Know Your Customer) compliance.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/jwangkun/claude-for-financial-services-cn --skill china-kyc-doc-parse

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

china-kyc-doc-parse

Purpose

Parse 中国身份文件 — extract and verify data from Chinese KYC documents.

Data Sources

Tier 0 — 万得 Wind(最全面付费数据)

  • 覆盖:A股/港美股/基金/指数/债券/宏观/研报/分析(44个工具)
  • MCP 服务:wind-mcp(需 WIND_API_KEY 密钥,以 ak_ 开头)
  • 优势:全市场覆盖面最广、数据最全面、包含研报和量化分析
  • 密钥申请:https://aifinmarket.wind.com.cn/#/home

Tier 1 — 同花顺 iFind(付费精确数据)/ AkShare MCP(Tier-2 免费备选)

python
# Not typically used for KYC; for background checks:
get_stock_info(ticker)                    → Company verification (if applicable)

Secondary Sources

  • 国家企业信用信息公示系统 — business license verification
  • 天眼查 / 企查查 — corporate information
  • 公安部 — ID verification (via approved channels)

Document Types

1. 个人身份证 (Personal ID Card)

Front of ID card:

FieldLocationData Type
姓名Upper sectionText
性别Below name男/女
民族Below genderText (e.g., 汉)
出生日期Below ethnicityYYYY年MM月DD日
住址Lower sectionAddress
公民身份号码Lower section18-digit number

Back of ID card:

FieldDescription
签发机关Issuing authority
有效期限Validity period
证件签发Issue date
证件失效Expiry date

ID number structure:

PositionLengthContent
1-66 digitsAddress code (行政区划)
7-148 digitsBirth date (YYYYMMDD)
15-173 digitsOrder code + gender (odd=male, even=female)
181 digitCheck digit

2. 营业执照 (Business License)

Unified Social Credit Code (统一社会信用代码):

StructureLengthContent
登记管理部门代码1 digit9=工商, 1=机构编制, etc.
机构类别代码1 digit
登记管理机关行政区划码6 digits
主体标识码9 digitsOrg code
校验码1 digitCheck digit

Business license fields:

FieldContent
统一社会信用代码18-digit code
名称Company name
类型Entity type
法定代表人Legal representative
注册资本Registered capital
成立日期Establishment date
住所Registered address
经营范围Business scope
登记机关Registration authority
登记日期Registration date

3. 护照 (Passport)

FieldContent
护照号码Letter + 8 digits
姓名Chinese + Pinyin
国籍Nationality
出生日期DD/MM/YYYY
性别M/F
出生地点Place of birth
签发日期Issue date
有效期至Expiry date
签发机关Issuing authority

4. 港澳通行证 / 台湾通行证

FieldContent
证件号码HK/Macau/Taiwan travel permit number
姓名Name
出生日期DOB
性别Gender
有效期至Expiry date

5. 外国人居留许可证

FieldContent
姓名Name (native + Chinese)
国籍Nationality
出生日期DOB
性别Gender
有效期至Expiry date
签发机关Issuing authority

Parsing Workflow

Step 1: Document Intake

Document verification:

CheckPass Criteria
照片清晰Photo clear enough to read
文字清晰Text legible
无遮挡No obstruction of key fields
证件在有效期内Not expired
证件真实Genuine appearance

Step 2: Data Extraction

Extraction checklist:

DocumentFields to Extract
身份证Name, ID number, DOB, gender, address
营业执照Company name, USCC, legal rep, registered capital, scope
护照Passport number, name, nationality, DOB, expiry
其他As applicable

Step 3: ID Number Validation

ID number checks:

CheckMethodPass
Length18 digits✓
Birth dateValid date✓
GenderOdd/even check✓
Check digitMod 11 algorithm✓
Address codeValid code✓

Check digit algorithm:

Weights: 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2
Remainder → 0-10 → Code: 10→X, 0→1, 1→0, 2→9, ...

Step 4: Address Code Decoding

Address code lookup:

CodeProvince/City
11北京
31上海
44广东
33浙江
32江苏
......

Step 5: Data Normalization

Normalization rules:

FieldNormalization
NameTrim whitespace, no middle dots
ID numberUppercase X for check digit
DOBYYYY-MM-DD format
AddressStandardize
Phone+86 format
Registered capitalConvert to 万元
DatesYYYY-MM-DD format

Step 6: Quality Checks

Extraction quality:

CheckPass
All required fields extracted✓
Data format correct✓
ID number validated✓
Dates valid✓
No OCR errors✓

China-Specific Considerations

Anti-Money Laundering (AML)

RequirementImplementation
客户身份识别Identify and verify customer
受益所有人Ultimate beneficial owner
持续识别Ongoing monitoring
风险分类Risk categorization
身份证明文件Minimum documents required

Required Documents by Customer Type

TypeRequired
中国个人身份证
外国个人护照 + 居留许可
中国企业营业执照 + 法人身份证
外国企业注册文件 + 授权代表证件

Common Issues

IssueResolution
照片模糊Request clearer copy
证件过期Request current document
信息矛盾Verify with other sources
扫描不全Request complete document

Quality Checks

Before completing:

  • [ ] All fields extracted
  • [ ] Data validated
  • [ ] Documents verified
  • [ ] AML checks performed
  • [ ] Records complete
Data Source Mode Switch: Set env var IFIND_DATA_SOURCE_MODE to control data source preference. - ifind-only (strict): Use iFind only, error if unavailable - ifind-fallback (default): iFind preferred, fallback to AkShare - akshare-only: Skip iFind, use AkShare only - wind-only: Wind only, error if unavailable - wind-fallback: Wind first, fallback to iFind → AkShare

按任务相关推荐

来自同一仓库

更多 Skills

全部 Skills
jwangkun
社区

china-catalyst-calendar

Track upcoming catalysts for A-share coverage universe — earnings dates, regulatory announcements, sector conferences, product launches, and policy events relevant to Chinese equities. Adapted from the original catalyst-calendar skill for A-share market conventions. Triggers on "A股催化剂日历", "事件日历", "财报日历", "earnings calendar A-share", "upcoming catalysts China", or "what's coming up for [company]".

安装量
1
GitHub Stars
840
最近更新
9月14日
jwangkun
社区

china-cim-builder

Structure and draft Confidential Information Memorandums (CIMs) for A-share sell-side M&A processes. Organizes company information into professional, investor-ready documents with Chinese market context. Triggers on "A股CIM", "保密信息备忘录", "CIM China", "confidential memorandum A-share", or "offering memorandum [company]".

安装量
1
GitHub Stars
840
最近更新
9月14日
jwangkun
社区

china-competitive-analysis

Competitive landscape analysis for A-share companies and Chinese industries. Maps competitors, compares positioning, and assesses relative strengths. Adapted from the original competitive-analysis skill for Chinese market context. Triggers on "A股竞争格局", "行业竞争分析", "competitive landscape China", "competitive analysis A-share", or "[company] competitors China".

安装量
1
GitHub Stars
840
最近更新
9月14日
jwangkun
社区

china-datapack-builder

Build professional data packs for A-share investment banking deals — M&A due diligence, IC materials, company profiles. Adapted from the original datapack-builder skill for Chinese data sources (AkShare, 巨潮, exchange filings) and CAS accounting. Triggers on "A股数据包", "投行数据包", "datapack China", "due diligence pack A-share", or "IC data pack [company]".

安装量
1
GitHub Stars
840
最近更新
9月14日