tencentcloud-faceid-detectlivefaceaccurate: Invoking Tencent Cloud Static Liveness High-Precision Detection in Agent

Introduction

A common step in business is when a user uploads a face photo, and the system needs to determine if it is a reproduction (e.g., photographing a screen with a phone, a printed paper, or a mask). If an Agent has to check Tencent Cloud FaceID documentation on the fly or piece together SDK parameters during a conversation, it is prone to missing fields or confusing this with the standard static liveness detection. This article introduces tencentcloud-faceid-detectlivefaceaccurate on SkillHub, which codifies the calling conventions for DetectLiveFaceAccurate (High-precision Static Face Liveness Detection) into a SKILL.md file. This allows the Agent to execute the same standardized workflow whenever anti-spoofing liveness detection is required.

What is this

In short: A coding Agent skill for calling the Tencent Cloud DetectLiveFaceAccurate API, designed for anti-spoofing liveness detection on static face images.

  • Coordinates: @tencent-adm/tencentcloud-faceid-detectlivefaceaccurate
  • Version: 1.0.0 (as listed on the SkillHub page)
  • Maintainer: Tencent Cloud Huiyan Face Verification Team
  • Category: it-ops-security; SkillHub tags include requires_api_key=true
  • Source: enterprise (Materials scraped by SkillHub)

Compared to standard static liveness detection, the official description states that the high-precision version strengthens defense against high-definition screen reproductions, cropped paper, 3D masks, and other attacks. It is suitable for liveness verification scenarios primarily based on images on mobile and PC platforms. Interface capabilities and parameter details are subject to the Tencent Cloud documentation: https://cloud.tencent.com/document/product/867/48501

Core Features

The following content is consistent with the SKILL.md inside the skill package and only lists the explicitly documented capabilities:

  1. Anti-spoofing Liveness Detection: Determines if a user-uploaded static image is a reproduction.
  2. Attack Type Focus: High-definition screen reproduction, cropped paper, 3D masks, etc. (Enhancements relative to standard static liveness, see skill description).
  3. Input Methods: Image Base64, Image URL; local file paths can be automatically converted to Base64 by the script.
  4. Script Entry: scripts/main.py, depends on tencentcloud-sdk-python.
  5. Output: JSON, containing fields such as Score, ScoreDesc, IsLive, FaceModelVersion, and RequestId; the skill documentation provides a recommended threshold of 40 (Score ≥ 40 leans towards a real face, < 40 leans towards a reproduction).

Installation and Usage

1. Install SkillHub CLI (if not installed)

First, check if the CLI is already present:

command -v skillhub && skillhub --version

If not installed, follow the SkillHub installation instructions to perform a complete installation (the example below is the recommended command from the official documentation):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

2. Install this Skill

When installing, you must use --dir to point to the current Agent’s skills directory; otherwise, if it defaults to ./skills/, it might not be recognized.

skillhub install @tencent-adm/tencentcloud-faceid-detectlivefaceaccurate --dir <skills directory>

Common path examples (from SkillHub installation documentation):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

You can also ask the AI to complete the installation following the prompts on the SkillHub page, referencing https://skillhub.cn/install/skillhub.md.

3. Configure Tencent Cloud Keys

The skill requires Python 3.6+ and the following environment variables:

export TENCENTCLOUD_SECRET_ID="<Your SecretId>"
export TENCENTCLOUD_SECRET_KEY="<Your SecretKey>"

Install Python dependencies:

pip install tencentcloud-sdk-python

Typical Usage

After the Agent loads the skill, run scripts/main.py when static image liveness detection is needed. Request parameters (consistent with SKILL.md):

Parameter Description
--image Local path or Base64 string; mutually exclusive with --url
--url Image URL; if provided simultaneously with --image, the URL takes precedence
--face-model-version Optional, currently supports 3.0, default is 3.0
--region Optional, Tencent Cloud region, default is empty

Image Specifications (Skill Documentation Summary): PNG, JPG, JPEG, BMP (GIF not supported); for JPG, the long edge must not exceed 4000 pixels, for other formats, the long edge must not exceed 2000 pixels; the face area is recommended to be larger than 100×100; the Base64 encoded size must not exceed 5MB.

Reproducible examples:

# Local image (auto Base64)
python scripts/main.py --image ./face.jpg

# Image URL
python scripts/main.py --url "http://example.com/face.jpg"

# Specify model version
python scripts/main.py --image ./face.jpg --face-model-version 3.0

Example structure returned on success (Score descriptions see the table in the skill, recommended threshold is 40):

{
  "Score": 99,
  "ScoreDesc": "Liveness score is 99, higher than the recommended threshold of 40, determined as a real face",
  "IsLive": true,
  "FaceModelVersion": "3.0",
  "RequestId": "xxx"
}

In environments like Cursor, a more common path is: the user describes in natural language “Determine if this face is a reproduction,” the Agent triggers based on the “When to use” section of the SKILL.md, and then calls the script mentioned above, rather than writing SDK boilerplate code manually.

Use Cases and Notes

Who is it for

  • Teams already using or planning to use Tencent Cloud Face Verification / FaceID who need to perform static image anti-spoofing detection within Agent workflows.
  • Scenarios dissatisfied with standard static liveness accuracy and hoping to use the DetectLiveFaceAccurate High-precision Version (both mobile and PC uploaded images apply, provided the actual shooting quality meets specifications).

Limitations and Notes

  1. Static Images Only: The skill is positioned for static liveness detection, not video streams or action-based liveness; if the requirement involves AIGC face-swapping or video attacks, other Tencent Cloud interfaces and corresponding Skills should be selected. Do not mix with this skill.
  2. Compliance: Processing personal face information requires a legal authorization basis. Please refer to the Tencent Cloud official service agreement for specifics (the skill’s SKILL.md also points to official conventions).
  3. Keys: requires_api_key=true. Do not write TENCENTCLOUD_SECRET_* into repository code or conversation logs.
  4. Thresholds: The default recommendation is 40. Businesses can adjust security strategies based on the documentation’s 5 / 10 / 40 / 70 / 90 scale.

The SkillHub page displays a skill rating of 100,000, with approximately 1171 downloads and 26 installations (subject to page/scraped data, which changes over time).

Conclusion

tencentcloud-faceid-detectlivefaceaccurate consolidates the trigger conditions, environment variables, script parameters, and image specifications for DetectLiveFaceAccurate into a skill description readable by Agents, reducing the need for repeated documentation checks during integration. To install or view metadata, you can visit the official SkillHub pages:

  • https://www.skillhub.cn/skills/tencent-adm/tencentcloud-faceid-detectlivefaceaccurate
  • https://api.skillhub.cn/tencent-adm/tencentcloud-faceid-detectlivefaceaccurate
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye