Everything you need to know about skills, plugins, MCP servers, hooks, and custom instructions — simplified.
Custom slash commands
External tool integrations
Automated event triggers
Persistent instructions
Bundled extension packs
Claude Code has 5 ways to extend and customize it. Think of them as layers:
| Feature | What It Does | Analogy |
|---|---|---|
| CLAUDE.md | Tells Claude about your project, conventions, and rules | An onboarding doc for a new developer |
| Skills | Reusable prompt templates you invoke with /name |
Saved macros or shortcuts |
| MCP Servers | Connect Claude to external tools (GitHub, DBs, APIs) | IDE plugins / VS Code extensions |
| Hooks | Run scripts automatically when things happen | Git hooks or CI triggers |
| Plugins | Bundle skills + hooks + MCP servers into a shareable package | npm packages for Claude Code |
What: Markdown files that give Claude persistent context about your project. Loaded automatically every session.
| File | Scope | Shared with team? |
|---|---|---|
./CLAUDE.md | This project | Yes (via git) |
./.claude/CLAUDE.md | This project | Yes (via git) |
./CLAUDE.local.md | This project, only you | No (gitignored) |
~/.claude/CLAUDE.md | All your projects | No |
.claude/rules/*.md | Modular rules for this project | Yes |
# In Claude Code, just type:
/init
This auto-generates a CLAUDE.md based on your project.
# My Project
## Tech Stack
- TypeScript, React 18, PostgreSQL
## Commands
- `npm test` — Run tests
- `npm run lint` — Lint code
## Rules
- Use 2-space indentation
- Prefer const over let
- Always write tests for new functions
In .claude/rules/api.md, add YAML frontmatter to scope rules to specific files:
---
paths:
- "src/api/**/*.ts"
---
All API endpoints must include input validation.
What: Markdown files that become reusable commands. You type /skill-name and Claude follows the instructions in the file.
Create .claude/skills/review/SKILL.md:
---
name: review
description: Review code for bugs and style issues
user-invocable: true
---
Review the code for:
1. Bugs and logic errors
2. Security vulnerabilities
3. Performance issues
Suggest fixes for each issue found.
Now type /review in Claude Code and it runs.
| Option | What it does |
|---|---|
user-invocable: true | You can call it with /name |
disable-model-invocation: true | Only you can trigger it (Claude won't auto-use it) |
argument-hint: "[file]" | Shows hint in autocomplete |
allowed-tools: Bash, Read | Tools the skill can use without asking permission |
context: fork | Run in an isolated sub-agent |
---
name: fix-issue
argument-hint: "[issue-number]"
---
Fix GitHub issue #$ARGUMENTS.
# User types: /fix-issue 123
# Claude sees: Fix GitHub issue #123
---
name: pr-review
---
Review this PR:
- Diff: !`gh pr diff`
- Files changed: !`gh pr diff --name-only`
# The !`command` syntax runs the command and injects the output
What: MCP (Model Context Protocol) servers let Claude use external tools — like querying a database, managing GitHub PRs, or searching Notion. Think of them as plugins that give Claude new abilities.
Remote server (most common — cloud-hosted):
# Add GitHub integration
claude mcp add --transport http github https://api.githubcopilot.com/mcp/
# Then authenticate in Claude Code:
/mcp
Local server (runs on your machine):
# Add a PostgreSQL server
claude mcp add --transport stdio mydb -- npx -y @bytebase/dbhub \
--dsn "postgresql://user:pass@localhost:5432/mydb"
| Scope | Flag | Stored in | Shared? |
|---|---|---|---|
| Local (default) | none | ~/.claude.json | No |
| Project | --scope project | .mcp.json | Yes (via git) |
| User | --scope user | ~/.claude.json | No |
{
"mcpServers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/"
},
"database": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@bytebase/dbhub"],
"env": { "DB_URL": "${DB_URL}" }
}
}
}
claude mcp list # List all
claude mcp get github # Details
claude mcp remove github # Remove
/mcp # Status & auth (inside Claude Code)
What: Shell commands or prompts that run automatically when specific events happen. Like git hooks, but for Claude Code.
| Event | When | Can block? |
|---|---|---|
PreToolUse | Before Claude uses a tool | Yes |
PostToolUse | After a tool runs successfully | No |
UserPromptSubmit | You submit a prompt | Yes |
Stop | Claude finishes responding | Yes |
SessionStart | Session begins/resumes | No |
SessionEnd | Session terminates | No |
Notification | Permission request, etc. | No |
In any settings file: ~/.claude/settings.json (personal) or .claude/settings.json (project).
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "jq -r '.tool_input.file_path' | xargs npx prettier --write"
}
]
}
]
}
}
{
"hooks": {
"PreToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "jq -r '.tool_input.file_path' | grep -q '.env' && exit 2 || exit 0"
}
]
}
]
}
}
# exit 0 = allow, exit 2 = block
{
"hooks": {
"Notification": [
{
"matcher": "permission_prompt",
"hooks": [
{
"type": "command",
"command": "osascript -e 'display notification \"Claude needs your attention\"'"
}
]
}
]
}
}
/hooks inside Claude Code for an interactive hook manager.
What: A plugin bundles skills, hooks, MCP servers, and agents into one shareable package. It's how you distribute a full extension to a team or community.
{
"name": "my-plugin",
"description": "What this plugin does",
"version": "1.0.0"
}
claude --plugin-dir ./my-plugin
# Then use: /my-plugin:skill-name
/plugin # Browse & search
/plugin install # Install from marketplace
/plugin enable name # Enable
/plugin disable name # Disable
/plugin uninstall name # Remove
.claude/skills/, .claude/settings.json) for project-specific stuff.Control what Claude can and can't do via .claude/settings.json:
{
"permissions": {
"allow": [
"Bash(npm run *)",
"Bash(git *)",
"Read(./src/**)"
],
"deny": [
"Bash(rm *)",
"Read(.env*)"
]
}
}
| File | Purpose |
|---|---|
.claude/settings.local.json | Personal project settings (gitignored) |
.claude/settings.json | Team project settings (in git) |
~/.claude/settings.json | Your global settings |
Interactive setup: type /config in Claude Code.
| I want to... | Use | Command / Location |
|---|---|---|
| Tell Claude about my project | CLAUDE.md | /init or create CLAUDE.md |
| Create a reusable command | Skill | .claude/skills/name/SKILL.md |
| Connect to GitHub/Notion/DB | MCP | claude mcp add ... |
| Auto-format after edits | Hook | .claude/settings.json hooks |
| Block dangerous commands | Hook | PreToolUse hook with exit 2 |
Allow npm test always |
Settings | permissions.allow: ["Bash(npm test *)"] |
| Share config with my team | Plugin | Create a plugin with .claude-plugin/ |
| See what's loaded | — | /memory, /mcp, /config |
CLAUDE.md (/init).claude/rules/ for organized guidelinesClaude Code Extensibility Guide — Generated Feb 2026