---
title: "SKILL.md Format: Fields, Rules, and an Example | Prettify"
description: "What a Claude SKILL.md file is: YAML frontmatter with name and
  description, then Markdown instructions. See the fields, rules, and an
  example, then edit one free."
url: https://prettify.tools/skill-md
---

# SKILL.md: The Claude Skill File Format

A SKILL.md is the file that defines a skill for Claude. It starts with YAML frontmatter that holds a name and a description, followed by Markdown instructions that Claude reads when it uses the skill. This page covers the fields Claude Code reads, the rules a valid file follows, and an example.

## The structure of a SKILL.md

Each skill is a folder that holds a SKILL.md file, plus optional scripts and reference files. In Claude Code, personal skills live in \~/.claude/skills/\<name>/SKILL.md and project skills in .claude/skills/\<name>/SKILL.md.

The file has two parts. The frontmatter, between two --- lines at the top, is YAML that tells Claude what the skill is and when to use it. Below it, the body is ordinary Markdown: the steps, rules, and examples Claude follows once it loads the skill. Here is a short, complete example:

```
---
name: review-pr
description: Review a pull request for correctness and style. Use when the user asks for a code review.
allowed-tools: Bash(gh pr diff:*)
---

# Review a pull request

Read the diff, then report findings from most to least severe.

1. Run `gh pr diff`.
2. Read each changed file in full.
3. List each finding with its file and line.
```

## Frontmatter fields Claude Code reads

In Claude Code every field is optional, and Claude Code ignores a key it does not know without an error. A misspelled key therefore fails silently. These are the fields most skills use.

- name is the command that runs the skill, such as /review-pr. It defaults to the folder name.
- description says what the skill does and when to use it. Claude reads it to decide when to load the skill. If it is missing, Claude Code uses the first non-empty line of the body.
- when\_to\_use adds trigger phrases or example requests. It is added to the description in the skill list.
- allowed-tools lists tools Claude can use without asking during the turn that runs the skill.
- disable-model-invocation: true makes the skill run only when you type its command. user-invocable: false means only Claude can invoke it.
- argument-hint shows the expected arguments in autocomplete.
- model and effort set the model and the effort level while the skill runs.
- context: fork runs the skill in a subagent, and agent picks the subagent type.

## Rules and limits

The Agent Skills specification sets the name rule: 1 to 64 lowercase letters, digits, and single hyphens, with no hyphen at the start or end. It also asks for a description of 1,024 characters or fewer. Claude Code shows only the first 1,536 characters of the description and when\_to\_use together.

The Claude Code docs say to keep the body under 500 lines. Move long reference material into separate files in the skill folder, and link to them from SKILL.md. The effort key takes low, medium, high, xhigh, or max, and the context key takes fork.

## How to edit and check a SKILL.md in Prettify

The box on this page opens a skill in the Preview, where the frontmatter is a card and the instructions are a document you can type in. The Add properties button inserts name and description for a file with no frontmatter.

1. Paste your SKILL.md into the box, or select Try an example.
2. Read the line above the result. It lists the frontmatter keys and flags a YAML error.
3. Select Open in Preview to load the file into the editor.
4. Edit name, description, and other keys in the Properties card. Use Edit YAML for a list.
5. Edit the instructions in the Preview, or switch to Raw for the source.
6. Run Skill Check in the Problems panel. It is a Pro feature.

## Worked example: a skill with arguments

This skill takes a version number and only runs when you type its command. It uses a list of allowed tools, written as one string, and sets a medium effort.

The argument-hint value is in quotes. Without quotes, \[version] is a YAML list, not text.

```
---
name: release-notes
description: Draft release notes from merged pull requests. Use when the user asks for a changelog or a release summary.
when_to_use: Also use when the user asks what shipped this week.
argument-hint: "[version]"
disable-model-invocation: true
allowed-tools: Bash(gh pr list:*) Bash(git log:*)
effort: medium
---

# Draft release notes

Write the notes for version $ARGUMENTS.

1. List the pull requests merged since the last tag.
2. Group them under Added, Changed, and Fixed.
3. Write one plain sentence for each pull request.
```

## Reading the example

You run this skill by typing /release-notes with a version. The text after the command replaces $ARGUMENTS in the body. Because disable-model-invocation is true, Claude does not start the skill on its own.

The allowed-tools line lets Claude run gh pr list and git log without asking during that turn. Skill Check finds no issue in this file. If you delete the description line, it reports an error that tells you to add one.

## Common use cases

Skills fit tasks that you repeat and describe in the same way each time. These are examples of skills that people write, from small checklists to larger workflows.

- A review checklist for pull requests.
- A release notes writer that runs from a command with a version.
- A migration guide that Claude loads only when a question matches its description.
- A project skill committed to the repository so the whole team shares it.

## Frequently asked questions

### What is a SKILL.md file?

