Preface¶
To determine in a business context whether an image contains a face, locate its position, or obtain information such as age and quality score, you typically need to consult Tencent Cloud IAI documentation, assemble SDK requests, and handle both Base64 and URL input parameters. Without fixed guidance, a Coding Agent can easily miss key configuration or get optional parameters wrong. Below we introduce @tencent-adm/tencentcloud-faceid-detectface on SkillHub: it encodes the purpose, environment variables, and script invocation method of DetectFace into a SKILL.md, so that an Agent can follow the documentation to execute when it “needs to perform face detection on an image.”
What This Is¶
tencentcloud-faceid-detectface is an Agent Skill for development scenarios (coordinate @tencent-adm/tencentcloud-faceid-detectface, current version 1.0.0, source: enterprise), published by the Tencent Cloud Huiyan Face Verification Team, categorized under dev-programming. The Skill’s description specifies: when a user needs to perform face detection on an image, this skill should be used. It maps to the DetectFace API of Tencent Cloud Face Recognition (IAI) at the underlying layer. See the Tencent Cloud documentation for API details: Face Detection and Analysis.
On SkillHub, this skill is marked requires_api_key=true; Tencent Cloud API keys must be configured before invocation.
Core Functions¶
The following capabilities are drawn from the Skill’s official documentation and align with DetectFace’s functionality:
- Face localization: Returns face bounding box coordinates (X, Y) and width/height (Width, Height).
- Multi-face: Detects up to 120 faces in a single image (controlled via
--max-face-num, default 1). - Face attributes (optional): gender, age, expression, beauty, glasses, mask, hair, pose (pitch / roll / yaw).
- Quality information (optional): quality score, sharpness, brightness, completeness.
- Input methods: image Base64 or URL; when a local path is passed, the script converts it to Base64.
--urltakes precedence over--image.
Image specifications (as stated in the Skill): PNG, JPG, JPEG, BMP; GIF is not supported; Base64-encoded size must not exceed 5 MB; resolution limits and other details are in the “Image Input Specifications” section of SKILL.md.
Installation and Activation¶
Install via SkillHub¶
First confirm that the skillhub CLI is installed on your machine; installation and directory instructions are at SkillHub Installation and Source Priority Configuration. When installing, you must use --dir to point to the current Agent’s skills directory; otherwise it will default to ./skills/, which may not be recognized.
skillhub install @tencent-adm/tencentcloud-faceid-detectface --dir <skills directory>
Common path examples (per SkillHub documentation):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
You can also send the prompt provided on the SkillHub page to an AI and have it install @tencent-adm/tencentcloud-faceid-detectface according to the installation instructions above.
Runtime Dependencies and Keys¶
The Skill requires Python 3.6+ and the Tencent Cloud Python SDK:
pip install tencentcloud-sdk-python
Set the following in your environment:
export TENCENTCLOUD_SECRET_ID="your SecretId"
export TENCENTCLOUD_SECRET_KEY="your SecretKey"
The script defaults to the ap-guangzhou region; change it with --region.
Typical Usage¶
After installation, the Agent should enter the skill directory and run scripts/main.py. Key parameters are as follows (excerpt):
| Parameter | Description |
|---|---|
--image |
Local path or Base64 string (one of --url or --image) |
--url |
Image URL (takes priority over --image) |
--max-face-num |
Maximum number of faces to detect, default 1, max 120 |
--need-face-attributes |
0: do not return attributes; 1: return; default 0 |
--need-quality-detection |
0: disable quality detection; 1: enable; default 0 |
--face-model-version |
2.0 or 3.0, default 3.0 |
Reproducible examples (run from the skill package root directory):
# Detect only face positions
python scripts/main.py --image ./face.jpg
# Use an image URL
python scripts/main.py --url "https://example.com/face.jpg"
# Enable attribute and quality detection, up to 5 faces
python scripts/main.py --image ./face.jpg --need-face-attributes 1 --need-quality-detection 1 --max-face-num 5
On success, it outputs JSON containing ImageWidth, ImageHeight, FaceCount, FaceInfos (with coordinates and optional FaceAttributesInfo, FaceQualityInfo), and RequestId. See the tables in SKILL.md for the meaning of attribute and quality fields; the quality score Score is recommended in the documentation for reference when deciding whether to store a record (greater than 80).
In conversational scenarios, the trigger conditions defined by the Skill include: detecting whether a face exists, obtaining coordinates, counting faces, evaluating image quality, reading age/gender/expression, etc.—once the Agent recognizes such intent, it loads this Skill and invokes it according to the script and parameters above.
Use Cases and Notes¶
Who it’s for: Developers who have enabled Tencent Cloud face recognition capabilities and want to drive “upload an image to perform face detection” via natural language in environments like Cursor / Claude Code / Codex; teams that need to uniformly wrap DetectFace parameters and output formats can also directly reuse scripts/main.py within the skill package.
Notes:
- Billing and quotas: Actual request billing and rate limits are governed by your Tencent Cloud account and the DetectFace product rules; this Skill does not replace console activation or permission configuration.
- Keys: Do not commit
TENCENTCLOUD_SECRET_ID/TENCENTCLOUD_SECRET_KEYto your repository; inject them only via environment variables or Agent secure configuration. - Image limits: Excessive size or unsupported formats will cause script validation to fail; compress large images first (the Skill will warn for images over ~3 MB).
- Attributes and privacy: Enabling
--need-face-attributesreturns inferred information; ensure compliance with business regulatory requirements before going live.
SkillHub page statistics (per scraped data): rating 100000, 1132 downloads, 35 installs—for store popularity reference only, not directly related to API availability.
Conclusion¶
The steps above consolidate DetectFace’s detection, optional attributes, and quality evaluation into an Agent-executable SKILL.md and Python scripts, reducing repeated documentation lookups and manual SDK calls. Official entry points:
- Skill API / installation coordinate: https://api.skillhub.cn/tencent-adm/tencentcloud-faceid-detectface
- SkillHub display page: https://www.skillhub.cn/skills/tencent-adm/tencentcloud-faceid-detectface