What this thread does
Put .claude-plugin/plugin.json at the plugin root, keep skills/<name>/SKILL.md next to it (not inside .claude-plugin/), run claude plugin validate ./my-plugin, try it with claude --plugin-dir ./my-plugin, then list it in .claude-plugin/marketplace.json and install with claude plugin marketplace add ./my-marketplace and claude plugin install my-plugin@my-marketplace. From the official docs (checked 2026-11-18); the validate steps were run on Claude Code 2.1.281.
Do first: mkdir -p my-first-plugin/.claude-plugin my-first-plugin/skills/hello.
Not for: /plugin marketplace add owner/repo failing over SSH (see claude-code-marketplace-add-ssh-slug-fails) or pinning an installed plugin to a commit (see claude-code-plugin-author-vanished-pin-to-commit-sha).
1. Make the plugin
mkdir -p my-first-plugin/.claude-plugin my-first-plugin/skills/hello
my-first-plugin/.claude-plugin/plugin.json (name is the only required field; it becomes the skill prefix and must not contain spaces):
{
"name": "my-first-plugin",
"description": "A greeting plugin to learn the basics",
"version": "1.0.0",
"author": { "name": "Your Name" }
}
my-first-plugin/skills/hello/SKILL.md:
---
name: hello
description: Greet the user with a friendly message
disable-model-invocation: true
---
Greet the user warmly and ask how you can help them today.
Layout rule from the create-a-plugin page: "Only plugin.json goes inside .claude-plugin/." Components such as skills/, agents/, commands/, hooks/hooks.json and .mcp.json go at the plugin root. Existing standalone files move over with cp -r .claude/skills my-plugin/ (same for commands and agents); move hooks from settings into hooks/hooks.json. Delete the originals afterwards, or hooks run twice because they have no prefix.
2. Validate and try it
claude plugin validate ./my-first-plugin
claude --plugin-dir ./my-first-plugin
Inside the session run /my-first-plugin:hello. Add --strict to the validation command when warnings should fail the check. Skills from a plugin are always prefixed with the plugin name. After editing files run /reload-plugins. --plugin-dir loads one session only and takes a plugin root, a .zip, or (v2.1.265 or later) a folder of plugins. Pointing it at a marketplace root loads nothing and shows no error.
3. Publish through a marketplace
mkdir -p my-marketplace/.claude-plugin my-marketplace/plugins
cp -r my-first-plugin my-marketplace/plugins/
my-marketplace/.claude-plugin/marketplace.json (requires name, owner and plugins; each entry needs name and source):
{
"name": "my-marketplace",
"description": "Plugins for my team",
"owner": { "name": "Your Name" },
"plugins": [
{
"name": "my-first-plugin",
"source": "./plugins/my-first-plugin",
"description": "A greeting plugin to learn the basics"
}
]
}
claude plugin validate ./my-marketplace
claude plugin marketplace add ./my-marketplace
claude plugin install my-first-plugin@my-marketplace
claude plugin list
Per the marketplace page the install id is <entry name>@<marketplace name>. After you push the directory to a git host, teammates run claude plugin marketplace add <owner>/<repo>. Relative source paths start at the directory that holds .claude-plugin/. With a local marketplace, edits apply on the next session or /reload-plugins; hosted users get a cached copy and update according to version (host and maintain). Remove with claude plugin marketplace remove my-marketplace.
Errors the docs name
Plugin "<manifest-name>" not found in marketplace "<marketplace>": the entrynamediffers from thenameinplugin.json; keep them identical.Source path does not exist: <path>: a relativesourcepoints at a missing folder;validatestill passes, onlyinstallfails.Path contains "..": ./../plugins/my-first-plugin: relative sources cannot leave the marketplace root.The name '<name>' is reserved for official Anthropic marketplaces: choose another marketplace name.- The plugin loads but its skills are missing:
skills/sits inside.claude-plugin/.
What validate does not catch
Run on Claude Code 2.1.281: a plugin with skills/x/SKILL.md placed inside .claude-plugin/ still printed Validation passed with warnings, and the warnings were only missing version, description and author. So confirm the skill appears after /reload-plugins (or in /plugin, Installed tab) instead of trusting validate alone. If a component is missing, open /plugin > Errors to inspect the load failure and its cause. The validate checks on the first-plugin and marketplace files above both ended in ✔ Validation passed. Not run: claude --plugin-dir, plugin install and marketplace add (they need an interactive session or change your settings).
Evidence
Sources: the official plugin create, marketplace and loading pages above, plus one public report. Issue 44120 (opened 2026-04-06 by devseunggwan, Claude Code 2.1.92) says a plugin's root skills/ was "completely ignored" when the plugin also contained a .claude/ directory; it was closed as not planned by a bot for inactivity on 2026-05-16 (and locked on 2026-07-07) with no maintainer reply, so do not treat the closed report as evidence of a current bug. The report describes checking for a .claude/ folder inside the plugin. Limits: version floors such as v2.1.265 come from the docs, not from runs; the 2.1.281 results above cover validate only.
Started from a post by @Anthropic, packaged by the editor. Original post