It is the file that defines a Claude skill. YAML frontmatter at the top gives the skill a name and a description, and the Markdown body below holds the instructions Claude follows when it uses the skill.

### Which fields are required?

The Agent Skills specification requires name and description. In Claude Code every field is optional: the name defaults to the folder name. Claude reads the description to decide when to use the skill, so always write one.

### How long can the description be?

The Agent Skills specification allows up to 1,024 characters. Claude Code shows the first 1,536 characters of the description and when\_to\_use together, so put the most important words first.

### How long can the body be?

The Claude Code docs say to keep it under 500 lines. Put long reference material in separate files in the skill folder and link to them from SKILL.md, so Claude reads them only when it needs them.

### Where does a SKILL.md go?

In a folder named for the skill. For Claude Code, that is \~/.claude/skills/\<name>/SKILL.md for a personal skill, or .claude/skills/\<name>/SKILL.md inside a project.

### How do I check a SKILL.md?

Open it in Prettify. YAML errors in the frontmatter show for free. Skill Check (Pro) tests the name, the description, the keys, and the body length.

## Related tools

- [Claude Skill Validator](https://prettify.tools/claude-skill-validator)
- [Online Markdown Editor](https://prettify.tools/markdown-editor)
- [Markdown Formatter](https://prettify.tools/markdown-formatter)
- [Markdown Preview](https://prettify.tools/markdown-preview)
- [MDX Formatter](https://prettify.tools/mdx-formatter)
- [MDX Preview](https://prettify.tools/mdx-preview)

## Structured data

```json
{
  "@context": "https://schema.org",
  "@type": "SoftwareApplication",
  "name": "Prettify",
  "url": "https://prettify.tools",
  "description": "Multi-format data viewer, editor, and query engine for JSON, YAML, CSV, XML, Mermaid, Markdown, MDX, HTML, and SVG",
  "applicationCategory": "DeveloperApplication",
  "operatingSystem": "Web, macOS, Windows, Linux",
  "offers": [
    {
      "@type": "Offer",
      "price": "0",
      "priceCurrency": "USD",
      "description": "Free tier with core features"
    },
    {
      "@type": "Offer",
      "price": "19.99",
      "priceCurrency": "USD",
      "description": "Pro: lifetime access to all features"
    }
  ],
  "publisher": {
    "@id": "https://prettify.tools/#organization"
  }
}
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "@id": "https://prettify.tools/#organization",
  "name": "Prettify",
  "legalName": "Off Leash Labs",
  "url": "https://prettify.tools/",
  "logo": {
    "@type": "ImageObject",
    "url": "https://prettify.tools/icon-512.png",
    "width": 512,
    "height": 512
  },
  "contactPoint": {
    "@type": "ContactPoint",
    "contactType": "customer support",
    "email": "offleashlabs@gmail.com",
    "availableLanguage": "English"
  }
}
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "WebPage",
      "@id": "https://prettify.tools/skill-md",
      "url": "https://prettify.tools/skill-md",
      "name": "SKILL.md Format: Fields, Rules, and an Example | Prettify",
      "description": "What a Claude SKILL.md file is: YAML frontmatter with name and description, then Markdown instructions. See the fields, rules, and an example, then edit one free.",
      "isPartOf": {
        "@type": "WebSite",
        "name": "Prettify",
        "url": "https://prettify.tools"
      }
    },
    {
      "@type": "FAQPage",
      "mainEntity": [
        {
          "@type": "Question",
          "name": "What is a SKILL.md file?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "It is the file that defines a Claude skill. YAML frontmatter at the top gives the skill a name and a description, and the Markdown body below holds the instructions Claude follows when it uses the skill."
          }
        },
        {
          "@type": "Question",
          "name": "Which fields are required?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "The Agent Skills specification requires name and description. In Claude Code every field is optional: the name defaults to the folder name. Claude reads the description to decide when to use the skill, so always write one."
          }
        },
        {
          "@type": "Question",
          "name": "How long can the description be?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "The Agent Skills specification allows up to 1,024 characters. Claude Code shows the first 1,536 characters of the description and when_to_use together, so put the most important words first."
          }
        },
        {
          "@type": "Question",
          "name": "How long can the body be?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "The Claude Code docs say to keep it under 500 lines. Put long reference material in separate files in the skill folder and link to them from SKILL.md, so Claude reads them only when it needs them."
          }
        },
        {
          "@type": "Question",
          "name": "Where does a SKILL.md go?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "In a folder named for the skill. For Claude Code, that is ~/.claude/skills/<name>/SKILL.md for a personal skill, or .claude/skills/<name>/SKILL.md inside a project."
          }
        },
        {
          "@type": "Question",
          "name": "How do I check a SKILL.md?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "Open it in Prettify. YAML errors in the frontmatter show for free. Skill Check (Pro) tests the name, the description, the keys, and the body length."
          }
        }
      ]
    }
  ]
}
```
