ai newsFr., 16. Okt.
EilmeldungFaraday Future bringt Humanoid-Roboter für 2.490 Dollar für Entwickler und Schulen

Claude Code Plugins paketieren und im eigenen Marketplace veröffentlichen

Ein Claude Code Plugin bündelt Skills, Agents, Hooks und MCP Server in einem Verzeichnis, das sich als Einheit installieren lässt. Ein Marketplace ist ein git Repository mit einer .claude-plugin/marketplace.json, die die Plugins auflistet.

dev.toFreitag 09:15 · 16.10.DE12 Min. Lesezeit
Bild: dev.to

Veröffentlicht am 16. Okt. • Zuerst erschienen auf wowhow.cloud

Ein Claude Code Plugin ist ein Verzeichnis, das Skills, Agents, Hooks und MCP Server bündelt, damit Claude Code sie als eine Einheit installiert, und ein Marketplace ist ein Git-Repository mit einer.claude-plugin/marketplace.json Datei, die Plugins auflistet. Im Plugin-Manifest ist nur name erforderlich. In der Marketplace-Datei sind nur name, owner und plugins erforderlich.

Ist das Repository privat, ist auch der Marketplace privat. Ich habe jeden Befehl und jedes Feld unten gegen die aktuelle Claude Code Dokumentation und claude plugin --help auf Version 2.1.299 geprüft. Im Folgenden: Plugin vs. Skill vs. MCP vs. Hook, das Layout und das Manifest, Plugin-Hooks vs. Hooks in der settings.json, das Marketplace-Schema, Updates, das Team-Rollout, eine Sicherheitscheckliste und ein Plugin, das du in 15 Minuten veröffentlichen kannst.

Ein Plugin ist Verpackung: Skills, Agents, Hooks und MCP Server werden unter einem Namen und einer Version gemeinsam installiert.

.claude-plugin/plugin.json enthält nur das Manifest. Alles andere liegt im Plugin-Stammverzeichnis.

Veröffentliche ein Repository mit.claude-plugin/marketplace.json. Nutzer führen /plugin marketplace add owner/repo aus und dann /plugin install name@marketplace.

Updates kommen nur an, wenn sich die Version ändert.

Für Teams: extraKnownMarketplaces und enabledPlugins in den verwalteten Einstellungen oder in der.claude/settings.json des Repositories.

Ein Plugin führt Code in deinem Namen aus. Lies vor der Installation seine Hooks,.mcp.json und bin/.

Skills, Subagents, Hooks und MCP Server funktionieren alle eigenständig. Ein Skill in ~/.claude/skills/ ist in jedem Projekt auf deinem Rechner verfügbar. Erstelle ein Plugin, wenn du mehrere Teile gemeinsam installiert, mit Teamkollegen geteilt oder mit Versionen versehen freigegeben haben möchtest. Plugin-Skills und -Agents erhalten den Plugin-Namen als Präfix, sodass zwei Plugins jeweils einen hello-Skill mitliefern können, ohne zu kollidieren. Zur Frage der Ebenen selbst siehe MCP vs CLI vs skills.

| Skill | SKILL.md Anweisungen, die Claude bei Bedarf lädt, auch als Befehl ausführbar | Nein, es lenkt Claude | skills/<name>/SKILL.md | Ein Ordner oder innerhalb eines Plugins |

| MCP Server | Tool-Server, mit dem sich Claude Code verbindet | Ja, ein stdio-Server ist ein Prozess auf deinem Rechner |.mcp.json | Konfigurationsdatei oder innerhalb eines Plugins |

| Hook | Befehl, den Claude Code bei einem Lebenszyklus-Ereignis ausführt | Ja, ein Shell-Befehl mit deinen Berechtigungen | settings.json oder hooks/hooks.json | Einstellungs-Snippet oder innerhalb eines Plugins |

| Plugin | Verzeichnis, das eine beliebige Kombination des oben Genannten mit einem Manifest bündelt | Wenn es Hooks, MCP Server, Monitore oder bin/ enthält | Plugin-Stammverzeichnis, mit optionaler.claude-plugin/plugin.json | Ein Marketplace-Eintrag, ein Zip oder --plugin-dir |

Ein Kostenpunkt: Ein aktiviertes Plugin ist Teil jeder Sitzung. Der Name und die Beschreibung jedes Skills, Agents und Befehls, die Claude eigenständig aufrufen kann, liegen in jeder Runde im Kontext und zählen zur Nutzung, selbst wenn nichts aus dem Plugin ausgeführt wird. Der Claude Max API Credits Planner zeigt, was ein größerer Kontext-Fußabdruck für ein Monatsbudget bedeutet.

