/
Skills

Create Your Own Claude Skill

Building a Claude Skill is as simple as writing a Markdown file. If you can describe a process step by step, you can create a skill. Here's everything you need to know.

The SKILL.md Format

Every skill is a directory containing at minimum one file: SKILL.md. This file has two parts — YAML frontmatter for metadata, and Markdown content for instructions.

Minimal example: SKILL.md

---
name: Code Review Helper
description: Performs thorough code reviews focusing on bugs, security, and best practices
triggers:
  - code review
  - review this code
  - check my code
---

# Code Review Skill

When asked to review code, follow this structured process:

## 1. Security scan
Look for common vulnerabilities: SQL injection, XSS, path traversal,
hardcoded secrets, and insecure dependencies.

## 2. Logic review
Check for off-by-one errors, null pointer issues, race conditions,
and unhandled edge cases.

## 3. Style and best practices
Evaluate naming conventions, function length, code duplication,
and adherence to project patterns.

## 4. Output format
Present findings as a prioritized list: Critical > Warning > Suggestion.
Include line numbers and specific fix recommendations.

Frontmatter Fields

name(required)

Human-readable name displayed in the skills list. Keep it short and descriptive.

description(required)

One-sentence explanation of what the skill does. This is what Claude reads to decide whether to activate the skill.

triggers(recommended)

List of keywords or phrases that hint when this skill is relevant. Claude uses these along with the description to auto-detect when to apply the skill.

Writing Effective Instructions

The body of SKILL.md is where the magic happens. Here are tips for writing instructions that produce consistent, high-quality results:

Be specific, not vague

Instead of "write good code", specify exactly what "good" means: "Use TypeScript strict mode, prefer const over let, extract functions over 20 lines, add JSDoc for public APIs."

Include examples

Show Claude what good output looks like. Include before/after examples, sample outputs, or templates. Concrete examples are worth more than abstract rules.

Define a clear process

Break complex tasks into numbered steps. This prevents Claude from skipping important phases and makes the output more predictable.

Handle edge cases

Anticipate what could go wrong. "If the file is empty, inform the user instead of proceeding" or "If the API returns an error, retry once then report the issue."

Skill Directory Structure

A skill can be a single file or include supporting assets:

my-skill/
├── SKILL.md          # Required — main instructions
├── templates/        # Optional — template files
│   └── report.html
├── examples/         # Optional — reference examples
│   ├── good.md
│   └── bad.md
└── assets/           # Optional — images, data, etc.
    └── logo.png

Testing Your Skill

Before sharing your skill, test it thoroughly:

1. Install it locally: cp -r my-skill ~/.claude/skills/my-skill
2. Test the trigger — ask Claude something that should activate the skill
3. Test edge cases — give it unusual inputs, empty files, wrong formats
4. Iterate — refine instructions based on what Claude gets wrong

Sharing Your Skill

Once your skill is working well, share it with the community:

GitHub — Push your skill to a public repository. Include a README explaining what it does and how to install it. Use the claude-skill topic tag.

Our directory — Skill submission is coming soon. In the meantime, share your skills on GitHub with the claude-skill topic tag.

Pro tip: Use the Skill Creator skill

Anthropic's official Skill Creator skill helps you build skills interactively. It guides you through the frontmatter, helps structure your instructions, and even tests the skill for you. Install it from our directory and let Claude help you build skills for Claude.

Browse Existing SkillsWhat Are Skills?