Skip to content
codewithanjum
Claude

Claude skills: what they are and how to create your own

Claude skills explained: how SKILL.md works, where skills run, and how to create a Claude skill step by step with a real example folder you can copy today.

By Md Anjum Kamali · · 6 min read

Painting of a hand placing a block with a sunburst symbol on top of a small pyramid of coloured wooden blocks
On this page
  1. What is a Claude skill?
  2. What goes inside a skill folder?
  3. Where do Claude skills work?
  4. How to create a Claude skill step by step
  5. Useful frontmatter options in Claude Code
  6. Tips from writing a pile of these
  7. Questions people ask

Claude skills are folders of instructions that Claude loads only when a task needs them. Each one has a SKILL.md file with a name and a description at the top, and Claude reads that description to decide whether to pull in the rest. To create one, you make a folder, write a SKILL.md with a clear description, add any scripts or reference files, and either drop it into Claude Code's skills folder or upload it as a ZIP in the Claude apps.

I write a lot of these. I have skills for SEO audits, AI SEO, copywriting, programmatic SEO, YouTube scripts and one that holds my writing rules so nothing I publish reads like a chatbot wrote it. This guide is what I wish I'd had before the first one.

What is a Claude skill?

A Claude skill (Agent Skill) is a folder containing a SKILL.md file and any supporting files it needs, which Claude loads on demand when your request matches the skill's description.

The part that makes skills useful is how they load. Anthropic's engineering write-up on Agent Skills describes it in levels:

  1. At startup, Claude only sees each skill's name and description.
  2. When a task looks relevant, Claude reads the full SKILL.md body.
  3. If SKILL.md points to other files, Claude opens them only at the step that needs them.

So you can install twenty skills and pay almost nothing in context until one is actually used. That's the difference from stuffing everything into a system prompt or a giant CLAUDE.md.

What goes inside a skill folder?

Anthropic's guide to creating custom skills lays out the structure. Only SKILL.md is required.

Item Required? What it's for
SKILL.md Yes Frontmatter (name, description) plus the instructions
scripts/ No Code Claude runs as part of the workflow
references/ No Longer docs Claude reads when a step needs them
assets/ No Templates, images or lookup data Claude copies or fills in

The frontmatter has two fields you care about:

  • name: lowercase letters, numbers and hyphens, up to 64 characters, and it must match the folder name
  • description: what the skill does and when to use it, up to 1,024 characters

The description is the trigger. If it's vague, Claude won't load the skill when you want it to. If it's too broad, it loads when you don't.

Where do Claude skills work?

Skills run in more places than most people expect. According to Anthropic's help article on using skills, here's where you can use them today:

Surface How you add a skill Notes
Claude apps (chat, Cowork) Upload a ZIP under Customize > Skills Code execution must be on
Office add-ins (Excel, PowerPoint, Word, Outlook) Same skills as your account Type / to pick one
Claude Code Folder in ~/.claude/skills/ or .claude/skills/ Skills enabled in the app also sync if you sign in with the same Claude account
Claude API Through the code execution tool In beta for API users

The help article lists Free, Pro, Max, Ultra, Team and Enterprise as plans with skills. On Team and Enterprise, an owner has to switch them on in organization settings first.

How to create a Claude skill step by step

I'll build a real one: a skill that checks a markdown blog post before I publish it. It runs a script for the mechanical checks and reads a separate rules file for style.

1. Pick one repeated job

A skill should do one workflow you repeat. "Check a blog post before publishing" is good. "Help with marketing" is not, because Claude can't tell when to load it and you can't tell if it worked.

If something applies to every single session, it belongs in CLAUDE.md or your project instructions instead. If it needs live data from another service, that's a job for an MCP connector.

2. Make the folder

blog-post-check/
├── SKILL.md
├── references/
│   └── style-rules.md
└── scripts/
    └── check_frontmatter.py

The folder name and the name field have to match exactly.

3. Write SKILL.md

---
name: blog-post-check
description: Checks a markdown blog post before publishing. Use when the user asks to review, proofread or check a blog post, article draft or .md file for the site, or asks whether a post is ready to publish.
---

# Blog post check

Run these steps in order on the file the user names.

1. Run `python3 ${CLAUDE_SKILL_DIR}/scripts/check_frontmatter.py <file>` and report every FAIL line it prints.
2. Read `references/style-rules.md`. List each line in the post that breaks a rule, with its line number.
3. Check that the first two sentences answer the title's question directly. If they don't, suggest a rewrite.
4. Don't edit the file. Return a short list of fixes, most serious first.

A few things I learned writing descriptions. Put the main use case first. Use the words you'd actually type ("proofread", "ready to publish") because Claude matches on them. In Claude Code, the description and any when_to_use text get cut off at 1,536 characters in the skill listing, per the Claude Code skills docs, so don't bury the trigger at the end.

