知识引擎/Hermes 知识引擎/技能系统 (Skill System)

技能是 Hermes 的可复用知识模块。每个技能都是一个 Markdown 文件,在激活时注入到 Agent 的上下文中——为其提供持久的工作流、领域知识和行为指南,而无需将这些内容塞入系统提示中。 技能是可热插拔的:你可以在会话中途安装、创建、编辑和切换技能。它们在 CLI、消息平台和 Gateway 后台任务中均可

技能系统 (Skill System)

> 📖 本文档翻译自 Hermes Agent 官方文档 > 最后更新:2026-04-16


技能是 Hermes 的可复用知识模块。每个技能都是一个 Markdown 文件,在激活时注入到 Agent 的上下文中——为其提供持久的工作流、领域知识和行为指南,而无需将这些内容塞入系统提示中。

技能是可热插拔的:你可以在会话中途安装、创建、编辑和切换技能。它们在 CLI、消息平台和 Gateway 后台任务中均可用。

技能如何工作

当你激活一个技能时,Hermes 会将其内容读取到会话的上下文中。从 Agent 的角度来看,它就像是系统提示的扩展——提供特定于该技能的指令、知识和行为规则。

技能不是工具(尽管技能可以指导 Agent 使用特定工具)。它们是纯文本提示片段,在正常对话期间持久存在于上下文中。

技能中心

/skills browse 命令会打开一个交互式浏览器,用于官方可选技能、社区技能和本地技能。

可用类别

中心包含多个类别的技能:

  • 开发工具——代码审查、PR 工作流、Git 操作
  • 研究与信息——网络研究、技术博客监控、新闻聚合
  • 写作与内容——文档生成、翻译辅助
  • 数据分析——CSV 分析、日志处理
  • 自动化——定时任务模板、系统监控
  • 平台集成——特定服务的工作流

使用 ↑↓ 导航,按 Enter 安装,按 q 退出。

中心离线时自动使用本地缓存

如果技能中心服务器不可达(例如,在离线或受限环境中),Hermes 会自动回退到上次成功获取的本地缓存技能列表。如果不存在缓存,它会显示可用的本地技能并说明中心离线。

你不会看到任何错误——只是一个可能较旧的技能集。

安装技能

通过技能中心(推荐)

在聊天中使用:

/skills browse

通过 CLI

hermes skill install github-pr-workflow
hermes skill install excalidraw-drawing
hermes skill install gif-search

从 URL 或文件

hermes skill install https://raw.githubusercontent.com/example/skill.md
hermes skill install /path/to/local/skill.md

安装后,该技能会在 ~/.hermes/skills/ 中可用。

使用技能

在聊天中

/skill github-pr-workflow

或者对于某些技能,只需使用技能名称作为斜杠命令:

/github-pr-workflow create a PR for the auth refactor

在 CLI 启动时

hermes -s github-pr-workflow
hermes -s github-pr-workflow,code-review  # 多个技能

在单次查询中

hermes chat -s github-pr-workflow -q "Create a PR for the auth refactor"

通过工具调用

skill(action="activate", name="github-pr-workflow")

创建自定义技能

基本结构

~/.hermes/skills/ 中创建一个 Markdown 文件:

# 我的自定义技能

## 目的
这个技能做什么的简要描述。

## 指令
- 步骤 1:做什么
- 步骤 2:做什么
- 步骤 3:做什么

## 规则
- 始终遵循规则 X
- 永远不要做 Y

高级:带参数的技能

技能可以定义参数,Agent 在使用时会填写这些参数:

---
parameters:
  - name: language
    description: "编程语言"
    required: true
  - name: style
    description: "代码风格(函数式、面向对象等)"
    required: false
---

# 代码生成器

根据指定的 {{language}} 语言生成代码,遵循 {{style}} 风格。

示例:博客监控技能

---
name: blogwatcher
description: "监控博客和 RSS 源的新内容"
parameters:
  - name: feeds
    description: "要监控的 RSS/Atom 源 URL(逗号分隔)"
    required: true
  - name: summary_length
    description: "每篇文章的摘要长度"
    required: false
    default: "3 sentences"
---

# 博客监控器

你是一个博客和新闻源监控器。

## 工作流
1. 从配置的源获取最新条目
2. 与之前检查进行比较,识别新内容
3. 根据请求的长度总结新文章
4. 以简洁的格式呈现发现

## 输出格式
对于每篇新文章:
- **标题**:文章标题
- **来源**:博客/源名称
- **摘要**:{{summary_length}}
- **链接**:URL

技能管理

/skills                    # 列出已安装的技能
/skills browse             # 浏览并安装新技能
/skill <name>              # 激活一个技能
/skill <name> off          # 停用一个技能

