Agent 技能安全审计利器
简介
SkillLens CLI 驱动的本地 Agent 技能安全审计工具,支持风险分级、漏洞识别与修复建议,适合 Codex/Claude 技能目录合规检查。
原始描述
Audit locally installed agent skills for security/policy issues using the SkillLens CLI (`skilllens scan`, `skilllens config`). Use when asked to scan a skills directory (Codex/Claude) and produce a risk-focused audit report based on each skill's `SKILL.md` and bundled resources.
通过你的 Agent 添加
安装目录:skilllens-audit/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
skills-audit 是一个基于 SkillLens CLI 的本地安全审计工具,用于扫描 Codex/Claude 等 Agent 技能目录。核心流程包括:
- 配置扫描范围:通过
skilllens config查看配置,或直接指定路径如~/.codex/skills - 执行扫描:
skilllens scan [path] [--auditor claude|codex],支持--verbose查看原始输出、--force强制重新审计 - 优先级审查:按
unsafe→suspicious→ 权限广泛技能 → 手动审查顺序处理 - 风险维度评估:聚焦六大风险——数据外泄(Exfiltration)、任意执行(Execution)、持久化(Persistence)、权限绕过(Privilege Bypass)、提示注入(Prompt Injection)、过度触发(Overbroad triggers)
- 生成报告:输出包含 name、path、verdict(safe/suspicious/unsafe)、risk 评分(0-100)及具体证据的结构化报告
显著优点
- 零代码风险:纯 Markdown 文档型 Skill,无实际可执行脚本,攻击面极小
- 安全意识导向:文档本身就是安全最佳实践指南,明确列出风险检测清单
- 结构化方法论:提供清晰的 6 步审计工作流,降低安全审查门槛
- 工具链整合:无缝对接 SkillLens CLI,支持 npm/pnpm 快速启动
- 风险量化输出:0-100 风险评分 + 三级定性结论,便于决策
潜在局限
- 依赖外部工具:核心功能依赖 SkillLens CLI,若审计器未安装或版本过时,扫描会跳过(文档明确提醒"skipped ≠ safe")
- T3 来源可信度:维护者为匿名标识符,无组织背书,需自行验证后续更新
- 无主动防护:仅为审计工具,不具备运行时拦截或主动防护能力
- 人工审查瓶颈:对
suspicious 和 skipped 项仍需人工介入,无法完全自动化
适合人群
- 企业安全团队:需要批量审计内部 Agent 技能仓库
- 个人开发者:安装第三方 Skills 前的安全预检
- 开源维护者:CI/CD 流程中集成技能安全扫描
- AI Agent 平台运营方:建立技能上架前的安全审核机制
常规风险
风险类型
说明
工具依赖风险
SkillLens 本身若存在漏洞,可能影响扫描结果可靠性
误报/漏报
静态分析难以捕获混淆代码或逻辑漏洞,需结合人工审查
配置误用
全局扫描(skilllens scan)可能暴露过多攻击面,应优先指定具体路径
更新滞后
新攻击模式出现到规则更新存在时间差
安全认证摘要
- 依赖外部工具:核心功能依赖 SkillLens CLI,若审计器未安装或版本过时,扫描会跳过(文档明确提醒"skipped ≠ safe")
- T3 来源可信度:维护者为匿名标识符,无组织背书,需自行验证后续更新
- 无主动防护:仅为审计工具,不具备运行时拦截或主动防护能力
- 人工审查瓶颈:对
suspicious和skipped项仍需人工介入,无法完全自动化
适合人群
- 企业安全团队:需要批量审计内部 Agent 技能仓库
- 个人开发者:安装第三方 Skills 前的安全预检
- 开源维护者:CI/CD 流程中集成技能安全扫描
- AI Agent 平台运营方:建立技能上架前的安全审核机制
常规风险
风险类型
说明
工具依赖风险
SkillLens 本身若存在漏洞,可能影响扫描结果可靠性
误报/漏报
静态分析难以捕获混淆代码或逻辑漏洞,需结合人工审查
配置误用
全局扫描(skilllens scan)可能暴露过多攻击面,应优先指定具体路径
更新滞后
新攻击模式出现到规则更新存在时间差
安全认证摘要
| 风险类型 | 说明 |
|---|---|
| 工具依赖风险 | SkillLens 本身若存在漏洞,可能影响扫描结果可靠性 |
| 误报/漏报 | 静态分析难以捕获混淆代码或逻辑漏洞,需结合人工审查 |
| 配置误用 | 全局扫描(skilllens scan)可能暴露过多攻击面,应优先指定具体路径 |
| 更新滞后 | 新攻击模式出现到规则更新存在时间差 |
安全认证摘要
CLS-Certify v2.1.0 全维度扫描结果:S 级(92/100),0 项安全发现。六维雷达全部通过,符合 GDPR 数据保护意识要求。文档中引用的危险模式均为检测规则示例,非实际恶意代码。
技能正文
name: skills-audit
description: Audit locally installed agent skills for security/policy issues using the SkillLens CLI (skilllens scan, skilllens config). Use when asked to scan a skills directory (Codex/Claude) and produce a risk-focused audit report based on each skill's SKILL.md and bundled resources.
Skills Audit (SkillLens)
Install SkillLens
- One-off run:
npx skilllens scan (or pnpm dlx skilllens scan)
- Global install:
pnpm add -g skilllens
Quick start
- Run
skilllens config to see configured scan roots and auditor CLI availability.
- Run
skilllens scan to scan configured roots, or skilllens scan <path> to scan a specific directory.
- Re-run with
--verbose to see raw auditor output and --force to ignore cached results.
Audit workflow
-
Define scope
- Prefer a concrete target path (example:
~/.codex/skills) unless the user explicitly wants all configured roots.
- If auditing a repo checkout containing skills, scan the parent folder that contains skill directories (example:
skilllens scan ./skills).
-
Inventory skills with SkillLens
- Run
skilllens scan [path] [--auditor claude|codex].
- Treat missing auditor CLIs or
skipped statuses as “manual review required”, not “safe”.
-
Prioritize review order
- Review any
unsafe or suspicious verdicts first.
- Next, review skills that request broad permissions (filesystem/network), run shell commands, or reference external downloads.
-
Manually review each skill’s contents
- Read the skill’s
SKILL.md and any referenced scripts/, references/, and assets/.
- Do not execute bundled scripts by default; inspect first.
-
Evaluate risks (focus on realistic abuse)
- Exfiltration: sending file contents, env vars, tokens, SSH keys, browser data, or configs to remote endpoints.
- Execution: instructions to run arbitrary shell commands,
curl | bash, eval, or to fetch-and-execute code.
- Persistence: modifying shell profiles, launch agents, cron, editor configs, or skill install locations.
- Privilege/approval bypass: instructions to ignore system policies, disable safety checks, or request escalated permissions unnecessarily.
- Prompt injection: attempts to override higher-priority instructions (“ignore previous”, “always comply”, “never mention…”).
- Overbroad triggers: vague descriptions that cause the skill to trigger on unrelated tasks.
-
Produce a report
- For each skill, include:
name, path, verdict (safe/suspicious/unsafe), risk (0–100), and bullet issues with concrete evidence (quote or filename).
- Recommend fixes that reduce blast radius: narrow scope, remove dangerous defaults, add explicit confirmation gates, and document required permissions.
Command snippets
- Scan configured roots:
skilllens scan
- Scan a specific folder:
skilllens scan ~/.codex/skills
- Force a re-audit and show raw output:
skilllens scan ~/.codex/skills --force --verbose
Install SkillLens
npx skilllens scan (or pnpm dlx skilllens scan)pnpm add -g skilllens- Run
skilllens configto see configured scan roots and auditor CLI availability. - Run
skilllens scanto scan configured roots, orskilllens scan <path>to scan a specific directory. - Re-run with
--verboseto see raw auditor output and--forceto ignore cached results.
Audit workflow
-
Define scope
- Prefer a concrete target path (example:
~/.codex/skills) unless the user explicitly wants all configured roots.
- If auditing a repo checkout containing skills, scan the parent folder that contains skill directories (example:
skilllens scan ./skills).
-
Inventory skills with SkillLens
- Run
skilllens scan [path] [--auditor claude|codex].
- Treat missing auditor CLIs or
skipped statuses as “manual review required”, not “safe”.
-
Prioritize review order
- Review any
unsafe or suspicious verdicts first.
- Next, review skills that request broad permissions (filesystem/network), run shell commands, or reference external downloads.
-
Manually review each skill’s contents
- Read the skill’s
SKILL.md and any referenced scripts/, references/, and assets/.
- Do not execute bundled scripts by default; inspect first.
-
Evaluate risks (focus on realistic abuse)
- Exfiltration: sending file contents, env vars, tokens, SSH keys, browser data, or configs to remote endpoints.
- Execution: instructions to run arbitrary shell commands,
curl | bash, eval, or to fetch-and-execute code.
- Persistence: modifying shell profiles, launch agents, cron, editor configs, or skill install locations.
- Privilege/approval bypass: instructions to ignore system policies, disable safety checks, or request escalated permissions unnecessarily.
- Prompt injection: attempts to override higher-priority instructions (“ignore previous”, “always comply”, “never mention…”).
- Overbroad triggers: vague descriptions that cause the skill to trigger on unrelated tasks.
-
Produce a report
- For each skill, include:
name, path, verdict (safe/suspicious/unsafe), risk (0–100), and bullet issues with concrete evidence (quote or filename).
- Recommend fixes that reduce blast radius: narrow scope, remove dangerous defaults, add explicit confirmation gates, and document required permissions.
Command snippets
- Scan configured roots:
skilllens scan
- Scan a specific folder:
skilllens scan ~/.codex/skills
- Force a re-audit and show raw output:
skilllens scan ~/.codex/skills --force --verbose
Define scope
- Prefer a concrete target path (example:
~/.codex/skills) unless the user explicitly wants all configured roots. - If auditing a repo checkout containing skills, scan the parent folder that contains skill directories (example:
skilllens scan ./skills).
Inventory skills with SkillLens
- Run
skilllens scan [path] [--auditor claude|codex]. - Treat missing auditor CLIs or
skippedstatuses as “manual review required”, not “safe”.
Prioritize review order
- Review any
unsafeorsuspiciousverdicts first. - Next, review skills that request broad permissions (filesystem/network), run shell commands, or reference external downloads.
Manually review each skill’s contents
- Read the skill’s
SKILL.mdand any referencedscripts/,references/, andassets/. - Do not execute bundled scripts by default; inspect first.
Evaluate risks (focus on realistic abuse)
- Exfiltration: sending file contents, env vars, tokens, SSH keys, browser data, or configs to remote endpoints.
- Execution: instructions to run arbitrary shell commands,
curl | bash,eval, or to fetch-and-execute code. - Persistence: modifying shell profiles, launch agents, cron, editor configs, or skill install locations.
- Privilege/approval bypass: instructions to ignore system policies, disable safety checks, or request escalated permissions unnecessarily.
- Prompt injection: attempts to override higher-priority instructions (“ignore previous”, “always comply”, “never mention…”).
- Overbroad triggers: vague descriptions that cause the skill to trigger on unrelated tasks.
Produce a report
- For each skill, include:
name,path,verdict(safe/suspicious/unsafe),risk(0–100), and bullet issues with concrete evidence (quote or filename). - Recommend fixes that reduce blast radius: narrow scope, remove dangerous defaults, add explicit confirmation gates, and document required permissions.
- Scan configured roots:
skilllens scan - Scan a specific folder:
skilllens scan ~/.codex/skills - Force a re-audit and show raw output:
skilllens scan ~/.codex/skills --force --verbose
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。