产品介绍

Write a Skill

This page is for Skill authors: organize SKILL.md, declare its sources, and choose subagent scope. For installation, loading checks, and updates, see Use Skills.

Write the minimal file

A Skill is a directory containing SKILL.md. The model initially sees its name and description and reads the body on demand. Match the directory name to the frontmatter name, for example concise-analysis/SKILL.md:

---
name: concise-analysis
description: Explain supplied analysis results with their units, evidence, and limitations.
---

# Explain an analysis result

1. State the question, scope, and units of the supplied data.
2. Cite the actual results provided in the conversation or files.
3. Explain the main finding and identify missing evidence.
4. Do not invent values or claim that unperformed queries have run.

This example provides instructions without an additional tool dependency. Mentioning a tool in a Skill does not register that tool. The repository's number-summary is a combined example: it calls common__summarize_numbers, so the common plugin supplying that tool must also be installed and enabled. Copying that Skill alone does not make the tool available.

See Skill metadata for format, required fields, and size limits.

Declare Skill sources

Source Author declaration
Standalone Skill <home>/skills/<name>/SKILL.md; source label is User
Plugin Skill Declare plugin-relative directories in manifest skills; source label is the plugin ID
skills/ next to an explicit product YAML Not automatically discovered; do not use it as a delivery convention

Manifest fragment:

skills:
- skills

This scans skills/ under the plugin root, with a SKILL.md in each child directory. Home and enabled-plugin Skills compile together. Multiple sources may reference one real file; the same name pointing to different files fails compilation. See Use Skills and Use plugins for installation and enabling.

Choose scope and verify behavior

The root Agent uses all compiled Skill sources. A subagent that omits skills inherits the root's compiled sources; a list selects those plugin-relative paths, and skills: [] loads none. The built-in general-purpose inherits its parent's sources; a plugin declaration with that name uses the plugin's own settings.

Save the minimal example to <Home>/skills/concise-analysis/SKILL.md and start a new session with the default root Agent. Ask “Use concise-analysis to interpret these monthly sales: January CNY 120, February CNY 150, March unknown.” Check that the turn read this SKILL.md. The result should retain the units, identify the CNY 30 increase, and flag missing March data. Discovery alone does not show that the Skill was used. If it names a tool, check that the current Agent has that tool. Compiled entries do not load root Skills.

Extension refresh scans metadata for the new revision, while the body is read from files on demand. Checkpoints do not version Skill source files; content already read by the model can appear in conversation messages. See extension lifecycle for refresh and restart boundaries during development.