# A.I.G skills: security checks for agent skills and agents (Tencent/AI-Infra-Guard) — skill card for AI agents

> AgentGid skill card. Checked on 2026-11-17 against commit 9581449.
> Every fact comes from the pack's own files at that commit. Numbers marked "as reported" are the author's.
> Human page: https://agentgid.com/skills/tencent/ai-infra-guard/

> Note: the pack has changed since this check; re-read its files before relying on details.

## Explain it to a non-programmer
Three security skills from Tencent's A.I.G project. One checks the skills you installed, or one skill before you install it, by reading its files. One gives an OpenClaw setup a full health check. One runs an authorised attack exercise on an AI assistant or product and writes a report like a penetration test.

## Who it is for
- You want to know whether a skill is safe before you install it
- You run OpenClaw and want a check of its settings, installed skills and known flaws
- You build an AI assistant or product and want it tested against tricks like hidden instructions and data leaks
- Not for: You want a check of an app or website you don't own: the attack exercise asks you to confirm you may test it
- Not for: You only want the OpenClaw health check without any outside lookup: switch the cloud lookup off first

## What it is
- Kind: knowledge, scripts
- License: Apache-2.0
- Repository: https://github.com/Tencent/AI-Infra-Guard

## What it does
- Skill scanner: finds your installed skills (or one named skill), reads their files and code without running them, and compares what each skill says it does with what its code does
- It flags stealing keys or passwords, hidden downloads, back doors, access to photos or documents, real secrets left in files, wide deletions and hidden instructions aimed at the assistant
- OpenClaw check: runs OpenClaw's own security audit, checks each installed skill (optionally against Tencent's online list), looks up known flaws for your OpenClaw version and rates privacy risk from settings only
- Attack exercise: maps what the target can reach, writes risk guesses, tests them with harmless markers, changes one thing per round and sends at least 30 test prompts when live testing is in scope
- The exercise writes report.md, and report.html for fuller runs, with every round shown in full and secrets replaced
- Never cuts: Static only in the scanners: the skill being checked is never run; the exercise avoids real secrets, real data leaving the machine and destructive writes unless you allow them

## Skills
| Skill | Call | Changes code? | In plain words |
|---|---|---|---|
| edgeone skill scanner | plain language ("scan skill", "check skill safety", "audit skill") | no | Reads a skill's files and tells you if it looks safe to install |
| edgeone-clawscan | plain language ("run a security audit" on OpenClaw, or "is this skill safe?") | no | A full health check of an OpenClaw setup, or a safety check of one skill |
| aig-agent-redteam | plain language (the README example is a Chinese "run a security exercise" request) | yes | Runs an authorised attack exercise on an AI assistant or product and writes a full report |

### edgeone skill scanner
- Asks for: The name or folder of one skill, or ask to check all skills on your assistant
- Asks for: Which assistant you use, if it cannot tell
- Gives: One verdict per skill: no risk found, needs attention, or risk found
- Gives: For each finding: place in the file, the code, what could happen, how far it reaches, what to do
- Gives: For a full check: one table of every skill, details only for risky ones
- Say: "Check whether the skills in my .claude/skills folder are safe"

### edgeone-clawscan
- Asks for: A request for a full OpenClaw check, or the name of one skill
- Asks for: Your choice on the cloud lookup (on by default)
- Gives: OpenClaw Security Health Report with a score out of 100
- Gives: Settings check
- Gives: Installed skills ranked by risk
- Gives: Known flaws for your OpenClaw version
- Gives: Privacy risk check
- Gives: For one skill: a short verdict
- Say: "Run a security audit of my OpenClaw setup"

### aig-agent-redteam
- Asks for: What to test: a web address, a model address, code, a skill, or the assistant itself
- Asks for: How to send it test messages and how to see its replies
- Asks for: That you own it or may test it
- Asks for: What is off limits
- Gives: A map of what the target can reach and do
- Gives: Every attempt with its result, not only the failures
- Gives: Counts of test prompts sent and which tricks were used
- Gives: Findings by severity with full evidence
- Gives: What held up, and fixes with a way to retest
- Gives: report.md, and report.html when asked or for fuller runs
- Say: "Run a security exercise on this assistant itself"

