Tencent Cloud ID Card OCR
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @tencent-adm/tencentcloud-ocr-idcard.
About this skill
Problem Scenario
When a system needs to extract fields such as name, ID number, and validity period from a mainland China ID card image, while also detecting risks like photocopy, reshoot, PS traces, or temporary ID, handling OCR, cropping, and warnings separately can create duplicated logic. @tencent-adm/tencentcloud-ocr-idcard targets this development scenario by wrapping the Tencent Cloud OCR ID card API into a single skill.
How It Works
The skill runs through scripts/main.py and supports two image input modes: ImageBase64 and ImageUrl. You can specify CardSide as FRONT or BACK; if omitted, the service detects the side automatically. Core capabilities include:
- Front side: name, gender, ethnicity, date of birth, address, and citizen ID number
- Back side: issuing authority and validity period
- Additional processing: ID card photo cropping or portrait cropping
- Risk warnings: photocopy, reshoot, PS traces, temporary ID, reflection, invalid date, and other checks
The Config request parameter is a JSON string used to enable warning and processing switches. CardWarnType can select Basic or Advanced warning algorithm levels. If WarnInfos is needed, at least one warning switch must be explicitly enabled in Config.
Boundaries and Notes
The skill requires Tencent Cloud API credentials, including TENCENTCLOUD_SECRET_ID and TENCENTCLOUD_SECRET_KEY. Base64 image input is limited to 10MB. Warning detection is not fully enabled by default. When a user requests checks such as “detect PS” or “detect reshoot”, the caller should confirm the relevant Config switches before relying on warning output. The JSON result is suitable for form prefill or review-assist workflows, but warning codes should not replace a complete compliance review.
Use Cases
- Extract name, ID number, and validity period from submitted ID card photos during onboarding review.
- Run photocopy, reshoot, or PS-trace detection on uploaded certificate images and return warning codes for risk review.
- Batch-process ID materials by automatically cropping ID card or portrait photos for storage and display.
- Call the recognition API with an image URL or Base64 payload to prefill form fields in an internal system.
Best For
- Backend engineers building onboarding review who need to auto-extract ID card fields into business forms.
- Risk engineers handling certificate checks who need to detect photocopy, reshoot, PS, and temporary ID warnings.
- Python developers processing document batches who need to call Tencent Cloud OCR and normalize JSON results.
- Product engineers designing material pre-review flows who need OCR results for form prefill and risk tagging.
Related Skills
A systematic code error fixing skill that follows a five-step workflow: Reproduce, Isolate, Understand, Fix, Verify, to help developers resolve code errors.
Supports inline SVG/HTML rendering and Mermaid code output, covering common technical diagram creation like architecture and flow diagrams.
Publish HTML, static assets, or build output as a public link, with account management, update, deletion, and AI safety review.
A comprehensive browser automation guide covering navigation, interaction, multi-tab management, and data collection, tailored for domestic web ecosystems and tools like Playwright/Selenium.