command-code 0.52.5 → 1.0.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.
Files changed (61) hide show
  1. package/CHANGELOG.md +2541 -0
  2. package/dist/bundled/command-code-knowledge/SKILL.md +52 -0
  3. package/dist/bundled/command-code-knowledge/reference/checkpoints.md +366 -0
  4. package/dist/bundled/command-code-knowledge/reference/custom-agents.md +91 -0
  5. package/dist/bundled/command-code-knowledge/reference/custom-slash-commands.md +345 -0
  6. package/dist/bundled/command-code-knowledge/reference/headless.md +234 -0
  7. package/dist/bundled/command-code-knowledge/reference/hooks.md +1097 -0
  8. package/dist/bundled/command-code-knowledge/reference/mcp.md +626 -0
  9. package/dist/bundled/command-code-knowledge/reference/memory.md +98 -0
  10. package/dist/bundled/command-code-knowledge/reference/models.md +81 -0
  11. package/dist/bundled/command-code-knowledge/reference/permissions.md +412 -0
  12. package/dist/bundled/command-code-knowledge/reference/plan-mode.md +101 -0
  13. package/dist/bundled/command-code-knowledge/reference/product-help.md +421 -0
  14. package/dist/bundled/command-code-knowledge/reference/skills.md +993 -0
  15. package/dist/bundled/mod-builder/SKILL.md +128 -0
  16. package/dist/bundled/mod-builder/examples/block-dangerous-commands.ts +41 -0
  17. package/dist/bundled/mod-builder/examples/custom-entry-renderer.ts +32 -0
  18. package/dist/bundled/mod-builder/examples/custom-tool.ts +53 -0
  19. package/dist/bundled/mod-builder/examples/flags-and-options.ts +29 -0
  20. package/dist/bundled/mod-builder/examples/input-shortcuts.ts +41 -0
  21. package/dist/bundled/mod-builder/examples/kitchen-sink.ts +110 -0
  22. package/dist/bundled/mod-builder/examples/lifecycle-hooks.ts +64 -0
  23. package/dist/bundled/mod-builder/examples/observe-events.ts +30 -0
  24. package/dist/bundled/mod-builder/examples/slash-command.ts +33 -0
  25. package/dist/bundled/mod-builder/reference/api.md +81 -0
  26. package/dist/bundled/mod-builder/reference/hooks-and-events.md +308 -0
  27. package/dist/bundled/mod-builder/reference/overview.md +161 -0
  28. package/dist/bundled/mod-builder/reference/packaging.md +63 -0
  29. package/dist/bundled/mod-builder/reference/ui.md +63 -0
  30. package/dist/bundled/mod-builder/reference/verify.md +58 -0
  31. package/dist/bundled/skill-builder/SKILL.md +104 -0
  32. package/dist/cli.mjs +5 -5
  33. package/package.json +35 -26
  34. package/vsix/commandcode-vscode.vsix +0 -0
  35. /package/{skills → dist/bundled}/agent-browser/SKILL.md +0 -0
  36. /package/{skills → dist/bundled}/design/SKILL.md +0 -0
  37. /package/{skills → dist/bundled}/design/references/border.md +0 -0
  38. /package/{skills → dist/bundled}/design/references/button.md +0 -0
  39. /package/{skills → dist/bundled}/design/references/checkup.md +0 -0
  40. /package/{skills → dist/bundled}/design/references/color.md +0 -0
  41. /package/{skills → dist/bundled}/design/references/create.md +0 -0
  42. /package/{skills → dist/bundled}/design/references/design-html.md +0 -0
  43. /package/{skills → dist/bundled}/design/references/deslop.md +0 -0
  44. /package/{skills → dist/bundled}/design/references/finish.md +0 -0
  45. /package/{skills → dist/bundled}/design/references/interaction.md +0 -0
  46. /package/{skills → dist/bundled}/design/references/layout.md +0 -0
  47. /package/{skills → dist/bundled}/design/references/motion.md +0 -0
  48. /package/{skills → dist/bundled}/design/references/redesign.md +0 -0
  49. /package/{skills → dist/bundled}/design/references/refine.md +0 -0
  50. /package/{skills → dist/bundled}/design/references/relayout.md +0 -0
  51. /package/{skills → dist/bundled}/design/references/report-html.md +0 -0
  52. /package/{skills → dist/bundled}/design/references/responsive.md +0 -0
  53. /package/{skills → dist/bundled}/design/references/review.md +0 -0
  54. /package/{skills → dist/bundled}/design/references/setup.md +0 -0
  55. /package/{skills → dist/bundled}/design/references/shadow.md +0 -0
  56. /package/{skills → dist/bundled}/design/references/smell.md +0 -0
  57. /package/{skills → dist/bundled}/design/references/surface.md +0 -0
  58. /package/{skills → dist/bundled}/design/references/tokenize.md +0 -0
  59. /package/{skills → dist/bundled}/design/references/typeset.md +0 -0
  60. /package/{skills → dist/bundled}/design/references/voice.md +0 -0
  61. /package/{skills → dist/bundled}/design/references/writing.md +0 -0
