Skill Maintainer — Documentation Ingestion & Skill Updater
Process new Apple developer documentation and route extracted knowledge into the correct skill files.
Workflow
Step 1: Classify Incoming Documentation
Read each uploaded document and classify it by answering:
| Question |
Action |
| Which framework(s) does it cover? |
Map to target skill(s) using the Skill Registry below |
| Is this a new API or an update to an existing one? |
New → may need new skill; Update → patch existing |
| What's the minimum deployment target? |
Tag patterns with OS version requirements |
| Does it deprecate anything? |
Add to Critical Constraints in target skill |
If a document spans multiple skills (e.g., "SwiftUI-WebKit-Integration" touches both swiftui-core and a potential swiftui-webkit skill), extract relevant portions into each.
Step 2: Extract Actionable Content
From each document, extract exactly these categories:
Patterns — Working, copy-pasteable code blocks with:
- The API call or view/modifier being demonstrated
- Required imports
- Minimum OS version (if not the latest)
- Inline comments on non-obvious behavior
Constraints — Things an LLM will get wrong:
- Deprecated APIs that the new one replaces (❌ old → ✅ new)
- Parameters that changed names or types
- Behaviors that differ from what the name implies
- Common mistakes visible in the doc's "Best Practices" or notes
Decision Logic — When to use which approach:
- If the doc presents multiple approaches (e.g.,
.background vs .foreground(.dynamic) intent modes), capture the decision tree
- If the doc distinguishes platform availability, capture the conditional
References — Source links:
- Apple Developer Documentation URLs
- WWDC session links with year
Step 3: Diff Against Existing Skills
Before writing, read the target skill file(s) and check:
- Duplicate patterns — Does this pattern already exist? If yes, check if the new version supersedes it
- Contradictions — Does the new doc contradict existing constraints? If yes, the new doc wins (it's more recent)
- Gaps — Does the existing skill lack coverage for this area? If yes, add a new section
- Deprecations — Does the new doc make any existing patterns obsolete? If yes, move old pattern to constraints with ❌
Step 4: Update Target Skills
Apply changes following the target skill's internal structure. Every skill should maintain these sections (add if missing):
## Critical Constraints ← ❌ DO NOT / ✅ INSTEAD rules
## Decision Tree ← When to use what
## Verified Patterns ← Working code blocks
### Pattern: [Name] ← Each with OS version tag
## Common Mistakes & Fixes ← Table format
## References ← Apple doc + WWDC links
Formatting rules for inserted content:
- Tag every pattern with version:
<!-- Verified: macOS 26, Swift 6.2, Xcode 26 -->
- Prefix new constraints with the source:
<!-- Source: SwiftUI-New-Toolbar-Features.md -->
- Keep code blocks self-contained (include imports)
- Prefer short inline comments over paragraph explanations
Step 5: Handle New Skills
If the document covers a framework with no existing skill, create one:
- Use the Skill Registry to confirm no existing skill covers it
- Create
SKILL.md with proper frontmatter
- Follow the standard section structure above
- If content exceeds ~400 lines, split into
SKILL.md (core workflow + index) and references/ files
- Register the new skill in the registry
Step 6: Report Changes
After processing, output a summary:
## Ingestion Report
### Documents Processed
- [filename] → [target skill(s)]
### Changes Made
| Skill | Action | Details |
|-------|--------|---------|
| swift-lang | UPDATED | Added @concurrent attribute pattern, Swift 6.2 default MainActor isolation |
| liquid-glass | UPDATED | Added WidgetKit accented rendering mode |
| swiftui-webkit | CREATED | New skill — WebView/WebPage APIs from SwiftUI-WebKit-Integration.md |
### Deprecations Flagged
- `NavigationView` → `NavigationSplitView` (swiftui-core)
- `ObservableObject` → `@Observable` for macOS 14+ (swift-lang)
### Unresolved
- [any docs that didn't map cleanly — ask user for guidance]
Skill Registry
Map frameworks/topics to target skills. Update this when creating new skills.
| Framework / Topic |
Target Skill |
Reference Files |
| Swift language, concurrency, value types, macros |
swift-lang |
— |
| SwiftUI views, navigation, state, toolbars, text |
swiftui-core |
— |
| SwiftData models, queries, inheritance, migration |
swiftdata |
— |
| macOS app lifecycle, windows, scenes, entitlements |
macos-app-structure |
— |
| AppKit bridging, NSView, NSPanel, NSEvent |
appkit-bridge |
— |
| Global hotkeys, CGEvent, keyboard monitoring |
global-hotkeys |
— |
| Clipboard, text insertion, paste simulation |
pasteboard-textinsertion |
— |
| macOS permissions, Accessibility, TCC |
macos-permissions |
— |
| Liquid Glass (SwiftUI, AppKit, UIKit, WidgetKit) |
liquid-glass |
Per-framework reference files |
| WebView, WebPage, WebKit in SwiftUI |
swiftui-webkit |
— |
| FoundationModels, on-device LLM, @Generable |
foundation-models |
— |
| AppIntents, Siri, Shortcuts, Spotlight |
app-intents |
— |
| StoreKit, IAP, subscriptions |
macos-distribution |
— |
| Swift Testing, @Test, #expect |
testing-swift |
— |
| MapKit, GeoToolbox, PlaceDescriptor |
mapkit-geo (optional) |
— |
| Charts, Chart3D, SurfacePlot |
charts-3d (optional) |
— |
Unmapped content: If a document doesn't fit any existing skill, flag it and ask the user whether to create a new skill or fold it into an existing one.
Classification Heuristics
Use these signals to auto-classify documents:
| Signal in Document |
Likely Target Skill |
import SwiftUI + view/modifier patterns |
swiftui-core |
import SwiftData or @Model |
swiftdata |
import AppKit or NS* classes |
appkit-bridge |
import FoundationModels or LanguageModelSession |
foundation-models |
import WebKit + WebView/WebPage |
swiftui-webkit |
import AppIntents or AppIntent protocol |
app-intents |
import StoreKit |
macos-distribution |
glassEffect, GlassEffectContainer, Liquid Glass |
liquid-glass |
@concurrent, nonisolated, Sendable, actor isolation |
swift-lang |
InlineArray, Span, MutableSpan |
swift-lang |
CGEvent, NSEvent.addGlobalMonitor |
global-hotkeys |
NSPasteboard, AXUIElement |
pasteboard-textinsertion |
AXIsProcessTrusted, permission prompts |
macos-permissions |
WindowGroup, MenuBarExtra, Settings scene |
macos-app-structure |
@Test, #expect, @Suite |
testing-swift |
Quality Rules
When updating skills, enforce these standards:
- No orphan code — Every code block must include required
import statements
- No version ambiguity — Every pattern tagged with minimum OS version
- No stale deprecations — If adding a new way, mark the old way as ❌
- No duplicates — Search existing skill before inserting; merge if similar
- Constraints > Patterns — It's more valuable to tell the agent what NOT to do than to show one more example
- Size budget — SKILL.md body stays under 500 lines; overflow goes to
references/
- Self-contained patterns — Each code block should compile independently if pasted into a fresh file with the right imports
Batch Processing
When processing multiple documents at once:
- Read all documents first to build a complete picture
- Group by target skill to minimize file edits
- Process in dependency order:
swift-lang first (language level), then frameworks
- Deduplicate across documents (e.g., Liquid Glass appears in 4 docs — consolidate)
- Generate a single unified ingestion report at the end
1---2name: skill-maintainer3description: Meta-skill for ingesting Apple developer documentation (WWDC transcripts, API docs, migration guides, release notes) and using it to create, update, or improve Swift/macOS development skills. Trigger when user uploads new Apple documentation, asks to update skills with new API information, requests skill creation from documentation, says "ingest this", "update skills with this", or provides markdown/text files containing Apple framework documentation. Also trigger when user asks to audit existing skills for staleness, merge overlapping skills, or check skills against new OS releases.4---56# Skill Maintainer — Documentation Ingestion & Skill Updater78Process new Apple developer documentation and route extracted knowledge into the correct skill files.910## Workflow1112### Step 1: Classify Incoming Documentation1314Read each uploaded document and classify it by answering:1516| Question | Action |17|----------|--------|18| Which framework(s) does it cover? | Map to target skill(s) using the Skill Registry below |19| Is this a new API or an update to an existing one? | New → may need new skill; Update → patch existing |20| What's the minimum deployment target? | Tag patterns with OS version requirements |21| Does it deprecate anything? | Add to Critical Constraints in target skill |2223If a document spans multiple skills (e.g., "SwiftUI-WebKit-Integration" touches both `swiftui-core` and a potential `swiftui-webkit` skill), extract relevant portions into each.2425### Step 2: Extract Actionable Content2627From each document, extract exactly these categories:2829**Patterns** — Working, copy-pasteable code blocks with:30- The API call or view/modifier being demonstrated31- Required imports32- Minimum OS version (if not the latest)33- Inline comments on non-obvious behavior3435**Constraints** — Things an LLM will get wrong:36- Deprecated APIs that the new one replaces (❌ old → ✅ new)37- Parameters that changed names or types38- Behaviors that differ from what the name implies39- Common mistakes visible in the doc's "Best Practices" or notes4041**Decision Logic** — When to use which approach:42- If the doc presents multiple approaches (e.g., `.background` vs `.foreground(.dynamic)` intent modes), capture the decision tree43- If the doc distinguishes platform availability, capture the conditional4445**References** — Source links:46- Apple Developer Documentation URLs47- WWDC session links with year4849### Step 3: Diff Against Existing Skills5051Before writing, read the target skill file(s) and check:52531. **Duplicate patterns** — Does this pattern already exist? If yes, check if the new version supersedes it542. **Contradictions** — Does the new doc contradict existing constraints? If yes, the new doc wins (it's more recent)553. **Gaps** — Does the existing skill lack coverage for this area? If yes, add a new section564. **Deprecations** — Does the new doc make any existing patterns obsolete? If yes, move old pattern to constraints with ❌5758### Step 4: Update Target Skills5960Apply changes following the target skill's internal structure. Every skill should maintain these sections (add if missing):6162```63## Critical Constraints ← ❌ DO NOT / ✅ INSTEAD rules64## Decision Tree ← When to use what65## Verified Patterns ← Working code blocks66 ### Pattern: [Name] ← Each with OS version tag67## Common Mistakes & Fixes ← Table format68## References ← Apple doc + WWDC links69```7071**Formatting rules for inserted content:**7273- Tag every pattern with version: `<!-- Verified: macOS 26, Swift 6.2, Xcode 26 -->`74- Prefix new constraints with the source: `<!-- Source: SwiftUI-New-Toolbar-Features.md -->`75- Keep code blocks self-contained (include imports)76- Prefer short inline comments over paragraph explanations7778### Step 5: Handle New Skills7980If the document covers a framework with **no existing skill**, create one:81821. Use the Skill Registry to confirm no existing skill covers it832. Create `SKILL.md` with proper frontmatter843. Follow the standard section structure above854. If content exceeds ~400 lines, split into `SKILL.md` (core workflow + index) and `references/` files865. Register the new skill in the registry8788### Step 6: Report Changes8990After processing, output a summary:9192```93## Ingestion Report9495### Documents Processed96- [filename] → [target skill(s)]9798### Changes Made99| Skill | Action | Details |100|-------|--------|---------|101| swift-lang | UPDATED | Added @concurrent attribute pattern, Swift 6.2 default MainActor isolation |102| liquid-glass | UPDATED | Added WidgetKit accented rendering mode |103| swiftui-webkit | CREATED | New skill — WebView/WebPage APIs from SwiftUI-WebKit-Integration.md |104105### Deprecations Flagged106- `NavigationView` → `NavigationSplitView` (swiftui-core)107- `ObservableObject` → `@Observable` for macOS 14+ (swift-lang)108109### Unresolved110- [any docs that didn't map cleanly — ask user for guidance]111```112113## Skill Registry114115Map frameworks/topics to target skills. Update this when creating new skills.116117| Framework / Topic | Target Skill | Reference Files |118|---|---|---|119| Swift language, concurrency, value types, macros | `swift-lang` | — |120| SwiftUI views, navigation, state, toolbars, text | `swiftui-core` | — |121| SwiftData models, queries, inheritance, migration | `swiftdata` | — |122| macOS app lifecycle, windows, scenes, entitlements | `macos-app-structure` | — |123| AppKit bridging, NSView, NSPanel, NSEvent | `appkit-bridge` | — |124| Global hotkeys, CGEvent, keyboard monitoring | `global-hotkeys` | — |125| Clipboard, text insertion, paste simulation | `pasteboard-textinsertion` | — |126| macOS permissions, Accessibility, TCC | `macos-permissions` | — |127| Liquid Glass (SwiftUI, AppKit, UIKit, WidgetKit) | `liquid-glass` | Per-framework reference files |128| WebView, WebPage, WebKit in SwiftUI | `swiftui-webkit` | — |129| FoundationModels, on-device LLM, @Generable | `foundation-models` | — |130| AppIntents, Siri, Shortcuts, Spotlight | `app-intents` | — |131| StoreKit, IAP, subscriptions | `macos-distribution` | — |132| Swift Testing, @Test, #expect | `testing-swift` | — |133| MapKit, GeoToolbox, PlaceDescriptor | `mapkit-geo` (optional) | — |134| Charts, Chart3D, SurfacePlot | `charts-3d` (optional) | — |135136**Unmapped content**: If a document doesn't fit any existing skill, flag it and ask the user whether to create a new skill or fold it into an existing one.137138## Classification Heuristics139140Use these signals to auto-classify documents:141142| Signal in Document | Likely Target Skill |143|---|---|144| `import SwiftUI` + view/modifier patterns | `swiftui-core` |145| `import SwiftData` or `@Model` | `swiftdata` |146| `import AppKit` or `NS*` classes | `appkit-bridge` |147| `import FoundationModels` or `LanguageModelSession` | `foundation-models` |148| `import WebKit` + `WebView`/`WebPage` | `swiftui-webkit` |149| `import AppIntents` or `AppIntent` protocol | `app-intents` |150| `import StoreKit` | `macos-distribution` |151| `glassEffect`, `GlassEffectContainer`, `Liquid Glass` | `liquid-glass` |152| `@concurrent`, `nonisolated`, `Sendable`, actor isolation | `swift-lang` |153| `InlineArray`, `Span`, `MutableSpan` | `swift-lang` |154| `CGEvent`, `NSEvent.addGlobalMonitor` | `global-hotkeys` |155| `NSPasteboard`, `AXUIElement` | `pasteboard-textinsertion` |156| `AXIsProcessTrusted`, permission prompts | `macos-permissions` |157| `WindowGroup`, `MenuBarExtra`, `Settings` scene | `macos-app-structure` |158| `@Test`, `#expect`, `@Suite` | `testing-swift` |159160## Quality Rules161162When updating skills, enforce these standards:1631641. **No orphan code** — Every code block must include required `import` statements1652. **No version ambiguity** — Every pattern tagged with minimum OS version1663. **No stale deprecations** — If adding a new way, mark the old way as ❌1674. **No duplicates** — Search existing skill before inserting; merge if similar1685. **Constraints > Patterns** — It's more valuable to tell the agent what NOT to do than to show one more example1696. **Size budget** — SKILL.md body stays under 500 lines; overflow goes to `references/`1707. **Self-contained patterns** — Each code block should compile independently if pasted into a fresh file with the right imports171172## Batch Processing173174When processing multiple documents at once:1751761. Read all documents first to build a complete picture1772. Group by target skill to minimize file edits1783. Process in dependency order: `swift-lang` first (language level), then frameworks1794. Deduplicate across documents (e.g., Liquid Glass appears in 4 docs — consolidate)1805. Generate a single unified ingestion report at the end