Short answer: a plugin bundles skills, commands, agents, hooks, output styles and MCP servers into one install. Add a marketplace with claude plugin marketplace add owner/repo, then claude plugin install name@owner/repo, or use /plugin inside a session.
A plugin is a bundle of Claude Code pieces that arrive together: skills, commands, agents, hooks, output styles and MCP servers. Instead of copying six files into .claude/ by hand, you install one plugin, and you can turn it off again with one command.
How do I install a Claude Code plugin?
Plugins come from a marketplace, so you add one first:
claude plugin marketplace add owner/repo
claude plugin install my-plugin@owner/repoA marketplace can be a GitHub repository, a URL or a local path. Nothing can be installed until one is added. The plugin@marketplace form picks the right one when two marketplaces offer the same name. Inside a session, /plugin does the same with a picker.
To switch one off without removing it:
claude plugin disable my-plugin
claude plugin enable my-pluginWhat does a plugin cost before you install it?
A plugin's hooks run code on your machine, and its skills sit in every context. Before installing, look inside:
claude plugin details my-plugin@owner/repoIt prints the plugin's components and its projected token cost, and it works before you install. Adding a marketplace means trusting whoever controls it to ship code that runs on your machine, so this is the step worth not skipping.
How is a plugin laid out?
If you want to make one, the layout is strict:
my-plugin/
.claude-plugin/plugin.json the manifest, and the only file in this folder
skills/<name>/SKILL.md becomes /my-plugin:<name>
commands/<name>.md
agents/<name>.md
output-styles/<name>.md
hooks/hooks.json plus the scripts it calls
.mcp.json servers started when the plugin is enabled
bin/ added to the PATH the Bash tool sees
README.md for people, not loaded by ClaudeThe mistake with no error message: putting skills/ or agents/ inside .claude-plugin/. The plugin installs and its components are never found. Only plugin.json goes in there.
What goes in the manifest?
{
"name": "team-setup",
"version": "1.0.0",
"description": "Hooks and skills for working on this codebase.",
"author": { "name": "Your Team" },
"license": "MIT"
}name is the only required field: lowercase, digits and hyphens. Setting version pins the plugin, so people only get updates when you bump it. Leave it out and every commit counts as a new version.
Inside a plugin, refer to bundled scripts through ${CLAUDE_PLUGIN_ROOT}, never an absolute path, because the install folder changes on every update.
What can a plugin not carry?
Some things in your setup do not travel in a plugin:
- Permission rules and most settings. A plugin's own settings only support a couple of keys, so put the rules in the README for people to paste in
- Your status line. It is a settings key. Ship the script in
bin/and give the one line to add - CLAUDE.md. A CLAUDE.md at the plugin root is not loaded. Turn it into a skill, which loads when it is relevant
And never package a real token: a plugin is made to be sent to someone, so a credential in one is a credential handed over.
Which marketplace names should you avoid?
Some marketplace names are reserved for Anthropic's own, such as claude-plugins-official and anthropic-plugins. A marketplace registered under a reserved name stops loading.
Where can you check this?
How do you turn your setup into a plugin?
Config Studio for Claude Code can export the plan you built (agents, skills, commands, output styles, hooks, MCP servers) as a ready plugin, a .zip you can try with claude --plugin-dir before you put it in a marketplace. It shows what was carried and what was left behind, with the reason for each, and refuses to package anything that looks like a credential. Its Plugins and marketplaces surface writes the install commands above for someone else's plugin.

