← 返回 Skills 市场
freedompixels

Cn Id Validator

作者 freedompixels · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
23
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install cn-id-validator
功能描述
cn id validator
使用说明 (SKILL.md)

Chinese ID Validator

Validate Chinese ID numbers (18-digit and 15-digit formats) and extract information.

Features

  • Validate 18-digit ID numbers (with checksum verification)
  • Validate 15-digit ID numbers (with birth date check)
  • Extract birth date from ID number
  • Extract gender from ID number
  • Extract region code from ID number
  • Pure Python, no external dependencies

ID Number Format

18-digit Format (1999-present)

  • 1-6: Region code
  • 7-14: Birth date (YYYYMMDD)
  • 15-17: Sequential code (odd=male, even=female)
  • 18: Check digit (0-10, where 10=X)

15-digit Format (1985-1999)

  • 1-6: Region code
  • 7-12: Birth date (YYMMDD, assumed 19xx)
  • 13-15: Sequential code (odd=male, even=female)

Usage

python3 scripts/id_validator.py --id 110101199003074416

Example Output

{
  "valid": true,
  "region": "110101",
  "birthday": "1990-03-07",
  "gender": "男"
}

Validation Rules

  1. Length must be 15 or 18 digits
  2. Birth date must be a valid calendar date
  3. For 18-digit IDs: checksum must be correct
  4. Region code must be a valid Chinese administrative region

Common Region Codes

Code Region
110000 北京市
310000 上海市
440000 广东省
320000 江苏省
330000 浙江省

Use Cases

  • User registration form validation
  • Identity verification in business processes
  • Age-based access control
  • Demographic data analysis

Notes

  • This tool validates format and checksum only
  • It does not verify against government databases
  • Region codes are not fully validated (only format checked)
  • Results are for reference only

Technical Details

  • Language: Python 3
  • Dependencies: None (standard library only)
  • License: MIT-0
安全使用建议
Use this only with ID numbers you are authorized to process. The tool checks format, birth date, and checksum locally; it does not verify identity against official government databases.
能力评估
Purpose & Capability
The stated purpose is to validate Chinese ID numbers and extract region, birthday, and gender, and the included Python script performs that local parsing/checksum logic.
Instruction Scope
The instructions show a single user-directed command-line usage example and do not tell the agent to override user intent, run automatically, or perform unrelated actions.
Install Mechanism
There is no install spec, no external dependency installation, and the only included code is a small Python script using standard library modules.
Credentials
The skill declares no environment variables, credentials, config paths, or required services, which is proportionate for an offline validator.
Persistence & Privilege
The artifacts show no file writes, background processes, persistence, privilege escalation, or account access.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cn-id-validator
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cn-id-validator 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Version 1.0.0 of cn-id-validator introduces a utility for validating and extracting information from Chinese ID numbers. - Validates both 18-digit and 15-digit Chinese ID numbers (including checksum and date checks) - Extracts birth date, gender, and region code from ID number - Pure Python implementation with no external dependencies - Useful for registration, verification, age control, and demographic analysis - Includes sample usage and output examples in documentation
元数据
Slug cn-id-validator
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Cn Id Validator 是什么?

cn id validator. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 23 次。

如何安装 Cn Id Validator?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cn-id-validator」即可一键安装,无需额外配置。

Cn Id Validator 是免费的吗?

是的,Cn Id Validator 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cn Id Validator 支持哪些平台?

Cn Id Validator 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cn Id Validator?

由 freedompixels(@freedompixels)开发并维护,当前版本 v1.0.0。

💬 留言讨论