codingbuddy-rules 4.2.0 → 4.4.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/antigravity.md +648 -160
- package/.ai-rules/adapters/codex.md +500 -10
- package/.ai-rules/adapters/cursor.md +252 -8
- package/.ai-rules/adapters/kiro.md +551 -93
- package/.ai-rules/adapters/opencode-skills.md +179 -188
- package/.ai-rules/adapters/opencode.md +251 -47
- package/.ai-rules/agents/README.md +179 -9
- package/.ai-rules/agents/act-mode.json +14 -7
- package/.ai-rules/agents/data-scientist.json +156 -0
- package/.ai-rules/agents/security-engineer.json +98 -0
- package/.ai-rules/agents/software-engineer.json +74 -0
- package/.ai-rules/agents/systems-developer.json +83 -0
- package/.ai-rules/agents/test-engineer.json +69 -0
- package/.ai-rules/skills/README.md +92 -24
- package/.ai-rules/skills/agent-design/SKILL.md +269 -0
- package/.ai-rules/skills/code-explanation/SKILL.md +259 -0
- package/.ai-rules/skills/context-management/SKILL.md +244 -0
- package/.ai-rules/skills/deployment-checklist/SKILL.md +233 -0
- package/.ai-rules/skills/documentation-generation/SKILL.md +293 -0
- package/.ai-rules/skills/error-analysis/SKILL.md +250 -0
- package/.ai-rules/skills/legacy-modernization/SKILL.md +292 -0
- package/.ai-rules/skills/mcp-builder/SKILL.md +356 -0
- package/.ai-rules/skills/prompt-engineering/SKILL.md +318 -0
- package/.ai-rules/skills/rule-authoring/SKILL.md +273 -0
- package/.ai-rules/skills/security-audit/SKILL.md +241 -0
- package/.ai-rules/skills/tech-debt/SKILL.md +224 -0
- package/package.json +1 -1
|
@@ -1,263 +1,254 @@
|
|
|
1
1
|
# OpenCode Skills Integration Guide
|
|
2
2
|
|
|
3
|
-
This guide explains how
|
|
3
|
+
This guide explains how skills work in OpenCode/Crush and how to access them through codingbuddy.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> **Note:** The original OpenCode project has been archived and continued as **"Crush"** by Charm Bracelet. This guide supports both versions. See [opencode.md](opencode.md) for full context.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Overview
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Skills are structured AI instructions following the [Agent Skills specification](https://agentskills.io/specification). They help AI agents perform better at specialized tasks like brainstorming, TDD, debugging, and planning.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|----------------|----------------|-------------------|
|
|
13
|
-
| `brainstorming` | `/skill brainstorming` | plan agent |
|
|
14
|
-
| `test-driven-development` | `/skill tdd` | build agent |
|
|
15
|
-
| `systematic-debugging` | `/skill debug` | build agent |
|
|
16
|
-
| `writing-plans` | `/skill planning` | plan agent |
|
|
17
|
-
| `executing-plans` | `/skill execute` | build agent |
|
|
18
|
-
| `frontend-design` | `/skill frontend` | build agent |
|
|
19
|
-
| `dispatching-parallel-agents` | `/skill parallel` | plan agent |
|
|
20
|
-
| `subagent-driven-development` | `/skill subagent` | plan agent |
|
|
11
|
+
In OpenCode/Crush, there are **two mechanisms** for accessing skills:
|
|
21
12
|
|
|
22
|
-
|
|
13
|
+
| Priority | Mechanism | How It Works |
|
|
14
|
+
|----------|-----------|-------------|
|
|
15
|
+
| **Primary** | codingbuddy MCP Tools | `recommend_skills` → `get_skill` — cross-platform, programmatic |
|
|
16
|
+
| **Supplementary** | Crush Native Discovery | Disk-based auto-discovery → `<available_skills>` system prompt injection |
|
|
23
17
|
|
|
24
|
-
|
|
25
|
-
```json
|
|
26
|
-
{
|
|
27
|
-
"skills": {
|
|
28
|
-
"paths": [
|
|
29
|
-
"packages/rules/.ai-rules/skills"
|
|
30
|
-
],
|
|
31
|
-
"auto_load": true
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
```
|
|
18
|
+
## Skills Access: Precedence
|
|
35
19
|
|
|
36
|
-
###
|
|
37
|
-
```json
|
|
38
|
-
{
|
|
39
|
-
"options": {
|
|
40
|
-
"skills_paths": [
|
|
41
|
-
"packages/rules/.ai-rules/skills"
|
|
42
|
-
],
|
|
43
|
-
"auto_suggest_skills": true
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
```
|
|
20
|
+
### 1. codingbuddy MCP Tools (Primary)
|
|
47
21
|
|
|
48
|
-
|
|
22
|
+
The codingbuddy MCP server provides skill recommendation and loading tools that work identically across all AI assistants (Claude Code, Cursor, OpenCode/Crush, etc.).
|
|
49
23
|
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
# In OpenCode CLI
|
|
53
|
-
/skill brainstorming "new feature ideas"
|
|
54
|
-
/skill tdd "user authentication implementation"
|
|
55
|
-
/skill debug "fix login bug"
|
|
56
|
-
```
|
|
24
|
+
**Available tools:**
|
|
57
25
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
26
|
+
| Tool | Description |
|
|
27
|
+
|------|-------------|
|
|
28
|
+
| `recommend_skills` | Analyze user prompt and recommend matching skills with confidence scores |
|
|
29
|
+
| `get_skill` | Load full skill content by name |
|
|
30
|
+
| `list_skills` | List all available skills with optional priority filtering |
|
|
63
31
|
|
|
64
|
-
|
|
65
|
-
/agent build
|
|
66
|
-
/skill tdd "implement API integration"
|
|
32
|
+
**Usage pattern:**
|
|
67
33
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
/skill debug "analyze performance issues"
|
|
34
|
+
```
|
|
35
|
+
User prompt → recommend_skills(prompt) → get_skill(recommended skillName) → follow instructions
|
|
71
36
|
```
|
|
72
37
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
38
|
+
**Why primary?**
|
|
39
|
+
- Works across all AI assistants — not limited to Crush
|
|
40
|
+
- Programmatic keyword matching for reliable recommendations
|
|
41
|
+
- Returns structured data (confidence scores, matched patterns)
|
|
42
|
+
- Consistent behavior regardless of platform
|
|
76
43
|
|
|
77
|
-
|
|
78
|
-
// Auto-triggered when user enters certain keywords
|
|
79
|
-
"there's a bug" → recommends: systematic-debugging
|
|
80
|
-
"create a plan" → recommends: writing-plans
|
|
81
|
-
"build the UI" → recommends: frontend-design
|
|
82
|
-
```
|
|
44
|
+
### 2. Crush Native Skill Discovery (Supplementary)
|
|
83
45
|
|
|
84
|
-
|
|
46
|
+
Crush automatically discovers skills from the filesystem and injects them into the AI's system prompt.
|
|
85
47
|
|
|
86
|
-
|
|
48
|
+
**How it works:**
|
|
49
|
+
1. Crush scans configured skill directories for `SKILL.md` files
|
|
50
|
+
2. Extracts `name` and `description` from each skill's frontmatter
|
|
51
|
+
3. Injects an `<available_skills>` block into the system prompt
|
|
52
|
+
4. The AI decides when to activate a skill based on natural language context
|
|
87
53
|
|
|
88
|
-
|
|
54
|
+
**Default skill directory:**
|
|
55
|
+
- Unix: `~/.config/crush/skills/`
|
|
56
|
+
- Windows: `%LOCALAPPDATA%\crush\skills\`
|
|
89
57
|
|
|
90
|
-
|
|
91
|
-
# Skill Name
|
|
58
|
+
**Important:** There is no `/skill` slash command. Skills are activated through natural language — ask the AI to use a specific skill or describe a task that matches a skill's description.
|
|
92
59
|
|
|
93
|
-
|
|
94
|
-
Brief description of the skill's purpose
|
|
60
|
+
**Reference:** [charmbracelet/crush#1972](https://github.com/charmbracelet/crush/issues/1972)
|
|
95
61
|
|
|
96
|
-
##
|
|
97
|
-
When and how to use this skill
|
|
62
|
+
## Configuration
|
|
98
63
|
|
|
99
|
-
|
|
100
|
-
1. Step 1
|
|
101
|
-
2. Step 2
|
|
102
|
-
3. Step 3
|
|
64
|
+
### Crush Configuration (crush.json)
|
|
103
65
|
|
|
104
|
-
|
|
105
|
-
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"options": {
|
|
69
|
+
"skills_paths": [
|
|
70
|
+
"packages/rules/.ai-rules/skills",
|
|
71
|
+
"~/.config/crush/skills"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
106
75
|
```
|
|
107
76
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
77
|
+
| Field | Location | Description |
|
|
78
|
+
|-------|----------|-------------|
|
|
79
|
+
| `skills_paths` | `options.skills_paths` | Array of additional directories to scan for skills |
|
|
111
80
|
|
|
112
|
-
|
|
113
|
-
- **test-driven-development/SKILL.md** ✅ Ready
|
|
114
|
-
- **systematic-debugging/SKILL.md** ✅ Ready
|
|
115
|
-
- **writing-plans/SKILL.md** ✅ Ready
|
|
116
|
-
- **executing-plans/SKILL.md** ✅ Ready
|
|
117
|
-
- **frontend-design/SKILL.md** ✅ Ready
|
|
118
|
-
- **dispatching-parallel-agents/SKILL.md** ✅ Ready
|
|
119
|
-
- **subagent-driven-development/SKILL.md** ✅ Ready
|
|
81
|
+
**Environment variable:**
|
|
120
82
|
|
|
121
|
-
|
|
83
|
+
| Variable | Description |
|
|
84
|
+
|----------|-------------|
|
|
85
|
+
| `CRUSH_SKILLS_DIR` | Override default skills directory path |
|
|
122
86
|
|
|
123
|
-
###
|
|
87
|
+
### MCP Server Configuration
|
|
124
88
|
|
|
125
|
-
|
|
89
|
+
Add codingbuddy MCP server for programmatic skill access:
|
|
126
90
|
|
|
127
91
|
```json
|
|
128
92
|
{
|
|
129
93
|
"mcp": {
|
|
130
94
|
"codingbuddy": {
|
|
131
|
-
"type": "
|
|
132
|
-
"command": ["npx", "codingbuddy@latest", "mcp"]
|
|
95
|
+
"type": "local",
|
|
96
|
+
"command": ["npx", "codingbuddy@latest", "mcp"],
|
|
97
|
+
"env": {
|
|
98
|
+
"CODINGBUDDY_PROJECT_ROOT": "/absolute/path/to/your/project"
|
|
99
|
+
}
|
|
133
100
|
}
|
|
134
101
|
}
|
|
135
102
|
}
|
|
136
103
|
```
|
|
137
104
|
|
|
138
|
-
|
|
139
|
-
- `recommend_skills`: Get skill recommendations based on user prompt
|
|
140
|
-
- `get_skill`: Load specific skill content
|
|
141
|
-
- `list_skills`: List all available skills
|
|
105
|
+
## SKILL.md Format
|
|
142
106
|
|
|
143
|
-
|
|
107
|
+
Skills follow the [Agent Skills specification](https://agentskills.io/specification).
|
|
144
108
|
|
|
145
|
-
|
|
109
|
+
### Required Structure
|
|
146
110
|
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
},
|
|
154
|
-
"build": {
|
|
155
|
-
"auto_skills": ["test-driven-development", "executing-plans", "frontend-design"],
|
|
156
|
-
"systemPrompt": "You have access to TDD, execution, and frontend skills..."
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
111
|
+
```
|
|
112
|
+
skill-name/
|
|
113
|
+
├── SKILL.md # Required
|
|
114
|
+
├── scripts/ # Optional — executable code
|
|
115
|
+
├── references/ # Optional — additional documentation
|
|
116
|
+
└── assets/ # Optional — static resources
|
|
160
117
|
```
|
|
161
118
|
|
|
162
|
-
|
|
119
|
+
### Frontmatter Schema
|
|
120
|
+
|
|
121
|
+
```yaml
|
|
122
|
+
---
|
|
123
|
+
name: skill-name # Required. Lowercase + hyphens, max 64 chars, must match directory name
|
|
124
|
+
description: ... # Required. Max 1024 chars. What it does + when to use it
|
|
125
|
+
license: Apache-2.0 # Optional. License name or reference
|
|
126
|
+
compatibility: ... # Optional. Max 500 chars. Environment requirements
|
|
127
|
+
metadata: # Optional. Arbitrary key-value map
|
|
128
|
+
author: example-org
|
|
129
|
+
version: "1.0"
|
|
130
|
+
allowed-tools: Bash Read # Optional. Space-delimited pre-approved tools (experimental)
|
|
131
|
+
---
|
|
132
|
+
```
|
|
163
133
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
- **test-driven-development**: For core logic implementation
|
|
173
|
-
- **executing-plans**: For systematic plan execution
|
|
174
|
-
- **frontend-design**: For UI component development
|
|
175
|
-
- **systematic-debugging**: When encountering issues
|
|
134
|
+
| Field | Required | Description |
|
|
135
|
+
|-------|----------|-------------|
|
|
136
|
+
| `name` | Yes | Lowercase alphanumeric + hyphens, max 64 chars |
|
|
137
|
+
| `description` | Yes | What the skill does and when to use it, max 1024 chars |
|
|
138
|
+
| `license` | No | License name or file reference |
|
|
139
|
+
| `compatibility` | No | Environment requirements, max 500 chars |
|
|
140
|
+
| `metadata` | No | Arbitrary key-value pairs |
|
|
141
|
+
| `allowed-tools` | No | Pre-approved tools list (experimental) |
|
|
176
142
|
|
|
177
|
-
|
|
178
|
-
When using `reviewer` agent, automatically suggest:
|
|
179
|
-
- **systematic-debugging**: For error analysis
|
|
180
|
-
- **subagent-driven-development**: For improvement strategies
|
|
143
|
+
## Available Skills
|
|
181
144
|
|
|
182
|
-
|
|
145
|
+
The table below shows representative skills by mode. Use `list_skills` MCP tool for the complete list.
|
|
183
146
|
|
|
184
|
-
|
|
147
|
+
### PLAN Mode Skills
|
|
185
148
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
149
|
+
| Skill | Description |
|
|
150
|
+
|-------|-------------|
|
|
151
|
+
| `brainstorming` | Ideation and requirements exploration |
|
|
152
|
+
| `writing-plans` | Structured implementation planning |
|
|
153
|
+
| `dispatching-parallel-agents` | Multi-component parallel work |
|
|
154
|
+
| `subagent-driven-development` | Subagent-per-task execution |
|
|
155
|
+
| `context-management` | Context window optimization |
|
|
156
|
+
|
|
157
|
+
### ACT Mode Skills
|
|
158
|
+
|
|
159
|
+
| Skill | Description |
|
|
160
|
+
|-------|-------------|
|
|
161
|
+
| `test-driven-development` | Red-Green-Refactor TDD cycle |
|
|
162
|
+
| `executing-plans` | Systematic plan execution |
|
|
163
|
+
| `frontend-design` | UI component development |
|
|
164
|
+
| `systematic-debugging` | Root cause analysis and bug fixing |
|
|
165
|
+
| `api-design` | API design and documentation |
|
|
166
|
+
| `refactoring` | Code restructuring |
|
|
167
|
+
| `mcp-builder` | MCP server development |
|
|
168
|
+
| `database-migration` | Database schema migration |
|
|
169
|
+
| `dependency-management` | Package dependency management |
|
|
170
|
+
| `widget-slot-architecture` | Widget/slot pattern implementation |
|
|
192
171
|
|
|
193
|
-
|
|
172
|
+
### EVAL Mode Skills
|
|
194
173
|
|
|
195
|
-
|
|
174
|
+
| Skill | Description |
|
|
175
|
+
|-------|-------------|
|
|
176
|
+
| `security-audit` | Security vulnerability analysis |
|
|
177
|
+
| `performance-optimization` | Performance profiling and improvement |
|
|
178
|
+
| `pr-review` | Pull request review |
|
|
179
|
+
| `pr-all-in-one` | Comprehensive PR workflow |
|
|
180
|
+
| `tech-debt` | Technical debt identification |
|
|
181
|
+
|
|
182
|
+
### General Skills
|
|
183
|
+
|
|
184
|
+
| Skill | Description |
|
|
185
|
+
|-------|-------------|
|
|
186
|
+
| `code-explanation` | Code walkthrough and documentation |
|
|
187
|
+
| `documentation-generation` | Auto-generate project documentation |
|
|
188
|
+
| `error-analysis` | Error pattern analysis |
|
|
189
|
+
| `incident-response` | Production incident handling |
|
|
190
|
+
| `prompt-engineering` | AI prompt optimization |
|
|
191
|
+
| `rule-authoring` | Custom AI rules creation |
|
|
192
|
+
| `agent-design` | Custom agent design |
|
|
193
|
+
| `legacy-modernization` | Legacy code modernization |
|
|
194
|
+
| `deployment-checklist` | Deployment readiness verification |
|
|
196
195
|
|
|
197
|
-
|
|
196
|
+
## Workflow Integration
|
|
198
197
|
|
|
199
|
-
|
|
200
|
-
# Start planning session
|
|
201
|
-
/agent plan
|
|
198
|
+
### PLAN Mode — Planning Skills
|
|
202
199
|
|
|
203
|
-
|
|
204
|
-
/skill brainstorming "improve user dashboard"
|
|
200
|
+
When working with the `plan-mode` agent, use MCP tools to load planning skills:
|
|
205
201
|
|
|
206
|
-
# Generate implementation plan
|
|
207
|
-
Create a plan for me
|
|
208
202
|
```
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
/agent build
|
|
215
|
-
|
|
216
|
-
# Load TDD skill
|
|
217
|
-
/skill test-driven-development "implement login API"
|
|
218
|
-
|
|
219
|
-
# Start TDD cycle
|
|
220
|
-
ACT
|
|
203
|
+
User: "I want to build a new feature"
|
|
204
|
+
AI calls: recommend_skills("build a new feature")
|
|
205
|
+
AI receives: brainstorming (high), writing-plans (medium)
|
|
206
|
+
AI calls: get_skill("brainstorming")
|
|
207
|
+
AI follows: brainstorming skill instructions
|
|
221
208
|
```
|
|
222
209
|
|
|
223
|
-
###
|
|
210
|
+
### ACT Mode — Implementation Skills
|
|
224
211
|
|
|
225
|
-
|
|
226
|
-
# Use systematic debugging
|
|
227
|
-
/skill systematic-debugging "screen not showing after login"
|
|
212
|
+
When working with the `act-mode` agent:
|
|
228
213
|
|
|
229
|
-
|
|
230
|
-
|
|
214
|
+
```
|
|
215
|
+
User: "ACT — implement the login API"
|
|
216
|
+
AI calls: recommend_skills("implement the login API")
|
|
217
|
+
AI receives: test-driven-development (high)
|
|
218
|
+
AI calls: get_skill("test-driven-development")
|
|
219
|
+
AI follows: TDD Red-Green-Refactor cycle
|
|
231
220
|
```
|
|
232
221
|
|
|
233
|
-
|
|
222
|
+
### EVAL Mode — Review Skills
|
|
234
223
|
|
|
235
|
-
|
|
236
|
-
- **No Migration Required**: Existing skills work as-is
|
|
237
|
-
- **Automatic Recommendations**: MCP-powered skill suggestions
|
|
238
|
-
- **Korean Support**: Full Korean language integration
|
|
239
|
-
- **Agent Integration**: Skills work seamlessly with agent modes
|
|
240
|
-
- **Workflow Enhancement**: Skills enhance PLAN/ACT/EVAL workflow
|
|
224
|
+
When working with the `eval-mode` agent:
|
|
241
225
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
226
|
+
```
|
|
227
|
+
User: "EVAL — review the implementation"
|
|
228
|
+
AI calls: recommend_skills("review the implementation")
|
|
229
|
+
AI receives: pr-review (high), security-audit (medium)
|
|
230
|
+
AI calls: get_skill("pr-review")
|
|
231
|
+
AI follows: PR review checklist
|
|
232
|
+
```
|
|
247
233
|
|
|
248
234
|
## Maintenance
|
|
249
235
|
|
|
250
236
|
### Adding New Skills
|
|
251
237
|
|
|
252
|
-
1. Create
|
|
253
|
-
2. Add `SKILL.md`
|
|
254
|
-
3. Skills automatically available
|
|
255
|
-
4.
|
|
238
|
+
1. Create skill directory: `packages/rules/.ai-rules/skills/new-skill/`
|
|
239
|
+
2. Add `SKILL.md` with required frontmatter (`name`, `description`)
|
|
240
|
+
3. Skills are automatically available via MCP tools (`recommend_skills`, `get_skill`)
|
|
241
|
+
4. For Crush native discovery, ensure skills are in a configured `skills_paths` directory
|
|
256
242
|
|
|
257
243
|
### Updating Existing Skills
|
|
258
244
|
|
|
259
|
-
1. Modify
|
|
260
|
-
2. Changes automatically reflected
|
|
261
|
-
|
|
245
|
+
1. Modify `SKILL.md` content in `packages/rules/.ai-rules/skills/*/`
|
|
246
|
+
2. Changes are automatically reflected — no configuration updates needed
|
|
247
|
+
|
|
248
|
+
### Validation
|
|
262
249
|
|
|
263
|
-
|
|
250
|
+
Use the [skills-ref](https://github.com/agentskills/agentskills/tree/main/skills-ref) library to validate skills:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
skills-ref validate ./my-skill
|
|
254
|
+
```
|