Das Layout ist an genau einer Stelle streng. Lege innerhalb von.claude-plugin/ nur plugin.json ab. Dort gespeicherte Komponenten werden nicht geladen. Alle anderen Verzeichnisse liegen im Plugin-Stammverzeichnis:

deploy-tools/ ├──.claude-plugin/ │ └── plugin.json ├── skills/ │ └── deploy/ │ └── SKILL.md ├── agents/ │ └── reviewer.md ├── hooks/ │ └── hooks.json ├── bin/ (auf dem PATH des Bash-Tools, solange aktiviert) └──.mcp.json Vollbildmodus öffnen Vollbildmodus beenden Das Manifest ist optional. Ohne es lädt Claude Code die Komponenten aus diesen Standardorten und nimmt den Namen aus dem Marketplace-Eintrag oder dem Verzeichnis. Schreibe eines für Metadaten, eine Version oder Komponenten außerhalb der Standards. Wissenswerte Felder:

name: der einzige erforderliche Schlüssel. Kebab-Case. Jede Komponente wird darunter namespaced, sodass der Agent reviewer im Plugin deploy-tools als deploy-tools:reviewer erscheint.

version: ein String, wird nicht gegen Semver geprüft. Wird er gesetzt, bleiben Nutzer darauf eingefroren, bis du ihn änderst.

description, author (Objekt, name erforderlich), homepage (muss als URL interpretierbar sein, sonst lädt das Plugin nicht), repository, license, keywords, displayName.

skills, commands, agents, hooks, mcpServers: Pfade oder Inline-Konfiguration für Komponenten außerhalb der Standards. Pfade beginnen mit./ und bleiben innerhalb des Plugin-Stammverzeichnisses.

dependencies und userConfig (Werte, nach denen Claude Code fragt, wobei sensitive: true Geheimnisse aus der settings.json heraushält).

Skills liegen in skills/<name>/SKILL.md und werden als /plugin-name:skill-name ausgeführt. Agents sind Markdown-Dateien in agents/. Hooks kommen in hooks/hooks.json, MCP Server in.mcp.json. Eine CLAUDE.md im Plugin-Stammverzeichnis wird nicht als Kontext geladen, also platziere Anweisungen in einem Skill. Namen, die mit claude- oder anthropic- beginnen, bestehen die Validierung nicht. Ein unbekannter Schlüssel auf oberster Ebene wird nur mit einer Warnung entfernt.

Die Verschachtelung von event, matcher und handler ist identisch. Zwei Unterschiede sind wichtig. Eine Plugin-Hooks-Datei umschließt die Event-Map mit einem Schlüssel "hooks" auf oberster Ebene, und eine nackte Event-Map lädt nicht, während Inline-Hooks in plugin.json keine Hülle haben. Und mitgelieferte Skripte werden über ${CLAUDE_PLUGIN_ROOT} referenziert, das sich bei jedem Update ändert (nutze ${CLAUDE_PLUGIN_DATA} für Zustände, die überdauern müssen). Plugin-Hooks verschmelzen mit deinen Nutzer- und Projekt-Hooks. Hooks haben kein Präfix, daher läuft ein Hook, der in ein Plugin migriert, aber in der settings.json belassen wurde, doppelt.

Ein Marketplace ist ein Verzeichnis oder Repository mit.claude-plugin/marketplace.json. Erforderliche Schlüssel auf oberster Ebene sind name, owner (mit name) und plugins. Jeder Plugin-Eintrag benötigt name und source.

{ "name": "team-tools", "description": "Plugins for my team", "owner": { "name": "Your Name" }, "plugins": [ { "name": "no-bypass", "source": "./plugins/no-bypass", "description": "Blocks git --no-verify and teaches commit hygiene" } ] } Vollbildmodus öffnen Vollbildmodus beenden Die source ist ein relativer Pfad vom Marketplace-Stamm (das Verzeichnis, das.claude-plugin/ enthält, niemals mit..) oder ein Objekt: github (repo, ref, sha), url, git-subdir, npm, archive (Zip über HTTPS, optionaler sha256 Pin) oder command. Halte den Eintragsnamen identisch mit dem in der plugin.json des Plugins, sonst meldet die Installation über den Manifest-Namen, dass das Plugin nicht gefunden wurde. Namen wie claude-plugins-official und claude-community werden nur für Marketplaces akzeptiert, die von github.com/anthropics/ stammen.

