When extracting a new skill from a learning, use the SKILL.md template to ensure consistency. A skill is a reusable piece of knowledge or an executable helper derived from a resolved learning entry.
Full Template Structure
A comprehensive skill should include:
- Frontmatter: Contains
name (lowercase with hyphens) and description (starting with an action verb and mentioning triggers). - Quick Reference: A table mapping specific triggers/situations to actions.
- Background: Context on why the knowledge matters.
- Solution: A step-by-step guide and a tested code example.
- Common Variations & Gotchas: Handling different scenarios and avoiding common mistakes.
- Source: Metadata including the
Learning ID, Original Category (correction, insight, knowledge_gap, or best_practice), and Extraction Date.
Minimal Template
For simple skills, use a reduced format:
---
name: skill-name-here
description: "What this skill does and when to use it."
---
# Skill Name
[Problem statement in one sentence]
## Solution
[Direct solution with code/commands]
## Source
- Learning ID: LRN-YYYYMMDD-XXX
---
name: skill-name-here
description: "Concise description of when and why to use this skill. Include trigger conditions."
---
# Skill Name
Brief introduction explaining the problem this skill solves and its origin.
## Quick Reference
| Situation | Action |
|-----------|--------|
| [Trigger 1] | [Action 1] |
| [Trigger 2] | [Action 2] |
## Background
Why this knowledge matters. What problems it prevents. Context from the original learning.
## Solution
### Step-by-Step
1. First step with code or command
2. Second step
3. Verification step
### Code Example
```language
// Example code demonstrating the solution
Common Variations
- Variation A: Description and how to handle
- Variation B: Description and how to handle
Gotchas
- Warning or common mistake #1
- Warning or common mistake #2
Related
- Link to related documentation
- Link to related skill
Source
Extracted from learning entry.
- Learning ID: LRN-YYYYMMDD-XXX
- Original Category: correction | insight | knowledge_gap | best_practice
- Extraction Date: YYYY-MM-DD