소스 정보
- 저장소
- Undermybelt/hermes-skills
- 최근 소스 활동
- 2026년 6월 7일 07:23
- 감지된 SKILL.md 언어
- 중국어
- 스타
- 6
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/Undermybelt/hermes-skills --skill hermes-config-optmzr명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Use when retiring old logic, collapsing duplicate owners, removing fallbacks, or touching schema, persistence, or source-of-truth boundaries while deciding whether to delete old paths, retain compatibility, or stop for confirmation.
Use when defining new features, product behavior, UI/component design, architecture choices, contract changes, or ambiguous medium/high-complexity work before implementation.
Use when the user asks for caveman mode, fewer tokens, brief responses, compressed communication, or otherwise explicitly requests a much shorter answer.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | hermes-config-optmzr |
| triggers | ["Hermes配置优化","路由文件精简","token节省","触发词中文化","memory压缩","技能路由优化","配置瘦身","config-optimize","hermes-optimize"] |
| category | software-development |
| description | Hermes配置优化 - 精简路由文件、添加中文触发词、压缩memory,减少token消耗 |
优化 Hermes 配置以减少 token 消耗,提高中文触发效率。
cp -r ~/.hermes/routing ~/.hermes/routing-backup-$(date +%Y%m%d-%H%M%S)
检查重复:
unified-index.md 与 skill-index.md 通常重叠 30-40%unified-index.md 和 unified-index.json精简 skill-router.md:
28|, 29|)验证:
ls -la ~/.hermes/routing/*.md
du -sh ~/.hermes/routing/*.md
识别纯英文触发词:
# 找出只有英文触发词的 skill
import re
pattern = r'\|\s*`([^`]+)`\s*\|[^|]*\|[^|]*\|\s*([^|]+)\s*\|'
# 检查是否有中文字符
has_chinese = bool(re.search(r'[\u4e00-\u9fff]', triggers))
添加中文等价词:
findmy → 查找设备, 定位, 找手机codex → 代码生成, AI编程, 代码代理excalidraw → 手绘图, 流程图, 白板github-auth → GitHub认证, gh登录, git凭据三文件同步更新流程(新增 skill 或给已有 skill 加中文触发词时):
批量添加中文触发词的完整流程:
import json
# 1. 读取 skill-index.json
with open('~/.hermes/routing/skill-index.json', 'r') as f:
skills = json.load(f)
# 2. 检查哪些 skills 没有中文触发词
no_chinese = []
for skill in skills:
triggers = skill.get('triggers', [])
has_cn = any(any('\u4e00' <= c <= '\u9fff' for c in t) for t in triggers)
if not has_cn:
no_chinese.append(skill['name'])
print(f"没有中文触发词的 skills ({len(no_chinese)}):")
for s in sorted(no_chinese):
print(f" - {s}")
# 3. 定义中文触发词映射
chinese_triggers = {
'apple-notes': ['苹果备忘录', '备忘录', 'Apple备忘录', '笔记'],
'apple-rmndrs': ['苹果提醒', '提醒事项', 'Apple提醒', '待办'],
# ... 为每个 skill 添加
}
# 4. 批量更新
for skill in skills:
if skill['name'] in chinese_triggers:
existing_triggers = skill.get('triggers', [])
new_triggers = chinese_triggers[skill[]]
all_triggers = ((existing_triggers + new_triggers))
skill[] = (all_triggers)
(, ) f:
json.dump(skills, f, indent=, ensure_ascii=)
关键陷阱:
| 开头有些用 ||),patch 时需带上足够上下文避免多匹配mcp 分类,不是 apple 或 red-teaming核心发现(2026-04-27):Hermes 的 auto-compress 触发点看 主模型 context_length × compression.threshold,不是看 auxiliary.compression.extra_body.context_window。
判定公式:
max(int(model.context_length * compression.threshold), 64000)model.context_length: 2000000 且 compression.threshold: 0.5 → 约 1000000 tokens 才触发 compress正确改法:
compression.threshold(默认常见为 0.5)model.context_lengthcustom_providers[].models[<exact model name>].context_lengthgpt-5.4(xhigh)),custom_providers.models 必须写完全同名键;只写 gpt-5.4 不够稳/models 不准或缺失时,直接在 model.context_length 明写整数,避免 Hermes 回退到错误默认值不要混淆:
auxiliary.compression.extra_body.context_window:只影响摘要模型请求体参数auxiliary.compression.context_length:只用于辅助压缩模型可行性检查/覆盖核心发现(2026-04-24):扁平条目 → 架构链,一条树状依赖替代 10+ 散装条目。
架构链模板:
元:[核心行为规则]→[次级规则]→[三级规则]
├─红线:[不可做]
├─重试:[失败策略]
├─[领域A]链:[约束]→[执行]→[验证]
└─[领域B]链:[约束]→[执行]→[验证]
实例:
元:长忆从严→直做勿问→效驱>轮询→全量不挑。
├─红线:勿删cron/自动化,清前确认存废。
├─重试:始后败不重(断线除外),败即弃。
├─cron链:模型驱→禁脚本→deliver=feishu→冲突必解→sniper参数分离不与长驻争。
├─Hansa链:只收不挪(无FluxA权)→cron走MCP→状态机→答题agent推理。
└─Quest链:禁Twitter/X→禁视频→Medium/Dev.to/gist可。
USER.md 优化:
MEMORY.md 优化:
# 1. 查大小排序
du -sh ~/.hermes/skills/* | sort -rh | head -20
# 2. 统计每个目录 skill 数
for d in ~/.hermes/skills/*/; do
count=$(find "$d" -name "SKILL.md" | wc -l)
size=$(du -sh "$d" | cut -f1)
echo "$count skills, $size: $(basename $d)"
done | sort -t, -k1 -rn
删除标准:
删前边界确认(2026-04-25 复盘):
⚠️ skill-index.json 顶层是数组 [{skill}, ...],不是 dict {"skills": [...]}
Python 清理(sed 对多行 section 不可靠):
import json, re
# skill-index.json
data = json.load(open('skill-index.json'))
data = [s for s in data if s.get('category') not in deleted_cats
and s.get('name') not in deleted_skills]
json.dump(data, open('skill-index.json', 'w'), indent=2)
# skill-index.md — 删除 section + table rows
content = open('skill-index.md').read()
for cat in deleted_cats:
pattern = rf'## {re.escape(cat)}\n.*?(?=\n## |\Z)'
content = re.sub(pattern, '', content, flags=re.DOTALL)
for skill in deleted_skills:
lines = content.split('\n')
content = '\n'.join(l for l in lines if skill not in l)
open('skill-index.md', 'w').write(content)
# skill-router.md — 删除对应行
lines = open('skill-router.md').readlines()
lines = [l for l in lines if not any(s in l for s in deleted_skills)]
open(, ).writelines(lines)
验证:
grep -c "DELETED_SKILL" skill-router.md skill-index.md
# 期望:0
| 优化项 | 优化前 | 优化后 | 节省 |
|---|---|---|---|
| routing 文件 | 90KB+ | 50-60KB | 30-40% |
| skill-router.md | 13KB | 6-8KB | 50%+ |
| 英文触发词 | 30+ 个 | <15 个 | 50%+ |
| USER.md | 1900 bytes | 1200 bytes | 37% |
Token 节省: 每次对话约 2000-3000 tokens
[{...}],不是 {"skills": [...]}~/.hermes/hermes-agent/routing/、~/.hermes/routing/、项目内 .hermes/routing/ 之一当成永真。当前任务若已存在项目内 .hermes/routing/,优先更新其正式文件,不得把正式路由先写去 /tmp/* 再停在那里。config.yaml 时先读精确上下文再 patch:含 api_key、base_url、内联 map(如 providers: {})的 YAML 很易因模糊匹配误伤相邻键;不要凭脱敏片段或记忆直接替换