Chuyển đến nội dung
Skillpedia
Agent11k · #11809

hive.writing-hive-skills

Skill này làm gì

Skill này giải thích cách tạo một skill mới cho agent Hive và nơi nên lưu nó. Skill dành cho người muốn biến một quy trình lặp lại thành một skill tái sử dụng.

Khi nào nên dùng

  • ✓Khi bạn muốn biến một quy trình lặp lại thành một skill tái sử dụng cho agent Hive.
  • ✓Khi bạn cần thêm một skill mới vào thư viện hoặc dự án của agent.
  • ✓Khi bạn muốn đóng gói một skill cùng các script hoặc file tham chiếu.

Liên kết skill

https://github.com/aden-hive/hive/blob/main/core/framework/skills/_default_skills/writing-hive-skills/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/aden-hive/hive/blob/main/core/framework/skills/_default_skills/writing-hive-skills/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tôi muốn biến các bước báo cáo hàng tuần của mình thành một skill tái sử dụng cho agent Hive.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

AI viết một file SKILL.md với tên và mô tả ở đầu, rồi thêm nó bằng công cụ write_skill. Cài đặt phạm vi quyết định ai có thể thấy skill, chẳng hạn một queen, một colony hoặc thư viện dùng chung.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Operational Protocol: Writing Hive Skills

Hive agents discover skills by scanning several roots, in precedence order (later wins):

  1. Framework defaults shipped in core/framework/skills/_default_skills/
  2. ~/.agents/skills/ — user, cross-client
  3. $HIVE_HOME/skills/ — the shared library every queen and colony reads
  4. $HIVE_HOME/queens/<queen_id>/skills/ — one queen's own skills (her colonies read them too)
  5. $HIVE_HOME/colonies/<colony_name>/skills/ — one colony's skills
  6. <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 in framework/skills/defaults.py::SKILL_REGISTRY only when the skill is a universal operational protocol shipped with Hive. Default skills use the hive.<name> naming convention and include type: default-skill in 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 name frontmatter field (for framework defaults, the directory is the unprefixed name, e.g. writing-hive-skills/ for hive.writing-hive-skills).
  • Keep SKILL.md under ~500 lines. Move long reference material into references/.
  • 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
Câu hỏi thường gặp

Skill được lưu ở đâu?

Chúng có thể nằm trong các skill riêng của một queen, thư mục colony, thư viện dùng chung hoặc thư mục dự án, tùy theo phạm vi đã chọn.

Tại sao không tự lưu file skill bằng tay?

Skill tự lưu bằng tay sẽ không có trong danh mục đang chạy cho đến một phiên mới, và nó bỏ qua bước phê duyệt của người dùng áp dụng cho thư viện dùng chung.

Một thư mục skill phải có những gì?

Nó cần một file SKILL.md, và có thể có các thư mục tùy chọn scripts, references và assets.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
11k
Vị trí xếp hạng
#11809
Giấy phép
Apache-2.0
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự