hive.writing-hive-skills
它能做什么
这个技能说明如何为 Hive 智能体创建新技能,以及技能应保存在哪里。适合希望把重复流程变成可复用技能的人。
适用场景
- ✓当你想把重复的流程变成 Hive 智能体可复用的技能时。
- ✓当你需要把新技能添加到智能体的技能库或项目中的时候。
- ✓当你希望把技能连同其脚本或参考文件一起打包的时候。
技能链接
https://github.com/aden-hive/hive/blob/main/core/framework/skills/_default_skills/writing-hive-skills/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我想把我每周报告的步骤整理成一个可复用技能,供我的 Hive 智能体使用。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会编写一个 SKILL.md 文件,在顶部包含名称和描述,然后使用 write_skill 工具添加它。范围设置决定谁能看到该技能,例如某个蜂王、某个集群,或共享库。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Operational Protocol: Writing Hive Skills
Hive agents discover skills by scanning several roots, in precedence order (later wins):
- Framework defaults shipped in
core/framework/skills/_default_skills/ ~/.agents/skills/— user, cross-client$HIVE_HOME/skills/— the shared library every queen and colony reads$HIVE_HOME/queens/<queen_id>/skills/— one queen's own skills (her colonies read them too)$HIVE_HOME/colonies/<colony_name>/skills/— one colony's skills<project>/.agents/skills/, then<project>/.hive/skills/— project
Each skill is a directory containing a SKILL.md. At startup, only the frontmatter name + description of every skill is loaded; the body is loaded only when the agent activates the skill. Design for that.
Adding a skill as a queen: write_skill
Always add a skill with write_skill. Never write a SKILL.md into a skills folder with the terminal or write_file: a skill put there by hand isn't in any running catalog until a new session, and one put in the shared library skips the user's approval. write_skill takes the content inline or copies an existing skill folder (source_path, e.g. one you git cloned into your workspace), and its scope decides who sees it:
scope |
Lands in | Who sees it |
|---|---|---|
queen (default outside a colony) |
your own skills | you from your next turn, and your colonies' workers |
colony (default inside a colony) |
this colony's skills | this colony's workers spawned from now on |
global |
the shared library, after the user approves | every queen and colony |
- Your own (
scope="queen"): a protocol, an API you use, a style you keep. You can replace a skill you wrote, but not one the user made in your skills. - One colony (
scope="colony"): the operational protocol a single colony needs — its API auth, DOM selectors, DB schema, task-queue conventions. Write it once before fanning out workers and name it in each task string. Keeping it in the colony means no other colony sees it at selection time. - Everyone (
scope="global"): only when the skill is genuinely useful to every queen. Nothing is installed when you call it: the user is asked in this session's chat in the Hive dashboard, and a message tells you when they approve or decline. You don't wait for it; carry on. If you're talking with them in a chat app, tell them it's waiting in the dashboard.
write_skill(
skill_name="honeycomb-api-protocol",
skill_description="How to query the HoneyComb staging API…",
skill_body="## Operational Protocol\n\nAuth: …",
skill_files=[{"path": "scripts/fetch_tickers.py", "content": "…"}], # optional
scope="colony",
)
Other places skills come from
- Project-scoped:
<project>/.hive/skills/when the skill is tied to that codebase's APIs, conventions, or infra and multiple agents in the project should share it. - Framework default: add under
core/framework/skills/_default_skills/AND register inframework/skills/defaults.py::SKILL_REGISTRYonly when the skill is a universal operational protocol shipped with Hive. Default skills use thehive.<name>naming convention and includetype: default-skillin metadata.
Directory layout
<skill-name>/
├── SKILL.md # Required
├── scripts/ # Optional — executable helpers
├── references/ # Optional — on-demand docs
└── assets/ # Optional — templates, data, images
Rules:
- The directory name must equal the
namefrontmatter field (for framework defaults, the directory is the unprefixed name, e.g.writing-hive-skills/forhive.writing-hive-skills). - Keep
SKILL.mdunder ~500 lines. Move long reference material intoreferences/. - Reference other files with relative paths from the skill root (
scripts/foo.py,references/API.md). Keep references one level deep.
SKILL.md frontmatter
Required fields:
| Field | Constraints |
|---|---|
name |
1–64 chars, [a-z0-9-], no leading/trailing/consecutive hyphens. Must match the directory name. Framework defaults prefix with hive. |
description |
1–1024 chars. Must describe what the skill does and when to use it. Include trigger keywords the user is likely to say. |
Optional fields:
| Field | Notes |
|---|---|
license |
License name or reference to a bundled file |
compatibility |
≤500 chars. Only include if env requirements are non-trivial (networ |
常见问题
技能保存在哪里?
根据所选范围,技能可以保存到某个蜂王的专属技能中、集群文件夹中、共享库中或项目文件夹中。
为什么不手动保存技能文件?
手动保存的技能在新会话之前不会出现在正在运行的目录中,而且会跳过共享库所需的用户审批。
技能文件夹必须包含什么?
它需要一个 SKILL.md 文件,并可以选择性地包含 scripts、references 和 assets 文件夹。
详情
作者的原始描述
Author a new Agent Skill for a Hive agent that conforms to the Agent Skills specification (SKILL.md with YAML frontmatter, optional scripts/references/assets directories). Use when the user asks to create, scaffold, add, install, or package a new skill for a Hive agent, or you want to keep a procedure as a skill.
repo: aden-hive/hive
热度
- GitHub 星标
- 11k
- 排名
- #11809
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
browser-edge-cases
11k帮你的智能体修复在 LinkedIn、X 或脚本繁重的页面等复杂网站上失败的浏览器自动化任务。
hive.browser-automation
11k教你的智能体使用 hive-browser 工具控制你自己的 Chrome 浏览器,通过截图和点击完成操作。
hive.colony-progress-tracker
11k帮你的智能体认领任务,并把它的步骤和检查记录在共享数据库中,让工作在进行中就被跟踪。
hive.context-preservation
11k帮你的智能体在较早的细节从记忆中被移除之前,把长篇工具结果中的关键事实保存到笔记里。