Nutzer registrieren einen Marketplace einmalig und installieren dann nach Name. Innerhalb einer Sitzung:

/plugin marketplace add your-org/your-marketplace /plugin install no-bypass@team-tools Vollbildmodus öffnen Vollbildmodus beenden Aus einer Shell: claude plugin marketplace add und claude plugin install no-bypass@team-tools. Der add-Befehl nimmt ein GitHub owner/repo, eine Git-URL, eine gehostete marketplace.json URL oder einen lokalen Pfad. Hänge #<ref> an, um einen Branch oder Tag zu pinnen. Die Kurzform bedeutet immer github.com, GitLab-Nutzer benötigen also die vollständige URL. Ein über eine URL gehosteter Marketplace lädt nur das JSON herunter, daher schlagen Einträge mit relativen Pfaden dort fehl.

Hier verlieren Leute einen Nachmittag. Nutzer bekommen eine neue Kopie nur, wenn sich die berechnete Version ändert. Setze "version": "1.0.0", pushe zehn Commits, und claude plugin update meldet, dass das Plugin bereits auf dem neuesten Stand ist. Bump die version bei jeder Veröffentlichung oder lasse sie sowohl in plugin.json als auch im Marketplace-Eintrag weg, sodass der Commit SHA entscheidet. Setze sie niemals an beiden Stellen: plugin.json gewinnt stillschweigend.

Auto-Update ist standardmäßig ausgeschaltet, und marketplace.json hat dafür kein Feld. Jeder Nutzer aktiviert es unter Marketplaces in /plugin, oder ein Admin setzt "autoUpdate": true in den verwalteten Einstellungen. Andernfalls führen Nutzer claude plugin update name@marketplace aus. Pinne eine Veröffentlichung mit ref oder einem 40-Zeichen-sha im Eintrag. claude plugin tag erstellt ein Git-Tag {name}--v{version}. Benenne ein veröffentlichtes Plugin niemals um; füge stattdessen eine renames-Map zum Marketplace hinzu.

Für ein Team reicht ein privates GitHub-Repository: Jeder, der es klonen kann, kann daraus installieren. Claude Code hat selbst kein Git-Token, und marketplace.json hat kein Anmeldeinformationsfeld, daher nutzen Installationen die Git-Anmeldeinformationen des Rechners. Für HTTPS speichert gh auth login gefolgt von gh auth setup-git eine. Ohne GitHub-SSH-Schlüssel setze CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1. Der Haken: Auto-Update gegen ein privates Repository benötigt eine gespeicherte Anmeldeinformation, und ein Helper, der nachfragen müsste, scheitert lautlos.

Um den Marketplace für ein einzelnes Repository zu registrieren, führe claude plugin marketplace add your-org/your-marketplace --scope project aus und committe die.claude/settings.json, die dabei geschrieben wird. Sie greift, sobald ein Beitragender dem Ordner vertraut. Unternehmensweit kommen die verifizierten Einstellungsnamen in die verwalteten Einstellungen:

{ "extraKnownMarketplaces": { "team-tools": { "source": { "source": "github", "repo": "your-org/team-tools" }, "autoUpdate": true } }, "enabledPlugins": { "no-bypass@team-tools": true } } Vollbildmodus öffnen Vollbildmodus beenden Verwaltete Einstellungen schlagen jeden anderen Bereich, sodass das Deaktivieren des Plugins durch einen Nutzer das Laden nicht verhindert; false in verwalteten enabledPlugins blockiert ein Plugin überall. strictKnownMarketplaces (Alias allowedMarketplaces) ist eine Allowlist, blockedMarketplaces eine Blocklist, die zuerst geprüft wird, und disableSideloadFlags weist --plugin-dir zurück. Eine leere Allowlist blockiert jede Quelle, auch den offiziellen Marketplace, und jede Allowlist stoppt Plugins unter ~/.claude/skills/, es sei denn, du fügst { "source": "skills-dir" } hinzu. Die Aliase benötigen v2.1.232 oder neuer.

Claude Code registriert den offiziellen Marketplace (claude-plugins-official) beim ersten interaktiven Start automatisch, sofern eine verwaltete Richtlinie dies nicht blockiert. Community- und Demo-Marketplaces werden nicht automatisch hinzugefügt. Um alle Nutzer zu erreichen, veröffentlichen Sie ein öffentliches Marketplace-Repository und teilen die beiden Befehle mit, oder reichen Sie Ihren Eintrag bei Anthropics Verzeichnis unter claude.ai/directory/manage ein (dafür ist ein kostenpflichtiger claude.ai-Plan erforderlich; das Verzeichnis erreicht Claude Code über die Konto-Synchronisation als name@synced).

Der offizielle Marketplace nimmt über dieses Portal keine Einreichungen an. Anthropic ordnet Marketplaces dem Namen nach in die Stufen offiziell, Community und Third-Party ein und weist darauf hin, dass der Name nur verrät, wer den Katalog veröffentlicht, nicht was jedes einzelne Plugin tut.

Ein Plugin lässt sich für eine einzige Sitzung mit claude --plugin-dir./my-plugin laden (wiederholbar, akzeptiert auch eine.zip-Datei). Der Pfad muss auf das Wurzelverzeichnis eines einzelnen Plugins zeigen, nicht auf das Wurzelverzeichnis eines Marketplace, sonst wird nichts geladen und es erscheint keine Fehlermeldung. Nach Änderungen führen Sie /reload-plugins aus. Danach:

claude plugin validate./my-plugin prüft das Manifest sowie das Frontmatter jeder Skill-, Agent- und Command-Datei. In der CI zusätzlich mit --strict verwenden.

claude plugin validate./my-marketplace prüft die JSON-Datei und jeden Eintrag.

Mit claude plugin marketplace add./my-marketplace wird der Marketplace hinzugefügt, und daraus lässt sich installieren. Ein relativer Pfad auf ein nicht vorhandenes Verzeichnis besteht die Validierung und schlägt erst bei der Installation fehl.

claude plugin details my-plugin gibt die Komponentenübersicht aus.

In der Dokumentation wird CLAUDE_CONFIG_DIR als Konfigurationsverzeichnis genannt, das Claude Code anstelle von ~/.claude verwendet, aber es gibt keine Anleitung für eine isolierte Installation. Probieren Sie das daher zuerst auf einer Wegwerf-Maschine aus.

Anthropics Formulierung: Ein Plugin kann beliebigen Code auf Ihrem Rechner mit Ihren Nutzerrechten ausführen. Hooks, Monitore, MCP-Server und LSP-Server laufen außerhalb der Sandbox und Ihrer Berechtigungsregeln. Skills und Agents gelangen als Anweisungen in den Kontext. Lesen Sie ein Plugin wie ein Installationsskript. Zum Thema Container siehe Sandboxing von Claude Code und Codex.

Quelle. claude plugin marketplace list zeigt an, woher jeder Marketplace stammt.

Hooks. Lesen Sie hooks/hooks.json vollständig durch. Der Detailbereich zeigt nur, dass ein Hook existiert, nicht was er ausführt.

MCP. Lesen Sie.mcp.json: den Befehl oder die URL jedes Servers.

bin/. Alles dort landet auf dem PATH des Bash-Tools.

Inventar. claude --plugin-dir <dir> plugin details <name> listet bei einem Clone Skills, Agents, Hooks samt Ereignissen und Server auf.

Updates. Wenn Auto-Update aktiviert ist, können bereits geprüfte Dateien sich ändern. Für Marketplaces, die Sie nicht kontrollieren, pinnen Sie einen SHA.

Deinstallieren mit claude plugin uninstall im selben Scope, in dem installiert wurde; die zwischengespeicherten Dateien bleiben 14 Tage unter ~/.claude/plugins/cache/ liegen.

Ein Repository, ein Marketplace, ein Plugin namens no-bypass mit einem Skill und einem PreToolUse-Hook, der git... --no-verify blockiert.

team-tools/ ├──.claude-plugin/ │ └── marketplace.json └── plugins/ └── no-bypass/ ├──.claude-plugin/ │ └── plugin.json ├── skills/ │ └── commit-hygiene/ │ └── SKILL.md ├── hooks/ │ └── hooks.json └── scripts/ └── block-no-verify.sh Vollbildmodus öffnen Vollbildmodus schließen plugins/no-bypass/.claude-plugin/plugin.json

{ "name": "no-bypass", "description": "Blocks git --no-verify and teaches commit hygiene", "version": "1.0.0", "author": { "name": "Your Name" } } Vollbildmodus öffnen Vollbildmodus schließen plugins/no-bypass/skills/commit-hygiene/SKILL.md

--- name: commit-hygiene description: Commit rules for this repo. Use before running git commit. --- Never bypass git hooks. If a pre-commit hook fails, read the output, fix the cause, and commit again. Do not pass --no-verify. Keep commits small. Vollbildmodus öffnen Vollbildmodus schließen plugins/no-bypass/hooks/hooks.json (beachten Sie den übergeordneten "hooks"-Wrapper; die exec-Form mit args hält den Pfad als ein einziges Argument zusammen)

{ "hooks": { "PreToolUse": [ { "matcher": "Bash", "hooks": [ { "type": "command", "command": "bash", "args": [ "${CLAUDE_PLUGIN_ROOT}/scripts/block-no-verify.sh" ] } ] } ] } } Vollbildmodus öffnen Vollbildmodus schließen plugins/no-bypass/scripts/block-no-verify.sh

#!/bin/bash # Reads the PreToolUse JSON on stdin. Exit 2 blocks the call and # shows stderr to Claude. Needs jq on PATH. command = $( jq -r '.tool_input.command // ""' ) if echo " $command " | grep -qE 'git[[:space:]].*--no-verify'; then echo "Blocked: --no-verify skips git hooks. Fix the failing check instead." > &2 exit 2 fi exit 0 Vollbildmodus öffnen Vollbildmodus schließen Bei einem Bash-Aufruf erhält der Hook JSON auf der Standardeingabe, wobei der Befehl in tool_input.command steht. Der Exit-Code 2 blockiert den Aufruf und zeigt Claude die Standardfehlerausgabe. Verwenden Sie pro Hook genau eine Blockiermethode. Das Kurzflag git commit -n bewirkt dasselbe wie --no-verify und wird von diesem regulären Ausdruck nicht erfasst, erweitern Sie das Muster also, falls das relevant ist.

Die Datei.claude-plugin/marketplace.json im Repository-Wurzelverzeichnis ist die oben bereits gezeigte. Dann:

claude plugin validate./team-tools claude plugin validate./team-tools/plugins/no-bypass --strict claude --plugin-dir./team-tools/plugins/no-bypass git init && git add. && git commit -m "no-bypass 1.0.0" # push to github.com/your-org/team-tools, then on any machine: claude plugin marketplace add your-org/team-tools claude plugin install no-bypass@team-tools Vollbildmodus öffnen Vollbildmodus schließen Fragen Sie in der --plugin-dir-Sitzung Claude auf, git commit --no-verify -m test auszuführen. Der Aufruf wird blockiert und Claude sieht Ihre Meldung. Für ein beispielhaftes, installierbares und lesbares Plugin im Marketplace-Format liefert das Opus 5.5 Claude Code Plugin genau in diesem Layout fünf Schutz-Hooks, Effort-Presets und zehn Skills; kombinieren Sie es mit den Opus-5.5-Effort-Einstellungen und CLAUDE.md-Regeln.

Ein Skill reicht aus, solange er Ihnen oder einem einzelnen Projekt dient. Erstellen Sie ein Plugin, um mehrere Komponenten gemeinsam zu installieren, projektübergreifend zu teilen oder versioniert zu veröffentlichen.

Die Version wurde nicht geändert. Ist eine Version in plugin.json gesetzt, meldet claude plugin update bereits latest, bis Sie sie anheben. Lassen Sie das Feld alternativ weg, dann entscheidet der Commit-SHA.

Bei einem privaten Repository tragen Sie extraKnownMarketplaces und enabledPlugins in die Datei.claude/settings.json des Repositorys oder in die verwalteten Einstellungen ein. Repository-Einträge greifen, nachdem jeder Beitragende dem Ordner vertraut hat. Verwaltete Einstellungen lassen sich nicht überschreiben.

Nicht automatisch. Anthropic weist darauf hin, dass ein Plugin Code mit Ihren Nutzerrechten ausführen kann. Prüfen Sie Hooks, MCP-Konfiguration und bin/ unabhängig von der Stufe.

Ja, mit derselben Ereignis- und Matcher-Struktur, eingebettet in einen übergeordneten "hooks"-Schlüssel. Entfernen Sie das Original danach, sonst läuft es doppelt.

Automatisch übersetzt. Das Original auf Englisch ist unten aufklappbar.

Original (Englisch) anzeigen

Posted on Oct 16 • Originally published at wowhow.cloud

A Claude Code plugin is a directory that bundles skills, agents, hooks and MCP servers so Claude Code installs them as one unit, and a marketplace is a git repository with a.claude-plugin/marketplace.json file that lists plugins. Only name is required in the plugin manifest. Only name, owner and plugins are required in the marketplace file. If the repository is private, the marketplace is private. I checked every command and field below against the current Claude Code docs and claude plugin --help on version 2.1.299. Below: plugin vs skill vs MCP vs hook, the layout and manifest, plugin hooks vs settings.json hooks, the marketplace schema, updates, team rollout, a security checklist, and a plugin you can publish in 15 minutes.

