Agent Skills
An agent is an intelligent agent and Skills means skills; Agent Skills are the core tool that solidifies professional knowledge and workflow conventions into reusable assets.
An Agent Skill is essentially a modular Markdown file that teaches AI tools (such as Claude, GitHub Copilot, Cursor, etc.) to perform specific tasks. It supports automatic triggering, team sharing, and engineering management, completely eliminating repetitive prompt input.
The essence of Agent Skills is not a tool, but rather:
A combination of behavioral norms + professional knowledge + when-to-use timing
Reference for basic Skills content:Skills Tutorial
Core form:
-
A Skill is a folder that must contain a SKILL.md file (with instructions and metadata), and may optionally include other resource files (such as scripts, examples, and reference docs).
-
A Skill is a Markdown file (SKILL.md) used to teach Claude how to do things your way in specific scenarios.
-
Essentially, it is like giving the AI agent a professional manual; the AI does not learn from scratch every time, but automatically draws on the knowledge in the manual according to the task.
-
Simply put, in the past we used prompts to teach AI to do things; now with Agent Skills we can package prompts + resources into reusable, shareable skill packages that are more efficient and reliable.

How Agent Skills work
The key to Agent Skills is progressive disclosure, loaded in three layers:
- Level 1: Skill discovery -- The AI first reads the metadata (name and description) of all skills to determine whether the task is relevant; this metadata is always present in the system prompt.
- Level 2: Load core instructions -- If relevant, the AI automatically reads the body of SKILL.md for detailed guidance.
- Level 3: Load resource files -- Additional files (such as scripts and examples) are read only when needed, or scripts are executed via tools.
Supported tools and environments
Currently mainly supported:
- Claude(Anthropic):Claude.ai、Claude Code、Agent SDK。
- VS Code + GitHub Copilot: project-level (.github/skills/) or personal-level skills.
- Cursor: project-level (.cursor/skills/) or global skills, with support for installing from GitHub.
- Others: still expanding; the open standard is at https://github.com/agentskills/agentskills。
Why do we need Skills? What problems do they solve?
Ordinary AI agents (such as Claude or Copilot) are smart, but tend to make mistakes when lacking specific context. For example:
- The team has its own coding conventions, but the AI has to be reminded manually every time.
- For complex processes like handling PDF forms or debugging GitHub Actions, the AI may not know the best practices.
Agent Skills solve these problems:
- Automatic triggering: The AI automatically loads relevant skills based on the task, with no need to manually enter long prompts.
- Reusable & shareable: Create once and use across the whole team or community, with Git version control support.
- Efficient use of context: Uses progressive disclosure, loading only what is needed to avoid overflowing the context window.
- Cross-platform: The same Skill can be used across tools like Claude, VS Code Copilot, Cursor, and more.
Quick understanding of core concepts
| Concept | Analogy | Purpose |
|---|---|---|
| Skill | A standalone Swiss Army knife tool or a cooking recipe | A complete kit for accomplishing a specific task (such as writing an email or analyzing data). |
| Instruction | The user manual for a tool or the steps of a recipe | Tells Claude exactly what to do, how to think, and what format to output. |
| Knowledge | The parts list of a tool or background information on a recipe's ingredients | Upload files (such as product manuals or API docs) as the Skill's dedicated knowledge base. |
| Tool | A special attachment on a tool (such as a bottle opener) | Defines external APIs or functions the Skill can call to fetch data or perform actions. |
Skill execution flow
-
Starting from the user instruction, Skill intent recognition is performed first to decide whether to enter the controlled execution path.
-
Once a Skill is matched, the system loads SKILL.md, establishes tool permissions and behavioral boundaries, and then reasons with the context.
-
Allowed external tools are called only when truly needed; otherwise, logic is completed within the rules.
-
The final result is output after constraint integration, and the user's next input triggers a new full round of the flow.

