Expert guide for creating, structuring, and documenting Agent Skills following the official specification. Use when you need to create a new Agent Skill, understand the Agent Skills format, or improve existing skill documentation.
npx playbooks add skill kehwar/experiments --skill skill-writer
This skill provides comprehensive guidance for creating Agent Skills that follow the official [Agent Skills specification](https://agentskills.io/specification). Agent Skills are a simple, open format for giving agents new capabilities and expertise through folders of instructions, scripts, and resources.
Agent Skills are:
Every Agent Skill lives in its own directory:
skill-name/
├── SKILL.md # Required: Main skill file with metadata and instructions
├── scripts/ # Optional: Helper scripts or tools
├── references/ # Optional: Supporting documentation
└── assets/ # Optional: Images, files, or other resources
The SKILL.md file is the heart of every skill. It has two parts:
At the top of SKILL.md, include YAML frontmatter with metadata:
---
name: skill-name # Required: lowercase, max 64 chars, matches folder name
description: Brief description # Required: max 1024 chars, explain what and when
license: MIT # Optional: license identifier or file path
compatibility: Linux, Python 3.10+ # Optional: system requirements
metadata: # Optional: custom key-value pairs
author: your-name
version: "1.0"
category: development
allowed-tools: tool1 tool2 # Optional/Experimental: approved tools
---
Required Fields:
name: Skill identifier (lowercase, hyphens allowed, no consecutive hyphens)description: Clear explanation of:Optional Fields:
license: License type (e.g., MIT, Apache-2.0) or path to LICENSE filecompatibility: System requirements, dependenciesmetadata: Any additional info (author, version, tags, etc.)allowed-tools: List of tools the skill can use (experimental feature)After the frontmatter, write clear instructions in markdown format:
# Skill Name Guide
## Overview
Brief introduction to the skill's purpose and capabilities.
## Quick Start
Simple example to get started quickly.
## Main Instructions
Step-by-step guidance organized by task or feature.
## Common Tasks
Frequent use cases with examples.
## Examples
Real-world examples with input/output.
## Troubleshooting
Common issues and solutions.
## Reference
Additional details, edge cases, advanced usage.
Best Practices:
scripts/
references/
assets/
Here's a minimal but complete skill:
hello-world/
└── SKILL.md
hello-world/SKILL.md:
---
name: hello-world
description: Simple example skill that demonstrates the basic structure of an Agent Skill. Use this as a template when creating new skills.
license: MIT
metadata:
author: example
version: "1.0"
---
# Hello World Skill
## Overview
This is a minimal example skill that demonstrates the Agent Skills format.
## Instructions
To use this skill:
1. Create a file called `hello.txt`
2. Write "Hello, World!" to the file
3. Display the contents
## Example
echo "Hello, World!" > hello.txt
cat hello.txt
Expected output:
Hello, World!
## Next Steps
Use this template to create more complex skills with additional features.
When creating a new skill, verify:
name field in frontmattername field is present (required)description field is present and clear (required)Focus on accomplishing specific tasks:
Provide specialized knowledge:
Guide multi-step processes:
Good names:
pdf-processingweb-testingapi-documentationcode-reviewAvoid:
PDFProcessing (uppercase)pdf_processing (underscores)pdfproc (unclear abbreviation)skill-1 (not descriptive)Before finalizing a skill:
For complex skills, organize content across multiple files:
advanced-skill/
├── SKILL.md # Main instructions and quick start
├── references/
│ ├── api.md # Detailed API documentation
│ ├── examples.md # Extended examples
│ └── troubleshoot.md
├── scripts/
│ ├── setup.sh # Installation script
│ └── helper.py # Utility functions
└── assets/
└── diagram.png # Visual aids
Reference from SKILL.md:
For detailed API documentation, see [references/api.md](references/api.md).
When including scripts:
chmod +x script.sh)#!/bin/bash or #!/usr/bin/env python3)Example script reference:
## Installation
Run the setup script:
chmod +x scripts/setup.sh
./scripts/setup.sh
The script will:
1. Check system requirements
2. Install dependencies
3. Configure the environment
Use the allowed-tools field (experimental) to specify approved tools:
---
name: secure-skill
description: Skill with restricted tool access
allowed-tools: pdftotext qpdf
---
This helps ensure skills only use vetted, secure tools.
Agent Skills provide a simple, powerful way to give AI agents specialized capabilities. By following this guide and the official specification, you can create high-quality skills that work across platforms and help agents perform better at specific tasks.
Start simple, iterate based on feedback, and share your skills with the community!
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.