TencentCloud FaceID DetectAIFakeFaces: Invoking Tencent Cloud AI Face Shield within an Agent

Preface

After the launch of Face ID Verification and Liveness Detection, attack methods are also evolving: AIGC face swapping, high-definition reprints, bulk materials from the black industry, and forged images/videos with watermarks. It is difficult to cover these risks relying solely on business-side rules. If you want an Agent to directly initiate anti-attack detection within a conversational development environment, you typically need to check API documentation and assemble SDKs and parameters yourself. Below, we introduce TencentCloud FaceID DetectAIFakeFaces (coordinates @tencent-adm/tencentcloud-faceid-detectaifakefaces) on SkillHub, which encapsulates the invocation flow of Tencent Cloud Face ID’s DetectAIFakeFaces (AI Face Protection Shield) into an Agent Skill, supporting anti-attack detection for face images or videos.

What is this

TencentCloud FaceID DetectAIFakeFaces is an enterprise-source (enterprise) Skill released by the Tencent Cloud Huiyan (Smart Eye) Face ID team. The current version is 1.0.3, categorized as professional, with a subcategory of Risk Control.

The Skill’s positioning is: When a user needs to perform anti-attack detection on face images or videos, the Agent follows the instructions in SKILL.md to call the Tencent Cloud DetectAIFakeFaces API. Input supports image Base64 and video Base64 (local file paths can also be passed; the script will identify and encode them based on the extension).

Official Skill page and API entry:

  • SkillHub: https://www.skillhub.cn/skills/tencent-adm/tencentcloud-faceid-detectaifakefaces
  • API Address: https://api.skillhub.cn/tencent-adm/tencentcloud-faceid-detectaifakefaces

Refer to Tencent Cloud documentation for product API details: https://cloud.tencent.com/document/product/1007/101561

The Skill tags indicate requires_api_key=true; actual invocation requires configuring Tencent Cloud API keys.

Core Features

The following capabilities are sourced from the SKILL.md and official descriptions within the Skill package, and have been verified:

  1. AIGC Face Swap Detection: Identifies high-fidelity AI-generated or synthesized face swaps.
  2. Reprint Detection: Identifies traces of high-definition reprinting.
  3. Black Industry Attack Detection: Identifies bulk black industry attack behaviors.
  4. Watermark Detection: Identifies attack traces such as watermarks in images or videos.
  5. Multiple Input Methods: FaceInput can be a local path (jpg/png images; mp4/avi/flv videos) or a Base64 string; FaceInputType can be 1 (image) or 2 (video). For local files, the type can be omitted and inferred from the extension.
  6. Structured Output: Returns JSON upon success, containing AttackRiskLevel, AttackRiskDetailInfos (attack type and itemized risk level), and RequestId.

Risk levels are Low / Mid / High; attack types include Face Swap Attack, Reprint Attack, Liveness Forgery, Black Industry Attack, Watermark Attack, etc. (subject to the API return).

Installation and Activation

First, check or install the CLI according to the SkillHub installation instructions (Doc: https://skillhub.cn/install/skillhub.md). When installing the Skill, you must use --dir to point to the current Agent’s skills directory; otherwise, it may default to ./skills/ where it might not be recognized.

command -v skillhub && skillhub --version

skillhub install @tencent-adm/tencentcloud-faceid-detectaifakefaces --dir <Your Agent skills directory>

Common path examples (subject to SkillHub installation documentation):

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

Method 2: Prompt Installation

Send the following instructions to an AI that supports Skills and ask it to complete the installation according to the SkillHub installation documentation:

Please install @tencent-adm/tencentcloud-faceid-detectaifakefaces based on https://skillhub.cn/install/skillhub.md.

Method 3: Zip Package

The SkillHub page provides a Zip download for version 1.0.3. The package contains SKILL.md and scripts/main.py, which can be extracted to the corresponding Agent’s skills directory. The page also provides an “Install to Local Agent” entry (marked as supporting WorkBuddy).

Runtime Dependencies and Keys

The Skill requires Python 3.6+ and the tencentcloud-sdk-python package to be installed:

pip install tencentcloud-sdk-python

Configure in the environment:

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

Before use, please confirm that you have obtained legal consent or other legality bases from the personal information subject in accordance with the official website’s service agreement (notes within the Skill align with official website conventions).

Typical Usage

After installing and configuring the keys, initiate detection via scripts/main.py in the Skill directory.

Local Image (automatically identifies type and Base64):

python scripts/main.py --face-input ./face.jpg

Local Video:

python scripts/main.py --face-input ./face_video.mp4

Direct Base64 Pass and Specify Type:

python scripts/main.py --face-input-type 1 --face-input "<base64_string>"
python scripts/main.py --face-input-type 2 --face-input "<base64_string>"

Images should be jpg/png; after encoding, recommended size is under 3MB, max 10MB. Videos should be mp4/avi/flv; duration around 2–5 seconds; after encoding, recommended size is under 8MB, max 10MB (see spec table in Skill for details). Return example structure:

{
  "AttackRiskLevel": "Low",
  "AttackRiskDetailInfos": [
    {
      "Type": "Face Swap Attack",
      "RiskLevel": "Low"
    }
  ],
  "RequestId": "xxx"
}

In environments like Cursor, you can also describe requirements in natural language, such as “check if this face image is an AI swap/reprint.” The Agent will load this Skill and then select the script or Base64 input parameters; whether the script executes automatically depends on the integration method between the Agent and the Skill.

Applicable Scenarios and Notes

Suitable for:

  • Real-person authentication, risk control, and content moderation chains where quick trial runs of face anti-attack detection are needed during development conversations.
  • Teams that have already activated Tencent Cloud Face ID capabilities and possess SecretId/SecretKey.

Notes:

  • TENCENTCLOUD_SECRET_ID / TENCENTCLOUD_SECRET_KEY must be configured; the Skill performs cloud API calls, generating costs and compliance obligations on the Tencent Cloud side.
  • There are clear upper limits for input format, resolution, duration, and Base64 size. Non-compliance with specifications may lead to failed calls or degraded effectiveness.
  • SkillHub statistics (page data): approximately 1211 downloads, 64 installations; the overview text is based on the Skill package and product documentation. If the page overviewMd is empty, SKILL.md prevails.

Conclusion

TencentCloud FaceID DetectAIFakeFaces writes the input parameter conventions, environment dependencies, and script entries for DetectAIFakeFaces into the standard Skill format. This facilitates anti-attack detection for face images/videos within Agent workflows without having to integrate the SDK from scratch every time. To install or view versions, please visit: https://api.skillhub.cn/tencent-adm/tencentcloud-faceid-detectaifakefaces

羽毛球分组比赛记分
小程序二维码

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

Xiaoye