docs(kyberforge): fill marketplace and plugin gaps in Claude Code and Copilot research docs

## Why
The initial research pass focused on agent definitions. An audit identified
critical and minor gaps in both doc sets around plugin publishing, marketplace
registration, and the Copilot extensibility model.

## Implementation Notes
Claude Code gaps filled: end-to-end publish walkthrough (scaffold → validate →
tag → host → register), CLI vs in-session command surface equivalence, all six
marketplace source URL formats, plugin update/upgrade lifecycle, interactive
plugin manager UI, private marketplace auth, `commands` vs `skills/` distinction.

Copilot gaps filled: discovered that the GitHub App-based Copilot Extensions
track was sunset November 2025. Created copilot-extensions.md as historical
reference (deprecated, with MCP servers as the current replacement path).
Documented the agent vs. skillset extension type distinction, OAuth install
flow, and VS Code Chat Participants as the surviving @mention mechanism.
overview.md updated with a "Which Track to Use" decision table covering all
four active tracks plus the deprecated one.

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
Defame1297andClaude Sonnet 4.6 committed 2026-06-27 15:40:53 +00:00
1 parent 0c6268f9fe
commit 3e52636da6
9 files changed
+707 -22

No files matched your search

@@ -20,6 +20,7 @@ source_keys:
| `license` | string | No | SPDX license identifier |
| `keywords` | string[] | No | Search/discovery tags |
| `skills` | string | No | Path to skills directory (default: `./skills/`) |
| `commands` | string[] | No | Legacy: explicit list of `.md` command file paths (prefer `skills/`) |
| `agents` | string[] | No | Explicit list of agent file paths |
| `hooks` | string | No | Path to hooks.json |
| `mcpServers` | string | No | Path to MCP server config |
@@ -64,15 +65,42 @@ Fields marked **No** in the "Plugin subagent?" column are silently ignored when
Multiple `--plugin-dir` flags are supported for loading multiple plugins.
## CLI Commands (terminal)
Run these outside a session, from any terminal. These are the same operations as the in-session `/plugin` commands — use whichever surface is available.
| Command | Description |
|---|---|
| `claude plugin init <name>` | Scaffold a new plugin under `~/.claude/skills/<name>/` |
| `claude plugin list [--enabled\|--disabled]` | List installed plugins with version, source, and enabled status |
| `claude plugin validate [<path>]` | Validate a plugin dir or marketplace dir (`.`); `--strict` promotes warnings to errors |
| `claude plugin marketplace add <source>` | Add a marketplace; accepts GitHub shorthand, git URL, remote JSON URL, or local path |
| `claude plugin tag [--push] [--dry-run] [--force]` | Tag a plugin release as `{name}--v{version}` and optionally push to remote |
**`claude plugin marketplace add` source formats:**
| Format | Example | Notes |
|---|---|---|
| GitHub shorthand | `owner/repo` | GitHub only. Pin: `owner/repo@ref` |
| HTTPS git URL | `https://gitlab.com/company/plugins.git` | Any git host. Pin: append `#ref` |
| SSH git URL | `[email protected]:company/plugins.git` | Any git host. Pin: append `#ref` |
| Remote JSON URL | `https://example.com/marketplace.json` | Must point directly to a `marketplace.json` file |
| Local directory | `./my-marketplace` | Directory containing `marketplace.json` |
| Local JSON file | `./path/to/marketplace.json` | Direct path to `marketplace.json` |
## In-Session Commands
Run these inside a running Claude Code session. The `/plugin` subcommands are equivalent to the `claude plugin` CLI subcommands above.
| Command | Description |
|---|---|
| `/reload-plugins` | Pick up plugin file changes without restarting the session |
| `/plugin install` | Install a plugin from a configured marketplace |
| `/plugin marketplace add <source>` | Add a marketplace source |
| `claude plugin init <name>` | Scaffold a new plugin under `~/.claude/skills/<name>/` |
| `claude plugin validate` | Run the same lint checks the marketplace submission pipeline runs |
| `/plugin` | Open the interactive plugin manager (Discover / Installed / Marketplaces / Errors tabs) |
| `/plugin install <name>@<marketplace>` | Install a plugin from a configured marketplace |
| `/plugin list [--enabled\|--disabled]` | List all installed plugins |
| `/plugin update [<name>]` | Update one or all installed plugins |
| `/plugin marketplace add <source>` | Add a marketplace source (same formats as CLI above) |
| `/plugin validate [<path>]` | Validate plugin or marketplace directory |
| `/agents` | Open the agent management UI (Running + Library tabs) |
| `/fork <directive>` | Spawn a fork subagent inheriting full conversation history |
| `@agent-<name>` | Invoke a specific subagent for one task |
@@ -51,6 +51,29 @@ The manifest lives at `.claude-plugin/plugin.json` in the plugin root directory.
All path values in the manifest are relative to the plugin root.
## `commands` vs `skills`
The manifest supports two fields that both register slash-command-style invocations, but they use different formats and have different capabilities:
| Feature | `skills` | `commands` |
|---|---|---|
| Format | `skills/<name>/SKILL.md` directory per skill | Single `.md` files listed as paths |
| Invocation | `/plugin-name:skill-name` (namespaced) | `/command-name` (global, no namespace) |
| Autonomous use by Claude | Yes — Claude can invoke without an explicit `/` command | No — only user-typed `/` triggers it |
| Status | Recommended | Legacy |
The `commands` field is the **legacy** slash-command format. It accepts an array of paths to individual Markdown files:
```json
"commands": ["./custom/commands/special.md"]
```
Each file is a single command definition equivalent to a `.md` file in `.claude/commands/`. The command is invoked as `/filename` (without the extension).
The `skills` field is the recommended replacement. A skill directory (`skills/<name>/SKILL.md`) provides the same `/name` invocation plus autonomous invocation by Claude (Claude can call the skill proactively without the user typing a `/` command). Skills also support bundling supporting files alongside `SKILL.md`.
**Practical rule**: use `skills/` for new plugin content. The `commands` field exists for backward compatibility when porting legacy `.claude/commands/` files into a plugin. The CLI supports both formats.
## Plugin `settings.json`
A `settings.json` at the plugin root applies default settings when the plugin is enabled. Currently supports only two keys:
@@ -44,16 +44,50 @@ This creates the plugin structure and registers it as `my-tool@skills-dir` on th
## Installing from a Marketplace
After configuring a marketplace source:
After configuring a marketplace source, install a plugin:
```
/plugin install
/plugin install my-plugin@marketplace-name
```
To add the community marketplace:
### Adding a marketplace source
Both CLI and in-session commands are equivalent:
```bash
# CLI — run from any terminal
claude plugin marketplace add <source>
# In-session — run inside a running Claude Code session
/plugin marketplace add <source>
```
Accepted `<source>` formats:
| Format | Example |
|---|---|
| GitHub shorthand | `owner/repo` (pin with `owner/repo@ref`) |
| HTTPS git URL | `https://gitlab.com/company/plugins.git` (pin with `#ref`) |
| SSH git URL | `[email protected]:company/plugins.git` (pin with `#ref`) |
| Remote JSON URL | `https://example.com/marketplace.json` |
| Local directory | `./my-marketplace` |
| Local JSON file | `./path/to/marketplace.json` |
The `owner/repo` shorthand is GitHub-only. For Gitea, GitLab, or self-hosted git, use a full HTTPS or SSH URL.
Examples:
```bash
# Add the official community marketplace
claude plugin marketplace add anthropics/claude-plugins-community
/plugin marketplace add anthropics/claude-plugins-community
# Add a private Git marketplace (any host)
claude plugin marketplace add https://gitea.example.com/org/plugins.git
/plugin marketplace add [email protected]:company/plugins.git
# Add a local marketplace for testing
/plugin marketplace add ./my-marketplace
```
## Development Workflow
@@ -29,9 +29,177 @@ Two submission paths:
Before submitting, run `claude plugin validate` locally — the review pipeline runs the same check. Check `marketplace.json` in the community catalog to confirm installability after approval.
## End-to-End Publish Walkthrough
Sequential path from a plugin directory to something installable by others:
**1. Scaffold (or bring your own directory)**
```bash
claude plugin init my-plugin
```
Creates `~/.claude/skills/my-plugin/` with a stub `plugin.json`. For a standalone plugin repo, create the directory structure manually.
**2. Write the manifest**
`plugin.json` (or `.claude-plugin/plugin.json`) at the plugin root:
```json
{
"name": "my-plugin",
"description": "What this plugin does",
"version": "1.0.0"
}
```
`name` is the only required field. Must be kebab-case with no spaces. Becomes the namespace prefix for all skills, agents, and hooks: `my-plugin:skill-name`.
**3. Validate the plugin**
```bash
claude plugin validate ./my-plugin
```
Checks `plugin.json` schema and type compliance, plus skills, agent, command, and hook files inside the directory. Use `--strict` to promote warnings (e.g. unrecognized fields) to errors — recommended in CI.
**4. Create the marketplace catalog**
In the repo that will serve as your marketplace, create `marketplace.json` at the root:
```json
{
"name": "my-plugins",
"owner": { "name": "Your Name" },
"plugins": [
{
"name": "my-plugin",
"source": "./plugins/my-plugin",
"description": "What this plugin does",
"version": "1.0.0"
}
]
}
```
**5. Validate the marketplace**
```bash
# CLI
claude plugin validate .
# In-session
/plugin validate .
```
Checks `marketplace.json` for: schema compliance, duplicate plugin names, source path traversal, version mismatches.
**6. Tag a release**
```bash
claude plugin tag --push
```
Creates a git tag in the format `{plugin-name}--v{version}` (e.g. `my-plugin--v1.0.0`), validates a clean working tree, and pushes to remote. Without `--push`, the tag is created locally only. Downstream plugins that declare a version constraint on this plugin resolve against these tags.
Preview without creating:
```bash
claude plugin tag --dry-run
```
**7. Host the repository**
Push to any git service — GitHub, GitLab, Gitea, Bitbucket, or a self-hosted server. The marketplace is the git repository containing `marketplace.json`. Alternatively, serve `marketplace.json` directly at an HTTPS URL.
**8. Register the marketplace with users**
Both surfaces accept the same source formats (see "Registering a private marketplace" below):
```bash
# CLI (from any terminal)
claude plugin marketplace add owner/repo
# In-session (inside a running Claude Code session)
/plugin marketplace add owner/repo
```
**9. Install from the marketplace**
Once registered:
```
/plugin install my-plugin@my-plugins
```
**10. Submit to the community marketplace (optional)**
See "Submitting to the Community Marketplace" above.
## Private / Team Marketplaces
Teams can host private marketplaces in private git repositories. The marketplace definition is a JSON file:
Teams can host private marketplaces in any git repository. The marketplace definition is a JSON file at the repo root (or a specified subdirectory).
### Registering a private marketplace
Both CLI and in-session commands are equivalent — use whichever surface is available:
| Surface | Command |
|---|---|
| CLI (terminal) | `claude plugin marketplace add <source>` |
| In-session | `/plugin marketplace add <source>` |
**Accepted `<source>` formats:**
| Format | Example | Notes |
|---|---|---|
| GitHub shorthand | `owner/repo` | GitHub only. Pin with `owner/repo@ref` |
| HTTPS git URL | `https://gitlab.com/company/plugins.git` | Any git host. Pin with `#ref` suffix |
| SSH git URL | `[email protected]:company/plugins.git` | Any git host. Pin with `#ref` suffix |
| Remote JSON URL | `https://example.com/marketplace.json` | Must point directly to a `marketplace.json` file |
| Local directory | `./my-marketplace` | Directory containing `marketplace.json` |
| Local JSON file | `./path/to/marketplace.json` | Direct path to the `marketplace.json` file |
Examples:
```shell
# GitHub shorthand (GitHub only)
claude plugin marketplace add acme-corp/claude-plugins
# HTTPS git URL (any host — GitHub, GitLab, Gitea, Bitbucket, self-hosted)
/plugin marketplace add https://github.com/company/internal-plugins.git
# SSH
/plugin marketplace add [email protected]:company/internal-plugins.git
# Pin to a branch, tag, or commit SHA
/plugin marketplace add https://github.com/company/internal-plugins.git#v1.0.0
claude plugin marketplace add owner/repo@main
# GitLab or Gitea work the same way with full URL
/plugin marketplace add [email protected]:company/plugins.git
/plugin marketplace add https://gitea.example.com/org/plugins.git
# Local path for testing before hosting
/plugin marketplace add ./my-marketplace
/plugin marketplace add ./path/to/marketplace.json
```
The `ref` (specified as `#ref` for git URLs or `@ref` for GitHub shorthand) can be a branch name, tag, or full commit SHA. Omitting it follows the default branch.
### Authentication for private repositories
**GitHub / GitHub Enterprise** — set the `GITHUB_TOKEN` environment variable. This is required for background auto-updates from private GitHub repositories:
```bash
export GITHUB_TOKEN=ghp_... # personal access token or fine-grained PAT
```
**SSH-based repos** — Claude Code uses the SSH keys configured in your local SSH agent. Ensure your key is loaded (`ssh-add`) before running Claude Code.
**Generic HTTPS with credentials** — configure credentials in your git credential store (e.g., `git credential-osxkeychain`, `git-credential-manager`, or `~/.netrc`). Claude Code delegates authentication to git for HTTPS clones.
### Marketplace JSON format
```json
{
@@ -60,7 +228,125 @@ Teams can host private marketplaces in private git repositories. The marketplace
}
```
The `source` field accepts either a local path string or a `{ source: "github", repo: "org/repo" }` object.
The `source` field accepts the following forms:
| Form | When to use |
|---|---|
| Local path string (`"./plugins/my-plugin"`) | Plugin lives in the same repo as the marketplace |
| `{ "source": "github", "repo": "owner/repo" }` | Plugin lives in a separate GitHub repo; optionally add `"ref"` (branch/tag) and `"sha"` (exact commit; takes precedence over `ref`) |
| `{ "source": "git", "url": "https://..." }` | Plugin in any git host via URL; optionally add `"ref"` for branch/tag |
| `{ "source": "npm", "package": "@scope/pkg", "version": "1.0.0" }` | Plugin distributed on npm |
> **Note:** The `{ "source": "github", ... }` object form is documented only for GitHub. Gitea and GitLab repos are supported when registering the marketplace itself via `marketplace add`, but their behavior as an inline `source` value inside `marketplace.json` is unverified — use the `git` source type with a full URL instead, or confirm against official docs.
### Pre-registering via managed settings
For org-wide deployment, pre-register the marketplace in managed settings so it appears for all developers automatically:
```json
{
"extraKnownMarketplaces": {
"internal-tools": {
"source": {
"source": "git",
"url": "[email protected]:company/internal-plugins.git"
}
}
}
}
```
Settings-format source object for reference:
```json
{ "source": "git", "url": "https://gitlab.example.com/tools/plugins.git" }
{ "source": "git", "url": "https://bitbucket.org/acme/plugins.git", "ref": "production" }
{ "source": "git", "url": "ssh://[email protected]/plugins.git", "ref": "v3.1", "path": "approved" }
```
The `path` key scopes Claude Code to a subdirectory of the repo as the marketplace root.
## Plugin Discovery and Browsing
The primary browse interface is the interactive plugin manager, opened with `/plugin` (no arguments). It has four tabs:
| Tab | Purpose |
|---|---|
| **Discover** | Browse plugins from all registered marketplaces |
| **Installed** | View and manage installed plugins |
| **Marketplaces** | Add or remove marketplace sources |
| **Errors** | Inspect plugin loading failures |
To list installed plugins non-interactively:
```shell
/plugin list # all installed plugins (version, source, enabled status)
/plugin list --enabled # only enabled plugins
/plugin list --disabled # only disabled plugins
```
CLI equivalent:
```bash
claude plugin list [options]
```
The `keywords` field in `plugin.json` feeds into the Discover tab's search index. Tags like `"git"`, `"formatting"`, or `"security"` make a plugin discoverable when users search those terms inside the plugin manager.
Administrators can allowlist specific marketplaces in managed settings; when set, Claude Code suggests relevant plugins for the current directory automatically.
## Plugin Update Lifecycle
### Manual update
```shell
/plugin update # update all installed plugins
/plugin update <name> # update a specific plugin
```
After an update completes, Claude Code prompts you to run `/reload-plugins` to pick up changes in the current session.
### Auto-update at startup
Marketplaces and their installed plugins can be refreshed automatically each time Claude Code starts. When auto-update runs, marketplace catalogs are pulled and installed plugins are upgraded to their latest versions.
Control auto-update behavior with environment variables:
```bash
export DISABLE_AUTOUPDATER=1 # prevent Claude Code itself from auto-updating
export FORCE_AUTOUPDATE_PLUGINS=1 # force plugin auto-update even when DISABLE_AUTOUPDATER=1
```
### Version resolution
Claude Code uses the installed version string as a cache key. On each update check it computes the current upstream version and skips the download if it matches the installed version.
For Git-based plugins: the version is derived from the git tag or commit SHA. If a plugin is pinned by a version constraint from another plugin, Claude Code automatically upgrades it to the highest satisfying tag.
### Version pinning
For npm-sourced plugins, pin to an exact version or range in the marketplace entry:
```json
{
"name": "my-npm-plugin",
"source": {
"source": "npm",
"package": "@acme/claude-plugin",
"version": "2.1.0"
}
}
```
For Git-sourced plugins, pin to a branch, tag, or commit SHA via the `ref` field:
```json
{
"source": "git",
"url": "https://github.com/org/plugin.git",
"ref": "v2.1.0"
}
```
## Loading Plugins
@@ -3,14 +3,14 @@
## context7-websites-code-claude
- **URL:** context7:/websites/code_claude
- **Description:** Official Claude Code documentation site indexed by Context7 — plugin manifest schema, subagent definition types, marketplace JSON format, agent markdown file format
- **Contributing files:** overview.md, agent-definition.md, configuration.md, examples.md, api-reference.md, marketplace.md
- **Description:** Official Claude Code documentation site indexed by Context7 — plugin manifest schema, subagent definition types, marketplace JSON format, agent markdown file format, plugin update lifecycle, interactive plugin manager UI, private marketplace authentication, `commands` vs `skills/` distinction
- **Contributing files:** overview.md, agent-definition.md, configuration.md, examples.md, api-reference.md, marketplace.md, installation.md
- **Status:** `extracted`
## claude-code-plugins-docs
- **URL:** https://code.claude.com/docs/en/plugins
- **Description:** Official Claude Code plugin authoring guide — plugin structure, manifest fields, loading methods, skill namespacing, agent activation, marketplace submission
- **Description:** Official Claude Code plugin authoring guide — plugin structure, manifest fields, loading methods, skill namespacing, agent activation, marketplace submission, end-to-end publish walkthrough, `claude plugin validate` behavior, marketplace source URL formats, CLI vs in-session command equivalence
- **Contributing files:** overview.md, installation.md, configuration.md, examples.md, api-reference.md, marketplace.md, troubleshooting.md
- **Status:** `extracted`