Complete reference for the SKILL.md file format, including YAML frontmatter, markdown body, and best practices for writing effective skill instructions.
The SKILL.md file is the core of every skill. It contains YAML frontmatter with metadata and a markdown body with instructions that the AI agent will follow when the skill is active.
YAML Frontmatter - Metadata enclosed in --- delimiters
Markdown Body - Instructions, examples, and guidelines
---name: my-skill-namedescription: A clear description of what this skill does and when to use itcompatibility: [optional] Required tools or dependencies---# Skill Instructions[Markdown content with instructions, examples, and guidelines]
Complete description of what the skill does and when to use it. This is the primary triggering mechanism - include both capabilities and specific contexts for when to use the skill.The description should be “pushy” to combat Claude’s tendency to under-trigger skills. Include:
What the skill does
When to use it (specific contexts, keywords, scenarios)
What it enables
description: Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
## Output FormatGenerate a JSON file with this structure:```json{ "name": "string", "version": "string", "dependencies": []}
Ensure all fields are present and properly formatted.
#### Multi-Step Workflows```markdown## Process### Phase 1: Research and Planning1. Review the API documentation2. Identify key endpoints to implement3. Plan authentication approach### Phase 2: Implementation1. Set up project structure2. Implement core infrastructure3. Implement individual tools### Phase 3: Testing1. Create test cases2. Run validation scripts3. Review results
## Platform-Specific Instructions**For TypeScript:**- Use Zod for input validation- Use the MCP TypeScript SDK- Follow the TypeScript guide in references/**For Python:**- Use Pydantic for input validation- Use the MCP Python SDK- Follow the Python guide in references/
## Error HandlingWhen errors occur:1. Read the error message carefully2. Check if the issue is in the bundled documentation3. Provide actionable error messages to the user4. Suggest specific next stepsCommon errors:- **Authentication failed**: Check API credentials in environment variables- **Rate limit exceeded**: Wait 60 seconds and retry- **Invalid input**: Validate against the schema in references/schema.md
Balance general principles with specific examples:
## Tool NamingUse clear, action-oriented names that describe what the tool does.Consistent prefixes help with discoverability.**Examples:**- `github_create_issue` - Creates a new GitHub issue- `github_list_repos` - Lists repositories- `github_update_pr` - Updates a pull requestNotice the pattern: `service_action_resource`
If you find yourself writing ALWAYS or NEVER in all caps frequently, consider whether you can explain the reasoning instead. Rigid structures work less well than flexible guidelines grounded in understanding.
Instead of:
You MUST ALWAYS create a validation script.You MUST NEVER skip error handling.ALWAYS use the exact template provided.
Try:
Validation scripts catch errors early and can be reused across runs.Write a validation script for any objectively verifiable requirements.Error handling helps agents recover gracefully and provides clear feedback.Include specific error messages and suggested next steps.
---name: commit-message-formatterdescription: Format git commit messages following conventional commits specification. Use when creating commits, formatting commit messages, or standardizing repository commit history.---# Commit Message FormatterFormat git commit messages following the Conventional Commits specification.## FormatUse this structure:
## Types- **feat**: New feature- **fix**: Bug fix - **docs**: Documentation only- **style**: Formatting, missing semicolons, etc.- **refactor**: Code change that neither fixes a bug nor adds a feature- **test**: Adding missing tests- **chore**: Changes to build process or auxiliary tools## Examples**Example 1:**Input: Added user authentication with JWT tokensOutput: `feat(auth): implement JWT-based authentication`**Example 2:**Input: Fixed crash when user logs out Output: `fix(auth): prevent crash on logout`**Example 3:**Input: Updated README with API documentationOutput: `docs(api): add endpoint documentation to README`## Guidelines- Keep description under 72 characters- Use present tense ("add" not "added")- Don't capitalize first letter of description- No period at the end of description- Scope is optional but recommended