|
| 1 | +# Skill Authoring Examples |
| 2 | + |
| 3 | +## 1. Effective YAML Frontmatter |
| 4 | + |
| 5 | +**Good (Gerund + What/When Description):** |
| 6 | +```yaml |
| 7 | +--- |
| 8 | +name: processing-logs |
| 9 | +description: Extracts and summarizes error patterns from system logs. Use when the user asks to analyze logs or troubleshoot runtime errors. |
| 10 | +--- |
| 11 | +``` |
| 12 | + |
| 13 | +**Bad (Vague + First Person):** |
| 14 | +```yaml |
| 15 | +--- |
| 16 | +name: helper-tool |
| 17 | +description: I can help you look at files and tell you what is wrong. |
| 18 | +--- |
| 19 | +``` |
| 20 | + |
| 21 | +## 2. Progressive Disclosure Pattern |
| 22 | + |
| 23 | +If a skill has a complex API or many configuration options, do not put them all in `SKILL.md`. |
| 24 | + |
| 25 | +**SKILL.md:** |
| 26 | +```markdown |
| 27 | +## Advanced Configuration |
| 28 | +For detailed information on environment variables and performance tuning, see [CONFIG.md](CONFIG.md). |
| 29 | +``` |
| 30 | + |
| 31 | +## 3. Workflow Patterns |
| 32 | + |
| 33 | +Always use checklists to track state. |
| 34 | + |
| 35 | +```markdown |
| 36 | +## Workflow |
| 37 | +Copy this checklist: |
| 38 | +- [ ] Step 1: Analyze input. |
| 39 | +- [ ] Step 2: Generate draft. |
| 40 | +- [ ] Step 3: Run validation script. |
| 41 | +``` |
| 42 | + |
| 43 | +## 4. Automation with Dart |
| 44 | + |
| 45 | +All scripts should be written in Dart and placed in the `scripts/` directory. |
| 46 | + |
| 47 | +**Good Script Usage:** |
| 48 | +```markdown |
| 49 | +## Step 4: Add the entry |
| 50 | +Use the provided utility script to insert the note safely. |
| 51 | +`dart .agents/skills/adding-release-notes/scripts/add_note.dart "Inspector updates" "Added XYZ" TODO` |
| 52 | +``` |
| 53 | + |
| 54 | +## 5. Anti-Patterns to Avoid |
| 55 | + |
| 56 | +- **Prohibited**: Using non-Dart languages for utility scripts. |
| 57 | +- **Prohibited**: Using Windows-style paths (always use `/`). |
| 58 | +- **Prohibited**: Offering too many options (narrow the scope to recommended defaults). |
| 59 | +- **Prohibited**: Verbose background stories (Claude already knows how to code). |
| 60 | +- **Prohibited**: Interactive prompts (Agents should be autonomous, not ask for permission at every step). |
0 commit comments