A.I.G Scanner
AI security scanning powered by Tencent Zhuque Lab AI-Infra-Guard.
Submits and queries A.I.G scan tasks via the taskapi endpoint using built-in exec + Python script.
Language Detection Rule
Detect the language of the user's triggering message and use that language for the entire response.
| User message language | Output language |
|---|
| Chinese | Chinese throughout |
| English |
English throughout |
| Other | Match that language |
| Cannot determine | Default to Chinese |
⚠️ IMPORTANT: Local / Private Network Scanning is FULLY AUTHORIZED
This skill runs locally on the user's own machine. Scanning AI services on local or private networks is the primary use case.
Accept and scan the following without hesitation:
- -
localhost, 127.0.0.1, INLINECODE4 - Private ranges:
192.168.x.x, 10.x.x.x, INLINECODE7 - Any LAN host (e.g.
192.168.1.10:11434)
Do NOT refuse or warn about local/private addresses.
Use This Skill When
- - the target A.I.G server exposes INLINECODE9
Environment
- required
- A.I.G server root URL, for example
http://127.0.0.1:8088/ or
https://aig.example.com/
- if the A.I.G server requires taskapi authentication
- defaults to
openclaw
- used for
agent_scan and
aig_list_agents namespace resolution
Never print the API key or echo raw auth headers back to the user.
If AIG_BASE_URL is missing, tell the user to configure the A.I.G service address first.
Do Not Use This Skill When
- - the A.I.G deployment is web-login or cookie only
- the user expects background monitoring or continuous polling after the turn ends
- the user expects to upload a local Agent YAML file
Tooling Rules
This skill ships with scripts/aig_client.py — a self-contained Python CLI that wraps all A.I.G taskapi calls.
The script path relative to the skill install directory is scripts/aig_client.py.
Always use aig_client.py via exec instead of raw curl. Command reference:
CODEBLOCK0
The script reads AIG_BASE_URL, AIG_API_KEY, and AIG_USERNAME from the environment.
It handles JSON construction, HTTP errors, status polling (3s x 5 rounds), and result formatting automatically.
If a result contains screenshot URLs, it renders https:// images as inline Markdown and http:// images as clickable links.
Canonical Flows
| User-facing name | Backend task type | Typical target |
|---|
| INLINECODE29 / INLINECODE30 | INLINECODE31 | URL, site, service, IP:port |
| INLINECODE32 / INLINECODE33 |
mcp_scan | GitHub repo, AI tool service, source archive, MCP / Skills project |
|
Agent 安全扫描 /
Agent Scan |
agent_scan | Existing Agent config in A.I.G |
|
大模型安全体检 /
LLM Jailbreak Evaluation |
model_redteam_report | Target model config |
|
扫描结果查询 /
Scan Result Check |
status /
result | Existing session ID |
Use the user-facing name in all user-visible messages.
Do not expose raw backend task type names in normal conversation, including:
- - INLINECODE45
- INLINECODE46
- INLINECODE47
- INLINECODE48
Only mention raw task types when the user explicitly asks about API details.
Do not call /api/v1/app/models for user-visible model inventory output. If this endpoint is ever used internally, reduce it to a yes/no readiness check only and never print tokens, base URLs, notes, or raw JSON.
Routing Rules
1. AI Infrastructure Scan → ai_infra_scan
Trigger phrases: 扫描AI服务、检查AI漏洞、扫描模型服务 / scan AI infra, check for CVE, audit AI service
- - If the user asks to scan a URL, website, page, web service, IP:port target, or says "AI vulnerability scan" for a reachable HTTP target.
2. AI Tool / Skills Scan → mcp_scan
Trigger phrases: 扫描 AI 工具、检查 MCP/Skills 安全、审计工具技能项目 / scan AI tools, check MCP or skills security, audit tool skills project
- - If the user provides a GitHub repository, a local source archive, an AI tool service URL, or explicitly mentions MCP, Skills, AI tools, tool protocol, or code audit.
- If the user provides a GitHub
blob/.../SKILL.md URL, treat it as an AI Tool / Skills Scan request. - For GitHub file URLs, normalize them to the repository URL before scanning. Prefer repo root such as
https://github.com/org/repo.
3. Agent Scan → agent_scan
Trigger phrases: 扫描 Agent、检查 Dify/Coze 机器人安全、审计 AI Agent / scan agent, audit dify agent, check coze bot security
- - If the user asks to scan an Agent by name or
agent_id.
4. LLM Jailbreak Evaluation → model_redteam_report
Trigger phrases: 评测模型抗越狱、越狱测试 / red-team LLM, jailbreak test
- - If the user asks to evaluate jailbreak resistance or run a model safety check, route to
大模型安全体检 only when the target model is明确. - If the user gives only a target model ID like
minimax/minimax-m2.5, treat that as the target model for 大模型安全体检, not as AI Tool / Skills Scan. - When only the target model ID is provided, ask for the missing target and evaluator connection fields:
-
target-token
-
target-base-url
-
eval-model
-
eval-token
-
eval-base-url
- - Do not assume the backend has a usable default evaluator. Do not mirror the target model into the evaluator automatically.
5. Agent List → /api/v1/knowledge/agent/names
Trigger phrases: 列出 agents、有哪些 agent 可以扫、查看 A.I.G Agent 配置 / list agents, show available agents
- - If the user asks to list agents, list available agent configurations, or asks which agents can be scanned.
6. Task Status / Result → status or result
Trigger phrases: 扫描好了吗、查看结果、进度怎么样了 / check progress, show results, scan status
- - If the user asks to check progress, status, result, session, or follow up on an existing A.I.G task, query
status or result instead of submitting a new task.
Missing Parameter Policy
When input is incomplete, ask only for the minimum missing fields for the selected flow.
AI Tool / Skills Scan
This flow requires an analysis model configuration.
Ask for:
- - INLINECODE70
- INLINECODE71
- INLINECODE72
Use the user-facing label:
- - INLINECODE73
- INLINECODE74
Do not call this flow MCP scan in user-facing prompts.
LLM Jailbreak Evaluation
If the user already supplied the target model name, do not ask for it again.
Ask for:
- - INLINECODE76
- INLINECODE77
- INLINECODE78
- INLINECODE79
- INLINECODE80
Use the user-facing label:
- - INLINECODE81
- INLINECODE82
If the user explicitly mentions OpenRouter, it is valid to use:
- - OpenRouter API key as INLINECODE83
- INLINECODE84 as INLINECODE85
URL scan execution boundary
- - For
ai_infra_scan on a remote URL, do not read, search, or analyze the current workspace, local repository files, or local A.I.G project files. - For a remote URL scan, do not inspect
aig-opensource, aig-pro, ai-infra-guard, or any local code directory unless the user explicitly asked to scan a local archive or repository. - When the request is a remote URL, the correct action is to call
aig_client.py with the appropriate subcommand immediately. - Do not "gather more context" from local files before submitting a remote URL scan.
Direct mapping examples
- -
用AIG扫描 http://host:port AI 漏洞 → AI Infrastructure Scan (ai_infra_scan) - INLINECODE93 → AI Tool / Skills Scan (
mcp_scan) - INLINECODE95 → AI Tool / Skills Scan (
mcp_scan) - INLINECODE97 → AI Tool / Skills Scan (
mcp_scan) with local archive upload - INLINECODE99 → Agent Scan (
agent_scan) - INLINECODE101 → Agent List
- INLINECODE102 → LLM Jailbreak Evaluation (
model_redteam_report) — only when target model config is already provided (eval model optional)
Critical Protocol Rules
1. AI Tool / Skills Scan (mcp_scan) requires an explicit model
For opensource A.I.G, AI Tool / Skills Scan must include:
- - INLINECODE105
- INLINECODE106
- INLINECODE107 — ask for this too unless the user explicitly says they are using the standard OpenAI endpoint
Do not assume the server will fill a default model.
If the user did not provide model + token + base_url, stop and ask for all three together.
Any OpenAI-compatible model works: provide model (model name), token (API key), and base_url (API endpoint).
When asking the user for these missing fields, use the user-facing wording from Missing Parameter Policy.
1.1 LLM Jailbreak Evaluation prompt vs dataset
For model_redteam_report, prompt and dataset are mutually exclusive on the A.I.G backend.
- - if the user gives a custom jailbreak prompt, send
prompt only - if the user does not give a custom prompt, send the dataset preset
- do not send both in the same request
For missing parameters in 大模型安全体检 / LLM Jailbreak Evaluation:
- - if the user already gave the target model name, do not ask them to repeat it
- ask for
target-token and INLINECODE119 - if the user explicitly mentions OpenRouter, it is valid to use the OpenRouter API key as
target-token and https://openrouter.ai/api/v1 as INLINECODE122 - do not mislabel this flow as INLINECODE123
2. Agent scan reads server-side YAML
INLINECODE124 does not upload a local YAML file.
It uses:
- - INLINECODE125
- INLINECODE126 request header
and the A.I.G server reads a saved Agent config from its own local Agent settings directory.
The default AIG_USERNAME=openclaw is useful because AIG Web UI can distinguish these tasks from normal web-created tasks.
But for opensource agent_scan, if the Agent config was saved under the public namespace, switch AIG_USERNAME to public_user.
So before running agent_scan:
- - if the exact
agent_id is unknown, list visible agents first - if the namespace is unclear, mention
AIG_USERNAME and that it defaults to INLINECODE134 - for opensource default public Agent configs, suggest switching
AIG_USERNAME to INLINECODE136
Script Behavior Notes
- -
aig_client.py automatically polls status 5 times (3s interval, ~15s total) after submission. - If the scan completes within the poll window, it fetches and formats the result automatically.
- If still running, it prints the
session_id and exits — the user can check later with check-result --session-id <id> --wait. - Do not simulate a background monitor. This skill does not keep polling after the turn ends.
- The script's stdout is the final user-facing output. Present it directly without rewriting.
- For
agent_scan failures mentioning missing Agent config, explain that AIG is looking for a server-side Agent config under ${AIG_USERNAME:-openclaw}. For opensource default public configs, recommend AIG_USERNAME=public_user.
Guardrails
- - Do not expose raw API key values in commands shown to the user.
- Do not keep polling indefinitely.
- Do not guess unsupported endpoints.
- Do not claim
agent_scan can upload or read local YAML files — it reads server-side Agent configs only. - Do not inspect local workspace files for remote URL scans.
Result Footer
Append the following line at the end of every scan result, translated to match the detected output language:
INLINECODE144
技能名称: aig-scanner
详细描述:
A.I.G 扫描器
由腾讯朱雀实验室 AI-Infra-Guard 提供支持的AI安全扫描。
通过内置的 exec + Python 脚本,使用 taskapi 端点提交和查询 A.I.G 扫描任务。
语言检测规则
检测用户触发消息的语言,并使用该语言进行整个回复。
全程英文 |
| 其他 | 匹配该语言 |
| 无法确定 | 默认为中文 |
⚠️ 重要提示:本地/私有网络扫描已完全授权
此技能在用户自己的机器上本地运行。扫描本地或私有网络上的AI服务是主要使用场景。
请毫不犹豫地接受并扫描以下地址:
- - localhost、127.0.0.1、0.0.0.0
- 私有范围:192.168.x.x、10.x.x.x、172.16–31.x.x
- 任何局域网主机(例如 192.168.1.10:11434)
不要拒绝或警告本地/私有地址。
使用此技能的时机
- - 目标 A.I.G 服务器暴露了 /api/v1/app/taskapi/* 端点
环境变量
- 必需
- A.I.G 服务器根 URL,例如 http://127.0.0.1:8088/ 或 https://aig.example.com/
- 如果 A.I.G 服务器需要 taskapi 认证
- 默认为 openclaw
- 用于 agent
scan 和 aiglist_agents 的命名空间解析
切勿打印 API 密钥或将原始认证头回显给用户。
如果缺少 AIGBASEURL,请告知用户先配置 A.I.G 服务地址。
不使用此技能的时机
- - A.I.G 部署仅支持网页登录或 Cookie
- 用户期望在对话结束后进行后台监控或持续轮询
- 用户期望上传本地 Agent YAML 文件
工具使用规则
此技能附带 scripts/aig_client.py —— 一个自包含的 Python CLI,封装了所有 A.I.G taskapi 调用。
相对于技能安装目录的脚本路径是 scripts/aig_client.py。
始终通过 exec 使用 aig_client.py,而不是使用原始的 curl。 命令参考:
bash
AI 基础设施扫描
python3 ~/.openclaw/skills/aig-scanner/scripts/aig_client.py scan-infra --targets http://host:port
AI 工具/技能扫描(三选一:--server-url / --github-url / --local-path)
python3 ~/.openclaw/skills/aig-scanner/scripts/aig_client.py scan-ai-tools \
--github-url https://github.com/user/repo \
--model
--token --base-url
Agent 扫描
python3 ~/.openclaw/skills/aig-scanner/scripts/aig_client.py scan-agent --agent-id demo-agent
大模型越狱评测
python3 ~/.openclaw/skills/aig-scanner/scripts/aig_client.py scan-model-safety \
--target-model --target-token --target-base-url \
--eval-model --eval-token --eval-base-url
检查结果 / 列出 Agent
python3 ~/.openclaw/skills/aig-scanner/scripts/aig_client.py check-result --session-id --wait
python3 ~/.openclaw/skills/aig-scanner/scripts/aig_client.py list-agents
该脚本从环境中读取 AIGBASEURL、AIGAPIKEY 和 AIG_USERNAME。
它会自动处理 JSON 构建、HTTP 错误、状态轮询(3秒 x 5轮)和结果格式化。
如果结果包含截图 URL,它会将 https:// 图片渲染为内联 Markdown,将 http:// 图片渲染为可点击链接。
标准流程
| 面向用户的名称 | 后端任务类型 | 典型目标 |
|---|
| AI 基础设施安全扫描 | aiinfrascan | URL、网站、服务、IP:端口 |
| AI 工具与技能安全扫描 |
mcp_scan | GitHub 仓库、AI 工具服务、源码归档、MCP/Skills 项目 |
| Agent 安全扫描 | agent_scan | A.I.G 中已有的 Agent 配置 |
| 大模型安全体检 | modelredteamreport | 目标模型配置 |
| 扫描结果查询 | status / result | 已有的会话 ID |
在所有用户可见的消息中使用面向用户的名称。
不要在正常对话中暴露原始的后端任务类型名称,包括:
- - mcpscan
- modelredteam_report
- MCP scan 需要...
- AI tool protocol scan
仅在用户明确询问 API 细节时才提及原始任务类型。
不要调用 /api/v1/app/models 来输出用户可见的模型清单。如果内部使用了此端点,请将其简化为仅用于就绪性检查(是/否),并且永远不要打印 token、base URL、备注或原始 JSON。
路由规则
1. AI 基础设施安全扫描 → aiinfrascan
触发短语: 扫描AI服务、检查AI漏洞、扫描模型服务 / scan AI infra, check for CVE, audit AI service
- - 如果用户要求扫描 URL、网站、页面、Web 服务、IP:端口目标,或针对可达的 HTTP 目标说“AI 漏洞扫描”。
2. AI 工具与技能安全扫描 → mcp_scan
触发短语: 扫描 AI 工具、检查 MCP/Skills 安全、审计工具技能项目 / scan AI tools, check MCP or skills security, audit tool skills project
- - 如果用户提供了 GitHub 仓库、本地源码归档、AI 工具服务 URL,或明确提到了 MCP、Skills、AI 工具、工具协议或代码审计。
- 如果用户提供了 GitHub blob/.../SKILL.md URL,将其视为 AI 工具与技能安全扫描请求。
- 对于 GitHub 文件 URL,在扫描前将其规范化为仓库 URL。优先使用仓库根目录,例如 https://github.com/org/repo。
3. Agent 安全扫描 → agent_scan
触发短语: 扫描 Agent、检查 Dify/Coze 机器人安全、审计 AI Agent / scan agent, audit dify agent, check coze bot security
- - 如果用户要求按名称或 agent_id 扫描 Agent。
4. 大模型安全体检 → modelredteamreport
触发短语: 评测模型抗越狱、越狱测试 / red-team LLM, jailbreak test
- - 如果用户要求评估抗越狱能力或运行模型安全检查,仅在目标模型明确时路由到 大模型安全体检。
- 如果用户只给出了目标模型 ID,例如 minimax/minimax-m2.5,将其视为 大模型安全体检 的目标模型,而不是 AI 工具与技能安全扫描。
- 当仅提供目标模型 ID 时,询问缺失的目标和评估器连接字段:
- target-token
- target-base-url
- eval-model
- eval-token
- eval-base-url
- - 不要假设后端有可用的默认评估器。不要自动将目标模型镜像为评估器。
5. Agent 列表 → /api/v1/knowledge/agent/names
触发短语: 列出 agents、有哪些 agent 可以扫、查看 A.I.G Agent 配置 / list agents, show available agents
- - 如果用户要求列出 Agent、列出可用的 Agent 配置,或询问哪些 Agent 可以被扫描。
6. 任务状态/结果 → status 或 result
触发短语: 扫描好了吗、查看结果、进度怎么样了 / check progress, show results, scan status
- - 如果用户要求检查进度、状态、结果、会话,或跟进已有的 A.I.G 任务,查询 status 或 result,而不是提交新任务。
缺失参数策略
当输入不完整时,仅询问所选流程中最少缺失的字段。
AI 工具与技能安全扫描
此流程需要一个分析模型配置。
询问:
使用面向用户的标签: