You have a skill that works and you want your colleagues to use it too, and to receive the fixes when you improve it. Copying the folder by hand works once; by the second version nobody knows which copy is which. The Claude Code documentation solves the problem with the plugin (a folder that holds skills, hooks, MCP servers) and with the catalog (marketplace), a JSON file that lists plugins and says where to get them. Here I package the skill from the previous articles, write a test catalog, check the documented rules with a script and measure when a version really changes.
This article follows the one on governing skills, plugins and MCP servers, of which it is the opposite side: there you decide what to let in, here you prepare what goes in. The starting skill is the one built in Building a Claude Skill from scratch. The "marketplace" discussed is not a shop with prices or install statistics: in the documentation it is a catalog of plugins that anyone can host in a repository, and I found no selling or rating feature in it.
Three ways to distribute, with different costs
The "Publish and distribute a plugin" page distinguishes three paths, and the choice depends on who has to install. Without a catalog you hand over the folder or a zip file: whoever receives it loads that copy and, to get the next version, downloads it again. With a catalog of your own, a git repository and a .claude-plugin/marketplace.json file are enough; the repository can be private, and whoever can clone it can install. The third path is Anthropic's directory, which requires a GitHub repository and a paid claude.ai plan for submission. The details of the review are described on claude.com, which I did not open: I do not report them.
For a working group the second path is almost always the right one, because it depends on nobody and can be enforced with the keys seen in the previous article. Automatic update, the same page notes, is off by default on your own catalog: whoever wants the new version has to ask for it (claude plugin update) or turn on automatic update for that catalog. Whoever publishes must therefore know that publishing does not mean "reaching everyone at once".
From skill to plugin
A single skill is a folder with a SKILL.md. To become distributable it goes into a plugin, that is a folder with a manifest in .claude-plugin/plugin.json and a skills/ subfolder. The only required field of the manifest is name; the documentation recommends kebab-case and warns you to treat the name as permanent, because users install and configure the plugin as name@catalog and a changed name is, for whoever already installed it, a different plugin. A plugin's skills are invoked with the plugin name as a prefix: the revisione-migration skill of the revisione-migration plugin becomes /revisione-migration:revisione-migration, which avoids collisions with personal or project skills.
$ find catalogo-buono -type f | sort
# Output:
# catalogo-buono/.claude-plugin/marketplace.json
# catalogo-buono/plugins/revisione-migration/.claude-plugin/plugin.json
# catalogo-buono/plugins/revisione-migration/skills/revisione-migration/regole.md
# catalogo-buono/plugins/revisione-migration/skills/revisione-migration/scripts/check_migration.py
# catalogo-buono/plugins/revisione-migration/skills/revisione-migration/SKILL.md
The structure is flat: the catalog has its own file in .claude-plugin/ and the plugins sit under plugins/, each with its own manifest and its own skills. It is the shape the "Create a marketplace" guide uses in its example. The tree also contains the check script and the rules the skill uses: the script travels with the plugin, because the skill invokes it with a path relative to its own folder.
{
"name": "revisione-migration",
"description": "Reviews Flyway migrations before the merge",
"version": "0.1.0",
"author": { "name": "Platform team" }
}
The manifest is deliberately minimal: name, description, version, author. The line that decides how your colleagues will receive updates is "version", and the section on versions, further down, explains why it must be chosen with care. Before publishing, the documentation also asks for homepage and repository and a README.md at the root; for an internal test catalog I left them out.
The catalog
{
"name": "plugin-approvati",
"description": "Internal plugins of the platform team (test catalog)",
"owner": { "name": "Platform team" },
"plugins": [
{
"name": "revisione-migration",
"source": "./plugins/revisione-migration",
"description": "Reviews Flyway migrations before the merge"
}
]
}
The file requires three fields at the first level: name, owner (with at least a name) and plugins. Each entry in plugins requires name and source. For a plugin that lives in the same repository, source is a path relative to the catalog root and must start with ./; for plugins elsewhere the documentation lists other source types (github, url, git-subdir, npm, archive, command), each with its own fields. The description is not required but claude plugin validate warns if it is missing. The catalog's name is the part users will type after the at sign, so it is worth choosing one that other authors are unlikely to choose: a user cannot have two catalogs with the same name.
Checking the catalog before publishing it
The official tool for the check is claude plugin validate, which requires Claude Code and which I did not run here. I instead reproduced in a script some of the rules that the catalog reference page lists as errors or warnings, for two reasons: it can run in continuous integration without installing anything, and writing it forces you to read the rules one by one. It is not a substitute: it covers a fraction of the rules and ignores many (sources other than the relative path, rename aliases, header fields).
"""Reproduces some documented rules of marketplace.json (it does not replace `claude plugin validate`)."""
import json
import re
import sys
from pathlib import Path
CAMPI_NOTI = {"$schema", "name", "description", "version", "owner", "plugins", "metadata",
"forceRemoveDeletedPlugins", "allowCrossMarketplaceDependenciesOn", "renames"}
NOME_VALIDO = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._-]*$")
def controlla(radice):
radice = Path(radice)
cat = json.loads((radice / ".claude-plugin" / "marketplace.json").read_text(encoding="utf-8"))
errori, avvisi = [], []
for chiave in ("name", "owner", "plugins"):
if chiave not in cat:
errori.append(f"missing required field '{chiave}'")
if "name" in cat and (not NOME_VALIDO.match(cat["name"]) or ".." in cat["name"]):
errori.append(f"invalid catalog name: {cat['name']!r}")
if "owner" in cat and "name" not in cat["owner"]:
errori.append("owner.name is required")
if "description" not in cat:
avvisi.append("catalog description is missing")
avvisi += [f"unknown field, ignored at load time: {k}" for k in sorted(set(cat) - CAMPI_NOTI)]
for i, voce in enumerate(cat.get("plugins", [])):
dove = f"plugins[{i}]"
if "name" not in voce or "source" not in voce:
errori.append(f"{dove}: name and source are required")
continue
if not NOME_VALIDO.match(voce["name"]):
errori.append(f"{dove}: invalid plugin name: {voce['name']!r}")
sorgente = voce["source"]
if isinstance(sorgente, str):
if sorgente != "." and not sorgente.startswith("./"):
errori.append(f"{dove}.source: the relative path must start with ./ ({sorgente!r})")
elif ".." in Path(sorgente).parts:
errori.append(f"{dove}.source: the path leaves the catalog root ({sorgente!r})")
else:
manifest = radice / sorgente / ".claude-plugin" / "plugin.json"
if manifest.is_file():
v_manifest = json.loads(manifest.read_text(encoding="utf-8")).get("version")
if "version" in voce and v_manifest and voce["version"] != v_manifest:
avvisi.append(f"{dove}: the entry declares {voce['version']} but plugin.json says {v_manifest}; plugin.json wins")
return errori, avvisi
esito = 0
for percorso in sys.argv[1:]:
errori, avvisi = controlla(percorso)
print(f"{percorso}: {len(errori)} errors, {len(avvisi)} warnings")
for e in errori:
print(" error:", e)
for a in avvisi:
print(" warning:", a)
esito |= bool(errori)
sys.exit(esito)
There are seven rules implemented, all taken from the documentation. The required fields and the valid name (letters, digits, dot, underscore and hyphen, starting with an alphanumeric, without "..") are errors; the missing description and the unknown fields are warnings, because Claude Code ignores them at load time instead of rejecting the file; the path without ./ and the one that leaves the root are errors. The most instructive case is the last: if the entry declares a version different from the manifest's, the documentation says that at install time plugin.json wins, and the script reports it as a warning. The exit code is 1 if there is at least one error.
{
"name": "plugin approvati",
"owner": {
"email": "platform@example.invalid"
},
"plugins": [
{
"name": "revisione-migration",
"source": "./plugins/revisione-migration",
"version": "0.2.0"
},
{
"name": "senza-punto",
"source": "plugins/revisione-migration"
},
{
"name": "fuori",
"source": "./../altrove"
}
],
"author": "team"
}
This test catalog concentrates the typical errors: a name with a space, an owner without a name, an entry with version 0.2.0 while the manifest says 0.1.0, a source without the leading ./ and one that climbs out of the root. The author field at the bottom is a mistake for owner that Claude Code would ignore without complaint.
$ python3 controlla_catalogo.py catalogo-buono catalogo-sbagliato
# Output:
# catalogo-buono: 0 errors, 0 warnings
# catalogo-sbagliato: 4 errors, 3 warnings
# error: invalid catalog name: 'plugin approvati'
# error: owner.name is required
# error: plugins[1].source: the relative path must start with ./ ('plugins/revisione-migration')
# error: plugins[2].source: the path leaves the catalog root ('./../altrove')
# warning: catalog description is missing
# warning: unknown field, ignored at load time: author
# warning: plugins[0]: the entry declares 0.2.0 but plugin.json says 0.1.0; plugin.json wins
The good catalog passes with no findings; the wrong one produces four errors and three warnings, one for each defect inserted. The line with the version warning is the one that does the most damage in practice, because it blocks nothing: whoever updates the version only in the catalog entry and not in the manifest publishes an update that nobody will receive.
Versions: when an update really arrives
Claude Code computes a version for each installed plugin and uses it to notice that something new is available: if the computed version equals the recorded one, claude plugin update prints "already at the latest version" and does not replace the cached copy. The documented resolution order, for plugins taken from a catalog, is this: first the manifest's version field, then the catalog entry's, and if both are missing the version derives from the source, which for a git repository is the commit SHA abbreviated to 12 characters. There are two consequences, opposite, and the documentation states both.
If you pin version in the manifest, every commit that does not change that string leaves users on the old copy, however many commits you make. It is an advantage when you want to publish only decided versions and a trap when you forget it. If instead you remove version from manifest and entry, every commit is a new version: users follow the branch and also receive half-finished changes. The choice belongs to the release flow, not to the plugin. To show it I wrote a scenario with a git repository created from scratch and commits with fixed date and author, so that the SHAs are reproducible.
"""Shows when the computed version of a plugin changes, following the documented resolution order."""
import json
import os
import shutil
import subprocess
import sys
from pathlib import Path
sorgente, lavoro = Path(sys.argv[1]), Path(sys.argv[2])
ENV = {**os.environ, "GIT_CONFIG_NOSYSTEM": "1", "GIT_AUTHOR_NAME": "t", "GIT_AUTHOR_EMAIL": "t@example.invalid",
"GIT_COMMITTER_NAME": "t", "GIT_COMMITTER_EMAIL": "t@example.invalid",
"GIT_AUTHOR_DATE": "2026-11-13T10:00:00+0000", "GIT_COMMITTER_DATE": "2026-11-13T10:00:00+0000"}
def git(*argomenti):
return subprocess.run(["git", *argomenti], cwd=lavoro, env=ENV, check=True, capture_output=True, text=True).stdout.strip()
def versione_calcolata(plugin_json, voce):
# documented order: 1) version in the manifest, 2) version in the catalog entry, 3) commit SHA (12 characters)
return plugin_json.get("version") or voce.get("version") or git("rev-parse", "HEAD")[:12]
shutil.rmtree(lavoro, ignore_errors=True)
shutil.copytree(sorgente, lavoro)
git("init", "-q", "-b", "main")
manifest = lavoro / "plugins/revisione-migration/.claude-plugin/plugin.json"
voce = json.loads((lavoro / ".claude-plugin/marketplace.json").read_text())["plugins"][0]
skill = lavoro / "plugins/revisione-migration/skills/revisione-migration/SKILL.md"
def committa(messaggio):
git("add", "-A")
git("commit", "-q", "-m", messaggio)
def riga(etichetta):
con = json.loads(manifest.read_text())
senza = {k: v for k, v in con.items() if k != "version"}
print(f"{etichetta:<28} with version: {versione_calcolata(con, voce):<14} without version: {versione_calcolata(senza, voce)}")
committa("first version")
riga("after the first commit")
skill.write_text(skill.read_text() + "\n4. Cite the line number of every finding.\n")
committa("change to the instructions")
riga("after a commit, no bump")
con = json.loads(manifest.read_text())
con["version"] = "0.2.0"
manifest.write_text(json.dumps(con, indent=2) + "\n")
committa("bump to 0.2.0")
riga("after the bump to 0.2.0")
The function that matters is versione_calcolata: three alternatives in cascade with or, in the documented order. It is a reproduction, not Claude Code's code, and it has a limit that I declare: for a relative path inside a catalog hosted on git the documentation speaks of "the SHA of the commit of the installed folder" without specifying which commit that is when the repository contains several plugins, and I use the head of the repository. The scenario has a single plugin, so the difference does not show up here.
$ python3 scenario_versioni.py catalogo-buono work
# Output:
# after the first commit with version: 0.1.0 without version: ab3c76175be2
# after a commit, no bump with version: 0.1.0 without version: 57d9e3b98929
# after the bump to 0.2.0 with version: 0.2.0 without version: f13bc4744bab
The left column shows the manifest as it is: 0.1.0 after the first commit, 0.1.0 also after a change to the instructions (no user would receive it), 0.2.0 only after the bump. In the right column, which simulates the absence of the field, the version changes at every commit. The SHAs shown depend on the content of the files and on the data fixed in the script: with other files they will be different.
Publishing, updating, renaming
The commands an author and their users use are few and documented. I did not run them, because they require Claude Code: I report them as a schema to adapt, with the outputs the documentation itself indicates (✔ Validation passed at the end of a successful validation).
# SCHEMA TO ADAPT, NOT EXECUTED: requires Claude Code installed
claude plugin validate ./catalogo-buono/plugins/revisione-migration --strict
claude plugin validate ./catalogo-buono
claude plugin marketplace add ./catalogo-buono
claude plugin install revisione-migration@plugin-approvati
claude plugin list
claude plugin update revisione-migration@plugin-approvati
claude plugin tag --push # from the plugin folder: creates revisione-migration--v<version>
The order makes sense: validating the plugin first and then the catalog isolates the origin of an error; marketplace add and install retrace the path the user will take, and update verifies that the bump arrives. The last line is needed in one case only: the documentation says to tag with claude plugin tag (the tag has the form name--v<version>) when other plugins declare a version range of yours, because those ranges resolve on tags; in other cases the tag is not needed.
Two rules concern the life cycle. Never change the name of a published plugin: whoever installed it loses it, because the installation is recorded under the old name; the catalog's renames field, a map from the old name to the new one (or to null for a removed plugin), migrates users, and displayName is for when you only want to change the label. To remove a plugin from the catalog and have it uninstalled from machines there is forceRemoveDeletedPlugins.
The responsibility of whoever publishes
Whoever maintains a catalog with automatic update on decides, in effect, which code will run on other people's machines: the plugin security documentation says an installed plugin can execute code with the user's privileges, and that reviewed files can change on disk if automatic update is active. Simple practices follow from this. Review the changes to hooks/hooks.json, .mcp.json and bin/ at every release, with a tool like the one in the previous article. For github, url and git-subdir sources the catalog accepts a sha field, a full 40-character commit: if both ref and sha are present, Claude Code extracts sha. For archive sources it accepts a sha256, and Claude Code refuses to install if the downloaded digest does not match. And do not add to an existing plugin a hook or a server that was not there before without saying so in the release notes: for whoever approved it, that plugin is no longer the same.
Frequently asked questions
Can I publish a skill without making a plugin?
The documentation lists three scopes for sharing a skill: the project (the .claude/skills/ folder under version control), the plugin and the organization's managed settings. For a group that does not share a repository, the plugin is the way that carries a version with it.
Do I have to make the code public to distribute it?
No, for a catalog of your own: if the repository is private, the catalog is private, and whoever can clone it installs from it. For Anthropic's directory you need a GitHub repository containing the plugin; the publication terms are on claude.com, which I did not consult.
How do I keep the old behavior for those who do not want to update?
If the source is pinned to a commit with sha and the version does not change, users stay on the same copy. To offer a stable channel and an early one the documentation describes two catalogs pointing to different ref values of the same plugins, assigned to groups with different managed settings; I did not try it here.
What you can do now
You can turn a skill into a plugin with its manifest, describe it in a catalog with the required fields, check the documented rules with a reproducible script and choose knowingly between a pinned version and a per-commit version, knowing which of the two leaves users on the old copy. In the next article I move from distribution to observation: how you see what an MCP server does when a call goes wrong.
Sources
- Claude Code, Publish and distribute a plugin - three distribution paths, choice of version, tag command, renaming and removal. Consulted on 2026-11-13.
- Claude Code, Create a marketplace - structure of
marketplace.json, required fields, local test procedure. Consulted on 2026-11-13. - Claude Code, Marketplace reference - catalog fields, source types, validation errors and warnings. Consulted on 2026-11-13.
- Claude Code, Plugin loading reference - version resolution order and update rules. Consulted on 2026-11-13.
- Claude Code, Plugin security and trust - what a plugin can do and automatic updates. Consulted on 2026-11-13.
- Claude Code, Extend Claude with skills - scopes for sharing skills (project, plugin, managed settings). Consulted on 2026-11-13.

Commenti
Caricamento commenti...
Sign in to comment