Claude Code: skills, plugins, and hooks explained

In Claude Code, a skill is a SKILL.md file of instructions that Claude loads when the task calls for it or when you invoke it with /name; a hook is a command that Claude Code runs on a specific event, such as before a file edit; a plugin bundles skills, hooks, subagents, and MCP servers into a single shareable install. Simple rule: a skill to guide, a hook to enforce, a plugin to share.
Claude Code can be extended in four ways that look similar on paper: skills, plugins, hooks, and subagents. They don't load at the same time, don't cost the same, and don't offer the same guarantees. This guide explains them using Anthropic's official examples as of November 18, 2026, then helps you choose and install them safely.
#What are Claude Code skills?
A Claude Code skill is a SKILL.md file, stored in its own folder, that contains knowledge, a procedure, or instructions. Claude loads it on its own when the description matches the task, or you invoke it by typing a slash followed by its name, for example /deploy. The old custom commands have been merged into skills.
According to Anthropic's documentation, accessed November 18, 2026, the body of a skill loads only when it's used: only its description stays visible at all times, so long reference documentation costs almost nothing until it's needed.
A Claude Code skill has two parts. The header, in YAML between two lines of three dashes, provides at minimum a description that tells Claude when to use it. The body, in Markdown, contains the instructions. The folder can also contain scripts, templates, or reference files that the instructions call on.
#Where should you store a Claude Code skill?
Benefit from our experience and a guided path to build your local copilot and get comfortable with your coding assistant.
- Lifetime online access
- PDF + files
- Refunded within 30 days
Where you place a Claude Code skill determines which sessions load it. When the same name exists in two locations, the documentation sets the priority: the organization skill takes precedence over the personal one, and the personal one over the project one. Plugin skills, prefixed with the plugin's name, never conflict.
| Location | File path | Loaded in |
|---|---|---|
| Personnel | ~/.claude/skills/nom-du-skill/SKILL.md | All your projects on this machine |
| Project | .claude/skills/nom-du-skill/SKILL.md | Sessions opened in this repository; commit it for your team |
| Plugin | plugin/skills/nom-du-skill/SKILL.md | Anywhere the plugin is enabled, as /plugin:skill |
| claude.ai account | Skills enabled in the account | Cowork, cloud sessions, and terminals signed in to this account |
#How do you create a skill in Claude Code?
To create a skill in Claude Code, create a folder named after it in ~/.claude/skills/ or in the project's .claude/skills/ folder, then write a SKILL.md file in it with a description and instructions. The folder name becomes the command you type.
- 01Create the skill folderIn a macOS, Linux, or WSL terminal, run mkdir -p ~/.claude/skills/summarize-changes.
- 02Write the SKILL.md fileSave the header and instructions to ~/.claude/skills/summarize-changes/SKILL.md. Claude Code runs the line that starts with an exclamation point before reading the file, so the actual diff ends up in the instructions.
- 03Run the skill manuallyIn a git project with changes, start Claude Code with the claude command, then type /summarize-changes. Claude should reply with a short summary and a list of risks.
- 04Check automatic triggeringAsk a question close to the description, for example "What did I change?". If Claude doesn't load the skill, put the main use case at the start of the description.
#What settings does a skill's header accept?
All fields in a Claude Code skill's header are optional; only the description is recommended. The documentation warns that the description and the when_to_use field are truncated together at 1,536 characters in the skill list, so the main use case should come first.
- disable-model-invocation
- With true, Claude no longer runs the skill on its own: only the typed command triggers it. Useful for a deployment.
- user-invocable
- With false, the skill is removed from the command menu and is used only by Claude.
- allowed-tools
- Tools usable without confirmation during the turn that launches the skill.
- context: fork
- Runs the skill in an isolated subagent.
#What are Claude Code plugins, and how do you install them?
A Claude Code plugin is a folder that bundles skills, hooks, subagents, and MCP servers into a single installable unit. You install it from a marketplace, meaning a catalog, with the command /plugin install nom@place-de-marché; its skills then appear as /nom-du-plugin:skill.
A Claude Code plugin is built around a manifest, the .claude-plugin/plugin.json file, which gives it its name. Claude Code adds Anthropic's official marketplace, claude-plugins-official, the first time you launch it interactively in the terminal; you can add another with /plugin marketplace add followed by a GitHub repository, a git URL, or a local folder.
- 01Open the plugin listingIn a Claude Code session, type /plugin install commit-commands@claude-plugins-official. The command first opens the plugin's details page, without installing anything.
- 02Review what the plugin addsThe Will install section lists the commands, agents, skills, hooks, and servers that get added. For official plugins, the listing also estimates the context cost.
- 03Choose the scopeUser scope for all your projects, project scope for all collaborators on the repository, local scope for just you in this repository. Local settings override project settings, which override user settings.
- 04Check that the plugin respondsType a slash: /commit-commands:commit should appear. In the shell, claude plugin list displays Version, Scope, and Status. If the summary shows Run /reload-plugins to apply, Claude Code runs that reload itself.
#What are Claude Code hooks for?
A Claude Code hook is a command, most often a shell script, that Claude Code runs automatically at a specific point: before a tool, after a file edit, at the end of a response. Unlike a skill, a hook doesn't depend on a decision by Claude: it runs every time.
Claude Code hooks are for enforcing a rule, not suggesting it. Anthropic's overview puts it plainly: an instruction like "never modify .env" in CLAUDE.md or in a skill is a request, not a guarantee; a PreToolUse hook that blocks the modification is a constraint. A hook uses no context unless it returns output.
The events table in the official hooks guide has 33 rows as of November 18, 2026, based on a count of that table; the hooks reference keeps the list up to date. The most useful: SessionStart at the start of a session, PreToolUse before a tool call, which it can block, PostToolUse after a successful call, and Stop when Claude has finished responding.
Each Claude Code hook has a type: command runs a shell command, http sends the event to a web address, mcp_tool calls an MCP tool, prompt asks a Claude model for a judgment, and agent, still experimental, runs a multi-step check. You declare hooks in ~/.claude/settings.json for all your projects, or in .claude/settings.json for a shared project.
#Example: format every modified file
This official Claude Code hook runs Prettier after each use of the Edit or Write tools. It goes in .claude/settings.json at the project root and assumes jq is installed. When it succeeds, nothing is displayed: the proof is the reformatted file. The /hooks command lists the configured hooks, grouped by event.
#Example: blocking edits to sensitive files
This second official example prevents Claude from modifying .env, package-lock.json, or the .git/ folder. The script compares the target path against the list of protected patterns and exits with code 2 to block the action; Claude receives the message and changes its approach. Make the script executable with chmod +x .claude/hooks/protect-files.sh on macOS and Linux.
#What are Claude Code agents (subagents)?
A Claude Code subagent is a specialized assistant that works in its own context window, with its own system prompt, allowed tools, and permissions. Claude hands it a side task, such as exploring dozens of files, and gets back only the summary, which keeps the main conversation readable.
A custom Claude Code subagent is a Markdown file with a header: a name, a description that says when to delegate, the list of tools, and, optionally, the model. If you put it in ~/.claude/agents/, it's available in all your projects. In the repository's .claude/agents/, it's available only to that project. Claude Code also ships with built-in subagents, including Explore, which is read-only.
A Claude Code subagent saves context, not usage: according to the documentation, its requests count toward the same limits as the main conversation. The model field lets you hand off a simple task to a cheaper model such as Haiku.
#Skill, plugin, hook, or subagent: which should you choose in Claude Code?
The right choice in Claude Code comes down to one question: "who decides?" A skill lets Claude judge when and how to apply a procedure; a hook runs on every event with no judgment involved; a subagent isolates a large chunk of work; a plugin is just packaging for sharing all three with other repositories or other people.
| Your situation | Extension | Why |
|---|---|---|
| You're pasting the same procedure for the third time | Skill | Loaded only when needed; invoked with /name or by Claude |
| A rule must hold every time, without exception | PreToolUse hook | Blocks the action before it runs, independent of the model |
| Formatting or a test after every edit | PostToolUse hook | Deterministic, no context cost without output |
| A search floods the conversation with results | Sous-agent | Works in a separate context and returns a summary |
| Claude needs to read a database or service | MCP server | Provides the connection; a skill explains how to use it |
| A second repository needs the same configuration | Plugin | Bundles skills, hooks, agents, and MCP into a single install |
#Claude Code skills and plugins: what are the risks and costs?
The main risk of a Claude Code plugin is that it runs code on your machine. Anthropic's security page puts it bluntly: an installed plugin can run arbitrary code with your user permissions. Its hooks and MCP servers run outside the sandbox, and an automatic update can change the files you previously reviewed.
Claude Code skills carry a subtler risk. A skill enters the context as an instruction, and its allowed-tools field can grant it broad tool access without confirmation. The documentation therefore recommends reviewing the allowed-tools of the skills in a cloned repository before running Claude Code in it.
A Claude Code skill or plugin costs you context and usage, not a separate price. The name and description of every skill or agent that Claude can launch on its own are included on every turn; according to the plugin documentation, those tokens count toward your usage, even when nothing from the plugin is used. Disable a plugin you don't need with claude plugin disable.
- What stays on your machine
- Command hooks, skill scripts, and local MCP servers.
- What gets sent to the model provider
- Everything that enters the context: the text of a loaded skill, hook output returned to Claude, subagent summaries.
#Do Claude Code skills work with other agents and local models?
Yes, as far as the format goes: Claude Code skills follow the open Agent Skills standard, created by Anthropic. According to the agentskills.io site, consulted on November 18, 2026, this format has been adopted by a growing number of agents, including OpenCode, Goose, Hermes Agent, OpenClaw, and Roo Code. The Ollama documentation has an integration page for each of these five agents, which can therefore use local models.
The portability of Claude Code skills has a limit: only the core of the format is shared. The folder, the SKILL.md file, the name, and the description are standard; Claude Code adds its own fields, such as disable-model-invocation or context: fork, which another agent ignores.
Claude Code itself can work with a local model: Ollama's documentation states that Ollama connects Claude Code to local and cloud models through its Anthropic-compatible API. However, no official source guarantees that a local model triggers skills as well as a Claude model does: test it on your own tasks.
Where can you find skills for Claude Code?+
Should you say « un skill » or « une skill » in French?+
Are Claude Code skills, plugins, and hooks free?+
Does a Claude Code skill work in Cowork or in the cloud?+
How do you disable all Claude Code hooks?+
Can a hook block Claude Code even in no-permissions mode?+
#Sources and verification as of November 18, 2026
The definitions, locations, commands, and examples in this guide were collected on November 18, 2026, from the official Claude Code documentation (version 2.1.327 at the top of the changelog), agentskills.io, and the Ollama documentation. Claude Code changes almost daily, and event or field names may change.
- Source: Extend Claude Code, extensions overview (Anthropic)
- Source: Extend Claude with skills (Anthropic)
- Source: Plugins overview (Anthropic)
- Source: Install and manage plugins (Anthropic)
- Source: Plugin security and trust (Anthropic)
- Source: Automate actions with hooks (Anthropic)
- Source: Create custom subagents (Anthropic)
- Source: Agent Skills, list of compatible clients
- Source: Claude Code with Ollama (Ollama)
- Source: Claude plans and pricing (Anthropic)
- Source: Claude Code changelog (Anthropic GitHub)
Feedback, an error, or a clarification? Let us know—it improves the guide for everyone.