Repeating the same instructions to Claude Code? Put them in a skill

A Claude Code skill is a SKILL.md file with your instructions, which Claude uses when relevant or when you type its name after /. The description decides when.

Published 3 min read#AI#Developer tools

Every time you open a new Claude Code session, you paste the same paragraph: how we write commits, what to check before a deploy, where the config file lives. By the end of this article you will know how to put those instructions in one file that Claude uses on its own when it fits, or that you run by name.

What is a skill in Claude Code?

A skill is a SKILL.md file with instructions that Claude adds to its toolkit.

According to Claude Code's skills documentation, Claude uses a skill when it is relevant, or you invoke it directly with /skill-name.

So instead of explaining the same thing every session, you write it once, and it becomes part of the tools Claude knows are there.

Where do you put SKILL.md?

You put it in a folder named after the skill, and the location decides where it works:

Location

Path

Works in

Personal

~/.claude/skills/<skill-name>/SKILL.md

All your projects on this machine

Project

.claude/skills/<skill-name>/SKILL.md

Sessions in this repository

Plugin

<plugin>/skills/<skill-name>/SKILL.md

Wherever the plugin is enabled

You commit a skill in the project folder, so it reaches the whole team with the repository.

What goes in the file?

You write a short frontmatter between two --- lines, and the instructions in Markdown below it:

---
name: deploy
description: Deploy the application to production
disable-model-invocation: true
---

The documentation says all fields are optional, and the description is the one it recommends so Claude knows when to use the skill. The name, if you leave it out, defaults to the folder name, and it is the name shown in the / menu.

Watch two details from the same page: Claude Code reads the frontmatter only when the opening --- is the file's first line, and it ignores a field whose name is misspelled without reporting an error.

How does Claude know when to use it?

Claude knows when to use a skill from its description, so the description should say what the skill does and when. The documentation advises putting the key use case first, because the description is truncated when it runs long.

A description like "help with code" tells Claude nothing. A description like "writes a commit message in the team's format when you are about to commit" names the task and the moment.

How do you stop Claude running it on its own?

You stop it with disable-model-invocation: true in the frontmatter, so only you can run it with /name. The documentation suggests it for workflows with side effects, like /deploy or /commit, and gives the reason plainly: you do not want Claude deciding to deploy because your code looks ready.

You run it by putting its name at the start of your message:

/deploy staging

What does allowed-tools do, and what does it not do?

allowed-tools names tools Claude can use without asking you, during the turn that invokes the skill, and the grant clears with your next message.

allowed-tools: Bash(git add *) Bash(git commit *) Bash(git status *)

The common mistake is to think this field limits Claude to those tools. The documentation says the opposite: it does not restrict which tools are available, every tool remains callable, and your permission settings still govern the tools that are not listed. So if you want to block something, it belongs in your settings, and see also how permissions behave when you run claude -p with --bare.

How do you keep a skill light?

You keep it light by keeping SKILL.md under 500 lines, as the documentation advises, and moving long details into files next to it in the same folder:

my-skill/
├── SKILL.md
├── reference.md
├── examples.md
└── scripts/
    └── helper.py

Mention each file from SKILL.md, so Claude knows what it holds and when to read it. For work that must happen every time without anyone asking, see hooks, and for a side task in its own context there are subagents.

Where do you start today?

Pick the longest paragraph you paste into Claude Code every week, and put it in .claude/skills/<its-name>/SKILL.md with a description that says when.

And if you want ready-made skills for coding agents, see the AI skills section. What is the first thing you will turn into a skill?

FAQ

Do I have to write name in the frontmatter?

No. All fields are optional, and the name defaults to the directory name. The description is the field the docs recommend.

Can I share a skill with my team?

Yes. Put it in the .claude/skills folder inside the repository and commit it, so it works for everyone who opens the same repository.

How long should SKILL.md be?

The docs recommend keeping it under 500 lines, with long details in other files next to it.

Share

More articles