← Anyone Can Code

Claude Code Extensibility

Everything you need to know about skills, plugins, MCP servers, hooks, and custom instructions — simplified.

/

Skills

Custom slash commands

MCP Servers

External tool integrations

Hooks

Automated event triggers

CLAUDE.md

Persistent instructions

Plugins

Bundled extension packs

The Big Picture

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

1 CLAUDE.md — Custom Instructions

What: Markdown files that give Claude persistent context about your project. Loaded automatically every session.

Where to put them

FileScopeShared with team?
./CLAUDE.mdThis projectYes (via git)
./.claude/CLAUDE.mdThis projectYes (via git)
./CLAUDE.local.mdThis project, only youNo (gitignored)
~/.claude/CLAUDE.mdAll your projectsNo
.claude/rules/*.mdModular rules for this projectYes

Quick start

# In Claude Code, just type:
/init

This auto-generates a CLAUDE.md based on your project.

Example CLAUDE.md

# 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

Path-specific rules

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.

2 Skills — Custom Slash Commands

What: Markdown files that become reusable commands. You type /skill-name and Claude follows the instructions in the file.

Where they live

~/.claude/skills/skill-name/SKILL.md ← personal (all projects) .claude/skills/skill-name/SKILL.md ← project (shared with team)

Minimal example

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.

Key frontmatter options

OptionWhat it does
user-invocable: trueYou can call it with /name
disable-model-invocation: trueOnly you can trigger it (Claude won't auto-use it)
argument-hint: "[file]"Shows hint in autocomplete
allowed-tools: Bash, ReadTools the skill can use without asking permission
context: forkRun in an isolated sub-agent

Passing arguments

---
name: fix-issue
argument-hint: "[issue-number]"
---

Fix GitHub issue #$ARGUMENTS.
# User types: /fix-issue 123
# Claude sees: Fix GitHub issue #123

Dynamic content with shell commands

---
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

3 MCP Servers — External Integrations

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.

How to add one

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"

Scopes

ScopeFlagStored inShared?
Local (default)none~/.claude.jsonNo
Project--scope project.mcp.jsonYes (via git)
User--scope user~/.claude.jsonNo

Project config file (.mcp.json)

{
  "mcpServers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/"
    },
    "database": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@bytebase/dbhub"],
      "env": { "DB_URL": "${DB_URL}" }
    }
  }
}

Managing servers

claude mcp list           # List all
claude mcp get github     # Details
claude mcp remove github  # Remove
/mcp                      # Status & auth (inside Claude Code)
Popular MCP servers: GitHub, Sentry, PostgreSQL, Notion, Slack, Jira, Airtable, Stripe, Linear, and hundreds more. Search "MCP server" + your tool name.

4 Hooks — Automated Triggers

What: Shell commands or prompts that run automatically when specific events happen. Like git hooks, but for Claude Code.

Events you can hook into

EventWhenCan block?
PreToolUseBefore Claude uses a toolYes
PostToolUseAfter a tool runs successfullyNo
UserPromptSubmitYou submit a promptYes
StopClaude finishes respondingYes
SessionStartSession begins/resumesNo
SessionEndSession terminatesNo
NotificationPermission request, etc.No

Where to configure

In any settings file: ~/.claude/settings.json (personal) or .claude/settings.json (project).

Example: Auto-format after edits

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "jq -r '.tool_input.file_path' | xargs npx prettier --write"
          }
        ]
      }
    ]
  }
}

Example: Block editing protected files

{
  "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

Example: macOS notification on permission request

{
  "hooks": {
    "Notification": [
      {
        "matcher": "permission_prompt",
        "hooks": [
          {
            "type": "command",
            "command": "osascript -e 'display notification \"Claude needs your attention\"'"
          }
        ]
      }
    ]
  }
}
Tip: Use /hooks inside Claude Code for an interactive hook manager.

5 Plugins — Bundled Extension Packs

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.

Plugin structure

my-plugin/ ├── .claude-plugin/ │ └── plugin.json ← required manifest ├── skills/ │ └── my-skill/SKILL.md ← slash commands ├── agents/ │ └── my-agent.md ← custom sub-agents ├── hooks/ │ └── hooks.json ← automated triggers └── .mcp.json ← external integrations

Minimal plugin.json

{
  "name": "my-plugin",
  "description": "What this plugin does",
  "version": "1.0.0"
}

Test locally

claude --plugin-dir ./my-plugin
# Then use: /my-plugin:skill-name

Managing plugins

/plugin                  # Browse & search
/plugin install          # Install from marketplace
/plugin enable name      # Enable
/plugin disable name     # Disable
/plugin uninstall name   # Remove
When to use a plugin vs standalone config:
Use standalone (.claude/skills/, .claude/settings.json) for project-specific stuff.
Use a plugin when you want to share, version, or reuse across projects.

Settings & Permissions

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*)"
    ]
  }
}

Settings file locations (highest priority first)

FilePurpose
.claude/settings.local.jsonPersonal project settings (gitignored)
.claude/settings.jsonTeam project settings (in git)
~/.claude/settings.jsonYour global settings

Interactive setup: type /config in Claude Code.

Quick Reference Cheat Sheet

I want to...UseCommand / 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

How Everything Fits Together

CLAUDE.md
context & rules
Skills
reusable prompts
MCP
external tools
Hooks
automation
Plugin
bundle & share all of the above

Start simple

  • Create a CLAUDE.md (/init)
  • Add one MCP server you use daily
  • Make one skill for a repetitive task

Scale up later

  • Add hooks for formatting/protection
  • Use .claude/rules/ for organized guidelines
  • Bundle into a plugin for your team

Claude Code Extensibility Guide — Generated Feb 2026