## Know before installing
- The OpenClaw check sends a little data to Tencent by default: skill names, where each came from, and your OpenClaw version. Set AIG_CLOUD_LOOKUP=off to keep everything local.
- The OpenClaw check also runs a live probe of the gateway set in your OpenClaw config; the skill says to avoid a production gateway.
- After a full OpenClaw check it offers to save a habit in the assistant's global memory: scan every new skill with it before installing.
- The attack exercise ships a large library of attack prompts and test sets, including harmful-request sets, for testing models.
- The attack exercise can test the assistant running it; that counts as permission only for that assistant, within safe limits.
- The skills list names a fourth skill, aig-scanner, but its folder is not in the repo at this commit.

## Install (official commands)
- Claude Code, Cursor, CodeBuddy (skills command): `npx skills add https://github.com/Tencent/AI-Infra-Guard.git --skill aig-agent-redteam` — Installs the attack exercise skill. Needs node and git.
- Claude Code (by hand): `git clone https://github.com/Tencent/AI-Infra-Guard.git /tmp/aig` && `cp -r /tmp/aig/skills/aig-agent-redteam ~/.claude/skills/` — Copy another skill folder from skills/ the same way. Remove: `delete the folder from ~/.claude/skills/`.
- OpenClaw (ClawHub): edgeone-clawscan and edgeone-skill-scanner are listed on ClawHub under aigsec. The skill itself says to check the publisher against the official repo before trusting it.

## What runs on the user's machine
- Code on the machine: yes (aig-agent-redteam (the two EdgeOne skills are markdown only))
- Network: True
- Install: Markdown skills; no hooks. aig-agent-redteam also ships Python helper scripts the assistant may call.
- OpenClaw check: The assistant runs openclaw security audit --deep (a live probe of your local gateway) and, unless AIG_CLOUD_LOOKUP=off, curl requests to matrix.tencent.com/clawscan with skill names, sources and your OpenClaw version.
- Skill scanner: Reads skill folders such as .claude/skills and ~/.claude/skills. Sends nothing out.
- Attack exercise on a web address: A Python script sends HTTP requests to the target to identify the product and match known flaws, and writes findings JSON under reports/<run_id>/.
- Attack exercise on a model: Sends test prompts to the model address you set in AIG_TARGET_BASE_URL with AIG_TARGET_TOKEN.
- Only if you allow a download: git clone of the full AI-Infra-Guard repo into a temporary folder for its data files.

