How to Use Claude Code Skills: Complete Beginner's Guide
Learn how to install, configure, and use Claude Code skills to supercharge your development workflow. A step-by-step beginner's guide covering everything from finding skills to using them effectively.
What Are Claude Code Skills?
Claude Code skills are markdown files that guide Claude's behavior when working on specific tasks. Think of them as reusable instruction sets that teach Claude how to approach particular development challenges, whether it's writing unit tests, generating Docker configurations, or setting up database schemas.
Unlike traditional code snippets or templates, skills are dynamic. They don't just give you boilerplate code; they teach Claude how to think about a problem so it can produce tailored, context-aware output every time you use them.
Each skill is a .md file with structured instructions, best practices, and examples that Claude reads and follows when you invoke it. This means you get consistent, high-quality results across your projects without having to repeat yourself.
Where Do Skills Live?
Claude Code looks for skills in a specific location on your machine:
~/.claude/skills/
On macOS and Linux, this expands to /home/your-username/.claude/skills/. On Windows, it's typically C:\Users\your-username\.claude\skills\.
When you install a skill, it gets placed in this directory as a markdown file. Claude automatically has access to any skill files stored here, and you can reference them during your coding sessions.
Directory Structure
A typical skills directory looks like this:
~/.claude/skills/
smart-commit.md
unit-test-generator.md
dockerfile-generator.md
prisma-setup.md
claude-md-writer.md
api-endpoint-generator.md
You can organize skills into subdirectories if you prefer:
~/.claude/skills/
testing/
unit-test-generator.md
integration-test-setup.md
devops/
dockerfile-generator.md
ci-cd-pipeline.md
database/
prisma-setup.md
migration-writer.md
How to Install Skills
Installing a skill is straightforward. There are several ways to do it:
Method 1: Download from Claude Skills Hub
The easiest way is to browse our skills hub, find a skill you want, and click the install button. This copies the skill file directly to your ~/.claude/skills/ directory.
Method 2: Manual Installation
You can also manually create or copy skill files:
# Create the skills directory if it doesn't exist
mkdir -p ~/.claude/skills
# Copy a skill file into the directory
cp path/to/downloaded-skill.md ~/.claude/skills/
Method 3: Clone from a Repository
Many developers share skills through GitHub repositories:
# Clone a skills collection
git clone https://github.com/example/claude-skills-collection.git
# Copy the skills you want
cp claude-skills-collection/skills/*.md ~/.claude/skills/
How Skills Work in Practice
When you start a Claude Code session, Claude is aware of all the skills installed in your ~/.claude/skills/ directory. You can reference skills naturally in your conversation.
Example 1: Using the Smart Commit Skill
Let's say you have the smart-commit skill installed. After making changes to your code, you can simply say:
Use the smart-commit skill to commit my changes
Claude will read the skill instructions, analyze your staged changes, and generate a well-formatted commit message following conventional commit standards, complete with a meaningful description and appropriate scope.
Example 2: Generating Unit Tests
With the unit-test-generator skill installed:
Use the unit-test-generator skill to write tests for src/utils/parser.ts
Claude will analyze your parser module, understand its functions and edge cases, and generate comprehensive unit tests following the patterns and framework specified in the skill.
Example 3: Creating a Dockerfile
With the dockerfile-generator skill:
Use the dockerfile-generator skill for my Node.js project
Claude will examine your project structure, package.json, and dependencies to generate an optimized, multi-stage Dockerfile with proper caching, security best practices, and minimal image size.
Understanding Skill Anatomy
A typical skill file has several key sections:
---
title: Skill Name
description: What this skill does
author: Author Name
tags: [tag1, tag2]
---
# Skill Name
## Purpose
Explains what the skill accomplishes.
## Instructions
Step-by-step guidance for Claude to follow.
## Best Practices
Patterns and conventions to adhere to.
## Examples
Concrete examples of expected input and output.
The frontmatter (between the --- markers) provides metadata, while the body contains the actual instructions Claude follows.
Tips for Getting the Most Out of Skills
1. Be Specific When Invoking Skills
Instead of saying "help me with tests," say "use the unit-test-generator skill to create tests for my auth middleware." The more context you provide, the better the output.
2. Combine Skills
Skills work great together. You might use the api-endpoint-generator skill to create an endpoint, then immediately follow up with the unit-test-generator skill to test it.
3. Customize Skills for Your Team
Skills are just markdown files. Feel free to modify them to match your team's conventions. If your team uses a specific test framework or commit message format, update the relevant skills accordingly.
4. Keep Skills Updated
As best practices evolve and your team's needs change, update your skills to reflect current standards. A skill that was perfect six months ago might need tweaks today.
5. Share Skills with Your Team
Put your team's custom skills in a shared repository so everyone benefits from the same consistent guidance. This is especially valuable for onboarding new team members.
Common Skills Every Developer Should Have
Here are some essential skills to get started with:
- smart-commit - Generates meaningful, conventional commit messages
- unit-test-generator - Creates comprehensive unit tests for your code
- dockerfile-generator - Builds optimized Docker configurations
- claude-md-writer - Creates well-structured CLAUDE.md project files
- prisma-setup - Sets up Prisma ORM with proper schema design
- api-endpoint-generator - Scaffolds REST API endpoints with validation
- code-reviewer - Provides thorough code review feedback
- refactoring-assistant - Identifies and executes code improvements
Troubleshooting Common Issues
Skills Not Being Recognized
If Claude doesn't seem to know about your skills, check:
- The skill file is in
~/.claude/skills/(not a subdirectory deeper than expected) - The file has a
.mdextension - The file contains valid markdown with proper frontmatter
- You've restarted your Claude Code session after adding new skills
Skill Output Doesn't Match Expectations
If the output isn't what you expected:
- Review the skill file to ensure instructions are clear and unambiguous
- Provide more context when invoking the skill
- Check if the skill needs updating for your specific framework or language
Skills Conflicting with Each Other
If you have skills with overlapping concerns, be explicit about which one to use. Claude will follow the instructions of the skill you specifically reference.
What's Next?
Now that you understand how to use Claude Code skills, explore our skills hub to find the ones that match your workflow. Start with two or three essential skills and gradually add more as you discover new use cases. The beauty of skills is that they compound - the more you use them, the more efficient your development process becomes.
Ready to go further? Check out our guide on how to create your own custom skills to build skills tailored to your exact needs.