Install
openclaw skills install @helloyxs/skill-subtraction技能减法 — 已安装技能审计与减法清理。当用户要求检查已安装技能、清理技能、做技能减法、评估技能保留与否、审计 skill、整理技能列表时触发此 Skill。典型场景:'帮我检查一下装了哪些技能'、'哪些技能该删'、'做一次技能减法'、'审计我的技能'、'skill audit'、'技能减法'。此 Skill 扫描所有已安装技能,按工具类/业务型分类评估,生成保留与卸载建议报告。支持中文和英文报告输出(根据用户语言或 --lang 参数自动选择)。
openclaw skills install @helloyxs/skill-subtraction对已安装的 AI 技能进行系统性审计,践行"定期做减法"的理念。扫描全部已安装技能,按类别评估使用价值,生成结构化的保留/卸载建议报告,帮助用户保持技能集精简高效。
技能管理的核心是"精而专",而非"多而全"。大多数人的习惯是不断做加法——看到一个技能就装一个,结果堆了几十个,真正用的没几个。定期做减法可以:
做减法的三个理由:
本 Skill 支持中文和英文两种报告语言,根据用户当前对话语言自动判断,不主动询问:
--lang zh--lang en确定语言后,所有后续步骤(脚本执行、评估、报告输出)均使用该语言。
运行审计脚本,自动检测当前脚本所在的 Agent 平台,只扫描该平台下的已安装技能。根据检测到的对话语言自动传 --lang zh 或 --lang en,无需用户指定:
# 自动检测当前 Agent,扫描同级技能(推荐)
# 中文对话时:python3 scripts/audit_skills.py --lang zh
# 英文对话时:python3 scripts/audit_skills.py --lang en
python3 scripts/audit_skills.py --lang zh
# 手动指定 Agent
python3 scripts/audit_skills.py --agent codex
# 扫描所有已安装的 Agent 平台
python3 scripts/audit_skills.py --all
# 指定自定义技能目录(如 Windows LobsterAI 的非标准路径)
python3 scripts/audit_skills.py --skills-dir "C:\Users\admin\AppData\Roaming\LobsterAI\SKILLs"
# 同时扫描项目级技能
python3 scripts/audit_skills.py --workspace /path/to/workspace
跨平台兼容:脚本在 Windows 上自动处理 GBK 编码问题,支持 AppData/Roaming/<Agent>/SKILLs 非标准路径。
可靠性保证:
脚本在所有可能失败的环节都主动记录 issue,最终输出到 JSON 的 issues 字段,并通过 stderr 打印摘要。
支持的 issue 类型:
| 类型 | 严重度 | 说明 |
|---|---|---|
missing_skill_md | error | 技能目录缺少 SKILL.md |
unreadable_skill_md | error | SKILL.md 编码异常(非 UTF-8) |
permission_denied | error | 目录/文件权限不足 |
no_frontmatter | warning | SKILL.md 没有 YAML frontmatter |
malformed_frontmatter | warning | frontmatter 内容解析异常 |
no_name_field | warning | frontmatter 缺少 name 字段 |
empty_description | warning | frontmatter description 为空 |
not_a_directory | warning | 技能目录下出现普通文件 |
broken_symlink | error | 符号链接指向不存在的位置 |
退出码:0 表示完全正常,2 表示扫描完成但有 error 级问题(方便 CI 接入)。
脚本输出 JSON 数组,每个元素包含:
name:技能名称agent:所属 Agent 平台(自动检测,如 workbuddy / codex / claude)scope:作用域(user / project)path:技能目录路径description:技能描述(从 frontmatter 提取)agent_created:是否为 Agent 创建has_scripts:是否包含脚本has_references:是否包含参考文档file_count:文件总数dir_size:目录大小(KB)last_modified:最近修改时间version:技能版本输出中的统计字段:
source_stats:安装来源统计(agent_created 数量、平台预装数量、已禁用数量、批量安装检测数量)batch_installs:批量安装检测(当同一天创建 ≥ 5 个技能时标记为批量,含日期、数量、技能列表)读取 references/evaluation_framework.md 获取完整评估框架。对每个技能进行三维度分类:
维度一:技能类型 / Skill Type
| 类型 Type | 定义 Definition | 典型特征 Typical Features |
|---|---|---|
| 工具类 Tool | 通用型操作工具,跨项目复用 General-purpose tools, cross-project | 浏览器操作、文档处理、PDF 处理、邮件发送、文件格式转换 Browser automation, document processing, PDF, email, file conversion |
| 业务型 Business | 与特定项目、业务方向绑定的技能 Tied to specific project/business domain | 竞品分析、客服回复、行业报告生成 Competitor analysis, customer service, industry reports |
| 资讯类 News | 信息获取与聚合类技能 Information gathering and aggregation | AI 新闻、趋势追踪、RSS 聚合 AI news, trend tracking, RSS |
| 生产力类 Productivity | 日常工作流程增强技能 Daily workflow enhancement | 周报生成、会议纪要、任务管理 Weekly reports, meeting notes, task management |
| 平台预装 Platform-preinstalled | Agent 平台出厂自带,用户未主动选择 Pre-installed by platform, not user-chosen | agent_created=false + 批量安装特征 Batch install pattern |
维度二:安装来源(影响评估策略,不单独打分)/ Install Source (affects evaluation strategy, not scored separately)
| 来源 Source | 识别方法 Detection | 评估策略 Strategy |
|---|---|---|
| 用户主动安装 User-installed | agent_created=false,非批量安装 | 正常六指标评分 Full 6-metric scoring |
| 平台预装 Platform-preinstalled | agent_created=false,批量安装(同日 ≥ 5 个)Batch install (≥5 same day) | 优先按业务方向整批筛选,不匹配的整批归档 Filter by business direction, batch archive non-matching |
| Agent 创建 Agent-created | agent_created=true | 重点关注创建目的是否仍然有效 Focus on whether original purpose still valid |
维度三:评估指标(百分制)/ Evaluation Metrics (100-point scale)
对每个技能逐一评估以下指标,加权求和得出总分(24-100 分): Evaluate each skill across the following weighted metrics (composite score: 24-100):
根据评估结果,将每个技能归入以下三类之一: Based on evaluation results, categorize each skill into one of three actions:
| 建议 Recommendation | 判定条件 Criteria | 操作 Action |
|---|---|---|
| 保留 Keep | 综合评分 80-100 分;工具类且高频使用;或业务型且当前业务方向匹配且近期有使用记录 Score 80-100; Tool type & high frequency; or Business type matching current direction with recent usage | 深度掌握,定期更新 Master deeply, update regularly |
| 归档 Archive | 综合评分 50-79 分;暂时不用但未来可能需要;或业务型且业务方向正在转型 Score 50-79; temporarily unused but may need later; or Business type during direction transition | 保存提示词和配置文档,卸载技能 Save prompt & config docs, uninstall skill |
| 卸载 Uninstall | 综合评分 24-49 分;零使用且无独有价值;或与其他技能高度重叠;或已不相关且长期未更新 Score 24-49; zero usage & no unique value; or high overlap; or irrelevant & stale | 直接卸载 Uninstall directly |
特殊规则 / Special Rules (Override Scoring):
根据「语言自动检测」章节确定的语言,选择对应格式输出报告。
使用中文时,按以下格式输出:
# 技能减法审计报告
**审计时间**:YYYY-MM-DD
**技能总数**:N 个(用户级 X 个,项目级 Y 个)
## 保留(N 个)
| 技能 | 类型 | 保留理由 | 使用频率 |
|------|------|---------|---------|
| ... | ... | ... | ... |
## 归档(N 个)
| 技能 | 类型 | 归档理由 | 重新激活条件 |
|------|------|---------|------------|
| ... | ... | ... | ... |
## 卸载(N 个)
| 技能 | 类型 | 卸载理由 | 风险评估 |
|------|------|---------|---------|
| ... | ... | ... | ... |
## 汇总建议
- 当前技能集健康度:高/中/低
- 主要问题:...
- 下次审计建议时间:...
使用英文时,按以下格式输出:
# Skill Subtraction Audit Report
**Audit Date**: YYYY-MM-DD
**Total Skills**: N (User-level: X, Project-level: Y)
## Keep (N)
| Skill | Type | Reason to Keep | Usage Frequency |
|-------|------|---------------|-----------------|
| ... | ... | ... | ... |
## Archive (N)
| Skill | Type | Reason to Archive | Reactivation Condition |
|-------|------|--------------------|-----------------------|
| ... | ... | ... | ... |
## Uninstall (N)
| Skill | Type | Reason to Uninstall | Risk Assessment |
|-------|------|---------------------|-----------------|
| ... | ... | ... | ... |
## Summary
- Current skill set health: High/Medium/Low
- Main issues: ...
- Recommended next audit: ...
输出报告后,询问用户是否要执行清理操作。不擅自卸载任何技能。 After outputting the report, ask the user whether to execute cleanup. Never uninstall skills without consent.
用户可选择 / User options:
~/.<agent>/skill-archive/<skill-name>.md(如 WorkBuddy → ~/.workbuddy/skill-archive/,Codex → ~/.codex/skill-archive/,Claude → ~/.claude/skill-archive/),然后卸载技能 / Save SKILL.md and key config files to the agent's archive directory, then uninstall每一步操作前都向用户展示将要执行的动作,获得明确确认后才执行。 Show the user each action before executing, and only proceed after explicit confirmation.
| 频率 Frequency | 适用场景 Scenario |
|---|---|
| 每季度 Quarterly | 技能数量超过 10 个时 When skill count exceeds 10 |
| 每个项目结束时 After each project ends | 清理项目级技能 Clean up project-level skills |
| 业务方向调整时 When business direction shifts | 评估业务型技能的相关性 Re-evaluate business-type skills |
| 感觉"技能太多"时 When feeling "too many skills" | 随时触发 Anytime |
audit_skills.py — 自动检测当前脚本所在的 Agent 平台,扫描该平台下的所有已安装技能(如 ~/.workbuddy/skills/、~/.codex/skills/、~/.claude/skills/ 等)及当前工作区项目级技能,解析 frontmatter,输出结构化 JSON 报告evaluation_framework.md — 完整的技能评估框架,包含中英双语版本:分类定义、评估指标、判定矩阵和去重规则。英文报告输出时阅读 English 部分。