A plugin is packaging: skills, agents, hooks and MCP servers installed together under one name and version.

.claude-plugin/plugin.json holds only the manifest. Everything else sits at the plugin root.

Publish a repo with.claude-plugin/marketplace.json. Users run /plugin marketplace add owner/repo, then /plugin install name@marketplace.

Updates arrive only when version changes.

Teams: extraKnownMarketplaces and enabledPlugins in managed settings or the repo's.claude/settings.json.

A plugin runs code as you. Read its hooks,.mcp.json and bin/ before installing.

Skills, subagents, hooks and MCP servers all work on their own. A skill in ~/.claude/skills/ is available in every project on your machine. Make a plugin when you want several pieces installed together, shared with teammates, or released with versions. Plugin skills and agents get the plugin name as a prefix, so two plugins can each ship a hello skill without colliding. For the layer question itself, see MCP vs CLI vs skills.

| Skill | SKILL.md instructions Claude loads when relevant, also runnable as a command | No, it steers Claude | skills/<name>/SKILL.md | A folder, or inside a plugin |

| MCP server | Tool server Claude Code connects to | Yes, a stdio server is a process on your machine |.mcp.json | Config file, or inside a plugin |

| Hook | Command Claude Code runs at a lifecycle event | Yes, a shell command with your permissions | settings.json or hooks/hooks.json | Settings snippet, or inside a plugin |

| Plugin | Directory that bundles any mix of the above with a manifest | If it contains hooks, MCP servers, monitors or bin/ | Plugin root, with optional.claude-plugin/plugin.json | A marketplace entry, a zip, or --plugin-dir |

One cost: an enabled plugin is part of every session. The name and description of each skill, agent and command Claude can invoke on its own sit in context every turn, counting toward usage even when nothing from the plugin runs. The Claude Max API credits planner shows what a heavier context footprint does to a monthly budget.

The layout is strict in one place. Put only plugin.json inside.claude-plugin/. Components saved there do not load. Every other directory sits at the plugin root:

deploy-tools/ ├──.claude-plugin/ │ └── plugin.json ├── skills/ │ └── deploy/ │ └── SKILL.md ├── agents/ │ └── reviewer.md ├── hooks/ │ └── hooks.json ├── bin/ (on the Bash tool PATH while enabled) └──.mcp.json Enter fullscreen mode Exit fullscreen mode The manifest is optional. Without it, Claude Code loads components from these default locations and takes the name from the marketplace entry or directory. Write one for metadata, a version, or components outside the defaults. Fields worth knowing:

name: the only required key. Kebab-case. Every component is namespaced under it, so agent reviewer in plugin deploy-tools appears as deploy-tools:reviewer.

version: a string, not checked against semver. Setting it pins users until you change it.

description, author (object, name required), homepage (must parse as a URL or the plugin fails to load), repository, license, keywords, displayName.

skills, commands, agents, hooks, mcpServers: paths or inline config for components outside the defaults. Paths start with./ and stay inside the plugin root.

dependencies and userConfig (values Claude Code prompts for, with sensitive: true keeping secrets out of settings.json ).

Skills live in skills/<name>/SKILL.md and run as /plugin-name:skill-name. Agents are Markdown files in agents/. Hooks go in hooks/hooks.json, MCP servers in.mcp.json. A CLAUDE.md at the plugin root is not loaded as context, so put instructions in a skill. Names starting with claude- or anthropic- fail validation. An unknown top-level key is stripped with only a warning.

The event, matcher and handler nesting is identical. Two differences matter. A plugin hooks file wraps the event map in a top-level "hooks" key, and a bare event map fails to load, while inline hooks in plugin.json have no wrapper. And bundled scripts are referenced through ${CLAUDE_PLUGIN_ROOT}, which changes on every update (use ${CLAUDE_PLUGIN_DATA} for state that must survive). Plugin hooks merge with your user and project hooks. Hooks have no prefix, so a hook migrated into a plugin but left in settings.json runs twice.

A marketplace is a directory or repository with.claude-plugin/marketplace.json. Required top-level keys are name, owner (with name ) and plugins. Each plugin entry needs name and source.

