Skill 冗余审计员
触发场景
- 用户说“检查/清理/优化 Skill 冗余”或类似意图。
- 自动化任务过多,需要排查重复/暂停任务。
- 新增大量 Skill 后,定期做路由归一化。
工作流程
1. 全量扫描
# 统计 Skill 总数(含子命令)
python3 - <<'PY'
from pathlib import Path
root = Path('~/.workbuddy/skills')
files = [f for f in root.rglob('SKILL.md') if 'node_modules' not in f.parts]
print(len(files))
PY
# 提取每个 SKILL.md 的标题、摘要、触发词(需要 PyYAML)
~/.workbuddy/binaries/python/envs/default/bin/python - <<'PY'
import re, yaml, json
from pathlib import Path
root = Path('~/.workbuddy/skills')
records = []
for f in sorted(root.rglob('SKILL.md')):
if 'node_modules' in f.parts:
continue
text = f.read_text(encoding='utf-8', errors='ignore')
m = re.match(r'^---\s*\n(.*?)\n---\s*\n', text, re.DOTALL)
meta, body = {}, text
if m:
try:
meta = yaml.safe_load(m.group(1)) or {}
except Exception:
pass
body = text[m.end():]
title = meta.get('title') or meta.get('name') or ''
if not title:
hm = re.search(r'^#\s+(.*)', body, re.MULTILINE)
title = hm.group(1).strip() if hm else f.parent.name
triggers = [l.strip() for l in body.splitlines()[:80] if '触发' in l or '关键词' in l or '当用户' in l]
summary = ''
for line in body.splitlines():
line = line.strip()
if line and not line.startswith('#') and not line.startswith('---'):
剩余内容仅限会员查看
「skill-redundancy-auditor」的完整方法论、话术模板与执行步骤都在下半部分。 开通会员即可解锁全部技能,并下载安装包直接接入 WorkBuddy。
- 全部技能完整正文
- 复制提示语
- 下载 .zip 安装包
- 新技能自动解锁
已有卡密?点此激活