Most people assume Claude Code figures out every task the same way, by reading your prompt and guessing at the best approach on the spot. It doesn’t. For anything you do repeatedly, it can reach into a folder on disk, pull out instructions you or Anthropic already wrote for that exact situation, and follow them instead of reinventing the process every time.
That folder is a skill, and once you know how to install and write them, Claude Code stops treating your recurring sysadmin tasks like they’re new.
Think of a skill as a reusable set of instructions that Claude Code can automatically apply whenever it recognizes a matching task. Instead of explaining the same steps over and over, you write them once in a SKILL.md file, and Claude Code uses them whenever they’re relevant. This saves time, keeps your workflow consistent, and makes repetitive tasks much easier to handle.
What a Claude Code Skill Actually Is
A Claude Code Skill is simply a folder that contains a SKILL.md file, along with optional scripts, reference documents, or templates. The SKILL.md file has two parts: a small YAML frontmatter section that defines the skill’s name and description, followed by the Markdown instructions that tell Claude Code how to perform the task.
Claude Code doesn’t load every skill whenever you enter a prompt. Instead, it first checks the descriptions of the available skills. If your request matches a skill’s description, it loads that skill and follows its instructions.
This is why writing a clear, specific description is important. If the description is too vague, Claude Code may never use the skill.
Claude Code Skills follow Anthropic’s open Agent Skills standard. That means a skill you create can also be used with Claude.ai and the Claude API without any changes.
The examples in this guide were tested on Ubuntu 24.04 LTS and RHEL 9, but the commands work the same on any Linux distribution supported by Claude Code because they don’t rely on distro-specific paths.
Prerequisites: Install Claude Code
Before you can use skills, you need to install Claude Code.
The easiest method is the official installer, which doesn’t require Node.js:
curl -fsSL https://claude.ai/install.sh | bash
If you prefer installing it with npm, make sure Node.js 22 or later is already installed:
npm install -g @anthropic-ai/claude-code
Avoid running the npm installation with sudo. Installing global npm packages as root can create permission problems that prevent future updates. If you run into permission errors, using nvm to manage Node.js is a better option because it installs everything inside your home directory.
After the installation completes, verify that Claude Code is available:
claude --version
If the command displays a version number, Claude Code is installed correctly. The first time you run Claude Code, launch it with:
claude
Then complete the authentication process to sign in to your Anthropic account.
Installing Pre-Built Skills from Anthropic’s Marketplace
Anthropic provides a collection of ready-made skills in the anthropics/skills GitHub repository. These include document related skills and example skills for development and enterprise workflows. Instead of downloading them manually, you can add the repository as a marketplace directly from Claude Code.
Start a Claude Code session and run:
/plugin marketplace add anthropics/skills
This registers the marketplace but doesn’t install any skills.
To install specific skill collections, run:
/plugin install document-skills@anthropic-agent-skills /plugin install example-skills@anthropic-agent-skills
Here’s what each part means:
/plugin installinstalls a plugin from a registered marketplace.document-skillsandexample-skillsare the plugin names.@anthropic-agent-skillsis the marketplace you added in the previous step.
After a plugin is installed, you don’t need to run a special command to use it. Simply describe what you want to do. Claude Code compares your request with the descriptions of the installed skills and automatically loads the appropriate one when it finds a match.
Installing a Skill Manually
Not every skill comes from Anthropic’s marketplace. You can also use skills shared by others or create your own. Claude Code finds these skills based on where they are stored, so there’s no upload or registration process.
To make a skill available for all projects on your system, create a directory under your home folder:
mkdir -p ~/.claude/skills/log-triage
To make a skill available only for the current project, create it inside your project’s .claude directory:
mkdir -p .claude/skills/log-triage
Next, place the SKILL.md file inside the new folder.
Claude Code automatically discovers the skill the next time it checks for matching skill descriptions. You don’t need to restart Claude Code or run any additional commands.
If a skill and a custom slash command have the same name, Claude Code gives priority to the skill.
Writing Your Own SKILL.md
If you find yourself giving Claude Code the same instructions over and over, it’s a good idea to create a custom skill instead of repeatedly pasting the same prompt.
For example, if you always ask Claude Code to check journalctl, compare timestamps, and look for recent package updates whenever a service fails, you can save those steps in a skill.
First, create the skill directory and the SKILL.md file:
mkdir -p ~/.claude/skills/log-triage nano ~/.claude/skills/log-triage/SKILL.md
A basic skill only needs a YAML frontmatter section followed by the instructions:
```markdown --- name: log-triage description: Use this skill when a systemd service has crashed or is failing to start, or when asked to investigate why a service died. Correlates journalctl output with recent package changes. --- # Log Triage 1. Run `systemctl status` to confirm the current state. 2. Pull the last 15 minutes of logs with `journalctl -u --since "-15 min"`. 3. Cross-check the failure timestamp against recent package installs with `journalctl -u dpkg --since "-1 day"` (Debian/Ubuntu) or `journalctl -u dnf --since "-1 day"` (RHEL/Rocky). 4. Report the likely cause in plain language before suggesting a fix. ```
In this example, is a placeholder. Replace it with the actual service name, such as nginx, sshd, or httpd, when running the commands.
The description field is especially important because Claude Code uses it to decide when to load the skill. Write it the way you would describe the problem to another person. For example, “Use this skill when a systemd service crashes or fails to start” is much more effective than a generic description like “log analysis skill.”
Common Mistakes When Writing Skills
Here are some common mistakes to avoid when creating Claude Code skills:
- Using vague descriptions: A description like “helps with logs” is too general and may not match your prompt. Instead, describe the situations where the skill should be used, such as “Use this skill when a systemd service fails to start or crashes.“
- Saving the skill in the wrong location: Claude Code only looks for skills in
~/.claude/skills/for personal skills or.claude/skills/for project-specific skills. If the skill is stored anywhere else, it won’t be detected. - Leaving out the YAML frontmatter delimiters: The
---lines at the beginning and end of the YAML frontmatter are required. Without them, Claude Code treats the entire file as plain Markdown and ignores the skill metadata. - Making the skill too large: Keep the main
SKILL.mdfocused on the task. If you have long reference material, examples, or documentation, place them in areferences/subdirectory so Claude Code loads them only when needed.
Testing That a Skill Works
After creating your skill, start a new Claude Code session. If it’s a project-specific skill, run the session from that project. For a personal skill, you can start it from any location.
$ claude > nginx keeps dying on this box, can you figure out why?
As Claude Code responds, watch how it approaches the task. If the skill is triggered, it will follow the instructions in your SKILL.md instead of generating a generic troubleshooting workflow.
If the skill isn’t used and Claude Code gives a general response, the most common cause is the description field. Update the description so it closely matches the way you would naturally describe the problem, then test it again.
One useful feature of Claude Code is that multiple skills can work together. If your request matches more than one skill, Claude Code can load each relevant skill and use their instructions in the same session without requiring you to switch between them manually.
Troubleshooting a Skill That Doesn’t Trigger
If your skill isn’t being used, first check that it’s stored in the correct location:
ls ~/.claude/skills/
Or, if it’s a project-specific skill:
ls .claude/skills/
Make sure the skill folder is in the correct directory and contains the SKILL.md file.
Next, open the file and verify that the YAML frontmatter is enclosed between the two required --- lines. Also, check that the name field uses only lowercase letters and hyphens, without spaces or uppercase characters.
If the skill still doesn’t trigger, the description is usually the problem. Rewrite it using the same words you would naturally use when describing the task. The closer the description matches your typical prompts, the more likely Claude Code is to load the skill automatically.
Skills vs. CLAUDE.md and Custom Commands
Claude Code provides different ways to customize its behavior, and each serves a different purpose.
Use CLAUDE.md for information that should always be available in a project. For example, if your project always uses pnpm instead of npm, or follows a specific coding standard, that information belongs in CLAUDE.md because Claude Code loads it at the start of every session.
Use a skill for task-specific instructions that are only needed in certain situations. Claude Code loads a skill only when your request matches its description, helping keep the working context focused.
Custom slash commands are also supported. For example, creating a file such as .claude/commands/deploy.md gives you a /deploy command that you can run whenever needed.
The main advantage of skills is that you don’t have to remember or type a specific command. Claude Code can activate them automatically when your request matches the skill’s description, and a skill can also include supporting scripts, templates, and reference files alongside its instructions.
CLAUDE.md, a custom slash command, or a skill for a particular task, this guide should help you choose the right option for your workflow.Conclusion
Claude Code Skills let you save repeated workflows so you don’t have to explain the same steps every time. In this guide, you learned what a skill is, how to install pre-built skills from Anthropic’s marketplace, how to add a custom SKILL.md file manually, and how to create your own skill from scratch.
If there’s a task you regularly ask Claude Code to perform, consider turning it into a skill. Write a clear description that matches how you naturally describe the task, save the skill, and test it the next time you need it.
Have you created a useful Claude Code Skill or have an idea for one? Share it in the comments below.





