Skip to content

Commit 5c197c9

Browse files
rjmurillo-botclaude
andcommitted
docs(skillbook): add canonical skill formats and naming conventions
Add comprehensive documentation for skill file organization: ## File Naming Convention - Domain-topic pattern: `{domain}-{topic}.md` - Internal Skill ID goes inside file, not in filename - Clear distinction between index files and atomic files ## Canonical Formats - Format A: Standalone skills (CRITICAL/P0, referenced skills) - Format B: Bundled skills (related workflow skills in one file) - Decision tree for format selection ## Skill Categories - Domain prefix mapping to file organization - Examples from actual repo files ## Fixes - Replace remaining cloudmcp-manager references with Serena This canonicalizes the migration reasoning for 100% repeatability. Part of Issue #307 Memory Automation work. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 8aa1b24 commit 5c197c9

File tree

4 files changed

+428
-84
lines changed

4 files changed

+428
-84
lines changed

src/claude/skillbook.md

Lines changed: 137 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -121,43 +121,155 @@ mcp__serena__read_memory # Read specific domain index
121121
- [ ] **REJECT**: Exact duplicate
122122
```
123123

124-
## Skill File Format (ADR-017)
124+
## File Naming Convention
125125

126-
Skills are stored as markdown files in `.serena/memories/`:
126+
Skill files use `{domain}-{topic}.md` format for index discoverability:
127127

128-
```markdown
129-
# Skill-[Category]-[Number]: [Title]
128+
```text
129+
.serena/memories/
130+
├── skills-{domain}-index.md # L2: Domain index (routing table)
131+
└── {domain}-{topic}.md # L3: Atomic skill file(s)
132+
```
133+
134+
### Naming Rules
135+
136+
| Component | Pattern | Examples |
137+
|-----------|---------|----------|
138+
| Domain | Lowercase, hyphenated | `pr-review`, `session-init`, `github-cli` |
139+
| Topic | Descriptive noun/verb | `security`, `acknowledgment`, `api-patterns` |
140+
| Full name | `{domain}-{topic}.md` | `pr-review-security.md`, `pester-test-isolation.md` |
141+
142+
**Internal Skill ID**: The `Skill-{Category}-{NNN}` identifier goes INSIDE the file, not in the filename.
143+
144+
### File vs Index Decision
130145

131-
**Statement**: [Atomic strategy - max 15 words]
146+
| File Type | Purpose | Example |
147+
|-----------|---------|---------|
148+
| `skills-{domain}-index.md` | L2 routing table | `skills-pr-review-index.md` |
149+
| `{domain}-{topic}.md` | L3 atomic content | `pr-review-security.md` |
132150

133-
**Context**: [When to apply]
151+
## Skill File Formats (ADR-017)
134152

135-
**Evidence**: [Specific execution proof]
153+
Skills are stored as markdown files in `.serena/memories/`. Two canonical formats exist:
136154

137-
**Atomicity**: [%]
155+
### Format A: Standalone Skill (Major Skills)
138156

139-
**Impact**: [1-10]
157+
Use for skills that are referenced independently or represent major capabilities.
158+
159+
```markdown
160+
# Skill-{Category}-{NNN}: {Title}
161+
162+
**Statement**: {Atomic strategy - max 15 words}
163+
164+
**Context**: {When to apply}
165+
166+
**Evidence**: {Specific execution proof with session/PR reference}
167+
168+
**Atomicity**: {%} | **Impact**: {1-10}
140169

141170
## Pattern
142171

143-
[Code example or detailed guidance]
172+
{Code example or detailed guidance}
144173

145174
## Anti-Pattern
146175

147-
[What NOT to do]
176+
{What NOT to do}
177+
178+
## Related
179+
180+
- **BLOCKS**: {Skills this blocks}
181+
- **ENABLES**: {Skills this enables}
182+
```
183+
184+
**Example** (from `session-init-serena.md`):
185+
186+
```markdown
187+
# Skill-Init-001: Serena Mandatory Initialization
188+
189+
**Statement**: MUST initialize Serena before ANY other action.
190+
191+
**Context**: BLOCKING gate at session start (Phase 1)
192+
193+
**Evidence**: This gate works perfectly - never violated.
194+
195+
**Atomicity**: 98% | **Impact**: 10/10
196+
197+
## Pattern
198+
1. mcp__serena__activate_project
199+
2. mcp__serena__initial_instructions
200+
3. Proceed with work
201+
```
202+
203+
### Format B: Bundled Skills (Related Workflows)
204+
205+
Use for multiple related skills that share a workflow context.
206+
207+
```markdown
208+
# {Domain}: {Topic Title}
209+
210+
## Skill-{Category}-{NNN}: {First Skill Title}
211+
212+
**Statement**: {Atomic strategy}
213+
214+
**Atomicity**: {%} | **Impact**: {1-10}
215+
216+
{Code example}
217+
218+
## Skill-{Category}-{NNN}: {Second Skill Title}
219+
220+
**Statement**: {Atomic strategy}
221+
222+
**Atomicity**: {%} | **Impact**: {1-10}
223+
224+
{Code example}
225+
```
226+
227+
**Example** (from `pr-review-acknowledgment.md`):
228+
229+
```markdown
230+
# PR Review: Acknowledgment Protocol
231+
232+
## Skill-PR-Comment-001: Acknowledgment BLOCKING Gate
233+
234+
**Statement**: Phase 3 BLOCKED until eyes count equals comment count.
235+
236+
**Atomicity**: 100% | **Tag**: critical
237+
238+
## Skill-PR-Comment-002: Session-Specific Work Tracking
239+
240+
**Statement**: Track 'NEW this session' separately from 'DONE prior'.
241+
242+
**Atomicity**: 100% | **Tag**: critical
243+
```
244+
245+
### Format Selection Decision Tree
246+
247+
```text
248+
1. Is this a CRITICAL/BLOCKING skill (P0)?
249+
YES → Format A (standalone, full detail)
250+
NO → Continue
251+
252+
2. Are there 2+ related skills in the same workflow?
253+
YES → Format B (bundled in one file)
254+
NO → Format A (standalone)
255+
256+
3. Is the skill referenced by other skills?
257+
YES → Format A (standalone for linkability)
258+
NO → Either format acceptable
148259
```
149260