{ "name": "team-tools", "description": "Plugins for my team", "owner": { "name": "Your Name" }, "plugins": [ { "name": "no-bypass", "source": "./plugins/no-bypass", "description": "Blocks git --no-verify and teaches commit hygiene" } ] } Enter fullscreen mode Exit fullscreen mode The source is a relative path from the marketplace root (the directory containing.claude-plugin/, never with.. ) or an object: github ( repo, ref, sha ), url, git-subdir, npm, archive (zip over HTTPS, optional sha256 pin) or command. Keep the entry name identical to the one in the plugin's plugin.json, or installing by the manifest name reports the plugin as not found. Names like claude-plugins-official and claude-community are accepted only for marketplaces sourced from github.com/anthropics/.

Users register a marketplace once, then install by name. Inside a session:

/plugin marketplace add your-org/your-marketplace /plugin install no-bypass@team-tools Enter fullscreen mode Exit fullscreen mode From a shell: claude plugin marketplace add and claude plugin install no-bypass@team-tools. The add command takes a GitHub owner/repo, a git URL, a hosted marketplace.json URL, or a local path. Append #<ref> to pin a branch or tag. Shorthand always means github.com, so GitLab users need the full URL. A URL-hosted marketplace downloads only the JSON, so relative-path entries fail there.

This is where people lose an afternoon. Users get a new copy only when the computed version changes. Set "version": "1.0.0", push ten commits, and claude plugin update reports the plugin is already at the latest version. Either bump version on every release or omit it from both plugin.json and the marketplace entry so the commit SHA decides. Never set it in both: plugin.json wins silently.

Auto-update is off by default and marketplace.json has no field for it. Each user enables it under Marketplaces in /plugin, or an admin sets "autoUpdate": true in managed settings. Otherwise users run claude plugin update name@marketplace. Pin a release with ref or a 40-character sha on the entry. claude plugin tag creates a {name}--v{version} git tag. Never rename a published plugin; add a renames map to the marketplace instead.

For a team, a private GitHub repository is enough: anyone who can clone it can install from it. Claude Code has no git token of its own and marketplace.json has no credential field, so installs use the machine's git credentials. For HTTPS, gh auth login then gh auth setup-git stores one. Without a GitHub SSH key, set CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1. The catch: auto-update against a private repo needs a stored credential, and a helper that has to prompt fails quietly.

To register the marketplace for one repository, run claude plugin marketplace add your-org/your-marketplace --scope project and commit the.claude/settings.json it writes. It applies once a contributor trusts the folder. Company-wide, the verified setting names go in managed settings:

{ "extraKnownMarketplaces": { "team-tools": { "source": { "source": "github", "repo": "your-org/team-tools" }, "autoUpdate": true } }, "enabledPlugins": { "no-bypass@team-tools": true } } Enter fullscreen mode Exit fullscreen mode Managed settings win over every other scope, so a user disabling the plugin does not stop it loading; false in managed enabledPlugins blocks a plugin everywhere. strictKnownMarketplaces (alias allowedMarketplaces ) is an allowlist, blockedMarketplaces a blocklist checked first, and disableSideloadFlags rejects --plugin-dir. An empty allowlist blocks every source, official marketplace included, and any allowlist stops plugins under ~/.claude/skills/ unless you add { "source": "skills-dir" }. The aliases need v2.1.232 or later.

Claude Code registers the official marketplace ( claude-plugins-official ) on first interactive start unless managed policy blocks it. Community and demo marketplaces are not added automatically. To reach everyone, publish a public marketplace repo and share the two commands, or submit to Anthropic's directory at claude.ai/directory/manage (paid claude.ai plan required; it reaches Claude Code through account sync as name@synced ). The official marketplace takes no submissions through that portal. Anthropic sorts marketplaces into official, community and third-party tiers by name, and says the name tells you who publishes the catalog, not what each plugin does.

Load a plugin for one session with claude --plugin-dir./my-plugin (repeatable, also accepts a.zip ). Point it at one plugin's root, not a marketplace root, or nothing loads and you get no error. After edits, run /reload-plugins. Then:

claude plugin validate./my-plugin checks the manifest and every skill, agent and command frontmatter. Add --strict in CI.

claude plugin validate./my-marketplace checks the JSON and each entry.

claude plugin marketplace add./my-marketplace and install from it. A relative path to a missing directory passes validation and fails at install.

claude plugin details my-plugin prints the component inventory.

The docs name CLAUDE_CONFIG_DIR as the configuration directory Claude Code uses in place of ~/.claude but publish no isolated-install walkthrough, so try that on a scratch machine first.

Anthropic's wording: a plugin can execute arbitrary code on your machine with your user privileges. Hooks, monitors, MCP servers and LSP servers run outside the sandbox and your permission rules. Skills and agents enter context as instructions. Read a plugin like an install script. For the container side, see sandboxing Claude Code and Codex.

