← Back to Skills Marketplace
freedompixels

Cn Id Validator

by freedompixels · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
23
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install cn-id-validator
Description
cn id validator
README (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
Usage Guidance
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cn-id-validator
  3. After installation, invoke the skill by name or use /cn-id-validator
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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
Metadata
Slug cn-id-validator
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Cn Id Validator?

cn id validator. It is an AI Agent Skill for Claude Code / OpenClaw, with 23 downloads so far.

How do I install Cn Id Validator?

Run "/install cn-id-validator" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Cn Id Validator free?

Yes, Cn Id Validator is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Cn Id Validator support?

Cn Id Validator is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Cn Id Validator?

It is built and maintained by freedompixels (@freedompixels); the current version is v1.0.0.

💬 Comments