artimath/i-know-kung-fu/swift-apple-context

Claude Code and agent skill by artimath/i-know-kung-fu

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

This skill should be used when the user asks about "SwiftUI API", "Apple documentation", "@Observable vs ObservableObject", "Swift Evolution proposals", "is this API real", or when Claude might hallucinate Apple APIs. Provides cupertino-docs lookup for verified Apple Developer documentation.

Install

npx vskill@latest install artimath/i-know-kung-fu/swift-apple-context

SKILL.md

The same SKILL.md was published earlier as artimath/i-know-kung-fu/swift-apple-context.

Swift & Apple Documentation Context

The Problem This Solves

AI assistants hallucinate Apple APIs constantly:

  • Suggesting @ObservableObject + @Published when Apple now recommends @Observable
  • Inventing methods that don't exist
  • Mixing iOS-only APIs into macOS code
  • Using deprecated patterns

Available Documentation

Local docs at ~/.cupertino/ (234,331 documents across 287 frameworks):

FolderContentFormat
docs/Apple Developer Documentation (287 frameworks)JSON
swift-evolution/Swift Evolution Proposals (SE-0001 through SE-0XXX)Markdown
swift-org/Swift.org language documentationMarkdown
hig/Human Interface GuidelinesJSON
archive/Legacy Apple guides (Core Animation, Quartz 2D, etc.)HTML/JSON
packages/Swift Package Index metadataJSON
Top Frameworks
FrameworkDocumentsUse For
SwiftUI7,062Modern UI
AppKit14,066macOS native
Foundation10,988Core types
Swift17,466Language stdlib
Combine1,200+Reactive

How to Search

Quick API Lookup (JSON docs)
bash
# Find a specific type
rg -l "SwiftUI.*View" ~/.cupertino/docs/swiftui/ | head -5
# Search for method/property in abstract
rg '"abstract".*drawingGroup' ~/.cupertino/docs/swiftui/
# Get full doc for a type
cat ~/.cupertino/docs/swiftui/documentation_swiftui_canvas.json | jq '.abstract, .codeExamples'
Swift Evolution Proposals
bash
# Find proposal by topic
rg -l "Observable" ~/.cupertino/swift-evolution/
# Read specific proposal
cat ~/.cupertino/swift-evolution/SE-0395.md # Observation (@Observable)
cat ~/.cupertino/swift-evolution/SE-0382.md # Expression macros
Human Interface Guidelines
bash
# Search HIG
rg -l "navigation" ~/.cupertino/hig/

JSON Doc Structure

Apple docs are structured JSON with these fields:

json
{
"abstract": "A type that represents part of your app's user interface...",
"codeExamples": [
{"code": "struct MyView: View { ... }", "language": "swift"}
],
"conformingTypes": ["Button", "Text", "Image", ...],
"url": "https://developer.apple.com/documentation/swiftui/view"
}

Swift 6 / Modern Patterns

ALWAYS use (Swift 6+, macOS 15+):
swift
// Observation - SE-0395
@Observable
class AppState {
var items: [Item] = [] // No @Published needed
}
// Structured concurrency
async let result = fetchData()
// Swift Testing
@Test func myTest() {
#expect(value == expected)
}
NEVER suggest (deprecated):
swift
// DON'T - Old Combine pattern
class AppState: ObservableObject {
@Published var items: [Item] = []
}
// DON'T - callback hell
DispatchQueue.main.async { ... }

SourceKit-LSP Integration

The swift-lsp plugin provides code intelligence:

  • Go to definition
  • Find references
  • Completions
  • Diagnostics

It uses /usr/bin/sourcekit-lsp from Xcode toolchain.

Workflow: Verify Before Suggesting

  1. Before suggesting any API: Search cupertino docs
  2. For new Swift features: Check swift-evolution proposals
  3. For UI patterns: Check HIG
  4. For legacy APIs: Check archive/

Example verification:

bash
# "Does Canvas support drawingGroup?"
rg -A5 '"drawingGroup"' ~/.cupertino/docs/swiftui/documentation_swiftui_canvas*.json
# "What's the modern way to observe state?"
cat ~/.cupertino/swift-evolution/SE-0395.md | head -100

Common Lookups

QuestionSearch
SwiftUI View modifiers`ls ~/.cupertino/docs/swiftui/ \rg modifier`
Async patternscat ~/.cupertino/swift-evolution/SE-0296.md
Observable macrocat ~/.cupertino/swift-evolution/SE-0395.md
Canvas APIcat ~/.cupertino/docs/swiftui/documentation_swiftui_canvas.json
Metal integrationls ~/.cupertino/docs/metal/

Key Swift Evolution Proposals

SETitleStatus
SE-0395Observation (@Observable)Swift 5.9
SE-0382Expression MacrosSwift 5.9
SE-0389Attached MacrosSwift 5.9
SE-0296Async/awaitSwift 5.5
SE-0302SendableSwift 5.5

When This Skill Activates

Activate this skill when:

  • User asks about Swift/SwiftUI/AppKit APIs
  • Suggesting an API that may not exist
  • User mentions "hallucinated API" or "that method doesn't exist"
  • Working with macOS/iOS framework code
  • Verifying modern vs deprecated patterns

Additional Resources

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/artimath/i-know-kung-fu/swift-apple-context/badge)](https://verified-skill.com/skills/artimath/i-know-kung-fu/swift-apple-context)

Something wrong with this skill or its page? Tell us.