codingbuddy-rules 4.5.0 → 5.1.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.
- package/.ai-rules/adapters/aider.md +374 -0
- package/.ai-rules/adapters/antigravity.md +6 -6
- package/.ai-rules/adapters/claude-code.md +68 -4
- package/.ai-rules/adapters/codex.md +5 -5
- package/.ai-rules/adapters/cursor.md +2 -2
- package/.ai-rules/adapters/kiro.md +8 -8
- package/.ai-rules/adapters/opencode.md +7 -7
- package/.ai-rules/adapters/q.md +2 -2
- package/.ai-rules/adapters/windsurf.md +395 -0
- package/.ai-rules/agents/README.md +66 -16
- package/.ai-rules/agents/accessibility-specialist.json +8 -1
- package/.ai-rules/agents/act-mode.json +8 -1
- package/.ai-rules/agents/agent-architect.json +14 -7
- package/.ai-rules/agents/ai-ml-engineer.json +7 -0
- package/.ai-rules/agents/architecture-specialist.json +7 -0
- package/.ai-rules/agents/auto-mode.json +10 -2
- package/.ai-rules/agents/backend-developer.json +7 -0
- package/.ai-rules/agents/code-quality-specialist.json +7 -0
- package/.ai-rules/agents/code-reviewer.json +86 -64
- package/.ai-rules/agents/data-engineer.json +14 -7
- package/.ai-rules/agents/data-scientist.json +16 -9
- package/.ai-rules/agents/devops-engineer.json +7 -0
- package/.ai-rules/agents/documentation-specialist.json +7 -0
- package/.ai-rules/agents/eval-mode.json +30 -19
- package/.ai-rules/agents/event-architecture-specialist.json +7 -0
- package/.ai-rules/agents/frontend-developer.json +7 -0
- package/.ai-rules/agents/i18n-specialist.json +8 -1
- package/.ai-rules/agents/integration-specialist.json +7 -0
- package/.ai-rules/agents/migration-specialist.json +7 -0
- package/.ai-rules/agents/mobile-developer.json +8 -10
- package/.ai-rules/agents/observability-specialist.json +7 -0
- package/.ai-rules/agents/parallel-orchestrator.json +352 -0
- package/.ai-rules/agents/performance-specialist.json +7 -0
- package/.ai-rules/agents/plan-mode.json +9 -1
- package/.ai-rules/agents/plan-reviewer.json +211 -0
- package/.ai-rules/agents/platform-engineer.json +7 -0
- package/.ai-rules/agents/security-engineer.json +15 -8
- package/.ai-rules/agents/security-specialist.json +8 -1
- package/.ai-rules/agents/seo-specialist.json +7 -0
- package/.ai-rules/agents/software-engineer.json +7 -0
- package/.ai-rules/agents/solution-architect.json +17 -10
- package/.ai-rules/agents/systems-developer.json +15 -8
- package/.ai-rules/agents/technical-planner.json +17 -10
- package/.ai-rules/agents/test-engineer.json +13 -6
- package/.ai-rules/agents/test-strategy-specialist.json +7 -0
- package/.ai-rules/agents/tooling-engineer.json +10 -3
- package/.ai-rules/agents/ui-ux-designer.json +7 -0
- package/.ai-rules/keyword-modes.json +4 -4
- package/.ai-rules/rules/clarification-guide.md +14 -14
- package/.ai-rules/rules/core.md +73 -0
- package/.ai-rules/rules/parallel-execution.md +217 -0
- package/.ai-rules/schemas/agent.schema.json +38 -0
- package/.ai-rules/skills/README.md +29 -1
- package/.ai-rules/skills/agent-design/SKILL.md +5 -0
- package/.ai-rules/skills/agent-design/examples/agent-template.json +55 -0
- package/.ai-rules/skills/agent-design/references/expertise-guidelines.md +112 -0
- package/.ai-rules/skills/agent-discussion/SKILL.md +199 -0
- package/.ai-rules/skills/agent-discussion-panel/SKILL.md +448 -0
- package/.ai-rules/skills/api-design/SKILL.md +5 -0
- package/.ai-rules/skills/api-design/examples/error-response.json +159 -0
- package/.ai-rules/skills/api-design/examples/openapi-template.yaml +393 -0
- package/.ai-rules/skills/build-fix/SKILL.md +234 -0
- package/.ai-rules/skills/code-explanation/SKILL.md +4 -0
- package/.ai-rules/skills/context-management/SKILL.md +1 -0
- package/.ai-rules/skills/cost-budget/SKILL.md +348 -0
- package/.ai-rules/skills/cross-repo-issues/SKILL.md +257 -0
- package/.ai-rules/skills/database-migration/SKILL.md +1 -0
- package/.ai-rules/skills/deepsearch/SKILL.md +214 -0
- package/.ai-rules/skills/deployment-checklist/SKILL.md +1 -0
- package/.ai-rules/skills/error-analysis/SKILL.md +1 -0
- package/.ai-rules/skills/finishing-a-development-branch/SKILL.md +281 -0
- package/.ai-rules/skills/frontend-design/SKILL.md +5 -0
- package/.ai-rules/skills/frontend-design/examples/component-template.tsx +203 -0
- package/.ai-rules/skills/frontend-design/references/css-patterns.md +243 -0
- package/.ai-rules/skills/git-master/SKILL.md +358 -0
- package/.ai-rules/skills/incident-response/SKILL.md +1 -0
- package/.ai-rules/skills/legacy-modernization/SKILL.md +1 -0
- package/.ai-rules/skills/mcp-builder/SKILL.md +7 -0
- package/.ai-rules/skills/mcp-builder/examples/resource-example.ts +233 -0
- package/.ai-rules/skills/mcp-builder/examples/tool-example.ts +198 -0
- package/.ai-rules/skills/mcp-builder/references/protocol-spec.md +215 -0
- package/.ai-rules/skills/onboard/SKILL.md +150 -0
- package/.ai-rules/skills/performance-optimization/SKILL.md +3 -0
- package/.ai-rules/skills/plan-and-review/SKILL.md +115 -0
- package/.ai-rules/skills/plan-to-issues/SKILL.md +318 -0
- package/.ai-rules/skills/pr-all-in-one/SKILL.md +15 -13
- package/.ai-rules/skills/pr-all-in-one/configuration-guide.md +7 -7
- package/.ai-rules/skills/pr-all-in-one/pr-templates.md +10 -10
- package/.ai-rules/skills/pr-review/SKILL.md +4 -0
- package/.ai-rules/skills/receiving-code-review/SKILL.md +347 -0
- package/.ai-rules/skills/refactoring/SKILL.md +1 -0
- package/.ai-rules/skills/requesting-code-review/SKILL.md +348 -0
- package/.ai-rules/skills/retrospective/SKILL.md +192 -0
- package/.ai-rules/skills/rule-authoring/SKILL.md +5 -0
- package/.ai-rules/skills/rule-authoring/examples/rule-template.md +142 -0
- package/.ai-rules/skills/rule-authoring/examples/trigger-patterns.md +126 -0
- package/.ai-rules/skills/security-audit/SKILL.md +4 -0
- package/.ai-rules/skills/ship/SKILL.md +242 -0
- package/.ai-rules/skills/skill-creator/SKILL.md +461 -0
- package/.ai-rules/skills/skill-creator/agents/analyzer.md +206 -0
- package/.ai-rules/skills/skill-creator/agents/comparator.md +167 -0
- package/.ai-rules/skills/skill-creator/agents/grader.md +152 -0
- package/.ai-rules/skills/skill-creator/assets/eval_review.html +568 -0
- package/.ai-rules/skills/skill-creator/assets/skill-template.md +43 -0
- package/.ai-rules/skills/skill-creator/eval-viewer/generate_review.py +496 -0
- package/.ai-rules/skills/skill-creator/references/frontmatter-guide.md +632 -0
- package/.ai-rules/skills/skill-creator/references/multi-tool-compat.md +480 -0
- package/.ai-rules/skills/skill-creator/references/schemas.md +784 -0
- package/.ai-rules/skills/skill-creator/scripts/aggregate_benchmark.py +302 -0
- package/.ai-rules/skills/skill-creator/scripts/init_skill.sh +196 -0
- package/.ai-rules/skills/skill-creator/scripts/run_loop.py +327 -0
- package/.ai-rules/skills/systematic-debugging/SKILL.md +1 -0
- package/.ai-rules/skills/tech-debt/SKILL.md +1 -0
- package/.ai-rules/skills/test-coverage-gate/SKILL.md +303 -0
- package/.ai-rules/skills/tmux-master/SKILL.md +491 -0
- package/.ai-rules/skills/using-git-worktrees/SKILL.md +368 -0
- package/.ai-rules/skills/verification-before-completion/SKILL.md +234 -0
- package/.ai-rules/skills/widget-slot-architecture/SKILL.md +6 -0
- package/.ai-rules/skills/widget-slot-architecture/examples/parallel-route-setup.tsx +206 -0
- package/.ai-rules/skills/widget-slot-architecture/examples/widget-component.tsx +250 -0
- package/.ai-rules/skills/writing-plans/SKILL.md +78 -0
- package/bin/cli.js +170 -0
- package/lib/init/detect-stack.js +162 -0
- package/lib/init/generate-config.js +31 -0
- package/lib/init/index.js +86 -0
- package/lib/init/prompt.js +60 -0
- package/lib/init/scaffold.js +67 -0
- package/lib/init/suggest-agent.js +57 -0
- package/package.json +10 -2
|
@@ -0,0 +1,632 @@
|
|
|
1
|
+
# Skill Frontmatter v2.0 Field Guide
|
|
2
|
+
|
|
3
|
+
Reference for YAML frontmatter fields in skill SKILL.md files.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Overview](#overview)
|
|
8
|
+
- [Field Reference Table](#field-reference-table)
|
|
9
|
+
- [Field Details](#field-details)
|
|
10
|
+
- [name](#name)
|
|
11
|
+
- [description](#description)
|
|
12
|
+
- [argument-hint](#argument-hint)
|
|
13
|
+
- [allowed-tools](#allowed-tools)
|
|
14
|
+
- [model](#model)
|
|
15
|
+
- [effort](#effort)
|
|
16
|
+
- [context](#context)
|
|
17
|
+
- [agent](#agent)
|
|
18
|
+
- [disable-model-invocation](#disable-model-invocation)
|
|
19
|
+
- [user-invocable](#user-invocable)
|
|
20
|
+
- [hooks](#hooks)
|
|
21
|
+
- [Decision Tree](#decision-tree)
|
|
22
|
+
- [Description Writing Guide](#description-writing-guide)
|
|
23
|
+
- [Complete Examples](#complete-examples)
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Overview
|
|
28
|
+
|
|
29
|
+
Every skill includes YAML frontmatter in its `SKILL.md` file. The frontmatter defines the skill's metadata and is used by the codingbuddy MCP server and each AI tool to search, load, and execute skills.
|
|
30
|
+
|
|
31
|
+
**Frontmatter structure:**
|
|
32
|
+
```yaml
|
|
33
|
+
---
|
|
34
|
+
name: skill-name
|
|
35
|
+
description: Use when [trigger condition]. [What it does].
|
|
36
|
+
# ... additional fields (optional)
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
# Skill Content (Markdown)
|
|
40
|
+
...
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**v2.0 changes:**
|
|
44
|
+
- Added `model` field: Specifies recommended AI model
|
|
45
|
+
- Added `effort` field: Controls reasoning effort level (`low/medium/high/max`)
|
|
46
|
+
- Added `hooks` field: Event-driven automatic execution (object type)
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Field Reference Table
|
|
51
|
+
|
|
52
|
+
| Field | Type | Required | Default | Description |
|
|
53
|
+
|-------|------|----------|---------|-------------|
|
|
54
|
+
| `name` | `string` | **Yes** | Directory name | Slash command name (lowercase, digits, hyphens, max 64 chars) |
|
|
55
|
+
| `description` | `string` | **Yes** | First paragraph | Purpose + auto-trigger condition (200 chars recommended, max 1024 chars) |
|
|
56
|
+
| `argument-hint` | `string` | No | — | Autocomplete argument hint |
|
|
57
|
+
| `allowed-tools` | `string` | No | all | List of available tools |
|
|
58
|
+
| `model` | `string` | No | Session default | Model override |
|
|
59
|
+
| `effort` | `string` | No | Session default | `low` / `medium` / `high` / `max` |
|
|
60
|
+
| `context` | `string` | No | inline | `fork`: Isolated sub-agent |
|
|
61
|
+
| `agent` | `string` | No | general-purpose | Sub-agent type |
|
|
62
|
+
| `disable-model-invocation` | `boolean` | No | `false` | Block AI auto-invocation |
|
|
63
|
+
| `user-invocable` | `boolean` | No | `true` | Whether to show in `/` menu |
|
|
64
|
+
| `hooks` | `object` | No | — | Skill lifecycle hooks |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Field Details
|
|
69
|
+
|
|
70
|
+
### name
|
|
71
|
+
|
|
72
|
+
The skill's unique identifier. Must match the directory name and is used as a slash command (`/name`).
|
|
73
|
+
|
|
74
|
+
| Property | Value |
|
|
75
|
+
|----------|-------|
|
|
76
|
+
| Type | `string` |
|
|
77
|
+
| Required | **Yes** |
|
|
78
|
+
| Default | Directory name |
|
|
79
|
+
| Pattern | `^[a-z][a-z0-9-]*$` |
|
|
80
|
+
| Max Length | 64 chars |
|
|
81
|
+
|
|
82
|
+
**Rules:**
|
|
83
|
+
- Use only lowercase letters, digits, and hyphens
|
|
84
|
+
- Must be identical to the skill directory name
|
|
85
|
+
- 2-4 words recommended
|
|
86
|
+
|
|
87
|
+
**Examples:**
|
|
88
|
+
```yaml
|
|
89
|
+
name: test-driven-development
|
|
90
|
+
name: security-audit
|
|
91
|
+
name: pr-all-in-one
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
### description
|
|
97
|
+
|
|
98
|
+
Describes the skill's purpose and auto-trigger conditions. This is the key matching field for `recommend_skills` search.
|
|
99
|
+
|
|
100
|
+
| Property | Value |
|
|
101
|
+
|----------|-------|
|
|
102
|
+
| Type | `string` |
|
|
103
|
+
| Required | **Yes** |
|
|
104
|
+
| Default | First paragraph of SKILL.md |
|
|
105
|
+
| Recommended Length | 200 chars |
|
|
106
|
+
| Max Length | 1024 chars |
|
|
107
|
+
|
|
108
|
+
**Rules:**
|
|
109
|
+
- Include specific trigger phrases ("Use when...", "Use this skill when the user asks to...")
|
|
110
|
+
- Use third-person narration ("Explains code..." not "Explain code...")
|
|
111
|
+
- 200 chars recommended, max 1024 chars
|
|
112
|
+
|
|
113
|
+
**Examples:**
|
|
114
|
+
```yaml
|
|
115
|
+
# Good - Clear trigger condition, third-person narration
|
|
116
|
+
description: Use when implementing any feature or bugfix, before writing implementation code
|
|
117
|
+
|
|
118
|
+
# Good - Multiple situations + result description
|
|
119
|
+
description: Use before deploying to staging or production. Covers pre-deploy validation, environment verification, rollback planning, health checks, and post-deploy monitoring.
|
|
120
|
+
|
|
121
|
+
# Good - Third-person action description
|
|
122
|
+
description: Explains code structure, logic flow, and design decisions with context-appropriate detail.
|
|
123
|
+
|
|
124
|
+
# Bad - Too vague
|
|
125
|
+
description: A skill for testing
|
|
126
|
+
|
|
127
|
+
# Bad - First-person/imperative (also avoid second-person)
|
|
128
|
+
description: Explain the code to me
|
|
129
|
+
|
|
130
|
+
# Bad - Exceeds 1024 chars
|
|
131
|
+
description: This comprehensive skill provides detailed guidance for implementing test-driven development...
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### argument-hint
|
|
137
|
+
|
|
138
|
+
Guides positional arguments that users can pass when invoking the skill. Displayed in the autocomplete UI.
|
|
139
|
+
|
|
140
|
+
| Property | Value |
|
|
141
|
+
|----------|-------|
|
|
142
|
+
| Type | `string` |
|
|
143
|
+
| Required | No |
|
|
144
|
+
| Format | `[arg1] [arg2]` (argument names wrapped in brackets) |
|
|
145
|
+
|
|
146
|
+
**Rules:**
|
|
147
|
+
- Wrap each argument in brackets `[]`
|
|
148
|
+
- Separate multiple arguments with spaces
|
|
149
|
+
- Use kebab-case for argument names
|
|
150
|
+
- All arguments are optional
|
|
151
|
+
|
|
152
|
+
**Examples:**
|
|
153
|
+
```yaml
|
|
154
|
+
argument-hint: [file-or-symbol]
|
|
155
|
+
argument-hint: [pr-url-or-number]
|
|
156
|
+
argument-hint: [target-branch] [issue-id]
|
|
157
|
+
argument-hint: [scope-or-path]
|
|
158
|
+
argument-hint: [capability-name]
|
|
159
|
+
argument-hint: [target-module-or-path]
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Usage pattern:**
|
|
163
|
+
```bash
|
|
164
|
+
# User invocation
|
|
165
|
+
/code-explanation src/auth/login.ts
|
|
166
|
+
/pr-review 123
|
|
167
|
+
/pr-all-in-one main 741
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
### allowed-tools
|
|
173
|
+
|
|
174
|
+
Restricts which tools can be used during skill execution. If not specified, all tools are available.
|
|
175
|
+
|
|
176
|
+
| Property | Value |
|
|
177
|
+
|----------|-------|
|
|
178
|
+
| Type | `string` |
|
|
179
|
+
| Required | No |
|
|
180
|
+
| Default | All tools allowed |
|
|
181
|
+
| Format | Comma+space separated tool list |
|
|
182
|
+
|
|
183
|
+
**Available tools:**
|
|
184
|
+
- `Read` — Read files
|
|
185
|
+
- `Write` — Write files
|
|
186
|
+
- `Edit` — Edit files
|
|
187
|
+
- `Grep` — Content search
|
|
188
|
+
- `Glob` — File pattern search
|
|
189
|
+
- `Bash` — Execute shell commands
|
|
190
|
+
- `Agent` — Execute sub-agents
|
|
191
|
+
|
|
192
|
+
**Bash filtering (Claude Code only):**
|
|
193
|
+
```yaml
|
|
194
|
+
# Allow all Bash
|
|
195
|
+
allowed-tools: Read, Grep, Glob, Bash
|
|
196
|
+
|
|
197
|
+
# Allow only git commands
|
|
198
|
+
allowed-tools: Read, Grep, Glob, Bash(git:*)
|
|
199
|
+
|
|
200
|
+
# Allow only git and gh commands
|
|
201
|
+
allowed-tools: Read, Grep, Glob, Bash(gh:*, git:*)
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
> **Note:** Bash filters (`Bash(git:*)`) are only supported in Claude Code. Other tools recognize only basic tool names.
|
|
205
|
+
|
|
206
|
+
**Example patterns:**
|
|
207
|
+
|
|
208
|
+
| Skill type | Recommended allowed-tools |
|
|
209
|
+
|------------|--------------------------|
|
|
210
|
+
| Read-only analysis | `Read, Grep, Glob` |
|
|
211
|
+
| Code analysis + git | `Read, Grep, Glob, Bash(git:*)` |
|
|
212
|
+
| PR review | `Read, Grep, Glob, Bash(gh:*, git:*)` |
|
|
213
|
+
| Performance analysis | `Read, Grep, Glob, Bash` |
|
|
214
|
+
| Refactoring | `Read, Write, Edit, Grep, Glob, Bash` |
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
### model
|
|
219
|
+
|
|
220
|
+
Specifies the recommended AI model for skill execution. Added in v2.0.
|
|
221
|
+
|
|
222
|
+
| Property | Value |
|
|
223
|
+
|----------|-------|
|
|
224
|
+
| Type | `string` |
|
|
225
|
+
| Required | No |
|
|
226
|
+
| Default | Session default model |
|
|
227
|
+
|
|
228
|
+
**Available values:**
|
|
229
|
+
- `opus` — Skills requiring complex reasoning
|
|
230
|
+
- `sonnet` — General coding skills
|
|
231
|
+
- `haiku` — Simple classification/transformation skills
|
|
232
|
+
|
|
233
|
+
**When to use:**
|
|
234
|
+
- Skills requiring high reasoning ability: `opus`
|
|
235
|
+
- Skills where fast response is important: `haiku`
|
|
236
|
+
- Most skills: Leave unspecified (uses session default)
|
|
237
|
+
|
|
238
|
+
**Examples:**
|
|
239
|
+
```yaml
|
|
240
|
+
model: opus # Complex architecture analysis
|
|
241
|
+
model: sonnet # General code writing
|
|
242
|
+
model: haiku # Simple code explanation
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
> **Compatibility:** Auto-switching only in Claude Code. Used as a hint only in other tools.
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
### effort
|
|
250
|
+
|
|
251
|
+
Controls the AI model's reasoning effort level. Added in v2.0.
|
|
252
|
+
|
|
253
|
+
| Property | Value |
|
|
254
|
+
|----------|-------|
|
|
255
|
+
| Type | `string` |
|
|
256
|
+
| Required | No |
|
|
257
|
+
| Default | Session default |
|
|
258
|
+
| Values | `low`, `medium`, `high`, `max` |
|
|
259
|
+
|
|
260
|
+
**Meaning of each level:**
|
|
261
|
+
- `low` — Quick classification, simple transformations. Minimal reasoning
|
|
262
|
+
- `medium` — General coding tasks (default)
|
|
263
|
+
- `high` — Deep analysis, complex problem solving
|
|
264
|
+
- `max` — Maximum reasoning. Security audits, architecture design, and other most demanding tasks
|
|
265
|
+
|
|
266
|
+
**Examples:**
|
|
267
|
+
```yaml
|
|
268
|
+
effort: max # Security audit - maximum reasoning
|
|
269
|
+
effort: high # Architecture analysis - deep analysis
|
|
270
|
+
effort: low # Code formatting - fast processing
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
> **Compatibility:** Auto-applied only in Claude Code. Ignored in other tools.
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
### context
|
|
278
|
+
|
|
279
|
+
Specifies the skill's execution context. Used for skills that need to run in an isolated environment.
|
|
280
|
+
|
|
281
|
+
| Property | Value |
|
|
282
|
+
|----------|-------|
|
|
283
|
+
| Type | `string` |
|
|
284
|
+
| Required | No |
|
|
285
|
+
| Default | `inline` (runs in main context) |
|
|
286
|
+
| Values | `fork` |
|
|
287
|
+
|
|
288
|
+
**What `fork` means:**
|
|
289
|
+
- Runs in an independent sub-agent
|
|
290
|
+
- Does not affect the main conversation context
|
|
291
|
+
- Suitable for read-only analysis tasks
|
|
292
|
+
|
|
293
|
+
**When to use:**
|
|
294
|
+
- Code analysis/review skills (to prevent main context pollution)
|
|
295
|
+
- Skills requiring large-scale file reading
|
|
296
|
+
- Skills that need independent result reporting
|
|
297
|
+
|
|
298
|
+
**Examples:**
|
|
299
|
+
```yaml
|
|
300
|
+
context: fork # Run PR review in isolated environment
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
> **Compatibility:** Only supported in Claude Code. Ignored in other tools (runs inline).
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
### agent
|
|
308
|
+
|
|
309
|
+
Specifies the recommended agent type for skill execution. Used together with `context: fork`.
|
|
310
|
+
|
|
311
|
+
| Property | Value |
|
|
312
|
+
|----------|-------|
|
|
313
|
+
| Type | `string` |
|
|
314
|
+
| Required | No |
|
|
315
|
+
| Default | `general-purpose` |
|
|
316
|
+
| Values | `Explore`, `general-purpose` |
|
|
317
|
+
|
|
318
|
+
**Agent types:**
|
|
319
|
+
- `Explore` — Specialized for fast code exploration/search (read-only)
|
|
320
|
+
- `general-purpose` — Full tool access (read+write+Bash)
|
|
321
|
+
|
|
322
|
+
**When to use:**
|
|
323
|
+
- Read-only tasks like code explanation, PR review: `Explore`
|
|
324
|
+
- Tasks requiring Bash like performance analysis, security audit: `general-purpose`
|
|
325
|
+
|
|
326
|
+
**Examples:**
|
|
327
|
+
```yaml
|
|
328
|
+
# Code explanation skill - Fast search with Explore
|
|
329
|
+
context: fork
|
|
330
|
+
agent: Explore
|
|
331
|
+
allowed-tools: Read, Grep, Glob
|
|
332
|
+
|
|
333
|
+
# Security audit - git access with general-purpose
|
|
334
|
+
context: fork
|
|
335
|
+
agent: general-purpose
|
|
336
|
+
allowed-tools: Read, Grep, Glob, Bash(git:*)
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
> **Compatibility:** Only supported in Claude Code. Ignored in other tools.
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
### disable-model-invocation
|
|
344
|
+
|
|
345
|
+
When set to `true`, the AI model will not automatically invoke the skill. The skill will only run when the user explicitly calls it with `/skill-name`.
|
|
346
|
+
|
|
347
|
+
| Property | Value |
|
|
348
|
+
|----------|-------|
|
|
349
|
+
| Type | `boolean` |
|
|
350
|
+
| Required | No |
|
|
351
|
+
| Default | `false` |
|
|
352
|
+
|
|
353
|
+
**When to use:**
|
|
354
|
+
- Skills with side effects: commits, deployments, pushes, DB migrations
|
|
355
|
+
- Skills involving dangerous operations: data deletion, production changes
|
|
356
|
+
- Skills requiring explicit user intent
|
|
357
|
+
|
|
358
|
+
**Examples:**
|
|
359
|
+
```yaml
|
|
360
|
+
# Deployment checklist - must be explicitly invoked by user
|
|
361
|
+
disable-model-invocation: true
|
|
362
|
+
|
|
363
|
+
# DB migration - involves dangerous operations
|
|
364
|
+
disable-model-invocation: true
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
**Currently used by:**
|
|
368
|
+
- `deployment-checklist`
|
|
369
|
+
- `database-migration`
|
|
370
|
+
- `incident-response`
|
|
371
|
+
- `pr-all-in-one`
|
|
372
|
+
|
|
373
|
+
> **Compatibility:** Supported by all tools.
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
### user-invocable
|
|
378
|
+
|
|
379
|
+
When set to `false`, the skill is not visible in the `/` menu and cannot be directly invoked by users. Used only internally by the system.
|
|
380
|
+
|
|
381
|
+
| Property | Value |
|
|
382
|
+
|----------|-------|
|
|
383
|
+
| Type | `boolean` |
|
|
384
|
+
| Required | No |
|
|
385
|
+
| Default | `true` |
|
|
386
|
+
|
|
387
|
+
**When to use:**
|
|
388
|
+
- Background knowledge skills: Information referenced by other skills or agents
|
|
389
|
+
- Internal-only skills: Context auto-loaded by `parse_mode`
|
|
390
|
+
|
|
391
|
+
**Examples:**
|
|
392
|
+
```yaml
|
|
393
|
+
# Internal only - not shown to users
|
|
394
|
+
user-invocable: false
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
**Currently used by:**
|
|
398
|
+
- `context-management`
|
|
399
|
+
- `widget-slot-architecture`
|
|
400
|
+
|
|
401
|
+
> **Compatibility:** Supported by all tools.
|
|
402
|
+
|
|
403
|
+
---
|
|
404
|
+
|
|
405
|
+
### hooks
|
|
406
|
+
|
|
407
|
+
Sets up triggers to automatically execute skills based on events. Added in v2.0.
|
|
408
|
+
|
|
409
|
+
| Property | Value |
|
|
410
|
+
|----------|-------|
|
|
411
|
+
| Type | `object` |
|
|
412
|
+
| Required | No |
|
|
413
|
+
|
|
414
|
+
**Hook events:**
|
|
415
|
+
|
|
416
|
+
```yaml
|
|
417
|
+
hooks:
|
|
418
|
+
PreToolUse:
|
|
419
|
+
- matcher: "Bash"
|
|
420
|
+
action: "invoke"
|
|
421
|
+
PostToolUse:
|
|
422
|
+
- matcher: "Write"
|
|
423
|
+
action: "invoke"
|
|
424
|
+
session-start:
|
|
425
|
+
action: "load"
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
**Supported events:**
|
|
429
|
+
- `PreToolUse` — Execute before tool invocation
|
|
430
|
+
- `PostToolUse` — Execute after tool invocation
|
|
431
|
+
- `session-start` — Auto-load at session start
|
|
432
|
+
|
|
433
|
+
**Examples:**
|
|
434
|
+
```yaml
|
|
435
|
+
# Automatic review before commit
|
|
436
|
+
hooks:
|
|
437
|
+
PreToolUse:
|
|
438
|
+
- matcher: "Bash"
|
|
439
|
+
pattern: "git commit"
|
|
440
|
+
action: "invoke"
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
> **Compatibility:** Fully supported in Claude Code. Event-based hooks supported in Kiro. Ignored in other tools.
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
## Decision Tree
|
|
448
|
+
|
|
449
|
+
Decision tree for determining skill frontmatter fields:
|
|
450
|
+
|
|
451
|
+
```
|
|
452
|
+
Does the skill have side effects? (commits, pushes, deployments, etc.)
|
|
453
|
+
├── YES → disable-model-invocation: true
|
|
454
|
+
└── NO → Is it a background knowledge skill? (architecture reference, etc.)
|
|
455
|
+
├── YES → user-invocable: false
|
|
456
|
+
└── NO → Keep defaults
|
|
457
|
+
|
|
458
|
+
Is it a read-only analysis skill?
|
|
459
|
+
├── YES → context: fork, agent: Explore
|
|
460
|
+
└── NO → Is it an analysis skill that needs Bash execution?
|
|
461
|
+
├── YES → context: fork, agent: general-purpose
|
|
462
|
+
└── NO → Default context (inline)
|
|
463
|
+
|
|
464
|
+
Should only specific tools be used?
|
|
465
|
+
├── YES → allowed-tools: [required tool list]
|
|
466
|
+
└── NO → Omit allowed-tools (allow all)
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
**Decision summary table:**
|
|
470
|
+
|
|
471
|
+
| Question | Condition | Field to set |
|
|
472
|
+
|----------|-----------|-------------|
|
|
473
|
+
| Has side effects? | Commits/deployments/DB changes | `disable-model-invocation: true` |
|
|
474
|
+
| Internal only? | Not user-invoked | `user-invocable: false` |
|
|
475
|
+
| Has arguments? | CLI argument passing | `argument-hint: [arg-name]` |
|
|
476
|
+
| Tool restriction? | Only specific tools allowed | `allowed-tools: [tool list]` |
|
|
477
|
+
| Needs isolation? | Independent execution, read-only | `context: fork` |
|
|
478
|
+
| Agent type? | When using fork | `agent: Explore` or `general-purpose` |
|
|
479
|
+
| Specific model? | Special model needed | `model: opus` etc. |
|
|
480
|
+
| Effort adjustment? | Adjust analysis depth | `effort: low/medium/high/max` |
|
|
481
|
+
| Auto-execution? | Event trigger | `hooks: { ... }` |
|
|
482
|
+
|
|
483
|
+
---
|
|
484
|
+
|
|
485
|
+
## Description Writing Guide
|
|
486
|
+
|
|
487
|
+
`description` is the key field that directly affects `recommend_skills` matching.
|
|
488
|
+
|
|
489
|
+
### Writing Principles
|
|
490
|
+
|
|
491
|
+
1. **Include trigger phrases** — "Use when...", "Use this skill when..."
|
|
492
|
+
2. **Third-person narration** — "Explains code..." (O), "Explain code..." (X)
|
|
493
|
+
3. **200 chars recommended, max 1024 chars** — Search optimization, maintain brevity
|
|
494
|
+
4. **Describe specific situations** — Not "when coding" but "before implementing a feature"
|
|
495
|
+
|
|
496
|
+
### Trigger Phrase Patterns
|
|
497
|
+
|
|
498
|
+
| Pattern | When to use | Example |
|
|
499
|
+
|---------|------------|---------|
|
|
500
|
+
| `Use when [action]ing` | During an activity | `Use when implementing any feature` |
|
|
501
|
+
| `Use before [action]ing` | Pre-activity preparation | `Use before deploying to production` |
|
|
502
|
+
| `Use after [action]ing` | Post-activity verification | `Use after completing a development branch` |
|
|
503
|
+
| `Use when encountering` | Problem response | `Use when encountering any bug or test failure` |
|
|
504
|
+
| `Use this skill when the user asks to` | User request | `Use this skill when the user asks to review a PR` |
|
|
505
|
+
|
|
506
|
+
### Third-Person Narration Guide
|
|
507
|
+
|
|
508
|
+
| Good (Third-person) | Bad (Imperative/Second-person) |
|
|
509
|
+
|---------------------|-------------------------------|
|
|
510
|
+
| Explains code structure and logic flow | Explain the code |
|
|
511
|
+
| Generates comprehensive test suites | Generate tests |
|
|
512
|
+
| Analyzes security vulnerabilities | Analyze security |
|
|
513
|
+
| Covers validation, rollback, monitoring | Cover all cases |
|
|
514
|
+
|
|
515
|
+
### Good vs Bad Examples
|
|
516
|
+
|
|
517
|
+
**Good:**
|
|
518
|
+
```yaml
|
|
519
|
+
# Trigger + third-person narration
|
|
520
|
+
description: Use when implementing any feature or bugfix, before writing implementation code
|
|
521
|
+
|
|
522
|
+
# Multiple situations + coverage description
|
|
523
|
+
description: Use before deploying to staging or production. Covers pre-deploy validation, environment verification, rollback planning, health checks, and post-deploy monitoring.
|
|
524
|
+
|
|
525
|
+
# Third-person action description
|
|
526
|
+
description: Explains code structure, logic flow, and design decisions with context-appropriate detail.
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
**Bad:**
|
|
530
|
+
```yaml
|
|
531
|
+
# Too vague
|
|
532
|
+
description: A testing skill
|
|
533
|
+
|
|
534
|
+
# Imperative (first-person/second-person)
|
|
535
|
+
description: Explain the code to me
|
|
536
|
+
|
|
537
|
+
# No trigger condition
|
|
538
|
+
description: Helps with code quality
|
|
539
|
+
|
|
540
|
+
# Exceeds 1024 chars
|
|
541
|
+
description: This comprehensive skill provides detailed guidance for implementing test-driven development practices including red-green-refactor cycles with support for multiple testing frameworks and assertion libraries across various programming languages and environments with special attention to edge cases and boundary conditions and performance optimization and integration testing and end-to-end testing and mutation testing and property-based testing and snapshot testing and visual regression testing...
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
### Keyword Matching Optimization
|
|
545
|
+
|
|
546
|
+
`recommend_skills` matches user prompts against descriptions. Including relevant keywords improves matching accuracy:
|
|
547
|
+
|
|
548
|
+
```yaml
|
|
549
|
+
# Matchable against "test", "tdd", "feature", "bugfix" keywords
|
|
550
|
+
description: Use when implementing any feature or bugfix, before writing implementation code
|
|
551
|
+
|
|
552
|
+
# Matchable against "deploy", "staging", "production", "validation"
|
|
553
|
+
description: Use before deploying to staging or production. Covers pre-deploy validation...
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
---
|
|
557
|
+
|
|
558
|
+
## Complete Examples
|
|
559
|
+
|
|
560
|
+
### Read-Only Analysis Skill
|
|
561
|
+
|
|
562
|
+
```yaml
|
|
563
|
+
---
|
|
564
|
+
name: code-explanation
|
|
565
|
+
description: Use when you need to understand unfamiliar code. Explains code structure, logic flow, and design decisions with context-appropriate detail.
|
|
566
|
+
context: fork
|
|
567
|
+
agent: Explore
|
|
568
|
+
allowed-tools: Read, Grep, Glob
|
|
569
|
+
argument-hint: [file-or-symbol]
|
|
570
|
+
---
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
### Skill with Side Effects (Checklist)
|
|
574
|
+
|
|
575
|
+
```yaml
|
|
576
|
+
---
|
|
577
|
+
name: deployment-checklist
|
|
578
|
+
description: Use before deploying to staging or production. Covers pre-deploy validation, environment verification, rollback planning, health checks, and post-deploy monitoring.
|
|
579
|
+
disable-model-invocation: true
|
|
580
|
+
---
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
### Complex Analysis Skill (v2.0)
|
|
584
|
+
|
|
585
|
+
```yaml
|
|
586
|
+
---
|
|
587
|
+
name: security-audit
|
|
588
|
+
description: Use when reviewing code for security vulnerabilities. Covers OWASP Top 10, authentication, authorization, input validation, and dependency risks.
|
|
589
|
+
context: fork
|
|
590
|
+
agent: general-purpose
|
|
591
|
+
allowed-tools: Read, Grep, Glob, Bash(git:*)
|
|
592
|
+
argument-hint: [scope-or-path]
|
|
593
|
+
model: opus
|
|
594
|
+
effort: max
|
|
595
|
+
---
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
### CLI Arguments + Side Effects Skill
|
|
599
|
+
|
|
600
|
+
```yaml
|
|
601
|
+
---
|
|
602
|
+
name: pr-all-in-one
|
|
603
|
+
description: Run local CI checks and ship changes - create branch, commit, push, and PR. Optionally link to a GitHub issue. Use when changes are ready to ship.
|
|
604
|
+
disable-model-invocation: true
|
|
605
|
+
argument-hint: [target-branch] [issue-id]
|
|
606
|
+
---
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
### Internal-Only Background Knowledge Skill
|
|
610
|
+
|
|
611
|
+
```yaml
|
|
612
|
+
---
|
|
613
|
+
name: context-management
|
|
614
|
+
description: Background knowledge for managing conversation context and memory across sessions. Not directly invocable by users.
|
|
615
|
+
user-invocable: false
|
|
616
|
+
---
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
### Event-Driven Auto-Execution Skill (v2.0)
|
|
620
|
+
|
|
621
|
+
```yaml
|
|
622
|
+
---
|
|
623
|
+
name: pre-commit-review
|
|
624
|
+
description: Use to automatically review code before committing. Checks for common issues, security vulnerabilities, and code quality.
|
|
625
|
+
allowed-tools: Read, Grep, Glob
|
|
626
|
+
hooks:
|
|
627
|
+
PreToolUse:
|
|
628
|
+
- matcher: "Bash"
|
|
629
|
+
pattern: "git commit"
|
|
630
|
+
action: "invoke"
|
|
631
|
+
---
|
|
632
|
+
```
|