Skill Creation
Create Agent Skills following the agentskills.io specification for platform-agnostic AI capabilities.
When to Use This Skill
- Creating a new skill from scratch
- Converting an existing prompt to skill format
- Refactoring or validating existing skills
- Understanding skill structure and best practices
Asset Resolution
- Check
./assets/skill-template.md for the SKILL.md template
- If not found, search
**/skill-template.md in repository
- If still not found, use the specification below to generate from scratch
Process
Step 1: Gather Context
Before creating a skill, understand:
- Purpose: What task does this skill accomplish?
- Triggers: What keywords or scenarios should activate this skill?
- Inputs: What information does the agent need from the user?
- Outputs: What should the agent produce?
- Assets: Are there templates or reference materials needed?
When refactoring from existing prompt/content:
Analyze the original for critical elements that must be preserved:
| Element |
Look For |
Why It Matters |
| Safety mechanisms |
Read-only operations, forbidden actions, pipe to cat |
Prevents destructive actions |
| Setup instructions |
cd to directory, environment prep |
Ensures correct execution context |
| Role/persona |
"You are a..." statements |
Sets expertise level and tone |
| Tool guidance |
MCP tools, remote APIs, search patterns |
Enables deeper analysis |
| User consultation |
Questions to ask user |
Ensures alignment with intent |
| Edge cases |
Error handling, fallbacks |
Improves robustness |
Active user feedback: Present your analysis of what to keep, improve, or remove. Ask:
- Are there critical behaviors to preserve?
- What should be improved or modernized?
- Any new requirements to add?
Step 2: Create Directory Structure
skill-name/
├── SKILL.md # Required: instructions + frontmatter
├── README.md # Required: human documentation
├── assets/ # Optional: templates, static resources
├── references/ # Optional: detailed docs, acceptance criteria
└── scripts/ # Optional: executable code
Naming rules (from agentskills.io):
- Lowercase letters, numbers, and hyphens only
- 1-64 characters
- No leading/trailing hyphens
- No consecutive hyphens (
--)
- Directory name must match
name field in frontmatter
Step 3: Write SKILL.md
Read the skill template from Asset Resolution. Fill in all bracket placeholders with project-specific values.
Frontmatter guidelines:
description: 1-1024 chars. First sentence: what the skill does. Second sentence: when to use it, including trigger keywords.
license: Project license name or file reference
- See Specification Reference below for all available fields
Body guidelines:
- Adapt template sections to the skill's domain - remove unused optional sections, add domain-specific ones
- For skills interacting with external systems, uncomment and fill in the Safety section (the template provides the pattern)
- Keep under 500 lines; move supplementary detail to
references/
Step 4: Create Assets (if needed)
Place templates in assets/ subdirectory:
- Use descriptive names:
{purpose}-template.md
- Templates should be self-documenting with placeholders
- Include version footer in templates
Step 5: Create README.md
Create human-readable documentation with: description, quick start, file listing, and related links. Follow the pattern of existing skill READMEs in the repository.
Output Format
When creating a skill, produce three files:
- SKILL.md - Complete with frontmatter and body
- README.md - Human documentation
- assets/*.md - Template files (if applicable)
Present each file in a markdown code block with the filename as header.
Constraints
- Frontmatter: Must be valid YAML with
name and description
- Name matching: Directory name must equal
name field
- Line limit: Keep SKILL.md under 500 lines (move details to references/)
- Token budget: Body should be <5000 tokens for efficient loading
- Progressive disclosure: Only essential instructions in SKILL.md; details in assets/references
- Asset resolution: Always instruct to check local
./assets/ first, then search
- Characters: QWERTY keyboard typeable only - no em-dashes, smart quotes, emojis, or special Unicode. Exception:
↑ for ToC navigation
Specification Reference
Full specification: agentskills.io/specification
Frontmatter Fields
| Field |
Required |
Constraints |
name |
Yes |
1-64 chars, lowercase, hyphens, must match directory |
description |
Yes |
1-1024 chars, what + when + triggers |
license |
No |
License name or file reference |
compatibility |
No |
Environment requirements (1-500 chars) |
metadata |
No |
Key-value pairs (author, version, etc.) |
allowed-tools |
No |
Space-delimited tool list (experimental) |
Optional Directories
| Directory |
Purpose |
When to Use |
assets/ |
Templates, images, data files, static resources |
Skill produces output based on templates |
references/ |
Detailed docs, acceptance criteria, domain-specific files |
SKILL.md exceeds 500 lines or needs test criteria |
scripts/ |
Executable code (Python, Bash, JavaScript) |
Skill needs to run code for reliable execution |
Skill Creation Skill v1.2.0 - KemingHe/common-devx
1---2name: skill-creation-33description: Create or refactor Agent Skills following the agentskills.io specification. Use when creating new skills, converting prompts to skills, or validating skill structure. Triggers: "create skill", "new skill", "SKILL.md", "agent skill", "convert prompt".4license: MIT5---6
7# Skill Creation
8
9Create Agent Skills following the [agentskills.io](https://agentskills.io) specification for platform-agnostic AI capabilities.
10
11## When to Use This Skill
12
13- Creating a new skill from scratch
14- Converting an existing prompt to skill format
15- Refactoring or validating existing skills
16- Understanding skill structure and best practices
17
18## Asset Resolution
19
201. Check `./assets/skill-template.md` for the SKILL.md template
212. If not found, search `**/skill-template.md` in repository
223. If still not found, use the specification below to generate from scratch
23
24## Process
25
26### Step 1: Gather Context
27
28Before creating a skill, understand:
29
30- **Purpose**: What task does this skill accomplish?
31- **Triggers**: What keywords or scenarios should activate this skill?
32- **Inputs**: What information does the agent need from the user?
33- **Outputs**: What should the agent produce?
34- **Assets**: Are there templates or reference materials needed?
35
36**When refactoring from existing prompt/content**:
37
38Analyze the original for critical elements that must be preserved:
39
40| Element | Look For | Why It Matters |
41| :--- | :--- | :--- |
42| **Safety mechanisms** | Read-only operations, forbidden actions, pipe to `cat` | Prevents destructive actions |
43| **Setup instructions** | `cd` to directory, environment prep | Ensures correct execution context |
44| **Role/persona** | "You are a..." statements | Sets expertise level and tone |
45| **Tool guidance** | MCP tools, remote APIs, search patterns | Enables deeper analysis |
46| **User consultation** | Questions to ask user | Ensures alignment with intent |
47| **Edge cases** | Error handling, fallbacks | Improves robustness |
48
49**Active user feedback**: Present your analysis of what to keep, improve, or remove. Ask:
50
51- Are there critical behaviors to preserve?
52- What should be improved or modernized?
53- Any new requirements to add?
54
55### Step 2: Create Directory Structure
56
57```plaintext
58skill-name/
59├── SKILL.md # Required: instructions + frontmatter
60├── README.md # Required: human documentation
61├── assets/ # Optional: templates, static resources
62├── references/ # Optional: detailed docs, acceptance criteria
63└── scripts/ # Optional: executable code
64```
65
66**Naming rules** (from [agentskills.io](https://agentskills.io)):
67
68- Lowercase letters, numbers, and hyphens only
69- 1-64 characters
70- No leading/trailing hyphens
71- No consecutive hyphens (`--`)
72- Directory name must match `name` field in frontmatter
73
74### Step 3: Write SKILL.md
75
76Read the skill template from Asset Resolution. Fill in all bracket placeholders with project-specific values.
77
78**Frontmatter guidelines**:
79
80- `description`: 1-1024 chars. First sentence: what the skill does. Second sentence: when to use it, including trigger keywords.
81- `license`: Project license name or file reference
82- See Specification Reference below for all available fields
83
84**Body guidelines**:
85
86- Adapt template sections to the skill's domain - remove unused optional sections, add domain-specific ones
87- For skills interacting with external systems, uncomment and fill in the Safety section (the template provides the pattern)
88- Keep under 500 lines; move supplementary detail to `references/`
89
90### Step 4: Create Assets (if needed)
91
92Place templates in `assets/` subdirectory:
93
94- Use descriptive names: `{purpose}-template.md`
95- Templates should be self-documenting with placeholders
96- Include version footer in templates
97
98### Step 5: Create README.md
99
100Create human-readable documentation with: description, quick start, file listing, and related links. Follow the pattern of existing skill READMEs in the repository.
101
102## Output Format
103
104When creating a skill, produce three files:
105
1061. **SKILL.md** - Complete with frontmatter and body
1072. **README.md** - Human documentation
1083. **assets/*.md** - Template files (if applicable)
109
110Present each file in a markdown code block with the filename as header.
111
112## Constraints
113
114- **Frontmatter**: Must be valid YAML with `name` and `description`
115- **Name matching**: Directory name must equal `name` field
116- **Line limit**: Keep SKILL.md under 500 lines (move details to references/)
117- **Token budget**: Body should be <5000 tokens for efficient loading
118- **Progressive disclosure**: Only essential instructions in SKILL.md; details in assets/references
119- **Asset resolution**: Always instruct to check local `./assets/` first, then search
120- **Characters**: QWERTY keyboard typeable only - no em-dashes, smart quotes, emojis, or special Unicode. Exception: `↑` for ToC navigation
121
122## Specification Reference
123
124Full specification: [agentskills.io/specification](https://agentskills.io/specification)
125
126### Frontmatter Fields
127
128| Field | Required | Constraints |
129| :--- | :--- | :--- |
130| `name` | Yes | 1-64 chars, lowercase, hyphens, must match directory |
131| `description` | Yes | 1-1024 chars, what + when + triggers |
132| `license` | No | License name or file reference |
133| `compatibility` | No | Environment requirements (1-500 chars) |
134| `metadata` | No | Key-value pairs (author, version, etc.) |
135| `allowed-tools` | No | Space-delimited tool list (experimental) |
136
137### Optional Directories
138
139| Directory | Purpose | When to Use |
140| :--- | :--- | :--- |
141| `assets/` | Templates, images, data files, static resources | Skill produces output based on templates |
142| `references/` | Detailed docs, acceptance criteria, domain-specific files | SKILL.md exceeds 500 lines or needs test criteria |
143| `scripts/` | Executable code (Python, Bash, JavaScript) | Skill needs to run code for reliable execution |
144
145---
146
147> Skill Creation Skill v1.2.0 - KemingHe/common-devx