@tencent-ai/codebuddy-code 2.97.0-next.03ca7ec.20260514 → 2.97.0-next.bcf636d.20260514
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.
- package/dist/codebuddy-headless.js +39 -35
- package/dist/codebuddy.js +40 -36
- package/dist/web-ui/docs/cn/cli/cli-reference.md +7 -6
- package/dist/web-ui/docs/cn/cli/env-vars.md +2 -2
- package/dist/web-ui/docs/cn/cli/hooks-guide.md +52 -0
- package/dist/web-ui/docs/cn/cli/hooks.md +50 -5
- package/dist/web-ui/docs/cn/cli/plugins-reference.md +11 -0
- package/dist/web-ui/docs/cn/cli/plugins.md +4 -0
- package/dist/web-ui/docs/cn/cli/release-notes/README.md +2 -0
- package/dist/web-ui/docs/cn/cli/release-notes/v2.95.1.md +27 -0
- package/dist/web-ui/docs/cn/cli/release-notes/v2.96.0.md +21 -0
- package/dist/web-ui/docs/cn/cli/skills.md +91 -0
- package/dist/web-ui/docs/en/cli/cli-reference.md +1 -0
- package/dist/web-ui/docs/en/cli/env-vars.md +2 -2
- package/dist/web-ui/docs/en/cli/hooks-guide.md +52 -0
- package/dist/web-ui/docs/en/cli/hooks.md +61 -14
- package/dist/web-ui/docs/en/cli/plugins-reference.md +11 -0
- package/dist/web-ui/docs/en/cli/plugins.md +337 -457
- package/dist/web-ui/docs/en/cli/release-notes/README.md +2 -0
- package/dist/web-ui/docs/en/cli/release-notes/v2.95.1.md +27 -0
- package/dist/web-ui/docs/en/cli/release-notes/v2.96.0.md +21 -0
- package/dist/web-ui/docs/en/cli/skills.md +91 -0
- package/dist/web-ui/docs/search-index-en.json +1 -1
- package/dist/web-ui/docs/search-index-zh.json +1 -1
- package/dist/web-ui/docs/sidebar-en.json +1 -1
- package/dist/web-ui/docs/sidebar-zh.json +1 -1
- package/package.json +1 -1
- package/product.cloudhosted.json +2 -2
- package/product.internal.json +2 -2
- package/product.ioa.json +2 -2
- package/product.json +2 -2
- package/product.selfhosted.json +2 -2
- package/vendor/sandbox/sandbox-cli +0 -0
|
@@ -1,427 +1,269 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Creating Plugins
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Plugins let you extend CodeBuddy Code's functionality with custom skills, agents, hooks, and MCP servers. This guide covers how to create your own plugins.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
To install existing plugins, see [Plugin Marketplaces](plugin-marketplaces.md). For complete technical specifications, refer to the [Plugin Reference Documentation](plugins-reference.md).
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## When to Use Plugins vs Standalone Configuration
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
CodeBuddy Code supports two ways to add custom skills, agents, and hooks:
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
| Method | Skill Name | Suitable Scenarios |
|
|
12
|
+
|--------|------------|--------------------|
|
|
13
|
+
| **Standalone configuration** (`.codebuddy/` directory) | `/hello` | Personal workflows, project-specific customizations, quick experiments |
|
|
14
|
+
| **Plugin** (directory containing `.codebuddy-plugin/plugin.json`) | `/plugin-name:hello` | Team sharing, community distribution, versioned releases, cross-project reuse |
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
**Use standalone configuration when**:
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
- Customizing CodeBuddy Code for a single project
|
|
19
|
+
- The configuration is personal and doesn't need to be shared
|
|
20
|
+
- Experimenting with skills or hooks before packaging them as a plugin
|
|
21
|
+
- You need short skill names like `/hello` or `/deploy`
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
- **GitHub Repository Marketplace**: Fetch plugins from GitHub repositories
|
|
21
|
-
- **HTTP/HTTPS Marketplace**: Fetch plugin manifests and packages from HTTP(S) servers
|
|
23
|
+
**Use plugins when**:
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Teams can configure `extraKnownMarketplaces` and `enabledPlugins` in the project's `.codebuddy/settings.json` to enable automatic plugin installation and activation. When team members start CodeBuddy, the system automatically installs the plugin marketplaces and plugins specified in the configuration.
|
|
30
|
-
|
|
31
|
-
#### Configuration Example
|
|
32
|
-
|
|
33
|
-
Add the following configuration to `.codebuddy/settings.json`:
|
|
34
|
-
|
|
35
|
-
```json
|
|
36
|
-
{
|
|
37
|
-
"extraKnownMarketplaces": {
|
|
38
|
-
"team-marketplace": {
|
|
39
|
-
"source": {
|
|
40
|
-
"source": "github",
|
|
41
|
-
"repo": "your-org/team-plugins-marketplace"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"custom-marketplace": {
|
|
45
|
-
"source": {
|
|
46
|
-
"source": "git",
|
|
47
|
-
"url": "https://git.example.com/plugins-marketplace"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"enabledPlugins": {
|
|
52
|
-
"team-plugin-a@team-marketplace": true,
|
|
53
|
-
"team-plugin-b@team-marketplace": true
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
#### Configuration Explanation
|
|
59
|
-
|
|
60
|
-
- **`extraKnownMarketplaces`**: Define additional plugin marketplaces
|
|
61
|
-
- Key is the marketplace name (e.g., `team-marketplace`)
|
|
62
|
-
- `source.source`: Marketplace type, supports `github`, `git`, and `url`
|
|
63
|
-
- `source.repo`: GitHub repository path (format: `owner/repo`, only when source is `github`)
|
|
64
|
-
- `source.url`: Git repository URL or HTTP(S) marketplace.json URL (only when source is `git` or `url`)
|
|
65
|
-
|
|
66
|
-
- **`enabledPlugins`**: Specify plugins to enable
|
|
67
|
-
- Key format: `plugin-name@marketplace-name`
|
|
68
|
-
- Value `true` means enabled, `false` means disabled
|
|
69
|
-
|
|
70
|
-
#### Automatic Installation Flow
|
|
71
|
-
|
|
72
|
-
1. **Startup Detection**: CodeBuddy automatically detects the configuration file on startup
|
|
73
|
-
2. **Marketplace Installation**: Automatically installs marketplaces from `extraKnownMarketplaces` that are not yet installed
|
|
74
|
-
3. **Plugin Installation**: Automatically installs enabled plugins from `enabledPlugins` that are not yet installed
|
|
75
|
-
4. **Background Execution**: The installation process executes asynchronously in the background without blocking the startup flow
|
|
76
|
-
5. **Logging**: The installation process logs detailed information, viewable with `--debug`
|
|
77
|
-
|
|
78
|
-
#### Advantages
|
|
79
|
-
|
|
80
|
-
- **Team Consistency**: Ensures team members use the same plugin configuration
|
|
81
|
-
- **Automation**: No manual installation needed, improving development efficiency
|
|
82
|
-
- **Version Control**: Configuration files can be committed to Git for team collaboration
|
|
83
|
-
- **Flexible Override**: Individuals can override team configuration in their local configuration
|
|
84
|
-
|
|
85
|
-
### Method 2: Interactive Interface
|
|
86
|
-
|
|
87
|
-
Enter `/plugin` in CodeBuddy conversation to open the interactive plugin management interface.
|
|
88
|
-
|
|
89
|
-
#### Opening the Management Interface
|
|
25
|
+
- Sharing functionality with a team or community
|
|
26
|
+
- The same skills/agents need to be used across multiple projects
|
|
27
|
+
- Version control and convenient update mechanisms are required
|
|
28
|
+
- Distributing through a marketplace
|
|
29
|
+
- You can accept namespaced skill names like `/my-plugin:hello` (namespacing prevents conflicts between plugins)
|
|
90
30
|
|
|
91
|
-
|
|
92
|
-
/plugin
|
|
93
|
-
```
|
|
31
|
+
> **Tip**: Start with standalone configuration in `.codebuddy/` for fast iteration, then [convert to a plugin](#converting-existing-configuration-to-a-plugin) when you're ready to share.
|
|
94
32
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
The interactive interface contains the following 6 tabs:
|
|
33
|
+
## Quick Start
|
|
98
34
|
|
|
99
|
-
|
|
100
|
-
- Real-time plugin search
|
|
101
|
-
- Display plugin installation statistics
|
|
102
|
-
- Quick plugin installation
|
|
35
|
+
This quick start walks you through creating a plugin that contains a custom skill. You'll create a manifest file (the configuration file that defines the plugin), add a skill, and test it locally with the `--plugin-dir` argument.
|
|
103
36
|
|
|
104
|
-
|
|
105
|
-
- Browse by marketplace category
|
|
106
|
-
- View plugin details
|
|
107
|
-
- Install plugins
|
|
37
|
+
### Prerequisites
|
|
108
38
|
|
|
109
|
-
|
|
110
|
-
- View installed plugin list and status
|
|
111
|
-
- Enable/disable plugins
|
|
112
|
-
- Uninstall plugins
|
|
113
|
-
- View plugin details
|
|
39
|
+
- CodeBuddy Code [installed and authenticated](quickstart.md)
|
|
114
40
|
|
|
115
|
-
|
|
116
|
-
- View configured marketplace list
|
|
117
|
-
- Update marketplace information
|
|
118
|
-
- Remove marketplaces
|
|
41
|
+
> If you don't see the `/plugin` command, update CodeBuddy Code to the latest version. See [Troubleshooting](troubleshooting.md) for upgrade instructions.
|
|
119
42
|
|
|
120
|
-
|
|
121
|
-
- Support local paths, GitHub repositories, Git URLs, and HTTP URLs
|
|
122
|
-
- Automatic marketplace source type detection
|
|
123
|
-
- Set marketplace display name
|
|
43
|
+
### Create Your First Plugin
|
|
124
44
|
|
|
125
|
-
|
|
126
|
-
- Detailed error information and error types
|
|
127
|
-
- Error timestamps and related context
|
|
128
|
-
- Help diagnose and resolve issues
|
|
45
|
+
#### Step 1: Create the plugin directory
|
|
129
46
|
|
|
130
|
-
|
|
47
|
+
Each plugin has its own directory containing the manifest file and your skills, agents, or hooks. Create one now:
|
|
131
48
|
|
|
132
49
|
```bash
|
|
133
|
-
|
|
134
|
-
/plugin install my-plugin # Install plugin
|
|
135
|
-
/plugin install my-plugin@marketplace # Install from specified marketplace
|
|
136
|
-
/plugin enable my-plugin # Enable disabled plugin
|
|
137
|
-
/plugin disable my-plugin # Disable enabled plugin
|
|
138
|
-
/plugin uninstall my-plugin # Uninstall plugin
|
|
139
|
-
/plugin marketplace add <source> # Add marketplace
|
|
140
|
-
/plugin marketplace list # List marketplaces
|
|
141
|
-
/plugin marketplace update <name> # Update marketplace
|
|
142
|
-
/plugin marketplace remove <name> # Remove marketplace
|
|
50
|
+
mkdir my-first-plugin
|
|
143
51
|
```
|
|
144
52
|
|
|
145
|
-
|
|
53
|
+
#### Step 2: Create the plugin manifest
|
|
146
54
|
|
|
147
|
-
|
|
55
|
+
The manifest file is located at `.codebuddy-plugin/plugin.json` and defines the plugin's identity: name, description, and version. CodeBuddy Code uses this metadata to display your plugin in the plugin manager.
|
|
148
56
|
|
|
149
|
-
|
|
57
|
+
Create the `.codebuddy-plugin` directory inside the plugin directory:
|
|
150
58
|
|
|
151
59
|
```bash
|
|
152
|
-
|
|
153
|
-
codebuddy plugin install <plugin> # Install from default marketplace
|
|
154
|
-
codebuddy plugin install <plugin>@<marketplace> # Install from specified marketplace
|
|
155
|
-
codebuddy plugin i <plugin> # Shorthand form
|
|
156
|
-
|
|
157
|
-
# Enable and disable plugins
|
|
158
|
-
codebuddy plugin enable <plugin> # Enable plugin
|
|
159
|
-
codebuddy plugin disable <plugin> # Disable plugin
|
|
160
|
-
|
|
161
|
-
# Uninstall plugin
|
|
162
|
-
codebuddy plugin uninstall <plugin> # Uninstall plugin
|
|
163
|
-
codebuddy plugin remove <plugin> # Alias form
|
|
164
|
-
|
|
165
|
-
# Validate plugin or marketplace manifest
|
|
166
|
-
codebuddy plugin validate <path> # Validate local plugin or marketplace
|
|
60
|
+
mkdir my-first-plugin/.codebuddy-plugin
|
|
167
61
|
```
|
|
168
62
|
|
|
169
|
-
|
|
63
|
+
Then create `my-first-plugin/.codebuddy-plugin/plugin.json` with the following content:
|
|
170
64
|
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
codebuddy plugin marketplace update <name>
|
|
181
|
-
|
|
182
|
-
# Remove marketplace
|
|
183
|
-
codebuddy plugin marketplace remove <name>
|
|
184
|
-
codebuddy plugin marketplace rm <name> # Alias form
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"name": "my-first-plugin",
|
|
68
|
+
"description": "A greeting plugin to learn the basics",
|
|
69
|
+
"version": "1.0.0",
|
|
70
|
+
"author": {
|
|
71
|
+
"name": "Your Name"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
185
74
|
```
|
|
186
75
|
|
|
187
|
-
|
|
76
|
+
| Field | Purpose |
|
|
77
|
+
|-------|---------|
|
|
78
|
+
| `name` | Unique identifier and skill namespace. Skills are prefixed with this (e.g., `/my-first-plugin:hello`) |
|
|
79
|
+
| `description` | Displayed when browsing or installing the plugin in the plugin manager |
|
|
80
|
+
| `version` | Track releases using [semantic versioning](plugins-reference.md#version-management) |
|
|
81
|
+
| `author` | Optional. Used for attribution |
|
|
188
82
|
|
|
189
|
-
|
|
83
|
+
For more fields like `homepage`, `repository`, and `license`, see the [complete manifest schema](plugins-reference.md).
|
|
190
84
|
|
|
191
|
-
####
|
|
85
|
+
#### Step 3: Add a skill
|
|
192
86
|
|
|
193
|
-
|
|
194
|
-
2. Select "3. Add marketplace"
|
|
195
|
-
3. Enter the marketplace source address
|
|
196
|
-
4. Wait for automatic marketplace type recognition and plugin manifest loading
|
|
87
|
+
Skills are placed in the `skills/` directory. Each skill is a folder containing a `SKILL.md` file. The folder name becomes the skill name and is prefixed with the plugin namespace (in a plugin named `my-first-plugin`, `hello/` creates `/my-first-plugin:hello`).
|
|
197
88
|
|
|
198
|
-
|
|
89
|
+
Create the skill directory in your plugin directory:
|
|
199
90
|
|
|
200
91
|
```bash
|
|
201
|
-
|
|
202
|
-
codebuddy plugin marketplace add https://github.com/username/plugin-repo
|
|
203
|
-
|
|
204
|
-
# Add marketplace and specify display name
|
|
205
|
-
codebuddy plugin marketplace add https://github.com/username/plugin-repo -n my-marketplace
|
|
206
|
-
|
|
207
|
-
# Add local directory marketplace
|
|
208
|
-
codebuddy plugin marketplace add /path/to/local/plugins
|
|
209
|
-
|
|
210
|
-
# Add HTTP marketplace
|
|
211
|
-
codebuddy plugin marketplace add https://example.com/plugins
|
|
92
|
+
mkdir -p my-first-plugin/skills/hello
|
|
212
93
|
```
|
|
213
94
|
|
|
214
|
-
|
|
215
|
-
- `<source>`: Marketplace source address (local path, GitHub URL, or HTTP(S) URL)
|
|
216
|
-
- `-n, --name <name>`: Optional, specify a display name for the marketplace
|
|
217
|
-
|
|
218
|
-
### Installing Plugins
|
|
219
|
-
|
|
220
|
-
#### Using the Interactive Interface
|
|
221
|
-
|
|
222
|
-
1. Enter `/plugin`
|
|
223
|
-
2. Select "1. Browse and install plugins"
|
|
224
|
-
3. Select the plugin marketplace
|
|
225
|
-
4. Browse available plugins and select to install
|
|
226
|
-
|
|
227
|
-
#### Using Subcommands
|
|
228
|
-
|
|
229
|
-
```bash
|
|
230
|
-
# Install from default marketplace
|
|
231
|
-
codebuddy plugin install my-plugin
|
|
95
|
+
Then create `my-first-plugin/skills/hello/SKILL.md` with the following content:
|
|
232
96
|
|
|
233
|
-
|
|
234
|
-
codebuddy plugin install my-plugin@marketplace-name
|
|
97
|
+
```markdown
|
|
235
98
|
|
|
236
|
-
|
|
237
|
-
codebuddy plugin i my-plugin
|
|
99
|
+
Greet the user warmly and ask how you can help them today.
|
|
238
100
|
```
|
|
239
101
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
#### Using the Interactive Interface
|
|
102
|
+
#### Step 4: Test your plugin
|
|
243
103
|
|
|
244
|
-
|
|
245
|
-
2. Select "2. Manage plugins"
|
|
246
|
-
3. Select the plugin to enable or disable
|
|
247
|
-
|
|
248
|
-
#### Using Subcommands
|
|
104
|
+
Run CodeBuddy Code with the `--plugin-dir` argument to load your plugin:
|
|
249
105
|
|
|
250
106
|
```bash
|
|
251
|
-
|
|
252
|
-
codebuddy plugin enable my-plugin
|
|
253
|
-
|
|
254
|
-
# Disable plugin
|
|
255
|
-
codebuddy plugin disable my-plugin
|
|
107
|
+
codebuddy --plugin-dir ./my-first-plugin
|
|
256
108
|
```
|
|
257
109
|
|
|
258
|
-
|
|
110
|
+
After startup, try your new skill:
|
|
259
111
|
|
|
260
|
-
|
|
112
|
+
```
|
|
113
|
+
/my-first-plugin:hello
|
|
114
|
+
```
|
|
261
115
|
|
|
262
|
-
|
|
116
|
+
You'll see CodeBuddy reply with a greeting. Run `/help` to see your skill listed under the plugin namespace.
|
|
263
117
|
|
|
264
|
-
|
|
265
|
-
2. Select "2. Manage plugins"
|
|
266
|
-
3. Select the plugin to uninstall and confirm uninstallation
|
|
118
|
+
> **Why namespacing?** Plugin skills are always namespaced (e.g., `/my-first-plugin:hello`) to prevent conflicts when multiple plugins have skills with the same name. To change the namespace prefix, update the `name` field in `plugin.json`.
|
|
267
119
|
|
|
268
|
-
####
|
|
120
|
+
#### Step 5: Add skill arguments
|
|
269
121
|
|
|
270
|
-
|
|
271
|
-
# Uninstall plugin
|
|
272
|
-
codebuddy plugin uninstall my-plugin
|
|
122
|
+
Make the skill more dynamic by accepting user input. The `$ARGUMENTS` placeholder captures any text the user provides after the skill name.
|
|
273
123
|
|
|
274
|
-
|
|
275
|
-
codebuddy plugin remove my-plugin
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
### Managing Plugin Marketplaces
|
|
124
|
+
Update your `SKILL.md` file:
|
|
279
125
|
|
|
280
|
-
|
|
126
|
+
```markdown
|
|
127
|
+
---
|
|
128
|
+
description: Greet the user with a personalized message
|
|
129
|
+
---
|
|
281
130
|
|
|
282
|
-
|
|
283
|
-
1. Enter `/plugin`
|
|
284
|
-
2. Select "4. Manage marketplaces"
|
|
131
|
+
# Hello Skill
|
|
285
132
|
|
|
286
|
-
|
|
287
|
-
```bash
|
|
288
|
-
codebuddy plugin marketplace list
|
|
133
|
+
Greet the user named "$ARGUMENTS" warmly and ask how you can help them today. Make the greeting personal and encouraging.
|
|
289
134
|
```
|
|
290
135
|
|
|
291
|
-
|
|
136
|
+
Run `/reload-plugins` to pick up the changes, then try the skill with your name:
|
|
292
137
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
2. Select "4. Manage marketplaces"
|
|
296
|
-
3. Select the marketplace to update
|
|
297
|
-
|
|
298
|
-
Using subcommands:
|
|
299
|
-
```bash
|
|
300
|
-
codebuddy plugin marketplace update my-marketplace
|
|
138
|
+
```
|
|
139
|
+
/my-first-plugin:hello Alex
|
|
301
140
|
```
|
|
302
141
|
|
|
303
|
-
|
|
142
|
+
CodeBuddy will greet you by name. For more information about passing arguments to skills, see the [Skills documentation](skills.md).
|
|
304
143
|
|
|
305
|
-
|
|
306
|
-
1. Enter `/plugin`
|
|
307
|
-
2. Select "4. Manage marketplaces"
|
|
308
|
-
3. Select the marketplace to remove and confirm removal
|
|
144
|
+
---
|
|
309
145
|
|
|
310
|
-
|
|
311
|
-
```bash
|
|
312
|
-
codebuddy plugin marketplace remove my-marketplace
|
|
313
|
-
codebuddy plugin marketplace rm my-marketplace
|
|
314
|
-
```
|
|
146
|
+
You've successfully created and tested a plugin containing the following key components:
|
|
315
147
|
|
|
316
|
-
|
|
148
|
+
- **Plugin manifest** (`.codebuddy-plugin/plugin.json`): Metadata describing the plugin
|
|
149
|
+
- **Skill directory** (`skills/`): Contains your custom skills
|
|
150
|
+
- **Skill arguments** (`$ARGUMENTS`): Capture user input for dynamic behavior
|
|
317
151
|
|
|
318
|
-
|
|
319
|
-
# Validate plugin manifest format
|
|
320
|
-
codebuddy plugin validate /path/to/plugin
|
|
152
|
+
> The `--plugin-dir` argument is for development and testing. When you're ready to share your plugin with others, see [Plugin Marketplaces](plugin-marketplaces.md).
|
|
321
153
|
|
|
322
|
-
|
|
323
|
-
codebuddy plugin validate /path/to/marketplace
|
|
154
|
+
## Plugin Structure Overview
|
|
324
155
|
|
|
325
|
-
|
|
326
|
-
codebuddy plugin validate https://github.com/username/plugin-repo
|
|
327
|
-
```
|
|
156
|
+
You've created a plugin containing a skill, but plugins can include much more: custom agents, hooks, MCP servers, and LSP servers.
|
|
328
157
|
|
|
329
|
-
|
|
158
|
+
> **Common mistake**: Don't put `commands/`, `agents/`, `skills/`, or `hooks/` inside the `.codebuddy-plugin/` directory. Only `plugin.json` goes inside `.codebuddy-plugin/`. All other directories must be at the plugin root level.
|
|
330
159
|
|
|
331
|
-
|
|
160
|
+
| Directory | Location | Purpose |
|
|
161
|
+
|-----------|----------|---------|
|
|
162
|
+
| `.codebuddy-plugin/` | Plugin root | Contains the `plugin.json` manifest |
|
|
163
|
+
| `commands/` | Plugin root | Slash commands in Markdown format |
|
|
164
|
+
| `agents/` | Plugin root | Custom agent definitions |
|
|
165
|
+
| `skills/` | Plugin root | Agent skills containing `SKILL.md` files |
|
|
166
|
+
| `hooks/` | Plugin root | `hooks.json` event handlers |
|
|
167
|
+
| `.mcp.json` | Plugin root | MCP server configuration |
|
|
168
|
+
| `.lsp.json` | Plugin root | LSP server configuration (code intelligence) |
|
|
169
|
+
| `bin/` | Plugin root | Executables added to the Bash tool's `PATH` when the plugin is enabled |
|
|
170
|
+
| `settings.json` | Plugin root | Default [settings](settings.md) applied when the plugin is enabled |
|
|
332
171
|
|
|
333
|
-
|
|
172
|
+
**Example complete structure**:
|
|
334
173
|
|
|
335
174
|
```
|
|
336
175
|
my-plugin/
|
|
337
|
-
├── .codebuddy-plugin/
|
|
338
|
-
│ └── plugin.json
|
|
339
|
-
├── commands/
|
|
176
|
+
├── .codebuddy-plugin/ # Metadata directory (required)
|
|
177
|
+
│ └── plugin.json # Plugin manifest file
|
|
178
|
+
├── commands/ # Commands directory (optional)
|
|
340
179
|
│ └── example.md
|
|
341
|
-
├── agents/
|
|
180
|
+
├── agents/ # Agents directory (optional)
|
|
342
181
|
│ └── example.md
|
|
343
|
-
├── skills/
|
|
344
|
-
│ └──
|
|
182
|
+
├── skills/ # Skills directory (optional)
|
|
183
|
+
│ └── code-review/
|
|
345
184
|
│ └── SKILL.md
|
|
346
|
-
├── hooks/
|
|
185
|
+
├── hooks/ # Hooks directory (optional)
|
|
347
186
|
│ └── hooks.json
|
|
348
|
-
├──
|
|
349
|
-
└──
|
|
187
|
+
├── bin/ # Executables directory (optional)
|
|
188
|
+
│ └── my-tool
|
|
189
|
+
├── .mcp.json # MCP configuration file (optional)
|
|
190
|
+
├── .lsp.json # LSP configuration file (optional)
|
|
191
|
+
└── settings.json # Default settings file (optional)
|
|
350
192
|
```
|
|
351
193
|
|
|
352
|
-
|
|
194
|
+
## Developing More Complex Plugins
|
|
353
195
|
|
|
354
|
-
|
|
196
|
+
Once you've mastered basic plugins, you can create more sophisticated extensions.
|
|
355
197
|
|
|
356
|
-
|
|
357
|
-
{
|
|
358
|
-
"name": "my-plugin",
|
|
359
|
-
"version": "1.0.0",
|
|
360
|
-
"description": "Plugin description",
|
|
361
|
-
"author": {
|
|
362
|
-
"name": "Author Name",
|
|
363
|
-
"email": "author@example.com"
|
|
364
|
-
},
|
|
365
|
-
"homepage": "https://github.com/username/my-plugin",
|
|
366
|
-
"repository": "https://github.com/username/my-plugin",
|
|
367
|
-
"keywords": ["example"],
|
|
368
|
-
"category": "Development Tools",
|
|
369
|
-
"commands": [],
|
|
370
|
-
"agents": [],
|
|
371
|
-
"skills": [],
|
|
372
|
-
"hooks": "./hooks/hooks.json"
|
|
373
|
-
}
|
|
374
|
-
```
|
|
198
|
+
### Adding Skills
|
|
375
199
|
|
|
376
|
-
|
|
200
|
+
Plugins can include [agent skills](skills.md) to extend CodeBuddy's capabilities. Skills are model-invoked: CodeBuddy automatically uses them based on task context.
|
|
377
201
|
|
|
378
|
-
|
|
202
|
+
Add a `skills/` directory at the plugin root containing skill folders with `SKILL.md` files:
|
|
379
203
|
|
|
380
|
-
|
|
204
|
+
```
|
|
205
|
+
my-plugin/
|
|
206
|
+
├── .codebuddy-plugin/
|
|
207
|
+
│ └── plugin.json
|
|
208
|
+
└── skills/
|
|
209
|
+
└── code-review/
|
|
210
|
+
└── SKILL.md
|
|
211
|
+
```
|
|
381
212
|
|
|
382
|
-
|
|
213
|
+
Each `SKILL.md` needs frontmatter containing `name` and `description` fields, followed by instructions:
|
|
383
214
|
|
|
384
|
-
|
|
215
|
+
```markdown
|
|
216
|
+
---
|
|
217
|
+
name: code-review
|
|
218
|
+
description: Reviews code for best practices and potential issues. Use when reviewing code, checking PRs, or analyzing code quality.
|
|
219
|
+
---
|
|
385
220
|
|
|
386
|
-
|
|
221
|
+
When reviewing code, check for:
|
|
222
|
+
1. Code organization and structure
|
|
223
|
+
2. Error handling
|
|
224
|
+
3. Security concerns
|
|
225
|
+
4. Test coverage
|
|
387
226
|
```
|
|
388
227
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
For detailed information, refer to: [Slash Commands Documentation](slash-commands.md)
|
|
228
|
+
After installing the plugin, run `/reload-plugins` to load the skill. For a complete guide to writing skills, including progressive disclosure and tool restrictions, see [Agent Skills](skills.md).
|
|
392
229
|
|
|
393
|
-
###
|
|
230
|
+
### Adding Commands
|
|
394
231
|
|
|
395
|
-
|
|
232
|
+
Plugins can provide custom slash commands that users can manually trigger. Commands are defined as Markdown files.
|
|
396
233
|
|
|
397
|
-
**Example**: `
|
|
234
|
+
**Example**: `commands/example.md`
|
|
398
235
|
|
|
399
236
|
```markdown
|
|
400
237
|
---
|
|
401
|
-
description: "
|
|
238
|
+
description: "Example command description"
|
|
239
|
+
argument-hint: "[argument]"
|
|
402
240
|
---
|
|
403
241
|
|
|
404
|
-
|
|
242
|
+
This is an example command. It executes when the user enters /my-plugin:example.
|
|
243
|
+
|
|
244
|
+
Argument: $ARGUMENTS
|
|
405
245
|
```
|
|
406
246
|
|
|
407
|
-
|
|
247
|
+
Commands are registered in the format `/plugin-name:command-name`.
|
|
248
|
+
|
|
249
|
+
For detailed information, refer to the [Slash Commands documentation](slash-commands.md).
|
|
408
250
|
|
|
409
|
-
### Hooks
|
|
251
|
+
### Adding Hooks
|
|
410
252
|
|
|
411
|
-
Hooks allow
|
|
253
|
+
Hooks allow operations to be automatically executed when specific events occur. Commands receive hook input JSON data via standard input and can use `jq` to extract fields.
|
|
412
254
|
|
|
413
255
|
**Example**: `hooks/hooks.json`
|
|
414
256
|
|
|
415
257
|
```json
|
|
416
258
|
{
|
|
417
259
|
"hooks": {
|
|
418
|
-
"
|
|
260
|
+
"PostToolUse": [
|
|
419
261
|
{
|
|
262
|
+
"matcher": "Write|Edit",
|
|
420
263
|
"hooks": [
|
|
421
264
|
{
|
|
422
265
|
"type": "command",
|
|
423
|
-
"command": "
|
|
424
|
-
"timeout": 5000
|
|
266
|
+
"command": "jq -r '.tool_input.file_path' | xargs npm run lint:fix"
|
|
425
267
|
}
|
|
426
268
|
]
|
|
427
269
|
}
|
|
@@ -430,21 +272,17 @@ Hooks allow automatic execution of operations when specific events occur.
|
|
|
430
272
|
}
|
|
431
273
|
```
|
|
432
274
|
|
|
433
|
-
|
|
275
|
+
Hooks in a plugin's `hooks/hooks.json` are automatically **merged** (not overwritten) with user- and project-level hooks when the plugin is enabled, and are **not** subject to the `allowUntrustedFrontmatterHooks` gate (which only applies to hooks declared in Agent / Skill frontmatter).
|
|
434
276
|
|
|
435
|
-
|
|
277
|
+
In addition to `command`, hooks also support `type: prompt` (small-model semantic decisions), `type: agent` (subagent validation), and `type: http` (POST/PUT/PATCH to a specified URL). See the [Hooks documentation](hooks.md) for details. If your plugin also needs to ship frontmatter hooks bundled with a Skill, refer to the [Skills documentation - Configuring Hooks in a Skill](skills.md#configuring-hooks-in-a-skill) (note that this path is subject to the security gate).
|
|
436
278
|
|
|
437
|
-
|
|
279
|
+
For detailed information, refer to the [Hooks documentation](hooks.md).
|
|
438
280
|
|
|
439
|
-
|
|
281
|
+
### Adding LSP Servers
|
|
440
282
|
|
|
441
|
-
For common languages
|
|
283
|
+
> For common languages such as TypeScript, Python, and Rust, it is recommended to install pre-built LSP plugins directly from the official plugin marketplace. Only create custom LSP plugins when you need to support languages not yet covered.
|
|
442
284
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
Configure LSP servers by adding a `.lsp.json` file to the plugin root directory:
|
|
446
|
-
|
|
447
|
-
**Example**: `.lsp.json`
|
|
285
|
+
LSP (Language Server Protocol) plugins provide real-time code intelligence to CodeBuddy. If you need support for a language without an official LSP plugin, you can add a `.lsp.json` file to the plugin:
|
|
448
286
|
|
|
449
287
|
```json
|
|
450
288
|
{
|
|
@@ -458,12 +296,7 @@ Configure LSP servers by adding a `.lsp.json` file to the plugin root directory:
|
|
|
458
296
|
}
|
|
459
297
|
```
|
|
460
298
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
- **Language Identifier** (e.g., `"go"`): Defines the language supported by the LSP server
|
|
464
|
-
- `command`: The command name of the LSP server executable
|
|
465
|
-
- `args`: Array of arguments passed to the command
|
|
466
|
-
- `extensionToLanguage`: Mapping of file extensions to language identifiers
|
|
299
|
+
Users who install the plugin must have the language server binaries pre-installed on their machine.
|
|
467
300
|
|
|
468
301
|
#### Multi-Language Configuration Example
|
|
469
302
|
|
|
@@ -488,201 +321,248 @@ Configure LSP servers by adding a `.lsp.json` file to the plugin root directory:
|
|
|
488
321
|
|
|
489
322
|
#### Installation Requirements
|
|
490
323
|
|
|
491
|
-
When
|
|
324
|
+
When users install plugins that include LSP configurations, they must have the corresponding language server binaries pre-installed on their system:
|
|
492
325
|
|
|
493
|
-
- **Go**:
|
|
494
|
-
- **Python**:
|
|
495
|
-
- **Rust**:
|
|
326
|
+
- **Go**: `go install golang.org/x/tools/gopls@latest`
|
|
327
|
+
- **Python**: `pip install python-lsp-server`
|
|
328
|
+
- **Rust**: `rustup component add rust-analyzer`
|
|
496
329
|
|
|
497
|
-
|
|
330
|
+
### Bundling Default Settings
|
|
498
331
|
|
|
499
|
-
|
|
500
|
-
2. Automatically starts the corresponding LSP server based on file extensions
|
|
501
|
-
3. AI obtains code intelligence information via the LSP protocol
|
|
502
|
-
4. Provides more accurate code suggestions and modifications
|
|
332
|
+
Plugins can include a `settings.json` file at the root that applies default configuration when the plugin is enabled. Currently, only the `agent` key is supported.
|
|
503
333
|
|
|
504
|
-
|
|
334
|
+
Setting `agent` activates one of the plugin's [custom agents](sub-agents.md) as the main thread, applying its system prompt, tool restrictions, and model. This allows the plugin to change CodeBuddy Code's default behavior when enabled.
|
|
505
335
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
## Plugin Marketplace Types
|
|
336
|
+
```json
|
|
337
|
+
{
|
|
338
|
+
"agent": "security-reviewer"
|
|
339
|
+
}
|
|
340
|
+
```
|
|
512
341
|
|
|
513
|
-
|
|
342
|
+
This example activates the `security-reviewer` agent defined in the plugin's `agents/` directory. Settings in `settings.json` take precedence over the `settings` declared in `plugin.json`. Unknown keys are silently ignored.
|
|
514
343
|
|
|
515
|
-
|
|
344
|
+
### Testing Plugins Locally
|
|
516
345
|
|
|
517
|
-
|
|
346
|
+
Use the `--plugin-dir` argument to test plugins during development. This loads your plugin directly without installation.
|
|
518
347
|
|
|
348
|
+
```bash
|
|
349
|
+
codebuddy --plugin-dir ./my-plugin
|
|
519
350
|
```
|
|
520
|
-
plugin-repo/
|
|
521
|
-
├── .codebuddy-plugin/
|
|
522
|
-
│ └── marketplace.json # Marketplace manifest
|
|
523
|
-
└── plugins/
|
|
524
|
-
├── plugin1/
|
|
525
|
-
│ ├── .codebuddy-plugin/
|
|
526
|
-
│ │ └── plugin.json
|
|
527
|
-
│ └── ...
|
|
528
|
-
└── plugin2/
|
|
529
|
-
├── .codebuddy-plugin/
|
|
530
|
-
│ └── plugin.json
|
|
531
|
-
└── ...
|
|
532
|
-
```
|
|
533
351
|
|
|
534
|
-
|
|
352
|
+
When a `--plugin-dir` plugin has the same name as an installed marketplace plugin, the local copy takes precedence in that session. This lets you test changes to an installed plugin without uninstalling it. Marketplace plugins force-enabled via managed settings are the only exception and cannot be overridden.
|
|
353
|
+
|
|
354
|
+
While modifying a plugin, run `/reload-plugins` to pick up updates without restarting. This reloads plugins, skills, agents, hooks, plugin MCP servers, and plugin LSP servers. Test your plugin components:
|
|
355
|
+
|
|
356
|
+
- Try skills with `/plugin-name:skill-name`
|
|
357
|
+
- Check that agents appear in `/agents`
|
|
358
|
+
- Verify hooks work as expected
|
|
359
|
+
|
|
360
|
+
> You can load multiple plugins simultaneously by specifying the argument multiple times:
|
|
361
|
+
>
|
|
362
|
+
> ```bash
|
|
363
|
+
> codebuddy --plugin-dir ./plugin-one --plugin-dir ./plugin-two
|
|
364
|
+
> ```
|
|
365
|
+
|
|
366
|
+
### Debugging Plugin Issues
|
|
367
|
+
|
|
368
|
+
If a plugin is not working as expected:
|
|
369
|
+
|
|
370
|
+
1. **Check structure**: Make sure directories are at the plugin root, not inside `.codebuddy-plugin/`
|
|
371
|
+
2. **Test components individually**: Check each command, agent, and hook separately
|
|
372
|
+
3. **Use debug mode**: Start CodeBuddy with the `--debug` argument to see detailed logs
|
|
373
|
+
|
|
374
|
+
## plugin.json Manifest Format
|
|
375
|
+
|
|
376
|
+
The plugin manifest file defines the plugin's metadata and included components, located at `.codebuddy-plugin/plugin.json`:
|
|
535
377
|
|
|
536
378
|
```json
|
|
537
379
|
{
|
|
538
|
-
"name": "
|
|
539
|
-
"
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
]
|
|
380
|
+
"name": "my-plugin",
|
|
381
|
+
"version": "1.0.0",
|
|
382
|
+
"description": "Plugin description",
|
|
383
|
+
"author": {
|
|
384
|
+
"name": "Author Name",
|
|
385
|
+
"email": "author@example.com"
|
|
386
|
+
},
|
|
387
|
+
"homepage": "https://github.com/username/my-plugin",
|
|
388
|
+
"repository": "https://github.com/username/my-plugin",
|
|
389
|
+
"keywords": ["example"],
|
|
390
|
+
"category": "Development Tools",
|
|
391
|
+
"commands": [],
|
|
392
|
+
"agents": [],
|
|
393
|
+
"skills": [],
|
|
394
|
+
"hooks": "./hooks/hooks.json"
|
|
551
395
|
}
|
|
552
396
|
```
|
|
553
397
|
|
|
554
|
-
|
|
398
|
+
For complete manifest schema documentation, see the [Plugin Reference Documentation](plugins-reference.md).
|
|
399
|
+
|
|
400
|
+
## Sharing Your Plugin
|
|
401
|
+
|
|
402
|
+
When your plugin is ready to share:
|
|
555
403
|
|
|
556
|
-
|
|
404
|
+
1. **Add documentation**: Include a `README.md` describing installation and usage
|
|
405
|
+
2. **Version management**: Use [semantic versioning](plugins-reference.md#version-management) in `plugin.json`
|
|
406
|
+
3. **Create or use a marketplace**: Distribute via [plugin marketplaces](plugin-marketplaces.md)
|
|
407
|
+
4. **Test with others**: Have team members test the plugin before broader distribution
|
|
557
408
|
|
|
558
|
-
|
|
409
|
+
Once your plugin is published to a marketplace, others can install and use it by following the instructions in [Plugin Marketplaces](plugin-marketplaces.md).
|
|
559
410
|
|
|
560
|
-
|
|
561
|
-
- Provide `/plugins/<plugin-name>/plugin.json` - Plugin manifest
|
|
562
|
-
- Provide plugin file downloads
|
|
411
|
+
## Converting Existing Configuration to a Plugin
|
|
563
412
|
|
|
564
|
-
|
|
413
|
+
If you already have skills or hooks in the `.codebuddy/` directory, you can convert them to a plugin for easier sharing and distribution.
|
|
565
414
|
|
|
566
|
-
|
|
415
|
+
### Migration Steps
|
|
567
416
|
|
|
568
|
-
|
|
417
|
+
#### Step 1: Create the plugin structure
|
|
569
418
|
|
|
419
|
+
Create a new plugin directory:
|
|
420
|
+
|
|
421
|
+
```bash
|
|
422
|
+
mkdir -p my-plugin/.codebuddy-plugin
|
|
570
423
|
```
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
424
|
+
|
|
425
|
+
Create the manifest file `my-plugin/.codebuddy-plugin/plugin.json`:
|
|
426
|
+
|
|
427
|
+
```json
|
|
428
|
+
{
|
|
429
|
+
"name": "my-plugin",
|
|
430
|
+
"description": "Migrated from standalone configuration",
|
|
431
|
+
"version": "1.0.0"
|
|
432
|
+
}
|
|
579
433
|
```
|
|
580
434
|
|
|
581
|
-
|
|
435
|
+
#### Step 2: Copy existing files
|
|
582
436
|
|
|
583
|
-
|
|
437
|
+
Copy your existing configuration to the plugin directory:
|
|
584
438
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
4. **Complete Documentation**: Provide clear descriptions for each command and skill
|
|
589
|
-
5. **Thorough Testing**: Test plugins in local marketplace before publishing
|
|
439
|
+
```bash
|
|
440
|
+
# Copy commands
|
|
441
|
+
cp -r .codebuddy/commands my-plugin/
|
|
590
442
|
|
|
591
|
-
|
|
443
|
+
# Copy agents (if any)
|
|
444
|
+
cp -r .codebuddy/agents my-plugin/
|
|
592
445
|
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
446
|
+
# Copy skills (if any)
|
|
447
|
+
cp -r .codebuddy/skills my-plugin/
|
|
448
|
+
```
|
|
596
449
|
|
|
597
|
-
|
|
450
|
+
#### Step 3: Migrate Hooks
|
|
598
451
|
|
|
599
|
-
|
|
600
|
-
2. Write `plugin.json`
|
|
601
|
-
3. Test plugin in local marketplace
|
|
602
|
-
4. Create GitHub repository or HTTP server
|
|
603
|
-
5. Add `marketplace.json`
|
|
604
|
-
6. Share marketplace address with users
|
|
452
|
+
If you have hooks in your settings, create the hooks directory:
|
|
605
453
|
|
|
606
|
-
|
|
454
|
+
```bash
|
|
455
|
+
mkdir my-plugin/hooks
|
|
456
|
+
```
|
|
607
457
|
|
|
608
|
-
|
|
458
|
+
Create `my-plugin/hooks/hooks.json` and place the hooks configuration in it. Copy the `hooks` object from `.codebuddy/settings.json` or `settings.local.json` — the format is the same. Commands receive hook input JSON data via standard input and can use `jq` to extract fields:
|
|
609
459
|
|
|
610
|
-
|
|
460
|
+
```json
|
|
461
|
+
{
|
|
462
|
+
"hooks": {
|
|
463
|
+
"PostToolUse": [
|
|
464
|
+
{
|
|
465
|
+
"matcher": "Write|Edit",
|
|
466
|
+
"hooks": [
|
|
467
|
+
{
|
|
468
|
+
"type": "command",
|
|
469
|
+
"command": "jq -r '.tool_input.file_path' | xargs npm run lint:fix"
|
|
470
|
+
}
|
|
471
|
+
]
|
|
472
|
+
}
|
|
473
|
+
]
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
```
|
|
611
477
|
|
|
612
|
-
|
|
478
|
+
#### Step 4: Test the migrated plugin
|
|
613
479
|
|
|
614
|
-
|
|
615
|
-
* Check if `.codebuddy-plugin/marketplace.json` exists at the specified path
|
|
616
|
-
* Use `codebuddy plugin validate` to ensure JSON syntax is valid
|
|
617
|
-
* For private repositories, confirm you have access permissions
|
|
480
|
+
Load the plugin to verify everything works:
|
|
618
481
|
|
|
619
|
-
|
|
482
|
+
```bash
|
|
483
|
+
codebuddy --plugin-dir ./my-plugin
|
|
484
|
+
```
|
|
620
485
|
|
|
621
|
-
|
|
486
|
+
Test each component: run your commands, check agents in `/agents`, and verify hooks trigger correctly.
|
|
622
487
|
|
|
623
|
-
|
|
488
|
+
### Before vs After Migration
|
|
624
489
|
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
490
|
+
| Standalone Configuration (`.codebuddy/`) | Plugin |
|
|
491
|
+
|-------------------------------------------|--------|
|
|
492
|
+
| Available in only one project | Shareable via marketplaces |
|
|
493
|
+
| Files in `.codebuddy/commands/` | Files in `plugin-name/commands/` |
|
|
494
|
+
| Hooks in `settings.json` | Hooks in `hooks/hooks.json` |
|
|
495
|
+
| Manual copy required for sharing | Install via `/plugin install` |
|
|
629
496
|
|
|
630
|
-
|
|
497
|
+
> After migration, you can delete the original files in `.codebuddy/` to avoid duplication. The plugin version takes precedence when loaded.
|
|
631
498
|
|
|
632
|
-
|
|
499
|
+
## Best Practices
|
|
633
500
|
|
|
634
|
-
|
|
501
|
+
### Plugin Development Recommendations
|
|
635
502
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
503
|
+
1. **Follow naming conventions**: Use clear, descriptive plugin names (kebab-case, no spaces)
|
|
504
|
+
2. **Provide complete metadata**: Provide detailed descriptions and author information in `plugin.json`
|
|
505
|
+
3. **Version management**: Use semantic versioning (Semantic Versioning)
|
|
506
|
+
4. **Complete documentation**: Provide clear descriptions for each command and skill
|
|
507
|
+
5. **Thorough testing**: Test plugins locally with `--plugin-dir` before publishing
|
|
640
508
|
|
|
641
|
-
###
|
|
509
|
+
### Security Considerations
|
|
642
510
|
|
|
643
|
-
**
|
|
511
|
+
1. **Only install plugins from trusted sources**: Plugins can execute commands and access the filesystem
|
|
512
|
+
2. **Review plugin code**: Check plugin commands and hooks before installation
|
|
513
|
+
3. **Use permission controls**: Limit plugin access through CodeBuddy's permission system
|
|
514
|
+
|
|
515
|
+
## Troubleshooting
|
|
516
|
+
|
|
517
|
+
### Plugin Not Loading
|
|
518
|
+
|
|
519
|
+
**Problem**: Plugin is installed but not working
|
|
644
520
|
|
|
645
521
|
**Solution**:
|
|
646
522
|
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
523
|
+
- Confirm the plugin is enabled: run `/plugin` and go to the "Installed" tab
|
|
524
|
+
- Check that `plugin.json` format is correct
|
|
525
|
+
- Run `/reload-plugins` to reload plugins
|
|
526
|
+
- Use `--debug` mode to view loading logs
|
|
650
527
|
|
|
651
|
-
###
|
|
528
|
+
### Command Not Available
|
|
652
529
|
|
|
653
|
-
**Problem**:
|
|
530
|
+
**Problem**: Plugin is installed but commands are unavailable
|
|
654
531
|
|
|
655
532
|
**Solution**:
|
|
656
533
|
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
534
|
+
- Confirm command files are placed in the plugin root's `commands/`, not inside `.codebuddy-plugin/`
|
|
535
|
+
- Check that command files exist and have the correct format
|
|
536
|
+
- Run `/reload-plugins` to refresh
|
|
660
537
|
|
|
661
538
|
### Validation and Testing
|
|
662
539
|
|
|
663
|
-
Test your
|
|
540
|
+
Test your plugin before sharing:
|
|
664
541
|
|
|
665
542
|
```bash
|
|
666
|
-
# Validate
|
|
667
|
-
codebuddy plugin validate .
|
|
668
|
-
|
|
669
|
-
# Validate specific plugin
|
|
543
|
+
# Validate plugin format
|
|
670
544
|
codebuddy plugin validate /path/to/plugin
|
|
671
545
|
|
|
672
|
-
#
|
|
673
|
-
codebuddy plugin
|
|
546
|
+
# Test locally with --plugin-dir
|
|
547
|
+
codebuddy --plugin-dir ./my-plugin
|
|
674
548
|
|
|
675
|
-
# Test plugin
|
|
676
|
-
|
|
549
|
+
# Test the plugin's skills
|
|
550
|
+
/my-plugin:skill-name
|
|
677
551
|
```
|
|
678
552
|
|
|
679
|
-
##
|
|
553
|
+
## Next Steps
|
|
680
554
|
|
|
681
|
-
|
|
682
|
-
- **[Slash Commands](slash-commands.md)** - Learn about the command system
|
|
683
|
-
- **[Skills](skills.md)** - Learn about the skills system
|
|
684
|
-
- **[Hooks](hooks.md)** - Master the hooks mechanism
|
|
555
|
+
### For Plugin Users
|
|
685
556
|
|
|
686
|
-
|
|
557
|
+
- [Plugin Marketplaces](plugin-marketplaces.md) - Browse marketplaces and install plugins
|
|
558
|
+
- [Settings](settings.md) - Learn about plugin configuration options
|
|
559
|
+
|
|
560
|
+
### For Plugin Developers
|
|
687
561
|
|
|
688
|
-
|
|
562
|
+
- [Plugin Marketplaces](plugin-marketplaces.md) - Package and share your plugin
|
|
563
|
+
- [Plugin Reference Documentation](plugins-reference.md) - Complete technical specification
|
|
564
|
+
- Dive deeper into specific plugin components:
|
|
565
|
+
- [Skills](skills.md) - Skill development details
|
|
566
|
+
- [Sub-agents](sub-agents.md) - Agent configuration and capabilities
|
|
567
|
+
- [Hooks](hooks.md) - Event handling and automation
|
|
568
|
+
- [MCP](mcp.md) - External tool integration
|