命令行管理

hermes skill list                    # 列出已安装的技能
hermes skill install <name>          # 从中心安装技能
hermes skill remove <name>           # 移除一个技能
hermes skill show <name>             # 显示技能内容
hermes skill create <name>           # 创建一个新的技能模板
hermes skill edit <name>             # 在编辑器中编辑技能
hermes skill search <query>          # 在中心搜索技能

技能和定时任务

技能可以在定时任务中使用,以为定时 Agent 提供持久知识:

/cron add "every 1h" "Summarize new feed items" --skill blogwatcher

或通过 API:

cronjob(
    action="create",
    skill="blogwatcher",
    prompt="Check the configured feeds and summarize anything new.",
    schedule="0 9 * * *",
    name="Morning feeds",
)

技能优先级和上下文

技能按激活顺序加载。如果多个技能提供冲突的指令,最后激活的技能优先。

你可以使用以下命令检查当前上下文中活跃的技能:

/skills

相关文档

Continue Exploring

继续探索

这不是课程式的上一篇下一篇,而是从当前节点向外继续漫游。

核心功能

定时任务 (Cron Scheduler)

通过自然语言或 cron 表达式自动调度任务。Hermes 通过单个 cronjob 工具暴露 cron 管理,使用动作风格的命令操作,而不是独立的 schedule/list/remove 工具。 Cron 任务可以: - 调度一次性或重复性任务 - 暂停、恢复、编辑、触发和删除任务

核心功能

MCP 集成 (MCP Integration)

MCP 让 Hermes Agent 连接到外部工具服务器,使 Agent 能够使用 Hermes 本身之外的工具——GitHub、数据库、文件系统、浏览器栈、内部 API 等。 如果你曾想让 Hermes 使用一个已经存在于其他地方的工具,MCP 通常是最简洁的方式。 - 无需先编写原生 Hermes 工具即可访问外

使用指南

配置 (Configuration)

All settings are stored in the /.hermes/ directory for easy access. :::tip ::: Settings are resolved in this order (highest priority first):

核心功能

工具与工具集 (Tools & Toolsets)

Tools are functions that extend the agent's capabilities. They're organized into logical toolsets that can be enabled or disabled per platform.

核心功能

记忆系统 (Memory System)

Hermes Agent has bounded, curated memory that persists across sessions. This lets it remember your preferences, your projects, your environment, and things it h

核心功能

ACP 编辑器集成 (ACP Editor Integration)

Hermes Agent 可以作为 ACP 服务器运行,让 ACP 兼容的编辑器通过 stdio 与 Hermes 通信,并渲染: - 聊天消息 - 工具活动 - 文件差异 - 终端命令 - 审批提示 - 流式思考 / 响应片段 当你希望 Hermes 像编辑器原生的编程 Agent 一样工作,而不是独立的 CLI 或

Core Features

核心功能

Hermes 的能力核心:工具、记忆、技能、委派、自动化、语音、插件与浏览器控制。

31 篇文档30 个节点

当前节点

技能系统 (Skill System)

同主题继续探索

相关节点

定时任务 (Cron Scheduler)

通过自然语言或 cron 表达式自动调度任务。Hermes 通过单个 cronjob 工具暴露 cron 管理,使用动作风格的命令操作,而不是独立的 schedule/list/remove 工具。 Cron 任务可以: - 调度一次性或重复性任务 - 暂停、恢复、编辑、触发和删除任务

MCP 集成 (MCP Integration)

MCP 让 Hermes Agent 连接到外部工具服务器,使 Agent 能够使用 Hermes 本身之外的工具——GitHub、数据库、文件系统、浏览器栈、内部 API 等。 如果你曾想让 Hermes 使用一个已经存在于其他地方的工具,MCP 通常是最简洁的方式。 - 无需先编写原生 Hermes 工具即可访问外

配置 (Configuration)

All settings are stored in the /.hermes/ directory for easy access. :::tip ::: Settings are resolved in this order (highest priority first):

工具与工具集 (Tools & Toolsets)

Tools are functions that extend the agent's capabilities. They're organized into logical toolsets that can be enabled or disabled per platform.

记忆系统 (Memory System)

Hermes Agent has bounded, curated memory that persists across sessions. This lets it remember your preferences, your projects, your environment, and things it h

ACP 编辑器集成 (ACP Editor Integration)

Hermes Agent 可以作为 ACP 服务器运行,让 ACP 兼容的编辑器通过 stdio 与 Hermes 通信,并渲染: - 聊天消息 - 工具活动 - 文件差异 - 终端命令 - 审批提示 - 流式思考 / 响应片段 当你希望 Hermes 像编辑器原生的编程 Agent 一样工作,而不是独立的 CLI 或