The minimal structure of a Skill
my-skill/
└── SKILL.md (唯一必需)
SKILL.md basic template:
---
name: your-skill-name
description: What it does and when Claude should use it
---
# Skill Title
## Instructions
Clear, concrete, actionable rules.
## Examples
- Example usage 1
- Example usage 2
## Guidelines
- Guideline 1
- Guideline 2
Metadata fields:
| Field | Required | Description |
|---|---|---|
| name | No | The Skill's display name; defaults to the directory name; only lowercase letters, digits, and hyphens are supported (max 64 characters) |
| description | Recommend | The Skill's purpose and use cases; Claude uses it to decide whether to apply it automatically |
| argument-hint | No | Parameter hints shown during autocomplete, such as [issue-number]、[filename] [format] |
| disable-model-invocation | No | Set to true Prevents Claude from triggering automatically; manual invocation only /name (defaults to false) |
| user-invocable | No | Set to false From the / Hidden from the menu, used as a background enhancement (defaults to true) |
| allowed-tools | No | Tools Claude may use without authorization when the Skill is active |
| model | No | The model used when the Skill is active |
| context | No | Set to fork when running in a subagent context |
| agent | No | Subagent type (used with context: fork) |
| hooks | No | Skill lifecycle hook configuration |
Skills support inserting dynamic variables in their content:
| Variables | Description |
|---|---|
$ARGUMENTS |
All arguments passed in when the Skill is invoked |
$ARGUMENTS[N] |
Access arguments by index, such as $ARGUMENTS[0] |
$N |
Shorthand form, such as $0 represents the first argument |
${CLAUDE_SESSION_ID} |
The current session ID, used for logs, temp files, and associated output |
For example:
---
name: session-logger
description: 记录当前会话活动
---
Please write the following content to the log file:
logs/${CLAUDE_SESSION_ID}.log
$ARGUMENTS
Call:
/session-logger 用户登录成功
A session-specific log record is actually generated.
The core composition of a SKILL.md file
Take Claude's PDF document editing skill as an example: Claude can natively parse PDFs but cannot manipulate them directly (such as filling in forms); this skill fills that gap.
- **Core form:** a directory containing SKILL.md
- **Required metadata:** a YAML block at the top of SKILL.md that must include name and description; preloaded into the system prompt at startup

Multi-file Skills (progressive disclosure)
The progressive disclosure mechanism
- Layer 1: metadata → lets Claude judge which scenarios a skill applies to, without loading all the content
- Layer 2: SKILL.md body → once relevance is determined, load the full context
- Layer 3+: attached files (such as forms.md) → referenced on demand to keep the core file small

The figure below shows how the context window changes when a user message triggers a skill:

- Initial state: the context window contains the system prompt, skill metadata, and user instruction
- Call the Bash tool to read the target SKILL.md, triggering the corresponding skill
- Load attached files (such as forms.md) on demand
- Execute the user's task after loading is complete
Recommended directory structure
To avoid context bloat:
- Core rules →
SKILL.md - Detailed information → separate files
- Practical logic → executed as scripts (not loaded)
Recommended structure:
my-skill/
├── SKILL.md
├── reference.md
├── examples.md # 存放示例文件
└── scripts/
└── helper.py
The First Skill
Let's forget the complicated creation process for now and start first with using a ready-made Skill to begin, and feel the convenience it brings.
Create the Skill directory
Skills are stored in ~/.claude/skills/ (personal global) or in .claude/skills/ under the project directory (project-specific).
This section tests under the project directory; first create a directory claude-test:
mkdir claude-test
Enter that directory and create the skills directory and files:
mkdir -p .claude/skills/python-naming-standard
Write the configuration file SKILL.md
Create SKILL.md in the directory; this is the brain of the Skill, telling Claude when to use it.
---
name: Python 内部命名规范技能
description: 当用户要求重构、审查或编写 Python 代码时,请参考此规范。
---
## 指令
1. 所有的内部辅助函数必须以 `_internal_` 前缀命名。
2. 如果发现不符合此规则的代码,请自动提出修改建议。
3. 在执行 `claude commit` 前,必须检查此规范。
## Reference Example
- 正确:`def _internal_calculate_risk():`
- 错误:`def _calculate_risk():`
Field requirements:
- name: must use only lowercase letters, digits and hyphens (up to 64 characters)
- description: a brief description of the Skill and when to use it (up to 1024 characters)
After creation, the file structure is as follows:

