swift-language — Claude Code skill: what it does, how to install
Guides AI agents through modern Swift patterns for core, non-concurrency code. Useful when modernizing enums, generics, and protocols under recent compiler releases.
npx skills add dpearson2699/swift-ios-skills --skill swift-language -a claude-codeWhat swift-language does
This skill guides coding assistants to apply current Swift syntax without altering runtime behavior. It covers if and switch expressions from Swift 5.9, typed errors from Swift 6, @resultBuilder types, and @propertyWrapper logic. It also covers opaque some versus existential any, guard statements, and collection methods like count(where:).
The instructions enforce strict checks: apply one rewrite at a time, compile the module, and run tests. Multi-statement branches are disallowed in if/switch expressions. Every branch must resolve to a single expression of identical type.
This skill omits concurrency and UI code. It routes async tasks to swift-concurrency, SwiftUI layouts to swiftui-patterns, and deep serialization to swift-codable.
What it helps with
- convert legacy branch blocks into Swift 5.9+ if/switch expressions
- introduce typed throws to handle domain error enums exhaustively
- encapsulate data clamping and bounds checks into a property wrapper
- construct domain-specific syntax trees using result builders
Example prompts for the agent
- Refactor this status switch into a Swift 5.9 expression
- Update validateUser to throw a typed ValidationError enum
- Create an ArrayBuilder struct using @resultBuilder for custom string lists
How to install swift-language
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swift-language -a claude-code2Manually: put the files in place
~/.claude/skills/swift-language/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/swift-language/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swift-language -a codex2Manually: put the files in place
.agents/skills/swift-language/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swift-language -a cursor2Manually: put the files in place
.cursor/skills/swift-language/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills swift-language2Manually: put the files in place
.github/skills/swift-language/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swift-language -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/swift-languageManually: put the files in place
.devin/skills/swift-language/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swift-language -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about swift-language
How do I install swift-language in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill swift-language -a claude-code in your terminal. Alternatively, save the skill file to ~/.claude/skills/swift-language/SKILL.md.
What does the swift-language skill do?
It directs the agent to modern Swift language idioms for core logic. It focuses on modern collection APIs, result builders, typed errors, and opaque return types without touching concurrency.
Does this skill cover Swift Concurrency or SwiftUI?
No. It explicitly leaves asynchronous tasks to swift-concurrency and interface logic to swiftui-patterns.