@@ -0,0 +1,993 @@
1
+ <!-- GENERATED FILE — do not edit. Source: packages/docs/src/app/skills/page.mdx. Regenerate: pnpm generate:knowledge -->
2
+
3
+ # Agent Skills
4
+
5
+ Command Code supports Agent Skills — a lightweight, open standard for extending AI agents with specialized knowledge and workflows.
6
+
7
+ ---
8
+
9
+ ## What are Agent Skills?
10
+
11
+ Agent Skills are modular, self-contained instruction sets that teach Command Code how to perform specific tasks. Each skill is a folder containing a `skill.md` file with metadata and step-by-step guidance.
12
+
13
+ Think of skills as expert playbooks that Command Code can reference when needed. Instead of explaining the same process repeatedly, you define it once in a skill, and Command Code automatically applies it when needed.
14
+
15
+ ---
16
+
17
+ ## How skills work
18
+
19
+ Skills use **progressive disclosure** to manage context efficiently:
20
+
21
+ 1. **Discovery**: Command Code loads only the name, description, and file path of each skill at startup.
22
+ 2. **Activation**: When a task matches a skill or invoked directly with `/skill-name`, Command Code reads its full `SKILL.md` instructions.
23
+ 3. **Execution**: Command Code follows the instructions, optionally loading referenced files as needed
24
+
25
+ This keeps Command Code fast while giving access to more context on demand.
26
+
27
+ ---
28
+
29
+ ## Quickstart
30
+
31
+ Let's create your first user-level and project-level skill.
32
+
33
+ ### User-level skill
34
+
35
+ **Create a global code review skill**
36
+ ```bash
37
+ mkdir -p ~/.commandcode/skills/code-review
38
+ cat > ~/.commandcode/skills/code-review/SKILL.md << 'EOF'
39
+ ---
40
+ name: code-review
41
+ description: Perform thorough code reviews checking for bugs, security issues, and best practices
42
+ ---
43
+
44
+ # Code Review Checklist
45
+
46
+ When reviewing code, check:
47
+
48
+ ## Security
49
+
50
+ - [ ] No hardcoded credentials or API keys
51
+ - [ ] Input validation on all user data
52
+ - [ ] Proper authentication and authorization
53
+
54
+ ## Code Quality
55
+
56
+ - [ ] Clear, descriptive variable names
57
+ - [ ] Functions do one thing well
58
+ - [ ] No code duplication
59
+ - [ ] Edge cases handled
60
+
61
+ ## Performance
62
+
63
+ - [ ] No unnecessary loops or operations
64
+ - [ ] Efficient data structures
65
+ - [ ] Database queries optimized
66
+
67
+ ## Testing
68
+
69
+ - [ ] Unit tests cover main functionality
70
+ - [ ] Edge cases tested
71
+ - [ ] Error conditions tested
72
+
73
+ EOF
74
+ ```
75
+
76
+ ### Project-level skill
77
+
78
+ **Create a project-specific API skill**
79
+
80
+ ```bash
81
+ mkdir -p .commandcode/skills/api-guidelines
82
+ cat > .commandcode/skills/api-guidelines/SKILL.md << 'EOF'
83
+ ---
84
+ name: api-guidelines
85
+ description: API design patterns and conventions for this project
86
+ ---
87
+
88
+ # API Guidelines
89
+
90
+ ## Endpoint naming
91
+ - Use plural nouns: `/users`, `/posts`
92
+ - Use kebab-case: `/user-profiles`
93
+ - Version in URL: `/v1/users`
94
+
95
+ ## Response format
96
+ \```json
97
+ {
98
+ "data": { ... },
99
+ "meta": { "count": 10, "page": 1 }
100
+ }
101
+ \```
102
+
103
+ ## Error handling
104
+ - 400: Bad request (validation errors)
105
+ - 401: Unauthorized
106
+ - 403: Forbidden
107
+ - 404: Not found
108
+ - 500: Server error
109
+ EOF
110
+ ```
111
+
112
+ ### Using `.agents/skills/` instead
113
+
114
+ If you already have skills in `.agents/skills/`, Command Code picks them up automatically. No migration needed.
115
+
116
+ `.commandcode/skills/` takes priority on name conflicts. Skills from `.agents/` show a `[.agents]` badge in the `/skills` UI.
117
+
118
+ ---
119
+
120
+ ## Storage locations
121
+
122
+ Command Code fully implements the [Agent Skills open standard](https://agentskills.io) with two storage locations:
123
+
124
+ ### User-level skills (global)
125
+
126
+ Stored in `~/.commandcode/skills/` and available across **all your projects**.
127
+
128
+ Perfect for:
129
+
130
+ - General development workflows
131
+ - Exploratory workflows
132
+ - Cross-project best practices
133
+
134
+ ### Project-level skills (local)
135
+
136
+ Stored in `.commandcode/skills/` within your project and **only available in that project**.
137
+
138
+ Perfect for:
139
+
140
+ - Project-specific patterns
141
+ - Team conventions
142
+ - Architecture guidelines
143
+ - Domain-specific workflows
144
+
145
+ Learn more about how to create user-level and project-level skills in the [Create skills](#create-skills) section below.
146
+
147
+ ### `.agents/skills/` compatibility
148
+
149
+ Command Code also discovers skills from `.agents/skills/` (project) and `~/.agents/skills/` (user). If another tool already stores your skills under `.agents/`, they load automatically and show a `[.agents]` badge in the `/skills` menu.
150
+
151
+ **Priority:** `.commandcode/skills/` wins on name conflicts. If the same skill exists in both, the `.commandcode/` version is used and the `.agents/` version is skipped. See [Selection priority](#selection-priority) for the full four-way order.
152
+
153
+ **Discovery:** Command Code walks up to 10 directory levels from your working directory to find `.agents/skills/`, stopping at your home directory. This keeps `~/.agents/skills/` from being picked up as a project-level source.
154
+
155
+ ### Extra locations
156
+
157
+ Beyond the standard directories, you can point Command Code at any skills folder — a directory of skills, or a single skill directory containing `SKILL.md`.
158
+
159
+ **In settings** — add a `skills` array to `settings.json` (user-global `~/.commandcode/settings.json`, project `.commandcode/settings.json`, or `.commandcode/settings.local.json`):
160
+
161
+ ```json theme={null}
162
+ {
163
+ "skills": [
164
+ "~/team/shared-skills",
165
+ "./vendor/skills",
166
+ "/opt/company/skills"
167
+ ]
168
+ }
169
+ ```
170
+
171
+ `~/` expands to your home directory; relative paths resolve against the project root (the git root, or the working directory outside a repo). Settings layers overwrite the array whole — the highest layer that defines `skills` wins. This is also the way to load a skills folder kept outside the standard locations like `~/.commandcode/skills` — a shared team drive, or a folder maintained for another Agent-Skills tool.
172
+
173
+ **At launch** — the `--skill` flag adds a location for one session and is repeatable; `--no-skills` skips discovery entirely (paths given via `--skill` still load):
174
+
175
+ ```bash theme={null}
176
+ cmd --skill ./my-skill --skill ~/team/shared-skills
177
+ cmd --no-skills # run with no skills at all
178
+ cmd --no-skills --skill ./only-this # run with exactly one skill
179
+ ```
180
+
181
+ ### Nested skill folders
182
+
183
+ Discovery is recursive: a location may group skills under intermediate directories, and each skill is still the directory that directly contains `SKILL.md`.
184
+
185
+ ```text theme={null}
186
+ .commandcode/skills/
187
+ ├── docs/
188
+ │ ├── changelog-writer/
189
+ │ │ └── SKILL.md
190
+ │ └── release-notes/
191
+ │ └── SKILL.md
192
+ └── code-review/
193
+ └── SKILL.md
194
+ ```
195
+
196
+ The `name` field still matches the skill's own directory (`changelog-writer`), not the grouping folder. A skill's own subfolders (`scripts/`, `references/`, `assets/`) are never scanned for more skills.
197
+
198
+ ### Selection priority
199
+
200
+ Skills, custom commands, and built-ins all share the same `/` menu. Skill locations are checked in this order:
201
+
202
+ 1. `.commandcode/skills/` (project)
203
+ 2. `.agents/skills/` (project)
204
+ 3. `~/.commandcode/skills/` (user)
205
+ 4. `~/.agents/skills/` (user)
206
+ 5. Extra locations (`--skill` flags first, then settings `skills` entries)
207
+ 6. Bundled skills that ship with Command Code
208
+
209
+ Put simply: project-level always trumps user-level, and within the same level `.commandcode/` is favored over `.agents/`.
210
+
211
+ When two locations provide the same skill name, the higher-precedence copy wins and every shadowed copy is reported as a **Duplicate names** warning in the `/skills` issues view and `cmd skills list --debug` — a shadowed skill is never dropped silently.
212
+
213
+ **What happens on a collision.** When a skill name matches a built-in or a custom command:
214
+
215
+ - Typing `/<name>` always resolves to the higher-precedence owner — the skill is not invoked.
216
+ - The skill still appears in the `/` menu with a `[skill]` badge and a ` — shadowed by /<owner>` note, so you can see it exists and understand why `/<name>` runs the built-in command instead. Command Code prefers visibility with a marker over silently dropping the row.
217
+
218
+ ---
219
+
220
+ ## Browse and use skills
221
+
222
+ Use the `/skills` slash command to view all your skills:
223
+
224
+ **Open skills menu**
225
+ ```bash
226
+ # In Command Code session
227
+ /skills
228
+ ```
229
+
230
+ This opens an interactive menu showing:
231
+
232
+ - All user-level skills with `(user)` label
233
+ - All project-level skills with `(project)` label
234
+ - Skills from `.agents/skills/` (user or project) show a dim `[.agents]` badge
235
+ - Use **arrow keys** to navigate
236
+ - Press **Enter** to open any skill in your editor (or toggle it — see [Enable or disable skills](#enable-or-disable-skills))
237
+ - Press **Esc** to close and return to your session
238
+
239
+ Every installed skill is also surfaced as a first-class slash command in the `/` menu. If you install a skill named `pr-desc`, you will see `/pr-desc`, sorted after built-ins and any custom commands in the slash menu.
240
+
241
+ If a skill name collides with a built-in or a custom command, the skill still appears in the `/` menu with a `[skill]` badge and a ` — shadowed by /<owner>` note. Typing `/<name>` always resolves to the higher-precedence owner, not the skill. See [Selection priority](#selection-priority) above for the full order.
242
+
243
+ ---
244
+
245
+ ## Invoking a skill
246
+
247
+ Command Code supports three ways to use a skill in a conversation. Pick whichever matches the task at hand.
248
+
249
+ ### 1. Exact slash invocation
250
+
251
+ Type `/skill-name` at the start of your prompt to run that skill for the current turn:
252
+
253
+ ```bash
254
+ # In Command Code session
255
+ /pr-desc update the description based on new changes
256
+ ```
257
+
258
+ ### 2. Inline slash reference
259
+
260
+ Drop `/skill-name` anywhere inside a longer prompt to pin that skill without losing your natural phrasing. You can mix multiple skills in a single prompt:
261
+
262
+ ```bash
263
+ # In Command Code session
264
+ Please follow /code-conv when writing the new module and /pr when opening the review PR.
265
+ ```
266
+
267
+ ### 3. Inferred suggestion
268
+
269
+ Command Code scans your prompt and suggests a matching skill when one clearly fits. Ordinary prompts keep working exactly like before — inferred suggestions just help you discover what is available.
270
+
271
+ ---
272
+
273
+ ## Create skills
274
+
275
+ The fastest way to create a skill is to ask Command Code to build it for you. The bundled `skill-builder` skill walks the agent through scoping the job, picking a valid name and location, writing spec-compliant frontmatter, and verifying the result loads — just describe the workflow you want captured, or invoke `/skill-builder` directly.
276
+
277
+ ### User-level skills
278
+
279
+ User-level skills are available across **all your projects**.
280
+
281
+ **Location:** `~/.commandcode/skills/`
282
+
283
+ **Create a user skill**
284
+ ```bash
285
+ # Create the directory
286
+ mkdir -p ~/.commandcode/skills/my-skill
287
+
288
+ # Create the SKILL.md file
289
+
290
+ cat > ~/.commandcode/skills/my-skill/SKILL.md << 'EOF'
291
+
292
+ ---
293
+ name: my-skill
294
+ description: What this skill does and when to use it
295
+ ---
296
+
297
+ # My Skill
298
+
299
+ Instructions for Claude...
300
+ EOF
301
+ ```
302
+
303
+ **Use cases:**
304
+
305
+ - Personal coding preferences
306
+ - General development workflows
307
+ - Cross-project best practices
308
+ - Your own code style guidelines
309
+
310
+ **Example:**
311
+
312
+ **Code review skill**
313
+
314
+ ```bash
315
+ mkdir -p ~/.commandcode/skills/code-review
316
+ cat > ~/.commandcode/skills/code-review/SKILL.md << 'EOF'
317
+ ---
318
+ name: code-review
319
+ description: Perform thorough code reviews checking for bugs, security issues, and best practices
320
+ ---
321
+
322
+ # Code Review Checklist
323
+
324
+ ## Security
325
+ - [ ] No hardcoded credentials or API keys
326
+ - [ ] Input validation on all user data
327
+ - [ ] Proper authentication and authorization
328
+
329
+ ## Code Quality
330
+ - [ ] Clear, descriptive variable names
331
+ - [ ] Functions do one thing well
332
+ - [ ] No code duplication
333
+
334
+ ## Performance
335
+ - [ ] No unnecessary loops
336
+ - [ ] Efficient data structures
337
+ - [ ] Optimized queries
338
+
339
+ ## Testing
340
+ - [ ] Unit tests cover main functionality
341
+ - [ ] Edge cases tested
342
+ - [ ] Error conditions handled
343
+ EOF
344
+ ```
345
+
346
+ ### Project-level skills
347
+
348
+ Project-level skills are available only in **that specific project**.
349
+
350
+ **Location:** `.commandcode/skills/` (in your project root)
351
+
352
+ **Create a project skill**
353
+ ```bash
354
+ # Create the directory
355
+ mkdir -p .commandcode/skills/my-skill
356
+
357
+ # Create the SKILL.md file
358
+
359
+ cat > .commandcode/skills/my-skill/SKILL.md << 'EOF'
360
+ ---
361
+ name: my-skill
362
+ description: What this skill does and when to use it
363
+ ---
364
+
365
+ # My Skill
366
+
367
+ Instructions for Claude...
368
+ EOF
369
+ ```
370
+
371
+ **Use cases:**
372
+
373
+ - Project-specific patterns
374
+ - Team conventions
375
+ - Architecture guidelines
376
+ - Domain-specific workflows
377
+
378
+ **Example:**
379
+
380
+ **API guidelines skill**
381
+ ```bash
382
+ mkdir -p .commandcode/skills/api-guidelines
383
+ cat > .commandcode/skills/api-guidelines/SKILL.md << 'EOF'
384
+ ---
385
+ name: api-guidelines
386
+ description: API design patterns and conventions for this project
387
+ ---
388
+
389
+ # API Guidelines
390
+
391
+ ## Endpoint naming
392
+ - Use plural nouns: `/users`, `/posts`
393
+ - Use kebab-case: `/user-profiles`
394
+ - Version in URL: `/v1/users`
395
+
396
+ ## Response format
397
+ Always return JSON with this structure:
398
+ \```json
399
+ {
400
+ "data": { ... },
401
+ "meta": { "count": 10, "page": 1 },
402
+ "errors": []
403
+ }
404
+ \```
405
+
406
+ ## Error codes
407
+ - 400: Bad request (validation errors)
408
+ - 401: Unauthorized (missing/invalid token)
409
+ - 403: Forbidden (insufficient permissions)
410
+ - 404: Not found
411
+ - 500: Server error
412
+
413
+ ## Authentication
414
+ All endpoints require Bearer token in Authorization header except:
415
+ - POST /v1/auth/login
416
+ - POST /v1/auth/register
417
+ EOF
418
+ ```
419
+
420
+ You can also install community skills directly from GitHub without manually creating files — see [`cmd skills add`](#cmd-skills-add) in the command reference.
421
+
422
+ ---
423
+
424
+ ## Edit skills
425
+
426
+ You can edit using the `/skills` command.
427
+
428
+ 1. Type `/skills` in Command Code
429
+ 2. Navigate to the skill you want to edit
430
+ 3. Press Enter
431
+
432
+ This opens the `SKILL.md` file in your default editor (configured via `$EDITOR` environment variable).
433
+
434
+ ### Manual editing
435
+
436
+ You can also edit skills directly via the following paths:
437
+
438
+ **Edit a skill**
439
+ ```bash
440
+ # Edit user-level skill
441
+ code ~/.commandcode/skills/my-skill/SKILL.md
442
+
443
+ # Edit project-level skill
444
+ code .commandcode/skills/my-skill/SKILL.md
445
+
446
+ # Edit a skill from .agents/ (if you use that convention)
447
+ code .agents/skills/my-skill/SKILL.md
448
+ ```
449
+
450
+ After editing, the changes are immediately applied and ready to use. No restart is required.
451
+
452
+ ### Setting up your editor
453
+
454
+ The `/skills` command uses your `$EDITOR` environment variable to open files. See [setting up your editor](https://commandcode.ai/docs/core-concepts/interactive-mode#setting-up-your-editor) for setup instructions.
455
+
456
+ ---
457
+
458
+ ## Enable or disable skills
459
+
460
+ Toggle a skill on or off without deleting it. Disabled skills are hidden from the model and won't be invoked.
461
+
462
+ In the `/skills` picker, highlight a skill and press **Enter** to toggle it.
463
+
464
+ ### Where the setting lives
465
+
466
+ Disabled skills are tracked under the `disabledSkills` key in a `settings.json` file. Command Code looks for settings.json in the following paths:
467
+
468
+ | **Scope** | **Config file** | **Applies to** |
469
+ | --------- | --------------- | ----------------- |
470
+ | User | `~/.commandcode/settings.json` | Across all projects |
471
+ | Project | `.commandcode/settings.json` | Anyone using the project |
472
+
473
+ The shape is the same in both settings files:
474
+
475
+ ```json theme={null}
476
+ {
477
+ "disabledSkills": ["blogster", "r0"]
478
+ }
479
+ ```
480
+
481
+ To disable a skill across every project on your machine, edit `~/.commandcode/settings.json` directly. The next session will pick it up.
482
+
483
+ ---
484
+
485
+ ## Organizing skills
486
+
487
+ You can organize your skills using the following best practices:
488
+
489
+ ### Single skill per directory
490
+
491
+ Each skill must be in its own directory:
492
+
493
+ ```text theme={null}
494
+ .commandcode/skills/
495
+ ├── code-review/
496
+ │ └── SKILL.md
497
+ ├── api-guidelines/
498
+ │ └── SKILL.md
499
+ └── testing-patterns/
500
+ └── SKILL.md
501
+ ```
502
+
503
+ Skills can also be grouped under intermediate folders — see [Nested skill folders](#nested-skill-folders).
504
+
505
+ ### Adding supporting files
506
+
507
+ Skills can include additional files:
508
+
509
+ ```text theme={null}
510
+ my-skill/
511
+ ├── SKILL.md # Required
512
+ ├── scripts/ # Executable code
513
+ │ ├── process.py
514
+ │ └── validate.sh
515
+ ├── references/ # Additional docs
516
+ │ ├── API_REFERENCE.md
517
+ │ └── EXAMPLES.md
518
+ └── assets/ # Templates, resources
519
+ ├── template.json
520
+ └── schema.sql
521
+ ```
522
+
523
+ Reference these files in your `SKILL.md`:
524
+
525
+ ```markdown theme={null}
526
+ See [API Reference](references/API_REFERENCE.md) for details.
527
+
528
+ Run the validation script:
529
+ \```bash
530
+ scripts/validate.sh
531
+ \```
532
+ ```
533
+
534
+ ---
535
+
536
+ ## Naming conventions
537
+
538
+ ### Skill names
539
+
540
+ * Use lowercase letters, numbers, and hyphens only
541
+ * Max 64 characters
542
+ * Must not start or end with hyphen
543
+ * No consecutive hyphens
544
+
545
+ **Good names:**
546
+
547
+ ```
548
+ code-review
549
+ api-guidelines
550
+ testing-patterns
551
+ commit-messages
552
+ ```
553
+
554
+ **Bad names:**
555
+
556
+ ```
557
+ CodeReview # uppercase not allowed
558
+ code_review # underscores not allowed
559
+ -code-review # cannot start with hyphen
560
+ code--review # consecutive hyphens
561
+ ```
562
+
563
+ ### Directory names
564
+
565
+ The directory name must match the skill `name` field:
566
+
567
+ ```text theme={null}
568
+ code-review/ # Directory name
569
+ └── SKILL.md # Must have: name: code-review
570
+ ```
571
+
572
+ ---
573
+
574
+ ## Skills specification
575
+
576
+ Every `SKILL.md` file should start with the frontmatter block followed by the markdown instructions in the body.
577
+
578
+ ### Frontmatter (required)
579
+
580
+ ```md
581
+ ---
582
+ name: skill-name
583
+ description: A description of what this skill does and when to use it.
584
+ ---
585
+ ```
586
+
587
+ You can add the following optional fields to the frontmatter as needed:
588
+
589
+ ```md
590
+ ---
591
+ name: pdf-processing
592
+ description: Extract text and tables from PDF files, fill forms, merge documents.
593
+ license: Apache-2.0
594
+ compatibility: Requires pdfplumber and PyPDF2 packages
595
+ metadata:
596
+ author: example-org
597
+ version: "1.0"
598
+ allowed-tools: Read Bash(python:*)
599
+ ---
600
+ ```
601
+
602
+ | Field | Required | Constraints |
603
+ | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
604
+ | `name` | Yes | Max 64 characters. Lowercase letters, numbers, and hyphens-separated only. Should not start or end with a hyphen. |
605
+ | `description` | Yes | Max 1024 characters. Describes what the skill does and when to use it. |
606
+ | `license` | No | License name or reference to a bundled license file. |
607
+ | `compatibility` | No | Max 500 characters. Describes environment requirements (packages, system tools, network access, etc.). |
608
+ | `metadata` | No | Arbitrary key-value mapping for additional metadata (author, version, etc.). |
609
+ | `allowed-tools` | No | Space-delimited list (or YAML array) of pre-approved tools the skill may use. (Experimental) |
610
+
611
+ Command Code additionally honors these extension fields. Several mirror the Agent Skills / Claude Code frontmatter so a skill authored for another agent loads unchanged; tools that don't recognize a field ignore it safely:
612
+
613
+ | Field | Required | Behavior |
614
+ | -------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------- |
615
+ | `argument-hint` | No | Shown next to the skill in the `/` menu so you know what arguments it expects (e.g. `argument-hint: "<branch> [--draft]"`). |
616
+ | `when_to_use` | No | Extra trigger context (trigger phrases, example requests) appended to the description in the model-facing catalog, so auto-invocation matches on it too. |
617
+ | `disable-model-invocation` | No | When `true`, the skill is hidden from the model entirely — it never appears in the skill catalog and can't be auto-loaded. Only an explicit `/skill-name` invocation runs it. Use for destructive or highly contextual workflows. |
618
+ | `user-invocable` | No | When `false`, the skill stays model-invocable but is hidden from the `/` menu. Use for background knowledge that isn't a command you'd run by hand. |
619
+ | `disallowed-tools` | No | Space-delimited list (or YAML array) of tools the skill should not use. Parsed and surfaced alongside `allowed-tools`. |
620
+ | `arguments` | No | Ordered names for positional arguments (`arguments: issue branch`), enabling `$issue` / `$branch` placeholders in the body. |
621
+ | `model` | No | Pin a model for the skill's work. |
622
+ | `effort` | No | Reasoning-effort hint for the skill's work (`low`, `medium`, `high`, `xhigh`, `max`, or `inherit`). |
623
+
624
+ ### Body content
625
+
626
+ The markdown body that follows the frontmatter contains the skill instructions. There are no format restrictions. Write whatever helps Command Code perform the task effectively.
627
+
628
+ Recommended sections:
629
+
630
+ * **When to use this skill**: Clear triggers for activation
631
+ * **Step-by-step instructions**: Detailed guidance
632
+ * **Examples**: Input/output examples
633
+ * **Common edge cases**: Known pitfalls and solutions
634
+
635
+ Keep your main `SKILL.md` under 500 lines. Move detailed reference material to separate files in `references/`.
636
+
637
+ ### Arguments and context substitution
638
+
639
+ When you invoke a skill with `/skill-name <args>`, Command Code substitutes these placeholders in the body before the model sees it:
640
+
641
+ | Placeholder | Expands to |
642
+ | ----------- | ---------- |
643
+ | `$ARGUMENTS` | All arguments as a single string. If the body has no placeholder, non-empty arguments are appended as an `ARGUMENTS: …` footer. |
644
+ | `$ARGUMENTS[N]` / `${N}` | The Nth argument, 0-indexed (`$ARGUMENTS[0]` / `${0}` is the first). |
645
+ | `$name` | A [declared named argument](#skills-specification). With `arguments: issue branch`, `$issue` is the first argument and `$branch` the second. Only declared names are replaced. |
646
+ | `${COMMANDCODE_SKILL_DIR}` | Absolute path to the skill's own directory — use it to reference bundled `scripts/` or `references/` regardless of the working directory. |
647
+ | `${COMMANDCODE_PROJECT_DIR}` | The project root (git root, otherwise the current directory). |
648
+ | `${COMMANDCODE_SESSION_ID}` | The current session id, when available. |
649
+ | `${COMMANDCODE_EFFORT}` | The active reasoning-effort level, when available. |
650
+
651
+ The `${CLAUDE_SKILL_DIR}`, `${CLAUDE_PROJECT_DIR}`, `${CLAUDE_SESSION_ID}`, and `${CLAUDE_EFFORT}` aliases resolve to the same values, so a skill written for Claude Code works unchanged. Only these known tokens are substituted — any other `${...}` (for example a literal `${HOME}`) is left untouched.
652
+
653
+ All placeholders substitute in a single pass and arguments are inserted literally: argument text that itself looks like a placeholder (`$ARGUMENTS`, `$$`, a declared `$name`) lands as-is and is never expanded again.
654
+
655
+ ### Dynamic context injection
656
+
657
+ A skill body can run shell commands and inline their output before the body reaches the model, so the model reads live data instead of a command. Two forms are recognized:
658
+
659
+ * **Inline** — `` !`git status --short` `` runs a single command. The `!` is only honored at the start of a line or directly after whitespace, so `KEY=!`cmd`` stays literal.
660
+ * **Fenced** — a ` ```! ` code block runs a multi-line script:
661
+
662
+ ````md
663
+ ```!
664
+ node --version
665
+ git rev-parse --short HEAD
666
+ ```
667
+ ````
668
+
669
+ Each placeholder is replaced with the command's output, once, left to right — output is never re-scanned for more placeholders. Commands run from the project directory, with the `COMMANDCODE_SKILL_DIR` / `COMMANDCODE_PROJECT_DIR` (and `CLAUDE_*` alias) values exported to their environment.
670
+
671
+ To turn this off — so opening a skill never shells out — set `disableSkillShellExecution: true` in `settings.json`. Every placeholder is then replaced with `[shell command execution disabled by policy]` instead of running.
672
+
673
+ ### Optional directories
674
+
675
+ Your skill folder can also include these optional subdirectories to organize related files:
676
+
677
+ #### `scripts/`
678
+
679
+ Contains executable code that agents can run. Scripts should:
680
+
681
+ * Be self-contained or clearly document dependencies
682
+ * Include helpful error messages
683
+ * Handle edge cases gracefully
684
+
685
+ ```text
686
+ my-skill/
687
+ ├── SKILL.md
688
+ └── scripts/
689
+ ├── extract.py
690
+ └── process.sh
691
+ ```
692
+
693
+ #### `references/`
694
+
695
+ Contains additional documentation that agents can read when needed:
696
+
697
+ ```text
698
+ my-skill/
699
+ ├── SKILL.md
700
+ └── references/
701
+ ├── API_REFERENCE.md
702
+ ├── FORMS.md
703
+ └── TROUBLESHOOTING.md
704
+ ```
705
+
706
+ Keep individual reference files focused. Command Code loads these on demand, so smaller files mean less context usage.
707
+
708
+ #### `assets/`
709
+
710
+ Contains static resources:
711
+
712
+ ```text
713
+ my-skill/
714
+ ├── SKILL.md
715
+ └── assets/
716
+ ├── template.json
717
+ ├── diagram.png
718
+ └── schema.sql
719
+ ```
720
+
721
+ ---
722
+
723
+ ## Command reference
724
+
725
+ Complete reference for all `cmd skills` commands. Install, list, and remove agent skills.
726
+
727
+ | Command | Description |
728
+ | ------- | ----------- |
729
+ | [`cmd skills add`](#cmd-skills-add) | Install a skill from a GitHub repository |
730
+ | [`cmd skills list`](#cmd-skills-list) | List all installed skills |
731
+ | [`cmd skills remove`](#cmd-skills-remove) | Remove an installed skill |
732
+
733
+ ### cmd skills add
734
+
735
+ Install a skill from a GitHub repository into your project or global skills directory.
736
+
737
+ **cmd skills add**
738
+ ```bash
739
+ cmd skills add <owner/repo> [options]
740
+ ```
741
+
742
+ **Options**
743
+
744
+ | Option | Short | Description |
745
+ | ------ | ----- | ----------- |
746
+ | `--global` | `-g` | Install to global skills (`~/.commandcode/skills/`) |
747
+ | `--force` | `-f` | Overwrite if skill already exists |
748
+ | `--skill <name>` | `-s` | Pick a specific skill from a multi-skill repo |
749
+
750
+ **Examples**
751
+
752
+ **Single-skill repo**
753
+ ```bash
754
+ cmd skills add acme/my-skills
755
+ ```
756
+
757
+ **Specific path in repo**
758
+ ```bash
759
+ cmd skills add acme/skills/path/to/skill
760
+ ```
761
+
762
+ **Pick one skill from a multi-skill repo**
763
+ ```bash
764
+ cmd skills add acme/multi-skills -s my-skill
765
+ ```
766
+
767
+ **Specific branch**
768
+ ```bash
769
+ cmd skills add acme/repo@branch
770
+ ```
771
+
772
+ **Install globally**
773
+ ```bash
774
+ cmd skills add acme/repo --global
775
+ ```
776
+
777
+ **Install from community**
778
+ ```bash
779
+ cmd skills add https://github.com/remotion-dev/skills --skill remotion-best-practices
780
+ ```
781
+
782
+ **Install locations**
783
+
784
+ | Flag | Location | Availability |
785
+ | ---- | -------- | ------------ |
786
+ | _(default)_ | `.commandcode/skills/<skill-name>/` | Current project only |
787
+ | `--global` | `~/.commandcode/skills/<skill-name>/` | All projects on your machine |
788
+
789
+ **Multi-skill repos.** When a repo contains multiple skills and `--skill` is not specified, Command Code shows an interactive prompt to select which skills to install.
790
+
791
+ **Name collisions.** Skill names share the `/` menu with built-in commands (`/clear`, `/help`, `/share`, `/rewind`, …) and with the custom commands in `.commandcode/commands/`. Built-ins and custom commands take precedence — typing `/<name>` resolves to the owner, not to the skill.
792
+
793
+ If you install a skill whose name collides with one of those, `cmd skills add` still completes normally — nothing blocks the install. The skill then appears in the `/` menu with a `[skill]` badge and a `shadowed by /<owner>` note so you can see it exists, while `/<name>` continues to route to the higher-precedence owner. See [Selection priority](#selection-priority) for the full order.
794
+
795
+ ### cmd skills list
796
+
797
+ List all installed skills, grouped by location.
798
+
799
+ **cmd skills list**
800
+ ```bash
801
+ cmd skills list
802
+ ```
803
+
804
+ **Options**
805
+
806
+ | Option | Description |
807
+ | ------ | ----------- |
808
+ | `--debug` | Show every skill that failed to load, grouped by error category |
809
+
810
+ **Output**
811
+
812
+ Shows all installed skills split into **Project** and **Global** sections:
813
+
814
+ **Example output**
815
+ ```sh
816
+ Skills (3 installed)
817
+
818
+ Project (1)
819
+ remotion-best-practices · Best practices for building Remotion video...
820
+
821
+ Global (2)
822
+ frontend-design · Guidelines for building accessible, responsive UIs
823
+ code-review · Comprehensive code review checklist for security and q...
824
+ ```
825
+
826
+ If any skills failed to load, a quiet hint appears under the listing:
827
+
828
+ **With skipped skills**
829
+ ```sh
830
+ 5 skills skipped · run with --debug to see issues
831
+ ```
832
+
833
+ Re-run with `--debug` to see the grouped report. Each row is categorized and tagged with the path and the one-line reason:
834
+
835
+ **cmd skills list --debug**
836
+ ```bash
837
+ cmd skills list --debug
838
+ ```
839
+
840
+ If no skills are installed, the command shows where it looked and how to install one:
841
+
842
+ **Empty output**
843
+ ```sh
844
+ No skills installed.
845
+
846
+ Looking in:
847
+ ~/.commandcode/skills/ (global)
848
+ .commandcode/skills/ (project)
849
+ ~/.agents/skills/ (global, .agents)
850
+ .agents/skills/ (project, .agents)
851
+
852
+ Install a skill: cmd skills add <owner/repo>
853
+ ```
854
+
855
+ ### cmd skills remove
856
+
857
+ Remove an installed skill by name. Prompts for confirmation before deleting.
858
+
859
+ **cmd skills remove**
860
+ ```bash
861
+ cmd skills remove <skill-name> [options]
862
+ ```
863
+
864
+ **Options**
865
+
866
+ | Option | Short | Description |
867
+ | ------ | ----- | ----------- |
868
+ | `--global` | `-g` | Remove from global skills (`~/.commandcode/skills/`) |
869
+ | `--yes` | `-y` | Skip the confirmation prompt |
870
+
871
+ **Examples**
872
+
873
+ **Remove from project**
874
+ ```bash
875
+ cmd skills remove remotion-best-practices
876
+ ```
877
+
878
+ **Remove from global**
879
+ ```bash
880
+ cmd skills remove frontend-design --global
881
+ ```
882
+
883
+ **Skip confirmation**
884
+ ```bash
885
+ cmd skills remove my-skill --yes
886
+ ```
887
+
888
+ **Skill name rules.** Skill names must use lowercase letters, numbers, and hyphens only — no path separators, dots, or uppercase.
889
+
890
+ ---
891
+
892
+ ## Best practices
893
+
894
+ Follow these best practices to create effective and maintainable skills.
895
+
896
+ ### Writing effective descriptions
897
+
898
+ Good descriptions help Command Code know when to use a skill:
899
+
900
+ **Specific and keyword-rich:**
901
+
902
+ ```md
903
+ description: Extract text and tables from PDF files using pdfplumber. Use when user mentions PDFs, pdf files, document extraction, or needs to read PDF content.
904
+ ```
905
+
906
+ **Too vague:**
907
+
908
+ ```md
909
+ description: PDF tools
910
+ ```
911
+
912
+ ### Keep skills focused
913
+
914
+ Each skill should do one thing well:
915
+
916
+ **Focused:**
917
+
918
+ - `code-review` - Code review checklist
919
+ - `commit-messages` - Commit message format
920
+ - `testing-patterns` - Testing conventions
921
+
922
+ **Too broad:**
923
+
924
+ - `development` - All development tasks
925
+
926
+ ### Pick a name that does not collide
927
+
928
+ Skill names share the `/` menu with built-in commands like `/clear`, `/help`, `/share`, and `/rewind`, and with any custom commands you define in `.commandcode/commands/`. Those take precedence — typing `/<name>` routes to the owner and the skill renders with a `shadowed by` note next to its `[skill]` badge.
929
+
930
+ Prefer task-oriented names that are unlikely to overlap:
931
+
932
+ **Safe:** `pr-desc`, `api-guidelines`, `release-notes`, `code-review`
933
+
934
+ **Risky:** `clear`, `help`, `share`, `rewind` — these are built-in.
935
+
936
+ ### Use progressive disclosure
937
+
938
+ Keep `SKILL.md` concise. Move detailed content to `references/`, for example:
939
+
940
+ ```markdown theme={null}
941
+ # API Guidelines
942
+
943
+ Quick reference of our API patterns.
944
+
945
+ For complete documentation, see:
946
+ - [Authentication details](references/AUTH.md)
947
+ - [Error handling guide](references/ERRORS.md)
948
+ - [Versioning strategy](references/VERSIONING.md)
949
+ ```
950
+
951
+ ### Version control
952
+
953
+ Track your skills in Git:
954
+
955
+ **Git tracking**
956
+ ```bash
957
+ # Add skills to git
958
+ git add .commandcode/skills/
959
+
960
+ # Commit
961
+ git commit -m "Add API guidelines skill"
962
+
963
+ # Share with team
964
+ git push
965
+ ```
966
+
967
+ Don't ignore `.commandcode/skills/` - these should be shared with your team.
968
+
969
+ ---
970
+
971
+ ## Standard compliance
972
+
973
+ Command Code fully implements the [Agent Skills open standard](https://agentskills.io). Skills you create are:
974
+
975
+ * **Portable**: Work with any agent that supports the standard
976
+ * **Versionable**: Track changes with Git
977
+ * **Shareable**: Publish for your team or community
978
+ * **Auditable**: Plain text files anyone can read
979
+
980
+ Validation follows the standard strictly — including the rule that a skill's `name` must match its directory name. Skills that break a rule are skipped with a categorized warning (visible in `/skills` and `cmd skills list --debug`) rather than failing the session, and a missing or empty `description` always prevents loading. Command Code's extension fields (`argument-hint`, `disable-model-invocation`, `model`) live alongside the standard fields and are ignored by other implementations; unknown frontmatter fields from other tools are ignored in turn.
981
+
982
+ ---
983
+
984
+ ## Skills vs Taste
985
+
986
+ Skills are explicit, authored playbooks you write and share; [Taste](https://commandcode.ai/docs/taste) is the implicit, continuously-learned profile of your preferences. See the full guide at [commandcode.ai/blog/taste-skills-rules](https://commandcode.ai/blog/taste-skills-rules).
987
+
988
+ ---
989
+
990
+ ## Next steps
991
+
992
+ - [Set up your taste profile](https://commandcode.ai/docs/taste) to pair learned preferences with authored skills
993
+ - Join our [Discord community](https://commandcode.ai/discord) for support