Plugins & Skills
Two extension mechanisms: Plugins for full CLI extensions, and Skills for lightweight AI prompt templates. For how plugin tools and skills feed into the tool pipeline, see Tool Sources.
Skills
Skills are the simpler extension — markdown files that inject prompt content when invoked as slash commands.
Skill Format
---
name: my-skill
description: What this skill does
context: inline # or 'fork' to run in a sub-agent
effort: balanced
paths: ["src/**"] # Glob patterns for auto-activation
---
Your skill prompt content here.
This becomes the instruction sent to the model.
How Skills Work
📋
User types /skill-name📥
Load skill fileContext type?
inline
Inject content as user message
🤖
Model processes in current conversationfork
Spawn sub-agent
🤖
Sub-agent processes independently📤
Result returned to main conversationSkill Sources
- Bundled skills — shipped with Claude Code in
src/skills/bundled/ - User skills — stored in
~/.claude/skills/ - Project skills — in
.claude/skills/within a repo
Bundled Skills
Claude Code ships with several built-in skills including:
/commit— create a git commit/review-pr— review a pull request/simplify— simplify recently changed code- And more...
These are PromptCommands — they inject specialized instructions into the conversation.
Plugins
Plugins are full CLI extensions that can add commands, tools, and hooks.
Plugin Manifest
{
"name": "my-plugin",
"version": "1.0.0",
"commands": [
{ "name": "my-command", "description": "...", "handler": "./commands/my-command.js" }
],
"tools": [
{ "name": "MyTool", "handler": "./tools/my-tool.js" }
],
"hooks": [
{ "event": "pre_tool_use", "handler": "./hooks/validate.js" }
]
}
Plugin Capabilities
| Feature | Description |
|---|---|
| Commands | Custom slash commands (any type) |
| Tools | Custom tools available to the model |
| Hooks | Lifecycle hooks (pre/post query, pre/post tool use) |
| Settings | Custom configuration options |
| Permissions | Custom permission rules |
Plugin Lifecycle
🚀
CLI Startup🔍
Discover plugins in ~/.claude/plugins/📥
Load and validate manifestsInvalid — log warning, skip plugin
Valid — register capabilities
🔌
Register commands, tools, hooks✅
Plugin active — responding to eventsCommand Invoked
⌨️
User runs /plugin-cmdHandler executes
Tool Called
🔧
Model calls plugin toolTool handler runs
Hook Fires
🪝
pre/post tool or queryHook logic runs
Plugin vs Skill
| Aspect | Skill | Plugin |
|---|---|---|
| Complexity | Low (just markdown) | High (JavaScript/TypeScript) |
| What it can do | Inject prompts | Commands, tools, hooks, settings |
| Format | YAML frontmatter + markdown | JSON manifest + JS handlers |
| Installation | Drop a file in ~/.claude/skills/ | Install in ~/.claude/plugins/ |
| Use case | Prompt templates, workflows | Full-featured extensions |
Key Source Files
| File | Purpose |
|---|---|
src/skills/ | Skill system (20 files) |
src/skills/bundled/ | Built-in skills |
src/plugins/ | Plugin system |
src/services/plugins/ | Plugin discovery and management |
src/tools/SkillTool/ | Skill execution tool |