Add reference documentation for skill authoring

This commit is contained in:
Michael 2026-01-07 20:13:36 -06:00
parent 05ab530992
commit 8bc7bcac35
3 changed files with 177 additions and 0 deletions

View file

@ -0,0 +1,38 @@
# Quality checklist
## Before submitting
### Structure
- [ ] SKILL.md has frontmatter with `name` and `description`
- [ ] Has `## Overview` section
- [ ] Has numbered `## Workflow` steps
- [ ] Has `## Reference material` section (if references exist)
- [ ] Reference files are single-topic focused
### Content
- [ ] Code examples are minimal and tested
- [ ] No verbose explanations before code
- [ ] No "Introduction" or "When to Use" sections
- [ ] Experienced developer would find useful
- [ ] Matches format of existing skills
### Style
- [ ] No emojis
- [ ] kebab-case file and folder names
- [ ] Tables used for comparisons
- [ ] Short paragraphs
### Code
- [ ] Examples compile and run
- [ ] Uses modern Swift syntax
- [ ] Follows Swift API Design Guidelines
- [ ] Copy-paste ready
## Common issues
| Issue | Fix |
|-------|-----|
| Too much preamble | Start with code, explain after |
| Giant code blocks | Show minimal pattern only |
| Duplicate Apple docs | Add unique value or don't write |
| Tutorial tone | Write for peers, not students |

View file

@ -0,0 +1,65 @@
# Skill structure
## Required files
```
skill-name/
├── SKILL.md # Entry point, always required
└── references/ # Optional, for deep content
└── topic.md
```
## SKILL.md anatomy
```markdown
---
name: skill-name
description: What it does + when to invoke it.
---
# Skill Title
## Overview
One to two sentences.
## Workflow
### 1. First step
Actionable instruction with code.
### 2. Next step
More instructions.
## Reference material
- See `references/topic.md` for details.
```
## References folder
One file per topic. Use when content is too detailed for SKILL.md.
| File | Purpose |
|------|---------|
| `basics.md` | Core concepts and usage |
| `advanced-patterns.md` | Complex scenarios |
| `migration.md` | Upgrade paths |
## Assets folder
Optional. Use for templates and scripts.
```
assets/templates/
├── bootstrap/ # Starter project files
└── scripts/ # Automation scripts
```
## Naming
- Skill folder: `kebab-case` (e.g., `swift-testing`)
- Files: `kebab-case.md`
- No prefixes like `swift-` unless disambiguating

View file

@ -0,0 +1,74 @@
# Writing guidelines
## Tone
- Direct and actionable
- Write for experienced developers
- No tutorials or hand-holding
- No emojis
## Structure
**Do:**
- Numbered workflow steps
- Code examples inline
- Tables for comparisons
- Short paragraphs
**Don't:**
- "Introduction" sections
- "When to Use This" preambles
- Lengthy explanations before code
- Theory without examples
## Code examples
Minimal and copy-paste ready:
```swift
// Good - shows the pattern directly
@Test func userCanLogin() async throws {
let result = try await auth.login(user: "test", pass: "pass")
#expect(result.isSuccess)
}
```
```swift
// Bad - too much setup noise
import Testing
import Foundation
struct AuthTests {
let auth = AuthService()
// This test verifies that a user can successfully log in
// with valid credentials and receive a success response
@Test func userCanLogin() async throws {
// Arrange
let username = "test"
let password = "pass"
// Act
let result = try await auth.login(user: username, pass: password)
// Assert
#expect(result.isSuccess)
}
}
```
## Descriptions
Frontmatter description format:
```yaml
# Good
description: Fix Swift Concurrency issues with actor isolation and Sendable. Use when compiler warns about data races.
# Bad
description: A comprehensive skill for understanding and resolving Swift Concurrency problems.
```
Include:
- What it does
- When to use (trigger words)