简介
Agent Skills
原始描述
Agent Skills standard reference guide. Covers SKILL.md specification format, progressive loading, skill discovery and activation, authoring best practices, quality evaluation, description optimization
通过你的 Agent 添加
安装目录:agent-skills/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: agent-skills
description: Agent Skills standard reference guide. Covers SKILL.md specification format, progressive disclosure mechanism, skill discovery and activation, frontmatter metadata fields, directory structure conventions.
Agent Skills
A standardized way to give AI agents new capabilities and expertise.
35+ agent products support it: Claude Code, GitHub Copilot, Cursor, Pi, Codex, Gemini CLI, and more.
Use Cases
A standardized way to give AI agents new capabilities and expertise. 35+ agent products support it: Claude Code, GitHub Copilot, Cursor, Pi, Codex, Gemini CLI, and more.
Use Cases
Use when creating new skills, validating skill formats, or understanding the standardized skill system design.
Directory Structure
skill-name/
├── SKILL.md # Required: YAML frontmatter + Markdown instructions
├── scripts/ # Optional: executable scripts
├── references/ # Optional: on-demand reference docs
├── assets/ # Optional: templates, resource files
└── ... # Any additional files
SKILL.md Format
Frontmatter
Field
Required
Constraints
name
✅
1-64 chars, lowercase/numbers/hyphens, no leading/trailing hyphens, no consecutive hyphens, must match directory name
description
✅
1-1024 chars, describe what it does and when to use
license
—
License name or reference
compatibility
—
≤500 chars, environment requirements
metadata
—
Arbitrary key-value pairs
allowed-tools
—
Space-separated pre-approved tool list (experimental)
Minimal Example
skill-name/
├── SKILL.md # Required: YAML frontmatter + Markdown instructions
├── scripts/ # Optional: executable scripts
├── references/ # Optional: on-demand reference docs
├── assets/ # Optional: templates, resource files
└── ... # Any additional files
Frontmatter
| Field | Required | Constraints |
|---|---|---|
name |
✅ | 1-64 chars, lowercase/numbers/hyphens, no leading/trailing hyphens, no consecutive hyphens, must match directory name |
description |
✅ | 1-1024 chars, describe what it does and when to use |
license |
— | License name or reference |
compatibility |
— | ≤500 chars, environment requirements |
metadata |
— | Arbitrary key-value pairs |
allowed-tools |
— | Space-separated pre-approved tool list (experimental) |
---
name: pdf-processing
description: Extract PDF text, fill forms, merge files. Use when handling PDFs.
---
Body Content
Markdown body after frontmatter, no format restrictions. Recommended: step-by-step instructions, input/output examples, common edge cases. Split to references/ if over 500 lines.
Progressive Disclosure (Three Tiers)
Tier
What's Loaded
When
Token Cost
1. Catalog
name + description
Session start
~50-100 per skill
2. Instructions
Full SKILL.md body
When skill is activated
<5000 tokens (recommended)
3. Resources
scripts/references/assets
When referenced by instructions
Varies
Skill Discovery
Scan Locations
Scope
Path
Purpose
Project
<project>/.<client>/skills/
Client-native location
Project
<project>/.agents/skills/
Cross-client interoperability
User
~/.<client>/skills/
Client-native location
User
~/.agents/skills/
Cross-client interoperability
| Tier | What's Loaded | When | Token Cost |
|---|---|---|---|
| 1. Catalog | name + description | Session start | ~50-100 per skill |
| 2. Instructions | Full SKILL.md body | When skill is activated | <5000 tokens (recommended) |
| 3. Resources | scripts/references/assets | When referenced by instructions | Varies |
Scan Locations
| Scope | Path | Purpose |
|---|---|---|
| Project | <project>/.<client>/skills/ |
Client-native location |
| Project | <project>/.agents/skills/ |
Cross-client interoperability |
| User | ~/.<client>/skills/ |
Client-native location |
| User | ~/.agents/skills/ |
Cross-client interoperability |
Scan subdirectories containing SKILL.md. Skip .git/ and node_modules/. Name collisions: project-level overrides user-level.
Integrating into an Agent
See references/integrate.md for the full integration guide, covering:
- Skill discovery (local/cloud/sandbox)
- SKILL.md parsing (YAML degradation, lenient validation)
- Model disclosure (XML/JSON catalog, behavior instructions)
- Activation mechanisms (file-read activation / dedicated tool activation / user explicit activation)
- Context management (compaction protection, caching strategies)
Supported Agent Products
35+ products implement Agent Skills: Claude Code, GitHub Copilot, Cursor, OpenAI Codex, Pi, Gemini CLI, Junie, OpenCode, OpenHands, Goose, Roo Code, VS Code, Mux, Amp, Spring AI, Databricks Genie Code, Qodo, Laravel Boost, and more. See references/products.md.
Validation
skills-ref validate ./my-skill
References
- integrate — Complete guide to integrating Skills support into agents
- best-practices — Skill creation best practices: real expertise, context management, control granularity, effective instruction patterns
- eval-skills — Skill quality evaluation: test cases, assertions, grading, iteration loops
- optimize-desc — Optimizing the description field: trigger testing, train/validation splits, optimization loops
- using-scripts — Bundling scripts in skills: one-off commands, self-contained scripts, agent-friendly design
- products — List of 35+ products supporting Agent Skills
skills-ref validate ./my-skill
- integrate — Complete guide to integrating Skills support into agents
- best-practices — Skill creation best practices: real expertise, context management, control granularity, effective instruction patterns
- eval-skills — Skill quality evaluation: test cases, assertions, grading, iteration loops
- optimize-desc — Optimizing the description field: trigger testing, train/validation splits, optimization loops
- using-scripts — Bundling scripts in skills: one-off commands, self-contained scripts, agent-friendly design
- products — List of 35+ products supporting Agent Skills
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。