Source. claude plugin marketplace list prints where each marketplace came from.

Hooks. Read hooks/hooks.json end to end. The details pane shows a hook exists, not what it runs.

MCP. Read.mcp.json: each server's command or URL.

bin/. Everything there lands on the Bash tool's PATH.

Inventory. claude --plugin-dir <dir> plugin details <name> on a clone lists skills, agents, hooks with events, and servers.

Updates. With auto-update on, reviewed files can change. Pin a sha for marketplaces you do not control.

Uninstall with claude plugin uninstall at the scope you installed; cached files stay under ~/.claude/plugins/cache/ for 14 days.

One repo, one marketplace, one plugin named no-bypass with a skill and a PreToolUse hook that blocks git... --no-verify.

team-tools/ ├──.claude-plugin/ │ └── marketplace.json └── plugins/ └── no-bypass/ ├──.claude-plugin/ │ └── plugin.json ├── skills/ │ └── commit-hygiene/ │ └── SKILL.md ├── hooks/ │ └── hooks.json └── scripts/ └── block-no-verify.sh Enter fullscreen mode Exit fullscreen mode plugins/no-bypass/.claude-plugin/plugin.json

{ "name": "no-bypass", "description": "Blocks git --no-verify and teaches commit hygiene", "version": "1.0.0", "author": { "name": "Your Name" } } Enter fullscreen mode Exit fullscreen mode plugins/no-bypass/skills/commit-hygiene/SKILL.md

--- name: commit-hygiene description: Commit rules for this repo. Use before running git commit. --- Never bypass git hooks. If a pre-commit hook fails, read the output, fix the cause, and commit again. Do not pass --no-verify. Keep commits small. Enter fullscreen mode Exit fullscreen mode plugins/no-bypass/hooks/hooks.json (note the top-level "hooks" wrapper; exec form with args keeps the path as a single argument)

{ "hooks": { "PreToolUse": [ { "matcher": "Bash", "hooks": [ { "type": "command", "command": "bash", "args": [ "${CLAUDE_PLUGIN_ROOT}/scripts/block-no-verify.sh" ] } ] } ] } } Enter fullscreen mode Exit fullscreen mode plugins/no-bypass/scripts/block-no-verify.sh

#!/bin/bash # Reads the PreToolUse JSON on stdin. Exit 2 blocks the call and # shows stderr to Claude. Needs jq on PATH. command = $( jq -r '.tool_input.command // ""' ) if echo " $command " | grep -qE 'git[[:space:]].*--no-verify'; then echo "Blocked: --no-verify skips git hooks. Fix the failing check instead." > &2 exit 2 fi exit 0 Enter fullscreen mode Exit fullscreen mode For a Bash call the hook receives JSON on stdin with the command in tool_input.command. Exit code 2 blocks the call and shows stderr to Claude. Use one blocking method per hook. The short flag git commit -n does the same as --no-verify and this regex misses it, so extend the pattern if that matters.

.claude-plugin/marketplace.json at the repo root is the one shown earlier. Then:

claude plugin validate./team-tools claude plugin validate./team-tools/plugins/no-bypass --strict claude --plugin-dir./team-tools/plugins/no-bypass git init && git add. && git commit -m "no-bypass 1.0.0" # push to github.com/your-org/team-tools, then on any machine: claude plugin marketplace add your-org/team-tools claude plugin install no-bypass@team-tools Enter fullscreen mode Exit fullscreen mode In the --plugin-dir session, ask Claude to run git commit --no-verify -m test. The call is blocked and Claude sees your message. For a marketplace-ready example you can install and read, the Opus 5.5 Claude Code Plugin ships five guard hooks, effort presets and ten skills in exactly this layout; pair it with the Opus 5.5 effort settings and CLAUDE.md rules.

A skill is enough while it serves you or one project. Make a plugin to install several components together, share them across projects, or release versions.

The version did not change. With version set in plugin.json, claude plugin update reports already latest until you bump it. Or omit it so the commit SHA decides.

Private repo, then extraKnownMarketplaces and enabledPlugins in the repo's.claude/settings.json or in managed settings. Repository entries apply after each contributor trusts the folder. Managed settings cannot be overridden.

Not automatically. Anthropic says a plugin can run code with your user privileges. Review hooks, MCP config and bin/ whatever the tier.

Yes, with the same event and matcher structure, wrapped in a top-level "hooks" key. Remove the original afterwards or it runs twice.

Originaltitel: Claude Code Plugin Marketplace 2026: Package and PublishQuelle: dev.to (dev.to). Original öffnen