4. Add the script

Scripts are where skills get reliable. Counting characters is something a model can get wrong. Python won't.

import re
import sys

path = sys.argv[1]
text = open(path, encoding="utf-8").read()
match = re.match(r"^---\n(.*?)\n---", text, re.S)
if not match:
    print("FAIL: no frontmatter block at the top of the file")
    sys.exit(1)

fields = {}
for line in match.group(1).splitlines():
    if ":" in line and not line.startswith(" "):
        key, value = line.split(":", 1)
        fields[key.strip()] = value.strip().strip('"')

problems = []
title = fields.get("title", "")
desc = fields.get("description", "")
if not 50 <= len(title) <= 62:
    problems.append(f"title is {len(title)} chars, want 50-62")
if not 140 <= len(desc) <= 158:
    problems.append(f"description is {len(desc)} chars, want 140-158")

for p in problems:
    print("FAIL:", p)
print("OK" if not problems else f"{len(problems)} problem(s)")

${CLAUDE_SKILL_DIR} is a placeholder that Claude Code and Cowork swap for the skill's folder path, so the script runs no matter which project you're in. In Claude Code, running a script still asks for permission unless you've allowed it.

Never put API keys in a skill. If the workflow needs an outside service, use a connector so each person signs in with their own account.

5. Add the reference file

references/style-rules.md is just a markdown list of rules: banned words, heading case, how to handle dashes, whatever your house style is. Keeping it separate means SKILL.md stays short, and Claude only reads the rules at step 2.

6. Install and test it

For Claude Code, copy the folder into ~/.claude/skills/ (every project) or .claude/skills/ inside a repo (that project, and you can commit it for your team). Then either type /blog-post-check or ask "is this post ready to publish?" and see if Claude picks it up on its own.

For the Claude apps, zip it from the parent folder so the archive's top level is the skill folder:

zip -r blog-post-check.zip blog-post-check/
unzip -l blog-post-check.zip

Upload it under Customize > Skills and turn it on. Then send three or four prompts that should trigger it and one that shouldn't.

Useful frontmatter options in Claude Code

Claude Code accepts more frontmatter fields than the base spec. Two I use often:

  • disable-model-invocation: true stops Claude from loading the skill by itself. Only you can run it with /name. I use this for anything with side effects, like a deploy or publish step.
  • allowed-tools lets listed tools run without asking during that skill's turn.

There's also argument-hint for autocomplete and paths to limit automatic loading to certain files. Outside Claude Code, stick to name, description, license, compatibility, metadata and allowed-tools, since those are what the open spec accepts.

Tips from writing a pile of these

Write the description last. Once the steps are done, you know what the skill actually does, and the description gets sharper.

Keep SKILL.md under 500 lines. That's Anthropic's own guidance, and it keeps the part Claude always reads small. Long material goes in references/.

Use numbered steps when order matters. Claude follows "1, 2, 3, 4" better than a paragraph of prose.

Include one example of good output. Anthropic's best practices suggest example inputs and outputs, and a before and after pair in a reference file is an easy way to do it.

Retest after every real change. A wording tweak in the description can stop a skill from triggering, and you won't notice until the day you need it.

If you want to see how skills fit into a bigger workflow, I wrote about how I build products with Claude and what a week of building with Claude looks like day to day. And if you're new to the terminal side, start with the Claude Code beginner's guide.

Start small. Pick the one task you've explained to Claude more than three times this month, turn it into a SKILL.md with five numbered steps, and use it for a week before adding anything else.

Questions people ask

What is a Claude skill?

A Claude skill is a folder with a SKILL.md file inside it. The file has a short name and description at the top, then instructions Claude follows when a task matches that description. The folder can also hold scripts and reference files.

Are Claude skills free to use?

Anthropic's help center says skills are available on Free, Pro, Max, Ultra, Team and Enterprise plans. Code execution has to be turned on, because skills run inside that environment. On Team and Enterprise an owner enables them first.

What is the difference between a Claude skill and CLAUDE.md?

CLAUDE.md loads at the start of every Claude Code session, so it should hold rules that always apply. A skill loads only when the task calls for it, so it suits workflows you use some of the time, like an SEO audit or a release checklist.

Do Claude skills work in Claude Code?

Yes. Put the folder in ~/.claude/skills/ for all your projects or .claude/skills/ inside a repo for that project. You can call it with /skill-name or let Claude load it when your request matches the description.

How long should a SKILL.md file be?

Anthropic's guidance is to keep SKILL.md under 500 lines. Move long reference material into separate files in the folder and point to them from the step where they're needed.

Keep reading