Your project should now look like this:
my-project/
├─ src/
│ └─ test.py # 项目源码
├─ .claude/
│ ├─ skills/
│ │ └─ hello-world/
│ │ ├─ skill.md # Skill 定义(YAML + Instructions,机器可执行)
│ │ └─ README.md # Skill 说明(人类阅读,可选)
│ └─ config.yml # Claude 项目级配置(可选)
├─ .gitignore
└─ README.md # 项目整体说明
Next, run the following command in the terminal to start Claude Code:
claude
Enter the task:
帮我写一个计算用户折扣的函数
Claude will then scan the installed Skills, find that your request involves "Python code writing", and match python-naming-standard.

It will generate the following code according to the requirements in SKILL.md:
def _internal_get_discount(user_score):
# Calculate logic...
return discount
Add resource files (optional)
We can also add the following directories under .claude/skills/:
Add in the same folder:
examples/: stores example files.references/: stores reference documents.scripts/: stores executable scripts (e.g., Python processing PDFs).
Then reference them in SKILL.md:
查看示例 commit:./examples/good-commit.txt
运行脚本:使用工具执行 ./scripts/process.py
Official marketplace
Besides writing your own, you can also leverage the Agent Skills open standard released in late 2025:
- Official marketplace: visit https://github.com/anthropics/skills a repository to download preset skills (such as React optimizers and SQL tuning tools).
- Skill Creator: you can tell Claude, "Summarize the Docker configuration logic I just taught you into a Skill," and it will automatically generate the files in the appropriate directory.
We can register this repository as a Claude Code plugin marketplace simply by running the following command in Claude Code:
/plugin marketplace add anthropics/skills

Then you can use /plugin to view it:

Steps to install a specific skill set:
- Browse and install plugins
-
Select the anthropic-agent-skills plugin source
-
Select document-skills or example-skills

-
Click Install now

We can also install both types of plugins directly via commands:
/plugin install document-skills@anthropic-agent-skills
/plugin install example-skills@anthropic-agent-skills
**Note:** skills installed via plugins are located under ~/claude/plugins/marketplaces/.
After plugin installation, you need to restart Claude Code.
To use a skill, simply mention its name in your instruction. For example, after installing the document-skills plugin, you can give Claude Code an instruction like:
使用 PDF 技能提取 path/to/some-file.pdf 文件中的表单字段
Or create a PPT:
创建一个 Agent Skill 的演示文稿
You can see that it called /document-skills:pptx:

and started generating:

Then it will tell you the location of the generated file:

A Collection of Agent Skills Resources
| Resource description | link |
|---|---|
| Skill aggregation portal | https://skills.sh/ |
| Skills marketplace (Chinese interface) | https://skillsmp.com/zh |
| Official Agent Skills standard site | https://agentskills.io |
| Anthropic official engineering article (practical concepts behind Agent Skills) | https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills |
| VS Code Copilot Agent Skills documentation | https://code.visualstudio.com/docs/copilot/customization/agent-skills |
| Anthropic official Skills GitHub repository | https://github.com/anthropics/skills |
| Curated list of Claude skills (Awesome series) | https://github.com/ComposioHQ/awesome-claude-skills |
| A collection of software development automation workflow Skills | https://github.com/obra/superpowers |
| A Skill that auto-generates Skills (official example) | https://github.com/anthropics/skills/tree/main/skills/skill-creator |