Claude Code skills are folders with a SKILL.md file inside. The file opens with YAML frontmatter that tells Claude when the skill applies, followed by Markdown instructions. At session start Claude reads only each skill's name and description. The full body loads when a task matches, or when you type /skill-name. Personal skills go in ~/.claude/skills/<name>/SKILL.md and work in every project on your machine. Project skills go in .claude/skills/<name>/SKILL.md, and committing that folder gives your team the same skill. Custom slash commands now run on the same system, so .claude/commands/deploy.md and .claude/skills/deploy/SKILL.md both create /deploy. Skills follow the Agent Skills open standard, so one SKILL.md can also run in other tools that adopt it. Use a skill for a procedure Claude should repeat. Use an MCP server when Claude needs access to an outside system, and a plugin when you want to ship skills, hooks, and servers to a team as one install.
TL;DR
Skills = procedural knowledge (30-50 tokens each, loaded on-demand)
MCP = external tool connections (can use 50k+ tokens)
Plugins = shareable bundles of everything
Hooks = automated actions at specific moments
Slash Commands = prompt shortcuts
Most developers need: 2-3 MCP servers (GitHub, Filesystem, one domain-specific) + a few custom Skills for their workflow.
The Five Extension Types
Claude Code ships with multiple ways to extend its capabilities. Each solves a different problem:
| Type | Purpose | Token Cost | Best For |
|---|---|---|---|
| Skills | Teach procedures | 30-50 tokens/skill | Domain expertise |
| MCP | Connect tools | Varies (can be 50k+) | External integrations |
| Plugins | Bundle & share | Sum of contents | Team standardization |
| Hooks | Automate actions | Minimal | Workflow triggers |
| Commands | Prompt shortcuts | Minimal | Frequent operations |
The confusion comes from overlap. A Plugin can contain Skills. A Skill can use MCP tools. Slash Commands were merged into Skills. Understanding when to reach for each one requires understanding what problem you're solving.
Skills: Token-Efficient Expertise
Skills teach Claude how to perform tasks. They're folders containing a SKILL.md file with instructions, plus optional scripts and resources.
How Skills Work
Skills use progressive disclosure to stay efficient:
- Metadata scan: Claude loads only names and descriptions (~30-50 tokens per skill)
- Relevance match: If a skill matches the current task, full instructions load
- Resource loading: Scripts and files load only when executed
This means you can have 100+ skills installed without impacting context. Claude loads what it needs, when it needs it.
Skill Structure
# .claude/skills/code-review/SKILL.md
---
name: code-review
description: Security-focused code review following OWASP guidelines
---
When reviewing code:
1. Check for injection vulnerabilities (SQL, XSS, command)
2. Verify authentication and authorization patterns
3. Look for sensitive data exposure
4. Check error handling for information leakage
Flag issues with severity levels: CRITICAL, HIGH, MEDIUM, LOWWhen to Use Skills
- You have repeatable procedures that Claude should follow
- Multiple conversations need the same expertise
- You want domain knowledge without burning context
- The knowledge is about how to do something, not access to something
Skills work across Claude.ai, Claude Code, and the API. The same skill file runs everywhere without modification. They've been adopted as the Agent Skills standard by multiple AI coding tools including Codex and Gemini CLI.
Bundled Skills
Claude Code ships bundled skills such as /doctor, /code-review, /batch, /debug, /loop, and /claude-api. They are prompt-based: each one gives Claude instructions and lets it run the work with its own tools. Turn them off with the disableBundledSkills setting.
How to Create a Claude Code Skill (SKILL.md Reference)
A skill is a directory named after the skill with a SKILL.md file in it. Create the directory, write the frontmatter, and Claude Code picks up the change in the running session.
Where Claude Code Skills Live
| Scope | Path | Applies to |
|---|---|---|
| Personal | ~/.claude/skills/<name>/SKILL.md | Every project on this machine |
| Project | .claude/skills/<name>/SKILL.md | This repository; commit it to share |
| Nested | <subdir>/.claude/skills/<name>/SKILL.md | Loads once Claude works on files in <subdir> |
| Enterprise | Managed settings directory | Every user where the org deploys it |
| Additional directory | --add-dir <path>/.claude/skills/ | That session only |
When two skills share a name, enterprise wins over personal and personal wins over project. A skill also wins over a .claude/commands/ file of the same name.
SKILL.md Frontmatter Fields
Every field is optional. Write a description anyway, because Claude uses it to decide when the skill applies. The description and when_to_use text share a 1,536-character cap in the skill listing, so put the main use case first.
| Field | What it does |
|---|---|
| name | Command name in the / menu. Defaults to the directory name |
| description | What the skill does and when Claude should load it |
| when_to_use | Extra trigger phrases, appended to the description |
| disable-model-invocation | true means only you can run it with /name |
| user-invocable | false hides it from the / menu so only Claude loads it |
| allowed-tools | Tools Claude may use without asking during the invoking turn |
| context / agent | context: fork runs the skill in a subagent of the given agent type |
| paths | Glob patterns that limit automatic loading to matching files |
| model / effort | Override the model or effort level for the current turn |
A deploy skill only you can trigger
# .claude/skills/deploy/SKILL.md
---
name: deploy
description: Deploy the application to production
disable-model-invocation: true
---
Deploy $ARGUMENTS to production:
1. Run the test suite
2. Build the application
3. Push to the deployment target
4. Verify the deployment succeededSet disable-model-invocation: true on anything with side effects. Claude should never decide to deploy because your code looks ready.
MCP: External Tool Connections
The Model Context Protocol (MCP) is an open standard for connecting LLMs to external tools and data. It's how Claude accesses GitHub, databases, browsers, and APIs.
How MCP Works
MCP servers expose tools through a standardized interface. When you configure an MCP server, Claude gains access to its capabilities as callable functions.
MCP Configuration
// ~/.claude/settings.json
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_TOKEN": "your-token" }
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir"]
}
}
}The Token Problem
MCP tool definitions consume context. A five-server setup with 58 tools can use 55,000+ tokens before any conversation starts. GitHub's official MCP alone uses tens of thousands.
Anthropic's Tool Search feature discovers tools on-demand instead of loading all definitions upfront. Claude only sees tools it needs for the current task. Internal testing showed accuracy improvements from 49% to 74% on Opus 4 when working with large tool libraries.
Essential MCP Servers
Rather than installing everything, choose 2-3 servers that match your workflow:
- GitHub: Repository management, PRs, issues, commits
- Filesystem: Secure local file operations with permission controls
- Context7: Automatic documentation lookup for any library
- Playwright: Browser automation using accessibility snapshots
- PostgreSQL: Natural language database queries
- Sequential Thinking: Structured problem-solving for complex tasks
When to Use MCP
- You need Claude to access external systems
- Real-time data is required (not just instructions)
- The tool needs to execute actions (not just provide guidance)
- You're integrating with third-party services
Hooks: Automated Actions
Hooks execute shell commands at specific moments in Claude's workflow. They're deterministic—when the trigger fires, the hook runs.
Available Hook Points
- PreToolUse: Runs before tool calls, can block them
- PostToolUse: Runs after tool execution
- PermissionRequest: Runs when permission dialogs appear
- SessionStart: Runs at the beginning of each session
Hook Configuration
// .claude/settings.local.json
{
"hooks": {
"PreToolUse": [
{
"matcher": "Edit",
"command": "npm run lint --fix $FILE"
}
],
"PostToolUse": [
{
"matcher": "Write",
"command": "./scripts/notify-slack.sh 'File created: $FILE'"
}
]
}
}When to Use Hooks
- Enforcing quality gates (lint before edit, test after write)
- Notifications and logging
- Automatic formatting or validation
- Integration with CI/CD pipelines
Hooks are for actions that must happen. Skills are for guidance that should be followed. Use hooks for hard requirements; use skills for best practices.
Slash Commands: Prompt Shortcuts
Slash commands are templates for frequently-used prompts. They've been merged into the Skills system—a file at .claude/commands/review.md creates /review.
Slash Command
# .claude/commands/pr.md
Create a pull request for the current branch.
1. Run git diff against main
2. Summarize all changes
3. Generate a PR title and description
4. Use gh cli to create the PRCommands vs Skills
The distinction has blurred. Both create /name shortcuts. The difference:
- Commands: Simple prompt templates, always user-invoked
- Skills: Can include scripts, resources, and auto-trigger based on context
For simple shortcuts, use commands. For anything more complex, use skills.
Head-to-Head Comparison
| Scenario | Best Choice | Why |
|---|---|---|
| Access GitHub repos | MCP | Need external connectivity |
| Follow coding standards | Skill | Procedural knowledge, low tokens |
| Share team workflow | Plugin | Bundles everything together |
| Auto-lint on save | Hook | Deterministic action at specific moment |
| Quick PR command | Command | Simple prompt shortcut |
| Query database | MCP | External tool access |
| Code review process | Skill | Multi-step procedure |
| Notify Slack on deploy | Hook | Automated action |
Token Efficiency Comparison
| Extension | Base Cost | Loaded Cost | Notes |
|---|---|---|---|
| Skill | 30-50 tokens | <5k tokens | Progressive loading |
| MCP Server | 1-50k tokens | Same | All tools loaded upfront* |
| Plugin | Sum of parts | Varies | Depends on contents |
| Hook | Minimal | Minimal | Shell execution |
| Command | Minimal | Template size | User-invoked |
*Tool Search feature reduces MCP overhead by ~85% through on-demand loading.
Recommended Setup
Based on common development workflows, here's what most developers actually need:
Essential MCP Servers (Pick 2-3)
- GitHub: If you use GitHub for version control
- Filesystem: For any local file operations beyond basic editing
- Context7: For automatic documentation lookup
- Playwright: If you do frontend development or testing
Useful Skills
- Project-specific CLAUDE.md: Your coding standards, architecture decisions
- Code review skill: Security checks, style enforcement
- Deploy skill: Your deployment procedure
Practical Hooks
- Pre-commit lint: Auto-fix formatting before commits
- Post-write test: Run relevant tests after file changes
Don't install everything. Each MCP server adds context overhead. Each hook adds execution time. Start with one MCP server for your primary external integration, add Skills as you identify repeated procedures, and add Hooks only when you need guaranteed execution.
Example Minimal Setup
Recommended Configuration
// ~/.claude/settings.json
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_TOKEN": "$GITHUB_TOKEN" }
}
}
}
// .claude/CLAUDE.md (project root)
# Project: My App
- Use TypeScript strict mode
- Prefer functional components
- Run `npm test` before committing
// .claude/skills/deploy/SKILL.md
---
name: deploy
description: Deploy to production following our release process
---
1. Run full test suite
2. Build production bundle
3. Deploy to staging first
4. Run smoke tests
5. Promote to productionFrequently Asked Questions
What are Claude Code skills?
Folders containing a SKILL.md file. The YAML frontmatter says when the skill applies and the Markdown body holds the instructions. Claude reads only the name and description at session start and loads the full skill when a task matches or when you type /skill-name.
Where do Claude Code skills live?
Personal skills go in ~/.claude/skills/<name>/SKILL.md and apply to every project on your machine. Project skills go in .claude/skills/<name>/SKILL.md inside the repository, so committing the folder shares the skill with your team.
What is the difference between Claude Code Skills and MCP?
Skills teach Claude how to perform tasks through instructions and scripts, using only 30-50 tokens per skill until needed. MCP (Model Context Protocol) connects Claude to external tools and data sources like GitHub, databases, and APIs. Skills are for procedural knowledge; MCP is for external connectivity. They work together—a Skill can use MCP tools.
How many tokens do MCP servers use?
MCP servers can consume significant context. A typical five-server setup with 58 tools uses approximately 55,000 tokens before any conversation starts. Some servers like GitHub's official MCP use tens of thousands of tokens alone. Anthropic's Tool Search feature reduces this by 85% through on-demand tool discovery.
Can I use Skills in Cursor or other editors?
Skills have been adopted as the Agent Skills standard beyond Claude Code. They work with Codex, Gemini CLI, and other compatible tools. The same SKILL.md file runs across platforms. MCP is also cross-platform—many editors support MCP servers.
Should I use Skills or MCP for my workflow?
Use MCP when you need Claude to access external systems (GitHub, databases, APIs, browsers). Use Skills when you need Claude to know how to do something. Most workflows benefit from both: MCP for connectivity, Skills for methodology.
How do I share my setup with teammates?
Create a Plugin. Plugins bundle commands, skills, hooks, and MCP configurations into a single installable package. Host it on GitHub and teammates can install with /plugin install github.com/you/plugin. Commit shared configurations to your repo's .claude/ directory.
Speed Up Your Claude Code Workflow
Our MCP server adds FastApply for 35% faster edits and WarpGrep for 40% fewer search tokens. One install, three capabilities.
