Skill Advisor
OpenClaw技能的预安装评估工具。生成全面的评估报告,帮助用户决定是否安装某个技能。
功能特性
- - 🔒 安全状态:查看ClawHub官方扫描结果
- 📊 流行度指标:下载量、星标数、安装量
- 🔄 维护状态:最后更新时间、活跃程度
- 📦 依赖分析:所需工具、库、复杂度
- 💰 API成本评估:免费/付费API需求
- 🎯 安装建议:明确的可行/不可行指导
触发条件
- - 安装前检查这个skill / Check this skill before installing
- {skill-name}安全吗 / Is {skill-name} safe?
- 评估skill {skill-name} / Evaluate skill {skill-name}
- {skill-name}需要什么依赖 / What does {skill-name} need?
- 要不要安装{skill-name} / Should I install {skill-name}?
- skill-advisor {skill-name}
- 帮我看看这个skill怎么样
语言支持
本技能支持多语言。输出语言会自动匹配用户与OpenClaw对话所使用的语言。
支持的语言:
检测规则:
- - 如果用户使用中文 → 输出中文报告
- 如果用户使用英文 → 输出英文报告
- 默认:匹配用户的输入语言
步骤 1:获取技能信息
当用户提供技能名称时,获取其元数据:
bash
SKILL_NAME=用户提供的技能名称
从ClawHub获取技能元数据
echo 📡 正在获取技能信息...
clawhub inspect $SKILL_NAME 2>/dev/null
备选:直接使用ClawHub API
curl -s https://clawhub.ai/api/v1/skills/$SKILL_NAME | python3 -m json.tool 2>/dev/null
步骤 2:获取SKILL.md内容
获取实际的SKILL.md以分析依赖和功能:
bash
获取SKILL.md内容
SKILL
CONTENT=$(curl -s https://clawhub.ai/api/v1/skills/$SKILLNAME | python3 -c
import sys, json
try:
data = json.load(sys.stdin)
if skill in data and content in data[skill]:
print(data[skill][content])
elif content in data:
print(data[content])
else:
print(CONTENT
NOTFOUND)
except:
print(PARSE_ERROR)
2>/dev/null)
echo $SKILL_CONTENT
步骤 3:分析并生成报告
解析技能数据,并以用户语言生成评估报告:
bash
python3 << PYEOF
import json
import re
import sys
from datetime import datetime
从输入中检测用户语言(作为参数传递)
USER_LANG = en # 默认为英文,将由代理覆盖
模拟技能数据(替换为实际API响应)
skill_data = {
name: SKILL
NAMEPLACEHOLDER,
description: DESCRIPTION_PLACEHOLDER,
version: 1.0.0,
owner: AUTHOR_PLACEHOLDER,
created_at: 2026-01-01T00:00:00Z,
updated_at: 2026-03-20T00:00:00Z,
downloads: 0,
stars: 0,
license: MIT-0,
security_status: unknown
}
skill_content =
SKILLMDCONTENT_PLACEHOLDER
不同语言的标签
LABELS = {
zh: {
conclusion_header: 🎯 结论,
recommend_install: ✅ 推荐安装,
caution_install: ⚠️ 可以安装,请注意事项,
not_recommend: ❌ 不建议安装,
score: 综合评分,
security_pass: 通过,
security_review: 需审查,
deps_light: 轻量,
deps_heavy: 较重,
report_title: 📋 Skill 评估报告,
metrics: 综合指标,
official_security: 🔒 官方安全,
benign: ✅ Benign(ClawHub扫描通过),
suspicious: ⚠️ Suspicious(需要审查),
security_unknown: ❓ 未知(未扫描),
popularity: 📈 流行度,
downloads: downloads,
stars: stars,
maintenance: 🔄 维护状态,
active_maintain: 天前更新(活跃维护),
normal_maintain: 天前更新(正常维护),
less_maintain: 天前更新(维护较少),
stop_maintain: 天前更新(可能停止维护),
maintenance_unknown: ❓ 未知,
dep_burden: 📦 依赖负担,
no_dep: 无需额外依赖,
light_dep: 轻量,
heavy_dep: 较重,
deps_count: 个依赖,
api_cost: 💰 API成本,
no_api: 无需外部API,
api_required: 需要,
description: 📝 功能说明,
env_req: ⚙️ 环境要求,
cli_tools: 命令行工具,
python_pkg: Python包,
node_pkg: Node包,
api_key: API密钥,
no
specialreq: 无特殊要求,
usage_note: ⚠️ 使用注意,
data_upload: 📤 文档/数据会上传到,
external_service: 📤 会访问外部服务,
sensitive_data: 🔐 敏感数据请谨慎处理,
install_advice: 💡 安装建议,
safe_install: 可安全安装。,
caution
installtext: 可以安装,但请注意上述事项。,
not
installtext: 不建议安装,请寻找替代方案。,
need_config: 需要配置API Key,
meta_info: ℹ️ 元信息,
author: 作者,
version: 版本,
license: 许可证,
score_time: 评分时间,
},
en: {
conclusion_header: 🎯 Conclusion,
recommend_install: ✅ Recommended,
caution_install: ⚠️ Install with Caution,
not_recommend: ❌ Not Recommended,
score: Overall Score,
security_pass: Passed,
security_review: Review Needed,
deps_light: Light,
deps_heavy: Heavy,
report_title: 📋 Skill Assessment Report,
metrics: Metrics,
official_security: 🔒 Official Security,
benign: ✅ Benign (ClawHub scan passed),
suspicious: ⚠️ Suspicious (needs review),
security_unknown: ❓ Unknown (not scanned),
popularity: 📈 Popularity,
downloads: downloads,
stars: stars,
maintenance: 🔄 Maintenance,
active_maintain: days ago (actively maintained),
normal_maintain: days ago (normal maintenance),
less_maintain: days ago (less maintained),
stop_maintain: days ago (possibly abandoned),
maintenance_unknown: ❓ Unknown,
dep_burden: 📦 Dependencies,
no_dep: No dependencies required,
light_dep: Light,
heavy_dep: Heavy,
deps_count: dependencies,
api_cost: 💰 API Cost,
no_api: No external API required,
api_required: Requires,
description: 📝 Description,
env_req: ⚙️ Requirements,
cli_tools: CLI Tools,
python_pkg: Python Packages,
node_pkg: Node Packages,
api_key: API Keys,
no
specialreq: No special requirements,
usage_note: ⚠️ Usage Notes,
data_upload: 📤 Data uploads to,
external_service: 📤 Accesses external services,
sensitive_data: 🔐 Handle sensitive data with care,
install_advice: 💡 Installation Advice,
safe_install: Safe to install.,
caution
installtext: Can be