🚀 若你已在 Gateway 主机上跑 Hermes Agent,却每个会话都要重新教一遍部署、调研或发布流程,本文就是 2026 年面向生产的 Skill Bundles、GEPA 自进化 与 Tap 发布 playbook——不是又一篇泛泛的 SKILL.md 入门。你会得到:16 万+ Star Agent 上 Skills 作为程序性记忆如何复利、YAML Bundle 设计、条件激活、团队 Tap 分发,以及十步落地路径。结构:概念对比 → L0/L1/L2 渐进加载 → Bundles 与 Hub 生态 → GEPA 护栏 → 插件技能 → 博客工作流案例 → FAQ。
2026 年初,Nous Research 发布 Hermes Agent,两个月内 GitHub Star 突破 16 万,成为 AI Agent 领域增速最快的开源项目之一。它的核心卖点不是更大的模型,而是一个理念:"the agent that grows with you"——Agent 会随着使用越来越懂你。
这一切的底层实现,就是它的技能(Skills)系统。与传统「一次性 Prompt」不同,Hermes 的技能体系是一套有标准、可进化、跨会话持久的程序性记忆。本文不聊基础入门,直接进入进阶区域:
若你尚未完成安装与 Gateway 配置,请先阅读 Hermes 保姆级安装教程;概念与硬件选型见 三层记忆架构文。
在再写一条 400 行的 system prompt 之前,先用这张表选对层级。Hermes 同时暴露 Memory、Skills 与 Prompt 三种表面;选错层是 Gateway 上 Token 浪费的最常见原因。
| 维度 | 普通 Prompt | Memory(记忆) | Skills(技能) |
|---|---|---|---|
| 持久性 | 当前对话 | 跨会话,永久 | 跨会话,永久 |
| 加载时机 | 每次都在上下文中 | 每次会话自动注入 | 按需加载(关键差异) |
| Token 成本 | 每次消耗 | 小而稳定 | 激活前零消耗 |
| 内容类型 | 任意意图描述 | 用户偏好 / 事实 | 程序性步骤(如何做某件事) |
| 谁来维护 | 用户手动 | Agent 自动 | 用户 + Agent 均可 |
| 可共享性 | 不方便 | 私有 | 可发布为社区 Tap |
核心记忆口诀 📝:
Skills 与 MCP 互补而非替代:MCP 提供运行时工具访问;Skills 告诉 Hermes 何时调用 web_search、terminal 或自定义插件工具。在 Cursor 侧编写同一 SKILL.md 标准,可参考 Agent Skills 跨平台指南。
所有 Hermes Skills 遵循 agentskills.io 开放标准,确保跨 Agent 可移植(Hermes、Claude Code、Cursor 均可使用)。单一事实来源位于 ~/.hermes/skills/。
---
name: my-skill # 必填:小写字母+连字符,≤64字符
description: | # 必填:≤1024字符,建议以"Use when..."开头
Use when the user needs to [...].
Handles [...] and [...].
version: 1.0.0 # 推荐填写
license: MIT
compatibility: Requires git, docker # 环境依赖说明
allowed-tools: Bash(git:*) Read # 预授权工具(实验性)
metadata:
hermes:
tags: [devops, automation]
category: software-development
related_skills: [github-pr-workflow, test-driven-development]
requires_toolsets: [terminal]
fallback_for_toolsets: [web]
---
# My Skill Title
## Overview
1-2 paragraphs: what it does and why it exists.
## When to Use
- Use for: [具体场景]
- Don't use for: [明确的排除场景]
## Procedure
1. 步骤一(包含精确命令)
2. 步骤二
3. 步骤三
## Common Pitfalls
1. 常见问题及修复方案
2. 边界情况处理
## Verification Checklist
- [ ] 验证点 1
- [ ] 验证点 2
~/.hermes/skills/
└── my-category/
└── my-skill/
├── SKILL.md # 主文件(核心步骤,建议 ≤500 行)
├── references/
│ ├── api-docs.md # API 参考(按需加载)
│ └── examples.md # 示例输入输出
├── templates/
│ └── config.yaml # 可复用模板
└── scripts/
└── setup.sh # Agent 可直接执行的脚本
Progressive Disclosure 三级加载机制(Token 控制的核心):
| 加载层级 | 内容 | 触发时机 | Token 成本 |
|---|---|---|---|
| Level 0 | name + description |
每次会话开始,所有技能 | ~3K(全部技能合计) |
| Level 1 | 完整 SKILL.md 正文 | 用户 /skill-name 或 LLM 判断需要 |
取决于文件长度 |
| Level 2 | references/、scripts/ 文件 |
LLM 在执行时判断需要 | 按需,单文件 |
写作建议:description 字段是 Level 0 的全部信息,LLM 靠它决定是否加载完整技能。写清「什么时候用」比「是什么」更重要。每个已安装技能也是斜杠命令:/github-pr-workflow、/plan,CLI 与 Telegram 通用。
Skill Bundles 是 Hermes 2026 新增的强力特性,也是目前最被低估的功能之一。Bundle 是轻量 YAML 文件,把多个相关技能打包成一个斜杠命令;执行 /bundle-name 时,所有列出的技能同时加载,无需逐个触发。文件位置:~/.hermes/skill-bundles/<slug>.yaml。
# ~/.hermes/skill-bundles/backend-dev.yaml name: backend-dev description: | Full backend feature workflow — code review, TDD, and PR management. Use at the start of any new backend feature session. skills: - github-code-review - test-driven-development - github-pr-workflow instruction: | Always write failing tests first before implementation. Open PRs with co-author tags for pair-programming sessions. Never push directly to main.
name: research-session description: Load all research tools at once for deep-dive sessions. skills: - arxiv - deep-research - plan - excalidraw instruction: | Start every session by checking recent papers on the topic. Create an Excalidraw diagram for any architecture discussed.
name: mlops-deploy description: Model deployment pipeline with monitoring setup. skills: - vllm - llama-cpp - github-pr-workflow - systematic-debugging instruction: | Always run inference benchmarks before and after deployment. Document model quantization settings in PR description.
Bundle 优先级规则 ⚙️:
hermes bundles create backend-dev \ --skills github-code-review,test-driven-development,github-pr-workflow \ --instruction "Always write failing tests first" hermes bundles list hermes bundles show backend-dev /bundles # 在对话内查看
这是让 Hermes 技能真正「聪明」的机制。技能可以根据当前会话中工具的可用性,自动显示或隐藏。在 SKILL.md 的 metadata.hermes 下配置:
metadata:
hermes:
requires_toolsets: [web] # 仅当 web 工具集可用时显示
requires_tools: [web_search] # 仅当 web_search 工具可用时显示
fallback_for_toolsets: [browser] # 当 browser 工具集不可用时才显示
fallback_for_tools: [browser_navigate] # 当 browser_navigate 不可用时才显示
| 字段 | 行为逻辑 |
|---|---|
| requires_toolsets | 列出的工具集不存在时,隐藏此技能 |
| requires_tools | 列出的工具不存在时,隐藏此技能 |
| fallback_for_toolsets | 列出的工具集存在时,隐藏此技能(作为备选方案) |
| fallback_for_tools | 列出的工具存在时,隐藏此技能 |
经典场景:duckduckgo-search 免费 / 付费工具智能切换
# duckduckgo-search/SKILL.md
name: duckduckgo-search
description: Search the web using DuckDuckGo. Use when web_search is unavailable.
metadata:
hermes:
fallback_for_tools: [web_search] # 有付费 web_search 时自动隐藏
当用户配置了 FIRECRAWL_KEY / BRAVE_SEARCH_KEY 时,付费的 web_search 工具激活,DuckDuckGo 技能自动从提示词中消失,节省 Token;当 API 不可用时,备选方案自动浮现。
高级场景:telegram-notify 平台感知技能
# telegram-notify/SKILL.md
metadata:
hermes:
requires_toolsets: [messaging] # 仅在有消息平台工具时显示
platforms: [telegram, discord] # 平台白名单
通过 hermes skills TUI,还可以为不同平台(CLI、Telegram、Discord)独立开关某个技能。
# 安装官方可选技能 hermes skills install official/research/arxiv # 从 HTTP URL 直接安装单文件技能 hermes skills install https://example.com/SKILL.md --name my-skill # 从 GitHub 仓库安装 hermes skills install github:openai/skills/k8s # 添加自定义 Tap(订阅整个技能仓库) hermes skills tap add github:my-org/my-skills hermes skills browse hermes skills search kubernetes hermes skills check hermes skills update
Hub 聚合官方可选技能、skills.sh、GitHub Tap 与社区市场;所有 Hub 安装均经安全扫描,仅在人工审查后使用 --force 覆盖非危险发现。
| 仓库 | 描述 | Stars / 规模 | 亮点 |
|---|---|---|---|
| ChuckSRQ/awesome-hermes-skills | 精选生产级技能合集 | 67 ⭐ | 含 Deep Research、MLOps、Apple 集成;内置 gh-copilot 插件,23 个技能直接集成 GitHub Copilot |
| amanning3390/hermeshub | 社区技能注册中心 | 166 ⭐ | 安全扫描认证;支持 API 与市场功能,每个技能都经过提示注入检测 |
| kevinnft/ai-agent-skills | 跨 Agent 技能包 | 191 个技能 / 28 分类 | 支持 Hermes / Claude Code / Cursor;一键安装脚本,跨 Agent 通用 |
| NousResearch/hermes-agent | 官方主仓库 | 权威来源 | 含所有内置 Skills 与编写规范 |
agentskills.io 开放标准意味着 Skills 可在 Hermes、Claude Code、Cursor、OpenCode 之间跨平台使用;可用 skills-ref validate ./my-skill 验证格式合规性。
通过创建 GitHub 仓库作为 Tap,你可以让整个团队甚至整个社区订阅你的技能集——无需注册中心。
my-skills-tap/ ├── skills.sh.json # 分类配置(可选,影响 Skills Hub 展示) ├── mlops/ │ ├── vllm-deploy/ │ │ └── SKILL.md │ └── model-benchmark/ │ └── SKILL.md ├── research/ │ ├── paper-summarizer/ │ │ └── SKILL.md │ └── citation-finder/ │ └── SKILL.md └── README.md
{
"groupings": [
{
"title": "MLOps & Model Deployment",
"skills": ["vllm-deploy", "model-benchmark"]
},
{
"title": "AI Research Workflows",
"skills": ["paper-summarizer", "citation-finder"]
}
]
}
团队部署流程:
# 团队成员一键订阅 hermes skills tap add github:your-org/your-skills-tap # 私有仓库(需要 GitHub Token) hermes skills tap add github:your-org/private-skills --token $GH_TOKEN # 更新所有 Tap 技能 hermes skills tap update # 查看已订阅的 Tap hermes skills tap list
提示:在 ~/.hermes/.env 中设置 GITHUB_TOKEN,可将 GitHub API 限额从 60 提升至 5,000 次/小时,便于批量 Tap 索引。
版本管理建议:将 ~/.hermes/skills/ 纳入 Git 版本控制,实现跨设备同步:
# 在 ~/.hermes/skills/ 初始化 git 仓库 cd ~/.hermes/skills && git init git remote add origin https://github.com/your-org/personal-skills git push -u origin main # 跨设备同步 git pull && hermes skills reset # 同步后重建内置技能
这是 Hermes 技能体系最前沿的部分,也是让它区别于所有同类工具的核心竞争力。hermes-agent-self-evolution 将 GEPA(Genetic-Pareto Prompt Evolution)——2026 年 ICLR Oral 论文成果——通过 DSPy 集成到技能优化流水线。
核心思路:不微调模型权重,只通过分析执行轨迹、生成变体、多目标帕累托优化来改进 SKILL.md 文本本身。成本:每次优化运行约 $2–10(纯 API 调用,无需 GPU)。
五阶段进化流程 🧬:
git clone https://github.com/NousResearch/hermes-agent-self-evolution
cd hermes-agent-self-evolution
pip install -r requirements.txt
export HERMES_AGENT_PATH=~/.hermes
# 合成数据进化(入门推荐)
python -m evolution.skills.evolve_skill \
--skill github-code-review \
--iterations 10 \
--eval-source synthetic
# 真实会话数据(效果更好)
python -m evolution.skills.evolve_skill \
--skill github-code-review \
--iterations 10 \
--eval-source sessiondb
# 联合多来源轨迹(实验性)
python -m evolution.skills.evolve_skill \
--skill github-code-review \
--iterations 10 \
--eval-source mixed \
--trace-dirs ~/.claude/traces,~/.hermes/sessions
四大安全护栏(Guardrails)🛡️——进化变体须全部通过才能生成 PR:
pytest tests/ -q 必须 100% 通过五阶段进化路线图(官方状态):
| 阶段 | 优化目标 | 使用引擎 | 状态 |
|---|---|---|---|
| Phase 1 | Skill 文件(SKILL.md) | DSPy + GEPA | ✅ 已实现 |
| Phase 2 | 工具描述 | DSPy + GEPA | 🔲 计划中 |
| Phase 3 | 系统提示片段 | DSPy + GEPA | 🔲 计划中 |
| Phase 4 | 工具实现代码 | Darwinian Evolver | 🔲 计划中 |
| Phase 5 | 持续改进循环(全自动) | 自动化流水线 | 🔲 计划中 |
由于 Skills 遵循 agentskills.io 标准,可将 Claude Code 或 Gemini CLI 产生的执行轨迹也喂给 GEPA 优化器(见上方 --eval-source mixed 示例)。
插件可以将技能打包成命名空间形式(plugin:skill),实现:
skills_list(减少系统提示噪声)# 加载插件技能(命名空间格式)
skill_view("superpowers:writing-plans")
# 加载时会自动展示同插件下的兄弟技能
# Agent: "This plugin also includes: superpowers:editing, superpowers:research"
在插件的 plugin.yaml 中声明技能:
name: my-hermes-plugin
skills:
- name: writing-plans
path: skills/writing-plans/SKILL.md
- name: editing
path: skills/editing/SKILL.md
在 config.yaml 的 plugins.enabled 下显式启用第三方插件——仅发现目录不会执行任意代码。项目本地插件位于 ./.hermes/plugins/,需设置 HERMES_ENABLE_PROJECT_PLUGINS=true。
# ❌ 太模糊,LLM 可能在不相关场景下加载 description: Helps with code. # ✅ 明确触发条件,精确激活 description: | Use when reviewing a pull request, checking for code quality issues, security vulnerabilities, or style violations. Handles GitHub PR URLs and local git diff output. Do NOT use for writing new code.
高质量 Pitfalls 应包含具体失败模式、根因分析与可操作修复步骤:
## Common Pitfalls
1. **CSS selector brittleness**: Dynamic class names like `css-abc123` change
on rebuild. Fix: Use data-testid attributes or ARIA roles instead.
2. **Rate limiting on GitHub API**: Burst of >5000 requests/hour returns 403.
Fix: Add `--rate-limit 100` flag; check `X-RateLimit-Remaining` header.
3. **Token overflow on large diffs**: PRs with >500 files may hit context limits.
Fix: Use `skill_view("github-code-review", "references/chunking.md")`
to load the chunking strategy.
## Procedure
3. Run the extraction script:
The agent will execute: `scripts/extract_schema.py --input $FILE`
If the script fails, load the manual fallback:
`skill_view("db-migration", "references/manual-extract.md")`
| 技能大小 | 建议 |
|---|---|
| < 500 行 | 全部放在 SKILL.md |
| 500–1000 行 | 将详细参考资料移至 references/ |
| > 1000 行 | 强烈建议拆分;考虑是否是两个技能 |
| > 15KB | 超过 GEPA 进化的大小限制,必须拆分 |
# Agent 可通过 skill_manage 工具动态维护技能
skill_manage(
action='patch',
name='github-code-review',
old_string='Check for obvious bugs',
new_string='Check for: null pointer dereferences, SQL injection, XSS vulnerabilities, and obvious logic errors'
)
# 创建全新技能
skill_manage(
action='create',
name='my-new-skill',
content="""---
name: my-new-skill
description: Use when [...].
---
# My New Skill
...""",
category='automation'
)
开启人工审批门(Approval Gate):在 config.yaml 中设置:
skills: agent_writes_require_approval: true # Agent 写入技能前必须人工确认
构建一套完整的博客写作辅助技能体系,让 Hermes 成为你的专属博客助理。~/.hermes/skill-bundles/blog-workflow.yaml:
name: blog-workflow description: Full tech blog writing workflow. skills: - seo-keyword-research - outline-generator - code-example-validator - bilingual-checker - publish-to-platform instruction: | Always research SEO keywords before writing. Ensure all code examples are tested and runnable. Generate both Chinese and English title options.
seo-keyword-research 自定义技能片段:
---
name: seo-keyword-research
description: |
Use when planning a technical blog post. Researches search volume,
competition, and related queries for both Chinese (Baidu, 微信) and
English (Google, Dev.to) audiences.
metadata:
hermes:
requires_toolsets: [web]
tags: [seo, blogging, content]
---
## When to Use
Use at the start of any blog writing session, before creating the outline.
## Procedure
1. Identify the primary topic (provided by user or inferred from context)
2. Search for Chinese long-tail variations: use "X 怎么用", "X 教程", "X 最佳实践"
3. Search for English long-tail variations: "X tutorial", "how to X", "X vs Y"
4. Cross-reference with platform trends (掘金热榜, Dev.to trending, HN)
5. Output a keyword matrix with 3-5 primary + 10-15 long-tail per language
## Common Pitfalls
- Chinese and English audiences search for the same concept differently
- Technical terms may have different Chinese translations across platforms
(e.g., "Agent" vs "智能体" vs "代理" — check which is dominant on target platform)
在 7×24 Mac Mini M4 节点上执行 /blog-workflow Hermes GEPA bundles tap。我们在 30 天 Hermes 租赁实测 中观察到:Skills 从 3 个增至 19 个,重复任务 Token 约降 38%——稳定任务画像下,Bundle 会进一步放大这一收益。
hermes doctor 通过。hermes skills list;若需空白 slate,用 hermes skills opt-out。description 以触发短语为先。backend-dev、research-session、mlops-deploy)。platforms(混合 macOS/Linux 舰队时尤其重要)。hermes skills tap add;附带 skills.sh.json 便于 Hub 分类展示。agent_writes_require_approval: true。--eval-source sessiondb 或 mixed 混合轨迹。description。skill-bundles/ 保持舰队一致。官方资源
开源仓库
社区内容
MACCOME 站内链:安装教程 · 记忆架构 · Cursor SKILL.md 指南
Skill Bundles、Tap 发布与 GEPA 进化只有在 Hermes 持续运行时才会复利。替代方案的局限很具体:(a)笔记本合盖会中断 Gateway 与夜间 GEPA 任务;(b)Linux VPS 缺少 macOS 专属技能与 Apple 工具链步骤;(c)临时 Prompt 无法跨会话旋转或团队 onboarding 存活。
当你需要分钟级 SSH 接入、可预测的月费,以及 ~/.hermes/skills/、Tap 与 launchd Gateway 7×24 存活的 macOS 主机时,MACCOME 专属 Mac Mini M4 云节点通常是更优的生产选择。对比内存档位见 Mac Mini 云租赁价格页;运维问题请前往 云 Mac 帮助中心。
FAQ
Hermes Skills 和 MCP 有什么区别?
Skills 是程序性知识文档(教 Agent 怎么做某事),MCP 是工具接口(给 Agent 额外的工具调用能力)。两者互补:你可以有一个 MCP 工具提供数据库访问,再有一个 Skill 教 Agent 如何正确使用该工具执行数据库迁移。
为什么 Skill 改了但 Agent 还在用旧版?
Skill 修改在当前会话不生效,需要 /reset 开启新会话,或安装时加 --now 参数强制刷新(会导致 Prompt Cache 失效,消耗更多 Token)。若 bundled 技能被标记为 user-modified,运行 hermes skills reset <name> 重新基线化,或 --restore 拉取上游 pristine 副本。
GEPA 进化出的技能安全吗?
变体须通过 pytest 全量测试、15KB 大小限制、缓存规则与语义保留四大护栏,且经人工 PR 审查后合并——不会未经批准直接写入 live Gateway 技能树。仍建议人工 review 每个 PR diff。
如何在 Claude Code 中复用 Hermes Skills?
复制 SKILL.md 到 ~/.claude/skills/,或使用 kevinnft/ai-agent-skills 等跨 Agent 安装脚本一次安装多端可用。agentskills.io 格式是 Hermes 刻意采用的 portability 层。
Skill 的中文内容会影响 Token 效率吗?
中文字符在大多数 tokenizer 中每字约 1–1.5 token,与英文相近。但 description 建议保留英文或中英双语,因为底层 LLM 对英文 description 的理解和匹配更精确。L0 保持精简、长文进 references/、Bundle 按需使用;运行 CJK editorial 工作流的 7×24 Gateway 主机选型见 MACCOME Mac Mini 云租赁价格。