caruso 0.6.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +41 -0
- data/impl.md +111 -0
- data/lib/caruso/adapter.rb +16 -96
- data/lib/caruso/adapters/base.rb +102 -0
- data/lib/caruso/adapters/command_adapter.rb +88 -0
- data/lib/caruso/adapters/dispatcher.rb +83 -0
- data/lib/caruso/adapters/hook_adapter.rb +222 -0
- data/lib/caruso/adapters/markdown_adapter.rb +23 -0
- data/lib/caruso/adapters/skill_adapter.rb +87 -0
- data/lib/caruso/cli.rb +22 -6
- data/lib/caruso/config_manager.rb +30 -28
- data/lib/caruso/fetcher.rb +137 -29
- data/lib/caruso/remover.rb +73 -13
- data/lib/caruso/version.rb +1 -1
- data/package-lock.json +6 -0
- data/reference/claude_code_create_marketplaces.md +511 -0
- data/reference/claude_code_hooks.md +1137 -0
- data/reference/claude_code_plugins.md +769 -0
- data/reference/claude_code_slash_commands.md +515 -0
- data/reference/cursor_commands.md +90 -0
- data/reference/cursor_hooks.md +467 -0
- data/reference/cursor_modes.md +105 -0
- data/reference/cursor_rules.md +246 -0
- data/reference/steering_docs.md +57 -0
- data/tasks.md +22 -0
- metadata +20 -3
- data/reference/plugins_reference.md +0 -376
- /data/reference/{marketplace.md → claude_code_marketplaces.md} +0 -0
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
# Create and distribute a plugin marketplace
|
|
2
|
+
|
|
3
|
+
> Build and host plugin marketplaces to distribute Claude Code extensions across teams and communities.
|
|
4
|
+
|
|
5
|
+
A plugin marketplace is a catalog that lets you distribute plugins to others. Marketplaces provide centralized discovery, version tracking, automatic updates, and support for multiple source types (git repositories, local paths, and more). This guide shows you how to create your own marketplace to share plugins with your team or community.
|
|
6
|
+
|
|
7
|
+
Looking to install plugins from an existing marketplace? See [Discover and install prebuilt plugins](/en/discover-plugins).
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Creating and distributing a marketplace involves:
|
|
12
|
+
|
|
13
|
+
1. **Creating plugins**: build one or more plugins with commands, agents, hooks, MCP servers, or LSP servers. This guide assumes you already have plugins to distribute; see [Create plugins](/en/plugins) for details on how to create them.
|
|
14
|
+
2. **Creating a marketplace file**: define a `marketplace.json` that lists your plugins and where to find them (see [Create the marketplace file](#create-the-marketplace-file)).
|
|
15
|
+
3. **Host the marketplace**: push to GitHub, GitLab, or another git host (see [Host and distribute marketplaces](#host-and-distribute-marketplaces)).
|
|
16
|
+
4. **Share with users**: users add your marketplace with `/plugin marketplace add` and install individual plugins (see [Discover and install plugins](/en/discover-plugins)).
|
|
17
|
+
|
|
18
|
+
Once your marketplace is live, you can update it by pushing changes to your repository. Users refresh their local copy with `/plugin marketplace update`.
|
|
19
|
+
|
|
20
|
+
## Walkthrough: create a local marketplace
|
|
21
|
+
|
|
22
|
+
This example creates a marketplace with one plugin: a `/review` command for code reviews. You'll create the directory structure, add a slash command, create the plugin manifest and marketplace catalog, then install and test it.
|
|
23
|
+
|
|
24
|
+
<Steps>
|
|
25
|
+
<Step title="Create the directory structure">
|
|
26
|
+
```bash theme={null}
|
|
27
|
+
mkdir -p my-marketplace/.claude-plugin
|
|
28
|
+
mkdir -p my-marketplace/plugins/review-plugin/.claude-plugin
|
|
29
|
+
mkdir -p my-marketplace/plugins/review-plugin/commands
|
|
30
|
+
```
|
|
31
|
+
</Step>
|
|
32
|
+
|
|
33
|
+
<Step title="Create the plugin command">
|
|
34
|
+
Create a Markdown file that defines what the `/review` command does.
|
|
35
|
+
|
|
36
|
+
```markdown my-marketplace/plugins/review-plugin/commands/review.md theme={null}
|
|
37
|
+
Review the code I've selected or the recent changes for:
|
|
38
|
+
- Potential bugs or edge cases
|
|
39
|
+
- Security concerns
|
|
40
|
+
- Performance issues
|
|
41
|
+
- Readability improvements
|
|
42
|
+
|
|
43
|
+
Be concise and actionable.
|
|
44
|
+
```
|
|
45
|
+
</Step>
|
|
46
|
+
|
|
47
|
+
<Step title="Create the plugin manifest">
|
|
48
|
+
Create a `plugin.json` file that describes the plugin. The manifest goes in the `.claude-plugin/` directory.
|
|
49
|
+
|
|
50
|
+
```json my-marketplace/plugins/review-plugin/.claude-plugin/plugin.json theme={null}
|
|
51
|
+
{
|
|
52
|
+
"name": "review-plugin",
|
|
53
|
+
"description": "Adds a /review command for quick code reviews",
|
|
54
|
+
"version": "1.0.0"
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
</Step>
|
|
58
|
+
|
|
59
|
+
<Step title="Create the marketplace file">
|
|
60
|
+
Create the marketplace catalog that lists your plugin.
|
|
61
|
+
|
|
62
|
+
```json my-marketplace/.claude-plugin/marketplace.json theme={null}
|
|
63
|
+
{
|
|
64
|
+
"name": "my-plugins",
|
|
65
|
+
"owner": {
|
|
66
|
+
"name": "Your Name"
|
|
67
|
+
},
|
|
68
|
+
"plugins": [
|
|
69
|
+
{
|
|
70
|
+
"name": "review-plugin",
|
|
71
|
+
"source": "./plugins/review-plugin",
|
|
72
|
+
"description": "Adds a /review command for quick code reviews"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
</Step>
|
|
78
|
+
|
|
79
|
+
<Step title="Add and install">
|
|
80
|
+
Add the marketplace and install the plugin.
|
|
81
|
+
|
|
82
|
+
```shell theme={null}
|
|
83
|
+
/plugin marketplace add ./my-marketplace
|
|
84
|
+
/plugin install review-plugin@my-plugins
|
|
85
|
+
```
|
|
86
|
+
</Step>
|
|
87
|
+
|
|
88
|
+
<Step title="Try it out">
|
|
89
|
+
Select some code in your editor and run your new command.
|
|
90
|
+
|
|
91
|
+
```shell theme={null}
|
|
92
|
+
/review
|
|
93
|
+
```
|
|
94
|
+
</Step>
|
|
95
|
+
</Steps>
|
|
96
|
+
|
|
97
|
+
To learn more about what plugins can do, including hooks, agents, MCP servers, and LSP servers, see [Plugins](/en/plugins).
|
|
98
|
+
|
|
99
|
+
<Note>
|
|
100
|
+
**How plugins are installed**: When users install a plugin, Claude Code copies the plugin directory to a cache location. This means plugins can't reference files outside their directory using paths like `../shared-utils`, because those files won't be copied.
|
|
101
|
+
|
|
102
|
+
If you need to share files across plugins, use symlinks (which are followed during copying) or restructure your marketplace so the shared directory is inside the plugin source path. See [Plugin caching and file resolution](/en/plugins-reference#plugin-caching-and-file-resolution) for details.
|
|
103
|
+
</Note>
|
|
104
|
+
|
|
105
|
+
## Create the marketplace file
|
|
106
|
+
|
|
107
|
+
Create `.claude-plugin/marketplace.json` in your repository root. This file defines your marketplace's name, owner information, and a list of plugins with their sources.
|
|
108
|
+
|
|
109
|
+
Each plugin entry needs at minimum a `name` and `source` (where to fetch it from). See the [full schema](#marketplace-schema) below for all available fields.
|
|
110
|
+
|
|
111
|
+
```json theme={null}
|
|
112
|
+
{
|
|
113
|
+
"name": "company-tools",
|
|
114
|
+
"owner": {
|
|
115
|
+
"name": "DevTools Team",
|
|
116
|
+
"email": "devtools@example.com"
|
|
117
|
+
},
|
|
118
|
+
"plugins": [
|
|
119
|
+
{
|
|
120
|
+
"name": "code-formatter",
|
|
121
|
+
"source": "./plugins/formatter",
|
|
122
|
+
"description": "Automatic code formatting on save",
|
|
123
|
+
"version": "2.1.0",
|
|
124
|
+
"author": {
|
|
125
|
+
"name": "DevTools Team"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "deployment-tools",
|
|
130
|
+
"source": {
|
|
131
|
+
"source": "github",
|
|
132
|
+
"repo": "company/deploy-plugin"
|
|
133
|
+
},
|
|
134
|
+
"description": "Deployment automation tools"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Marketplace schema
|
|
141
|
+
|
|
142
|
+
### Required fields
|
|
143
|
+
|
|
144
|
+
| Field | Type | Description | Example |
|
|
145
|
+
| :-------- | :----- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------- |
|
|
146
|
+
| `name` | string | Marketplace identifier (kebab-case, no spaces). This is public-facing: users see it when installing plugins (for example, `/plugin install my-tool@your-marketplace`). | `"acme-tools"` |
|
|
147
|
+
| `owner` | object | Marketplace maintainer information ([see fields below](#owner-fields)) | |
|
|
148
|
+
| `plugins` | array | List of available plugins | See below |
|
|
149
|
+
|
|
150
|
+
<Note>
|
|
151
|
+
**Reserved names**: The following marketplace names are reserved for official Anthropic use and cannot be used by third-party marketplaces: `claude-code-marketplace`, `claude-code-plugins`, `claude-plugins-official`, `anthropic-marketplace`, `anthropic-plugins`, `agent-skills`, `life-sciences`. Names that impersonate official marketplaces (like `official-claude-plugins` or `anthropic-tools-v2`) are also blocked.
|
|
152
|
+
</Note>
|
|
153
|
+
|
|
154
|
+
### Owner fields
|
|
155
|
+
|
|
156
|
+
| Field | Type | Required | Description |
|
|
157
|
+
| :------ | :----- | :------- | :------------------------------- |
|
|
158
|
+
| `name` | string | Yes | Name of the maintainer or team |
|
|
159
|
+
| `email` | string | No | Contact email for the maintainer |
|
|
160
|
+
|
|
161
|
+
### Optional metadata
|
|
162
|
+
|
|
163
|
+
| Field | Type | Description |
|
|
164
|
+
| :--------------------- | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
165
|
+
| `metadata.description` | string | Brief marketplace description |
|
|
166
|
+
| `metadata.version` | string | Marketplace version |
|
|
167
|
+
| `metadata.pluginRoot` | string | Base directory prepended to relative plugin source paths (for example, `"./plugins"` lets you write `"source": "formatter"` instead of `"source": "./plugins/formatter"`) |
|
|
168
|
+
|
|
169
|
+
## Plugin entries
|
|
170
|
+
|
|
171
|
+
Each plugin entry in the `plugins` array describes a plugin and where to find it. You can include any field from the [plugin manifest schema](/en/plugins-reference#plugin-manifest-schema) (like `description`, `version`, `author`, `commands`, `hooks`, etc.), plus these marketplace-specific fields: `source`, `category`, `tags`, and `strict`.
|
|
172
|
+
|
|
173
|
+
### Required fields
|
|
174
|
+
|
|
175
|
+
| Field | Type | Description |
|
|
176
|
+
| :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
177
|
+
| `name` | string | Plugin identifier (kebab-case, no spaces). This is public-facing: users see it when installing (for example, `/plugin install my-plugin@marketplace`). |
|
|
178
|
+
| `source` | string\|object | Where to fetch the plugin from (see [Plugin sources](#plugin-sources) below) |
|
|
179
|
+
|
|
180
|
+
### Optional plugin fields
|
|
181
|
+
|
|
182
|
+
**Standard metadata fields:**
|
|
183
|
+
|
|
184
|
+
| Field | Type | Description |
|
|
185
|
+
| :------------ | :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
186
|
+
| `description` | string | Brief plugin description |
|
|
187
|
+
| `version` | string | Plugin version |
|
|
188
|
+
| `author` | object | Plugin author information (`name` required, `email` optional) |
|
|
189
|
+
| `homepage` | string | Plugin homepage or documentation URL |
|
|
190
|
+
| `repository` | string | Source code repository URL |
|
|
191
|
+
| `license` | string | SPDX license identifier (for example, MIT, Apache-2.0) |
|
|
192
|
+
| `keywords` | array | Tags for plugin discovery and categorization |
|
|
193
|
+
| `category` | string | Plugin category for organization |
|
|
194
|
+
| `tags` | array | Tags for searchability |
|
|
195
|
+
| `strict` | boolean | Controls whether plugins need their own `plugin.json` file. When `true` (default), the plugin source must contain a `plugin.json`, and any fields you add here in the marketplace entry get merged with it. When `false`, the plugin doesn't need its own `plugin.json`; the marketplace entry itself defines everything about the plugin. Use `false` when you want to define simple plugins entirely in your marketplace file. |
|
|
196
|
+
|
|
197
|
+
**Component configuration fields:**
|
|
198
|
+
|
|
199
|
+
| Field | Type | Description |
|
|
200
|
+
| :----------- | :------------- | :----------------------------------------------- |
|
|
201
|
+
| `commands` | string\|array | Custom paths to command files or directories |
|
|
202
|
+
| `agents` | string\|array | Custom paths to agent files |
|
|
203
|
+
| `hooks` | string\|object | Custom hooks configuration or path to hooks file |
|
|
204
|
+
| `mcpServers` | string\|object | MCP server configurations or path to MCP config |
|
|
205
|
+
| `lspServers` | string\|object | LSP server configurations or path to LSP config |
|
|
206
|
+
|
|
207
|
+
## Plugin sources
|
|
208
|
+
|
|
209
|
+
### Relative paths
|
|
210
|
+
|
|
211
|
+
For plugins in the same repository:
|
|
212
|
+
|
|
213
|
+
```json theme={null}
|
|
214
|
+
{
|
|
215
|
+
"name": "my-plugin",
|
|
216
|
+
"source": "./plugins/my-plugin"
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### GitHub repositories
|
|
221
|
+
|
|
222
|
+
```json theme={null}
|
|
223
|
+
{
|
|
224
|
+
"name": "github-plugin",
|
|
225
|
+
"source": {
|
|
226
|
+
"source": "github",
|
|
227
|
+
"repo": "owner/plugin-repo"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Git repositories
|
|
233
|
+
|
|
234
|
+
```json theme={null}
|
|
235
|
+
{
|
|
236
|
+
"name": "git-plugin",
|
|
237
|
+
"source": {
|
|
238
|
+
"source": "url",
|
|
239
|
+
"url": "https://gitlab.com/team/plugin.git"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Advanced plugin entries
|
|
245
|
+
|
|
246
|
+
This example shows a plugin entry using many of the optional fields, including custom paths for commands, agents, hooks, and MCP servers:
|
|
247
|
+
|
|
248
|
+
```json theme={null}
|
|
249
|
+
{
|
|
250
|
+
"name": "enterprise-tools",
|
|
251
|
+
"source": {
|
|
252
|
+
"source": "github",
|
|
253
|
+
"repo": "company/enterprise-plugin"
|
|
254
|
+
},
|
|
255
|
+
"description": "Enterprise workflow automation tools",
|
|
256
|
+
"version": "2.1.0",
|
|
257
|
+
"author": {
|
|
258
|
+
"name": "Enterprise Team",
|
|
259
|
+
"email": "enterprise@example.com"
|
|
260
|
+
},
|
|
261
|
+
"homepage": "https://docs.example.com/plugins/enterprise-tools",
|
|
262
|
+
"repository": "https://github.com/company/enterprise-plugin",
|
|
263
|
+
"license": "MIT",
|
|
264
|
+
"keywords": ["enterprise", "workflow", "automation"],
|
|
265
|
+
"category": "productivity",
|
|
266
|
+
"commands": [
|
|
267
|
+
"./commands/core/",
|
|
268
|
+
"./commands/enterprise/",
|
|
269
|
+
"./commands/experimental/preview.md"
|
|
270
|
+
],
|
|
271
|
+
"agents": ["./agents/security-reviewer.md", "./agents/compliance-checker.md"],
|
|
272
|
+
"hooks": {
|
|
273
|
+
"PostToolUse": [
|
|
274
|
+
{
|
|
275
|
+
"matcher": "Write|Edit",
|
|
276
|
+
"hooks": [
|
|
277
|
+
{
|
|
278
|
+
"type": "command",
|
|
279
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/validate.sh"
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
]
|
|
284
|
+
},
|
|
285
|
+
"mcpServers": {
|
|
286
|
+
"enterprise-db": {
|
|
287
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/servers/db-server",
|
|
288
|
+
"args": ["--config", "${CLAUDE_PLUGIN_ROOT}/config.json"]
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"strict": false
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
Key things to notice:
|
|
296
|
+
|
|
297
|
+
* **`commands` and `agents`**: You can specify multiple directories or individual files. Paths are relative to the plugin root.
|
|
298
|
+
* **`${CLAUDE_PLUGIN_ROOT}`**: Use this variable in hooks and MCP server configs to reference files within the plugin's installation directory. This is necessary because plugins are copied to a cache location when installed.
|
|
299
|
+
* **`strict: false`**: Since this is set to false, the plugin doesn't need its own `plugin.json`. The marketplace entry defines everything.
|
|
300
|
+
|
|
301
|
+
## Host and distribute marketplaces
|
|
302
|
+
|
|
303
|
+
### Host on GitHub (recommended)
|
|
304
|
+
|
|
305
|
+
GitHub provides the easiest distribution method:
|
|
306
|
+
|
|
307
|
+
1. **Create a repository**: Set up a new repository for your marketplace
|
|
308
|
+
2. **Add marketplace file**: Create `.claude-plugin/marketplace.json` with your plugin definitions
|
|
309
|
+
3. **Share with teams**: Users add your marketplace with `/plugin marketplace add owner/repo`
|
|
310
|
+
|
|
311
|
+
**Benefits**: Built-in version control, issue tracking, and team collaboration features.
|
|
312
|
+
|
|
313
|
+
### Host on other git services
|
|
314
|
+
|
|
315
|
+
Any git hosting service works, such as GitLab, Bitbucket, and self-hosted servers. Users add with the full repository URL:
|
|
316
|
+
|
|
317
|
+
```shell theme={null}
|
|
318
|
+
/plugin marketplace add https://gitlab.com/company/plugins.git
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### Test locally before distribution
|
|
322
|
+
|
|
323
|
+
Test your marketplace locally before sharing:
|
|
324
|
+
|
|
325
|
+
```shell theme={null}
|
|
326
|
+
/plugin marketplace add ./my-local-marketplace
|
|
327
|
+
/plugin install test-plugin@my-local-marketplace
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
For the full range of add commands (GitHub, Git URLs, local paths, remote URLs), see [Add marketplaces](/en/discover-plugins#add-marketplaces).
|
|
331
|
+
|
|
332
|
+
### Require marketplaces for your team
|
|
333
|
+
|
|
334
|
+
You can configure your repository so team members are automatically prompted to install your marketplace when they trust the project folder. Add your marketplace to `.claude/settings.json`:
|
|
335
|
+
|
|
336
|
+
```json theme={null}
|
|
337
|
+
{
|
|
338
|
+
"extraKnownMarketplaces": {
|
|
339
|
+
"company-tools": {
|
|
340
|
+
"source": {
|
|
341
|
+
"source": "github",
|
|
342
|
+
"repo": "your-org/claude-plugins"
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
You can also specify which plugins should be enabled by default:
|
|
350
|
+
|
|
351
|
+
```json theme={null}
|
|
352
|
+
{
|
|
353
|
+
"enabledPlugins": {
|
|
354
|
+
"code-formatter@company-tools": true,
|
|
355
|
+
"deployment-tools@company-tools": true
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
For full configuration options, see [Plugin settings](/en/settings#plugin-settings).
|
|
361
|
+
|
|
362
|
+
### Enterprise marketplace restrictions
|
|
363
|
+
|
|
364
|
+
For organizations requiring strict control over plugin sources, enterprise administrators can restrict which plugin marketplaces users are allowed to add using the [`strictKnownMarketplaces`](/en/settings#strictknownmarketplaces) setting in managed settings.
|
|
365
|
+
|
|
366
|
+
When `strictKnownMarketplaces` is configured in managed settings, the restriction behavior depends on the value:
|
|
367
|
+
|
|
368
|
+
| Value | Behavior |
|
|
369
|
+
| ------------------- | ---------------------------------------------------------------- |
|
|
370
|
+
| Undefined (default) | No restrictions. Users can add any marketplace |
|
|
371
|
+
| Empty array `[]` | Complete lockdown. Users cannot add any new marketplaces |
|
|
372
|
+
| List of sources | Users can only add marketplaces that match the allowlist exactly |
|
|
373
|
+
|
|
374
|
+
#### Common configurations
|
|
375
|
+
|
|
376
|
+
Disable all marketplace additions:
|
|
377
|
+
|
|
378
|
+
```json theme={null}
|
|
379
|
+
{
|
|
380
|
+
"strictKnownMarketplaces": []
|
|
381
|
+
}
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
Allow specific marketplaces only:
|
|
385
|
+
|
|
386
|
+
```json theme={null}
|
|
387
|
+
{
|
|
388
|
+
"strictKnownMarketplaces": [
|
|
389
|
+
{
|
|
390
|
+
"source": "github",
|
|
391
|
+
"repo": "acme-corp/approved-plugins"
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"source": "github",
|
|
395
|
+
"repo": "acme-corp/security-tools",
|
|
396
|
+
"ref": "v2.0"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"source": "url",
|
|
400
|
+
"url": "https://plugins.example.com/marketplace.json"
|
|
401
|
+
}
|
|
402
|
+
]
|
|
403
|
+
}
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
#### How restrictions work
|
|
407
|
+
|
|
408
|
+
Restrictions are validated early in the plugin installation process, before any network requests or filesystem operations occur. This prevents unauthorized marketplace access attempts.
|
|
409
|
+
|
|
410
|
+
The allowlist uses exact matching. For a marketplace to be allowed, all specified fields must match exactly:
|
|
411
|
+
|
|
412
|
+
* For GitHub sources: `repo` is required, and `ref` or `path` must also match if specified in the allowlist
|
|
413
|
+
* For URL sources: the full URL must match exactly
|
|
414
|
+
|
|
415
|
+
Because `strictKnownMarketplaces` is set in [managed settings](/en/settings#settings-file-locations), individual users and project configurations cannot override these restrictions.
|
|
416
|
+
|
|
417
|
+
For complete configuration details including all supported source types and comparison with `extraKnownMarketplaces`, see the [strictKnownMarketplaces reference](/en/settings#strictknownmarketplaces).
|
|
418
|
+
|
|
419
|
+
## Validation and testing
|
|
420
|
+
|
|
421
|
+
Test your marketplace before sharing.
|
|
422
|
+
|
|
423
|
+
Validate your marketplace JSON syntax:
|
|
424
|
+
|
|
425
|
+
```bash theme={null}
|
|
426
|
+
claude plugin validate .
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
Or from within Claude Code:
|
|
430
|
+
|
|
431
|
+
```shell theme={null}
|
|
432
|
+
/plugin validate .
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
Add the marketplace for testing:
|
|
436
|
+
|
|
437
|
+
```shell theme={null}
|
|
438
|
+
/plugin marketplace add ./path/to/marketplace
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
Install a test plugin to verify everything works:
|
|
442
|
+
|
|
443
|
+
```shell theme={null}
|
|
444
|
+
/plugin install test-plugin@marketplace-name
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
For complete plugin testing workflows, see [Test your plugins locally](/en/plugins#test-your-plugins-locally). For technical troubleshooting, see [Plugins reference](/en/plugins-reference).
|
|
448
|
+
|
|
449
|
+
## Troubleshooting
|
|
450
|
+
|
|
451
|
+
### Marketplace not loading
|
|
452
|
+
|
|
453
|
+
**Symptoms**: Can't add marketplace or see plugins from it
|
|
454
|
+
|
|
455
|
+
**Solutions**:
|
|
456
|
+
|
|
457
|
+
* Verify the marketplace URL is accessible
|
|
458
|
+
* Check that `.claude-plugin/marketplace.json` exists at the specified path
|
|
459
|
+
* Ensure JSON syntax is valid using `claude plugin validate` or `/plugin validate`
|
|
460
|
+
* For private repositories, confirm you have access permissions
|
|
461
|
+
|
|
462
|
+
### Marketplace validation errors
|
|
463
|
+
|
|
464
|
+
Run `claude plugin validate .` or `/plugin validate .` from your marketplace directory to check for issues. Common errors:
|
|
465
|
+
|
|
466
|
+
| Error | Cause | Solution |
|
|
467
|
+
| :------------------------------------------------ | :------------------------------ | :------------------------------------------------------------ |
|
|
468
|
+
| `File not found: .claude-plugin/marketplace.json` | Missing manifest | Create `.claude-plugin/marketplace.json` with required fields |
|
|
469
|
+
| `Invalid JSON syntax: Unexpected token...` | JSON syntax error | Check for missing commas, extra commas, or unquoted strings |
|
|
470
|
+
| `Duplicate plugin name "x" found in marketplace` | Two plugins share the same name | Give each plugin a unique `name` value |
|
|
471
|
+
| `plugins[0].source: Path traversal not allowed` | Source path contains `..` | Use paths relative to marketplace root without `..` |
|
|
472
|
+
|
|
473
|
+
**Warnings** (non-blocking):
|
|
474
|
+
|
|
475
|
+
* `Marketplace has no plugins defined`: add at least one plugin to the `plugins` array
|
|
476
|
+
* `No marketplace description provided`: add `metadata.description` to help users understand your marketplace
|
|
477
|
+
* `Plugin "x" uses npm source which is not yet fully implemented`: use `github` or local path sources instead
|
|
478
|
+
|
|
479
|
+
### Plugin installation failures
|
|
480
|
+
|
|
481
|
+
**Symptoms**: Marketplace appears but plugin installation fails
|
|
482
|
+
|
|
483
|
+
**Solutions**:
|
|
484
|
+
|
|
485
|
+
* Verify plugin source URLs are accessible
|
|
486
|
+
* Check that plugin directories contain required files
|
|
487
|
+
* For GitHub sources, ensure repositories are public or you have access
|
|
488
|
+
* Test plugin sources manually by cloning/downloading
|
|
489
|
+
|
|
490
|
+
### Files not found after installation
|
|
491
|
+
|
|
492
|
+
**Symptoms**: Plugin installs but references to files fail, especially files outside the plugin directory
|
|
493
|
+
|
|
494
|
+
**Cause**: Plugins are copied to a cache directory rather than used in-place. Paths that reference files outside the plugin's directory (such as `../shared-utils`) won't work because those files aren't copied.
|
|
495
|
+
|
|
496
|
+
**Solutions**: See [Plugin caching and file resolution](/en/plugins-reference#plugin-caching-and-file-resolution) for workarounds including symlinks and directory restructuring.
|
|
497
|
+
|
|
498
|
+
For additional debugging tools and common issues, see [Debugging and development tools](/en/plugins-reference#debugging-and-development-tools).
|
|
499
|
+
|
|
500
|
+
## See also
|
|
501
|
+
|
|
502
|
+
* [Discover and install prebuilt plugins](/en/discover-plugins) - Installing plugins from existing marketplaces
|
|
503
|
+
* [Plugins](/en/plugins) - Creating your own plugins
|
|
504
|
+
* [Plugins reference](/en/plugins-reference) - Complete technical specifications and schemas
|
|
505
|
+
* [Plugin settings](/en/settings#plugin-settings) - Plugin configuration options
|
|
506
|
+
* [strictKnownMarketplaces reference](/en/settings#strictknownmarketplaces) - Enterprise marketplace restrictions
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
---
|
|
510
|
+
|
|
511
|
+
> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt
|