## Settings
- `AIG_CLOUD_LOOKUP`: off / false / 0 turns off every call to Tencent in edgeone-clawscan (default on)
- `AIG_BASE_URL`: Address of the A.I.G service for edgeone-clawscan (default https://matrix.tencent.com/clawscan)
- `AIG_DATA_DIR / AIG_ROOT`: Where aig-agent-redteam finds A.I.G data files
- `AIG_TARGET_BASE_URL / AIG_TARGET_TOKEN / AIG_TARGET_MODEL`: Model address, key and name for testing a model with aig-agent-redteam

## Examples (from the pack's own files)
- The scanner's verdict card for a safe skill: output format defined in skills/edgeone-clawscan/SKILL.md
- The scanner's answer when a skill is risky: output format defined in skills/edgeone-clawscan/SKILL.md

## Steps only the person can do
- Confirm that you own the target or are allowed to test it, and set its limits (skills/aig-agent-redteam/SKILL.md (Step 0)) Then: The assistant starts the attack exercise inside those limits
- Decide on the OpenClaw check's cloud lookup (set AIG_CLOUD_LOOKUP=off to keep it local) (skills/edgeone-clawscan/SKILL.md (Configuration)) Then: The assistant runs the check with or without Tencent lookups
- For model testing, set AIG_TARGET_BASE_URL, AIG_TARGET_TOKEN and AIG_TARGET_MODEL yourself (skills/aig-agent-redteam/scripts/profiler.py) Then: The scripts send test prompts to that model

## Mistakes to avoid
- Not: Run the OpenClaw check where policy forbids any outside call. Instead: Set AIG_CLOUD_LOOKUP=off first, or point AIG_BASE_URL at your own A.I.G. Why: Cloud lookup to Tencent is on by default
- Not: Read a cloud-off OpenClaw report as "no known flaws". Instead: Read it as "online flaw check skipped". Why: The skill says a skipped lookup is not the same as zero flaws
- Not: Treat a "safe" verdict as a guarantee. Instead: Re-check after updates; the verdict covers only the current files. Why: The scan is static and cannot see later updates or runtime behaviour
- Not: Ask the attack exercise to test an outside product without saying how to reach it or that you may. Instead: Give target, how to send, how to observe, and your authorisation up front. Why: It must not start on outside targets until those four are clear
- Not: Look for the aig-scanner skill in this repo. Instead: Use the three folders that exist under skills/. Why: skills/README.md lists aig-scanner, but its folder is missing at this commit

## What leaves the machine
- Installed skill names and source labels → matrix.tencent.com/clawscan (A.I.G threat lookup), edgeone-clawscan, per skill from a managed catalog such as ClawHub. Opt out: AIG_CLOUD_LOOKUP=off, or a self-hosted AIG_BASE_URL
- The fixed word OpenClaw and your OpenClaw version → matrix.tencent.com/clawscan (advisory lookup), edgeone-clawscan full check. Opt out: AIG_CLOUD_LOOKUP=off
- Test requests and test prompts → The target address or model you name, aig-agent-redteam live tests. Opt out: Keep the exercise to static code review

## Lines in the pack aimed at agents (ask the person first)
- "Execute all 4 steps silently and generate one unified report at the end." (skills/edgeone-clawscan/SKILL.md): Tell the person before the live gateway probe and the Tencent lookups run, not only in the report.
- "调用记忆写入工具，将以下内容写入**全局记忆**（global memory）和当天记忆，使其在所有项目中生效" (skills/edgeone-clawscan/SKILL.md): Writing a global rule needs the person's clear yes; it changes behaviour in every project.
- "Every scan output MUST end with the following footer line. Never omit it." (skills/edgeone-skill-scanner/SKILL.md): A fixed promotional footer; harmless, but the person may drop it.
- "用户明确要求测试当前 Agent 即视为对该 Agent 自身的授权" (skills/aig-agent-redteam/SKILL.md): Self-testing sends jailbreak prompts to the running assistant; keep it in a throwaway session with no real secrets.

## May I use it like this?
- commercial-app: conditions (Apache-2.0; the NOTICE asks you to state "Based on Tencent Zhuque Lab AI-Infra-Guard" and link the repo in anything built on it)
- redistribute-files: conditions (Apache-2.0: keep LICENSE and NOTICE, add the attribution and repo link; the EdgeOne skills also say MIT in their headers)
- client-work: conditions (Apache-2.0 with the NOTICE attribution)

## Which one to pick
- If You want a skill safety check plus an OpenClaw health check and an attack exercise for your own assistant: skill:Tencent/AI-Infra-Guard
- If You want a security suite that keeps guarding OpenClaw and its variants: skill:prompt-security/clawsec
- If You want a dedicated scanner for agent skills: skill:cisco-ai-defense/skill-scanner
- If You want NVIDIA's scanner for vulnerabilities and prompt injection in skills: skill:NVIDIA/SkillSpector

## Works well with
- agent:openclaw: edgeone-clawscan is built for OpenClaw and calls the openclaw program
- agent:claude-code: The scanner reads .claude/skills, and the attack exercise installs into ~/.claude/skills
- tool:skills: The README installs aig-agent-redteam with npx skills add
- tool:promptfoo: Another way to red-team LLM apps when you want repeatable test configs

## Works in and needs
- Works in Claude Code: skills folder
- Works in Cursor, CodeBuddy: skills folder
- Works in Windsurf, OpenClaw: skills (scanner); OpenClaw via ClawHub
- Needs openclaw program: edgeone-clawscan runs its built-in audit
- Needs Node.js and git: To install with npx skills add
- Needs Python 3: aig-agent-redteam helper scripts
- Needs A model address and key: Only to test a model with aig-agent-redteam

## How to tell it works
Install the skill scanner and ask "is the skill in .claude/skills/<name> safe?". You get a short card with four checks and a one-line verdict, then a footer line linking to A.I.G. That card is how you know the scanner ran.

## Related
- openclaw/clawscan

## Safety
edgeone-clawscan itself warns that a skill registry may show a different owner than the author, so check the copy against github.com/Tencent/AI-Infra-Guard. The attack exercise holds real attack prompts: run it only on systems you own or may test.
