agentskills

其他

agentskills/agentskills

用于扩展 AI 代理能力的轻量级开放格式。

项目简介

Agent Skills 是一种开放标准,将程序性知识与上下文打包成便携文件夹,供代理按需加载。它定义了简单的 SKILL.md 格式,包含元数据和指令,可在兼容的 AI 代理间实现领域专业知识与可重复工作流。

README 预览

# Agent Skills\n\n[](https://discord.gg/MKPE9g8aUy)\n\nA standardized way to give AI agents new capabilities and expertise.\n\n## What are Agent Skills?\n\nAgent Skills are a lightweight, open format for extending AI agent capabilities with specialized knowledge and workflows.\n\nAt its core, a skill is a folder containing a `SKILL.md` file. This file includes metadata (`name` and `description`, at minimum) and instructions that tell an agent how to perform a specific task. Skills can also bundle scripts, reference materials, templates, and other resources.\n\n```\nmy-skill/\n├── SKILL.md          # Required: metadata + instructions\n├── scripts/          # Optional: executable code\n├── references/       # Optional: documentation\n├── assets/           # Optional: templates, resources\n└── ...               # Any additional files or directories\n```\n\n## Why Agent Skills?\n\nAgents are increasingly capable, but often don't have the context they need to do real work reliably. Skills solve this by packaging procedural knowledge and company-, team-, and user-specific context into portable, version-controlled folders that agents load on demand. This gives agents:\n\n- **Domain expertise**: Capture specialized knowledge — from legal review processes to data analysis pipelines to presentation formatting — as reusable instructions and resources.\n- **Repeatable workflows**: Turn multi-step tasks into consistent, auditable procedures.\n- **Cross-product reuse**: Build a skill once and use it across any skills-compatible agent.\n\n## How do Agent Skills work?\n\nAgents load skills through **progressive disclosure**, in three stages:\n\n1. **Discovery**: At startup, agents load only the name and description of each available skill, just enough to know when it might be relevant.\n\n2. **Activation**: When a task matches a skill's description, the agent reads the full `SKILL.md` instructions into context.\n\n3. **Execution**: The agent follows the instructions, optionally exe

常见问题 (1)

故障排除
为什么在使用嵌套元数据时,SKILL.md 会报错 "cannot unmarshal !!map into string"?

SKILL.md frontmatter 中的 metadata 字段被定义为字符串到字符串的映射。嵌套对象、数组、数字和布尔值不具备可移植性,严格的客户端会拒绝它们。请将元数据扁平化为字符串键和字符串值,例如:

metadata:
  hermes_tags: "ADHD, Output Style, Productivity, Formatting"
  hermes_category: "productivity"
  hermes_related_skills: ""

如果需要数组或对象,请将其序列化为字符串(例如逗号分隔的文本或 JSON),然后由客户端解析该值。规范概述已更新,以与详细的字段定义保持一致:键和值都必须是字符串。

来源 Issue #474