150261
### Skill Categories
151262

152-
| Category | Description | Example |
153-
|----------|-------------|---------|
154-
| Build | Compilation | Skill-Build-001 |
155-
| Test | Testing | Skill-Test-001 |
156-
| Debug | Debugging | Skill-Debug-001 |
157-
| Design | Architecture | Skill-Design-001 |
158-
| Perf | Optimization | Skill-Perf-001 |
159-
| Process | Workflow | Skill-Process-001 |
160-
| Tool | Tool-specific | Skill-Tool-001 |
263+
| Category | Domain Prefix | Description | Example ID |
264+
|----------|--------------|-------------|------------|
265+
| Init | `session-init-` | Session initialization | Skill-Init-001 |
266+
| PR | `pr-review-` | Pull request workflows | Skill-PR-Comment-001 |
267+
| GH | `github-cli-` | GitHub CLI patterns | Skill-GH-API-001 |
268+
| Test | `pester-` | Testing strategies | Skill-Test-Pester-001 |
269+
| Build | `ci-` | Build and CI | Skill-Build-001 |
270+
| Memory | `skill-memory-` | Memory operations | Skill-Memory-001 |
271+
| Security | `security-` | Security patterns | Skill-Security-001 |
272+
| Process | `workflow-` | Workflow patterns | Skill-Process-001 |
161273

162274
## Memory Protocol
163275

@@ -272,8 +384,9 @@ Skillbook Manager:
272384
When agents retrieve skills:
273385

274386
```text
275-
mcp__cloudmcp-manager__memory-search_nodes
276-
Query: "skill [task context]"
387+
mcp__serena__read_memory
388+
memory_file_name: "skills-[domain]-index"
389+
# Then read specific skill file from index
277390
```
278391

279392
Agents should cite:
@@ -290,7 +403,7 @@ Agents should cite:
290403

291404
When skillbook update is complete:
292405

293-
1. Confirm skill created/updated via cloudmcp-manager memory tools
406+
1. Confirm skill created/updated via Serena memory tools
294407
2. Return summary of changes to orchestrator
295408
3. Recommend notification to relevant agents (orchestrator handles this)
296409

@@ -301,7 +414,7 @@ When skillbook update is complete:
301414
| **retrospective** | Need more evidence | Request additional analysis |
302415
| **orchestrator** | Skills updated | Notify for next task |
303416

304-
**Note**: Memory operations are executed directly via cloudmcp-manager memory tools (see Claude Code Tools section). You do not delegate to a memory agentyou invoke memory tools directly.
417+
**Note**: Memory operations are executed directly via Serena memory tools (see Claude Code Tools section). You do not delegate to a memory agent; you invoke memory tools directly.
305418

306419
## Execution Mindset
307420

src/copilot-cli/skillbook.agent.md

Lines changed: 97 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -118,43 +118,120 @@ serena/read_memory # Read specific domain index
118118

119119
---
120120

121-
## Skill File Format (ADR-017)
121+
## File Naming Convention
122122

123-
Skills are stored as markdown files in `.serena/memories/`:
123+
Skill files use `{domain}-{topic}.md` format for index discoverability:
124124

