{"slug": "how-to-use-claude-code-plugins-install-from-a-marketplace-or-build-your-own", "title": "How to Use Claude Code Plugins (Install from a Marketplace or Build Your Own)", "summary": "Anthropic has introduced a plugin system for Claude Code that allows developers to bundle skills, hooks, MCP servers, and other tooling into a single directory installable with one command. The system includes namespacing to avoid collisions, a marketplace for discovery, and commands for managing plugins. Plugins can be installed from official or community marketplaces and scoped to user, project, or global settings.", "body_md": "This is a cross-post — the original (and any updates) live at\n\n[broke2builtai.com].\n\nMy Claude Code setup took months to accrete: a review command here, a formatting hook there, an MCP server for the database, a subagent for QA. Then I started a second project and discovered the setup didn't come with me — it was smeared across four config surfaces in the first repo, and \"install my tooling\" meant a twenty-minute archaeology dig through my own dotfiles. Plugins are Claude Code's answer to exactly that problem: one directory that bundles all of it, installable with one command.\n\nA plugin is a folder with a manifest. Inside it, the same primitives you can already wire up by hand, packaged to travel together:\n\n`/name`\n\ninvocations, the same format as a `/agents`\n\n`hooks/hooks.json`\n\n`.mcp.json`\n\n, so installing the plugin connects the tools without anyone running `claude mcp add`\n\nPlugins can also carry LSP servers for code intelligence, background monitors, and executables — but the four above are the ones you'll actually package first.\n\nThe one behavioral difference from hand-wired pieces: **namespacing.** A skill named `hello`\n\nin a plugin named `my-plugin`\n\nis invoked as `/my-plugin:hello`\n\n, not `/hello`\n\n. That's deliberate — two plugins can both ship a `deploy`\n\nskill without colliding. Your own standalone `.claude/`\n\nfiles keep their short names.\n\nA marketplace is a catalog — a repo or URL that lists plugins and where to fetch them. Using one is a two-step deal: add the catalog, then install individual plugins from it. Think app store: adding the store installs nothing.\n\nAnthropic's official marketplace (`claude-plugins-official`\n\n) is registered automatically. Run `/plugin`\n\ninside a session and you get a tabbed manager — **Discover**, **Installed**, **Marketplaces**, **Errors**, cycled with Tab. Browse Discover, hit Enter on a plugin, and the details pane shows what it contains, its context cost in tokens, and a \"Will install\" inventory before you commit.\n\nOr skip the browsing and install directly:\n\n```\n/plugin install github@claude-plugins-official\n```\n\nFor third-party catalogs, add the marketplace first. The community marketplace — where reviewed third-party submissions land, each pinned to a specific commit — is the obvious second stop:\n\n```\n/plugin marketplace add anthropics/claude-plugins-community\n/plugin install some-plugin@claude-community\n```\n\n`/plugin marketplace add`\n\naccepts a GitHub `owner/repo`\n\nshorthand, a full git URL (include the `https://`\n\nand the `.git`\n\n), a local directory, or a direct URL to a hosted `marketplace.json`\n\n.\n\nInstalling prompts you for a **scope**:\n\n`.claude/settings.json`\n\n, so everyone who clones the repo gets itThen activate without restarting:\n\n```\n/reload-plugins\n```\n\nThat's the full loop. The plugin's skills now show up under their namespace — install `commit-commands`\n\nfrom Anthropic's demo marketplace and you get `/commit-commands:commit`\n\n.\n\nThe day-to-day commands:\n\n```\n/plugin list                                # what's installed, grouped by scope\n/plugin disable plugin-name@marketplace-name  # turn off without uninstalling\n/plugin enable plugin-name@marketplace-name\n/plugin uninstall plugin-name@marketplace-name\n/plugin update plugin-name@marketplace-name   # pull a plugin update\n/plugin marketplace update marketplace-name   # refresh a catalog\n```\n\nEverything also exists as a shell command (`claude plugin install formatter@my-marketplace --scope project`\n\n) for scripts and CI. Two things worth knowing before you accumulate a pile: removing a marketplace uninstalls every plugin you got from it, and every enabled plugin adds tokens to *every* session — `claude plugin details <name>`\n\nshows the projected cost, split into always-on and on-invoke. Audit occasionally; the Installed tab literally flags plugins you haven't touched in weeks.\n\nHonest answer: not always. The decision is about distribution, not capability — a plugin can't do anything the standalone pieces can't.\n\n**Hand-wire when** it's one project, it's just you, and you're still iterating. Files in `.claude/`\n\nare faster to edit, need no manifest, and keep short names. Every plugin in my own setup started life as a loose skill or hook I was still fiddling with.\n\n**Package a plugin when:**\n\n`.claude/`\n\nfolders around and watching them drift.`version`\n\nfield, users get the update; your copied-folder users get nothing, forever.The tell is the second consumer. The moment a setup has one — a teammate, your own second machine, a future you — packaging pays for itself.\n\nA minimal plugin is two files. The manifest lives at `.claude-plugin/plugin.json`\n\n:\n\n```\n{\n  \"name\": \"my-first-plugin\",\n  \"description\": \"A greeting plugin to learn the basics\",\n  \"version\": \"1.0.0\"\n}\n```\n\n`name`\n\nis the only required field — it becomes the namespace prefix. `version`\n\nis optional but load-bearing: set it and users only get updates when you bump it; omit it and the git commit SHA is the version, so every push ships. Set it for stable releases, omit it while iterating.\n\nComponents sit at the plugin **root**, not inside `.claude-plugin/`\n\n— the number-one structural mistake, per Anthropic's own docs. Only `plugin.json`\n\ngoes in there:\n\n```\nmy-plugin/\n├── .claude-plugin/\n│   └── plugin.json       # only the manifest lives here\n├── skills/\n│   └── hello/\n│       └── SKILL.md      # becomes /my-plugin:hello\n├── commands/             # flat .md files, same format as custom slash commands\n├── agents/               # subagent definitions\n├── hooks/\n│   └── hooks.json        # same schema as hooks in settings.json\n└── .mcp.json             # bundled MCP servers\n```\n\n`skills/`\n\nis the recommended layout for new plugins (each skill a folder with a `SKILL.md`\n\n); `commands/`\n\nholds flat Markdown files in the older style. If you already have working pieces in a project's `.claude/`\n\ndirectory, migration is mostly `cp -r`\n\n— copy `commands/`\n\n, `agents/`\n\n, `skills/`\n\nacross, and move your `hooks`\n\nobject out of `settings.json`\n\ninto `hooks/hooks.json`\n\n, same shape.\n\nOne rule saves you a debugging afternoon: **use ${CLAUDE_PLUGIN_ROOT} for every internal path** in hook commands and MCP configs. Installed plugins are copied into a cache at\n\n`~/.claude/plugins/cache`\n\n, not run from where the user cloned them — so relative paths that reach outside the plugin directory (`../shared-utils`\n\n) simply don't exist after install. The variable always resolves to wherever the plugin actually landed.Point Claude Code at the directory — no marketplace, no install:\n\n```\nclaude --plugin-dir ./my-plugin\n```\n\nInvoke your skill (`/my-plugin:hello`\n\n), check `/agents`\n\nfor your agents, trigger your hooks. As you edit, `/reload-plugins`\n\npicks up changes mid-session. Before shipping, lint the whole structure:\n\n```\nclaude plugin validate ./my-plugin\n```\n\nIt checks `plugin.json`\n\n, skill and agent frontmatter, and `hooks/hooks.json`\n\nfor schema errors — the same check Anthropic's review pipeline runs on community submissions. There's also `claude plugin init my-tool`\n\n, which scaffolds a manifest and starter skill under `~/.claude/skills/`\n\nthat loads automatically next session — the fastest path from nothing to a working plugin skeleton.\n\nTo share, you publish a catalog. A marketplace is a repo with a `.claude-plugin/marketplace.json`\n\nlisting your plugins:\n\n```\n{\n  \"name\": \"my-plugins\",\n  \"owner\": { \"name\": \"Your Name\" },\n  \"plugins\": [\n    {\n      \"name\": \"quality-review-plugin\",\n      \"source\": \"./plugins/quality-review-plugin\",\n      \"description\": \"Adds a quality-review skill for quick code reviews\"\n    }\n  ]\n}\n```\n\n`source`\n\ncan be a relative path inside the same repo (the simple case: one repo, `plugins/`\n\nfolder, catalog at the root) or an object pointing at another GitHub repo, so one catalog can index plugins living anywhere. Test the whole flow locally before pushing:\n\n```\n/plugin marketplace add ./my-marketplace\n/plugin install quality-review-plugin@my-plugins\n```\n\nThen push to GitHub and your users run `/plugin marketplace add your-name/your-repo`\n\n. For a team, go one step further: add the marketplace to the project's `.claude/settings.json`\n\nunder `extraKnownMarketplaces`\n\n, and Claude Code prompts every collaborator who trusts the repo to install the team plugins. That plus a committed [CLAUDE.md file](https://dev.to/guides/how-to-write-a-claude-md-file/) is the whole \"onboard a new dev's AI tooling\" problem, solved in two files.\n\nA plugin is code execution with your user privileges — hooks run shell commands, MCP servers are processes, and installing from a marketplace means trusting whoever controls that repo, including their future pushes. Anthropic verifies none of it for third-party sources. The same rules as any dependency: read the component inventory before installing, prefer pinned catalogs like the community marketplace, and be pickier about marketplaces than about plugins — the catalog decides what an update contains.\n\nPlugins are the distribution layer for everything else in this cluster: the [slash commands](https://dev.to/guides/how-to-create-a-custom-slash-command-in-claude-code/) you templatize, the [hooks](https://dev.to/guides/how-to-use-claude-code-hooks/) that enforce your rules, the [MCP servers](https://dev.to/guides/how-to-add-an-mcp-server-to-claude-code/) that feed Claude real data, the [subagents](https://dev.to/guides/how-to-use-subagents-in-claude-code/) that parallelize the work. Once your setup is a plugin, it follows you to every project — which means the economics of running it everywhere start to matter. I keep the heavy drafting lanes on the [z.ai GLM Coding Plan](https://z.ai/subscribe?ic=BWTG6TRYYQ) — that's a referral link, it helps fund our compute, and the plan costs the same with or without it; setup walkthrough in [how to set up Claude Code with the GLM API](https://dev.to/guides/how-to-set-up-claude-code-with-glm-api/).\n\nAnd the honest limit of packaging: a plugin makes instructions *installable*, not *good*. A bad prompt shipped to five repos is a bad prompt five times. The skill and agent bodies inside your plugin are system prompts, and writing those tight is its own craft — [Meta-Prompt + System Prompt Architect](https://promptbase.com/skill/metaprompt-system-architect?via=drbasilicious) ($8.99, one-time) is the skill I use to turn rough intent into the kind of precise, reusable, failure-aware instructions that are actually worth namespacing and shipping. Package the wiring with a plugin; make what's inside worth installing.\n\n*Broke to Built is one broke human + AI agents building real software with no budget, writing down every step. This site's tools run on free GLM — z.ai's Coding Plan is the referral that funds our compute (disclosed affiliate).*", "url": "https://wpnews.pro/news/how-to-use-claude-code-plugins-install-from-a-marketplace-or-build-your-own", "canonical_source": "https://dev.to/thryx/how-to-use-claude-code-plugins-install-from-a-marketplace-or-build-your-own-574", "published_at": "2026-07-14 19:00:09+00:00", "updated_at": "2026-07-14 19:30:12.636489+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "large-language-models"], "entities": ["Anthropic", "Claude Code"], "alternates": {"html": "https://wpnews.pro/news/how-to-use-claude-code-plugins-install-from-a-marketplace-or-build-your-own", "markdown": "https://wpnews.pro/news/how-to-use-claude-code-plugins-install-from-a-marketplace-or-build-your-own.md", "text": "https://wpnews.pro/news/how-to-use-claude-code-plugins-install-from-a-marketplace-or-build-your-own.txt", "jsonld": "https://wpnews.pro/news/how-to-use-claude-code-plugins-install-from-a-marketplace-or-build-your-own.jsonld"}}