Create an Agent Skill
A step-by-step guide to writing, validating, and publishing your first SKILL.md.
Create the folder structure
A skill is just a folder with a SKILL.md file inside it. The folder name must match the skill name in your frontmatter.
Write the frontmatter
Start your SKILL.md with YAML frontmatter. Two fields are required: name and description.
name: Lowercase letters, numbers, and hyphens only. Max 64 characters. Must match the folder name.
description: What the skill does and when to use it. Be specific — agents use this to decide whether to activate the skill. Max 1024 characters.
Write the instructions
After the frontmatter, write markdown instructions. There are no format restrictions — use whatever structure helps the agent succeed.
Add supporting files (optional)
Skills can include additional directories for scripts, references, and assets. These are loaded on demand by the agent.
Validate
Use the skills-ref reference library to check your skill follows the spec:
This checks that your frontmatter is valid, naming conventions are followed, and the skill structure is correct.
Publish
Push your skill to a GitHub repository, then submit it to the marketplace:
Or submit manually through the website.
Best Practices
- 1.Write for the agent, not the human. Be explicit about steps, file paths, and expected outputs.
- 2.Write a great description. This is what agents use to decide whether to activate your skill. Include specific keywords.
- 3.Include “when to use” and “when NOT to use” sections. Clear boundaries prevent the skill from being activated for the wrong task.
- 4.Keep SKILL.md under 500 lines. Move detailed references to separate files for efficient context use.
- 5.Test with multiple agents. Try your skill with Claude Code, Cursor, and at least one other compatible agent.
- 6.Handle errors gracefully. Include fallback instructions for when scripts fail or dependencies are missing.