125-
```markdown
126-
# Skill-[Category]-[Number]: [Title]
125+
```text
126+
.serena/memories/
127+
├── skills-{domain}-index.md # L2: Domain index (routing table)
128+
└── {domain}-{topic}.md # L3: Atomic skill file(s)
129+
```
130+
131+
### Naming Rules
132+
133+
| Component | Pattern | Examples |
134+
|-----------|---------|----------|
135+
| Domain | Lowercase, hyphenated | `pr-review`, `session-init`, `github-cli` |
136+
| Topic | Descriptive noun/verb | `security`, `acknowledgment`, `api-patterns` |
137+
| Full name | `{domain}-{topic}.md` | `pr-review-security.md`, `pester-test-isolation.md` |
138+
139+
**Internal Skill ID**: The `Skill-{Category}-{NNN}` identifier goes INSIDE the file, not in the filename.
140+
141+
### File vs Index Decision
142+
143+
| File Type | Purpose | Example |
144+
|-----------|---------|---------|
145+
| `skills-{domain}-index.md` | L2 routing table | `skills-pr-review-index.md` |
146+
| `{domain}-{topic}.md` | L3 atomic content | `pr-review-security.md` |
147+
148+
---
149+
150+
## Skill File Formats (ADR-017)
151+
152+
Skills are stored as markdown files in `.serena/memories/`. Two canonical formats exist:
127153

128-
**Statement**: [Atomic strategy - max 15 words]
154+
### Format A: Standalone Skill (Major Skills)
129155

130-
**Context**: [When to apply]
156+
Use for skills that are referenced independently or represent major capabilities.
157+
158+
```markdown
159+
# Skill-{Category}-{NNN}: {Title}
131160

132-
**Evidence**: [Specific execution proof]
161+
**Statement**: {Atomic strategy - max 15 words}
133162

134-
**Atomicity**: [%]
163+
**Context**: {When to apply}
135164

136-
**Impact**: [1-10]
165+
**Evidence**: {Specific execution proof with session/PR reference}
166+
167+
**Atomicity**: {%} | **Impact**: {1-10}
137168

138169
## Pattern
139170

140-
[Code example or detailed guidance]
171+
{Code example or detailed guidance}
141172

142173
## Anti-Pattern
143174

144-
[What NOT to do]
175+
{What NOT to do}
176+
177+
## Related
178+
179+
- **BLOCKS**: {Skills this blocks}
180+
- **ENABLES**: {Skills this enables}
181+
```
182+
183+
### Format B: Bundled Skills (Related Workflows)
184+
185+
Use for multiple related skills that share a workflow context.
186+
187+
```markdown
188+
# {Domain}: {Topic Title}
189+
190+
## Skill-{Category}-{NNN}: {First Skill Title}
191+
192+
**Statement**: {Atomic strategy}
193+
194+
**Atomicity**: {%} | **Impact**: {1-10}
195+
196+
{Code example}
197+
198+
## Skill-{Category}-{NNN}: {Second Skill Title}
199+
200+
**Statement**: {Atomic strategy}
201+
202+
**Atomicity**: {%} | **Impact**: {1-10}
203+
204+
{Code example}
205+
```
206+
207+
### Format Selection Decision Tree
208+
209+
```text
210+
1. Is this a CRITICAL/BLOCKING skill (P0)?
211+
YES → Format A (standalone, full detail)
212+
NO → Continue
213+
214+
2. Are there 2+ related skills in the same workflow?
215+
YES → Format B (bundled in one file)
216+
NO → Format A (standalone)
217+
218+
3. Is the skill referenced by other skills?
219+
YES → Format A (standalone for linkability)
220+
NO → Either format acceptable
145221
```
146222

147223
### Skill Categories
148224

149-
| Category | Description | Example |
150-
|----------|-------------|---------|
151-
| Build | Compilation | Skill-Build-001 |
152-
| Test | Testing | Skill-Test-001 |
153-
| Debug | Debugging | Skill-Debug-001 |
154-
| Design | Architecture | Skill-Design-001 |
155-
| Perf | Optimization | Skill-Perf-001 |
156-
| Process | Workflow | Skill-Process-001 |
157-
| Tool | Tool-specific | Skill-Tool-001 |
225+
| Category | Domain Prefix | Description | Example ID |
226+
|----------|--------------|-------------|------------|
227+
| Init | `session-init-` | Session initialization | Skill-Init-001 |
228+
| PR | `pr-review-` | Pull request workflows | Skill-PR-Comment-001 |
229+
| GH | `github-cli-` | GitHub CLI patterns | Skill-GH-API-001 |
230+
| Test | `pester-` | Testing strategies | Skill-Test-Pester-001 |
231+
| Build | `ci-` | Build and CI | Skill-Build-001 |
232+
| Memory | `skill-memory-` | Memory operations | Skill-Memory-001 |
233+
| Security | `security-` | Security patterns | Skill-Security-001 |
234+
| Process | `workflow-` | Workflow patterns | Skill-Process-001 |
158235

159236
---
160237

0 commit comments

Comments
 (0)