skills/hmohamed01/swift-development/SKILL.md
Comprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.
npx skillsauth add aiskillstore/marketplace swift-developmentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
xcode-select --installxcodebuild -version and swift --version# Use the included script for full setup
./scripts/new_package.sh MyLibrary --type library --ios --macos
# Or manually
swift package init --type library --name MyLibrary
# SPM packages
swift build
swift test
# Xcode projects
xcodebuild -workspace App.xcworkspace -scheme App \
-destination 'platform=iOS Simulator,name=iPhone 15' build
# Use included script for common options
./scripts/run_tests.sh --parallel --coverage
# Use included script
./scripts/format_and_lint.sh Sources/
# Check mode (CI)
./scripts/format_and_lint.sh --check
# Use included script
./scripts/simulator.sh list
./scripts/simulator.sh boot "iPhone 15"
./scripts/simulator.sh screenshot
./scripts/simulator.sh dark
# Debug build for simulator
xcodebuild -workspace App.xcworkspace -scheme App \
-destination 'platform=iOS Simulator,name=iPhone 15' \
build
# Release archive
xcodebuild archive \
-workspace App.xcworkspace -scheme App \
-archivePath ./build/App.xcarchive \
-configuration Release
# Export IPA (use templates from assets/ExportOptions/)
xcodebuild -exportArchive \
-archivePath ./build/App.xcarchive \
-exportPath ./build/export \
-exportOptionsPlist assets/ExportOptions/app-store.plist
# All tests
xcodebuild test -workspace App.xcworkspace -scheme App \
-destination 'platform=iOS Simulator,name=iPhone 15'
# Specific test
xcodebuild test -only-testing:AppTests/MyTestClass/testMethod
# With coverage
xcodebuild test -enableCodeCoverage YES \
-resultBundlePath ./TestResults.xcresult
# Install on booted simulator
xcrun simctl install booted ./Build/Products/Debug-iphonesimulator/App.app
# Launch
xcrun simctl launch booted com.company.app
These are Apple's official documentation links for manual browsing:
| Resource | URL | |----------|-----| | Swift Documentation | https://developer.apple.com/documentation/swift | | SwiftUI | https://developer.apple.com/documentation/swiftui | | Swift Concurrency | https://developer.apple.com/documentation/swift/concurrency | | Swift Testing | https://developer.apple.com/documentation/testing |
Note: Apple's documentation sites are JavaScript SPAs and cannot be fetched programmatically with WebFetch.
Use these GitHub-based sources for live documentation fetching:
| Resource | URL | |----------|-----| | Swift Testing | https://github.com/apple/swift-testing | | Swift Evolution Proposals | https://github.com/apple/swift-evolution/tree/main/proposals | | Swift Compiler Docs | https://github.com/apple/swift/tree/main/docs | | Swift Standard Library | https://github.com/apple/swift/tree/main/stdlib | | Swift Async Algorithms | https://github.com/apple/swift-async-algorithms | | Swift Collections | https://github.com/apple/swift-collections |
Use WebFetch to retrieve documentation from GitHub in these situations:
@Test, #expect, #require, traits, or parameterized testsHow to fetch: Use WebFetch with GitHub URLs:
https://github.com/apple/swift-testinghttps://raw.githubusercontent.com/apple/swift-testing/main/README.mdhttps://github.com/apple/swift-evolution/blob/main/proposals/0409-access-level-on-imports.mdExample prompt for WebFetch: "Extract the main features, macros, and usage examples from this documentation"
Detailed documentation for specific topics:
| Topic | File | |-------|------| | SwiftUI patterns | references/swiftui-patterns.md | | Testing patterns | references/testing-patterns.md | | Swift 6 concurrency | references/concurrency.md | | Architecture patterns | references/architecture.md | | Best practices | references/best-practices.md | | Swift Package Manager | references/spm.md | | xcodebuild commands | references/xcodebuild.md | | Simulator control | references/simctl.md | | Code signing | references/code-signing.md | | CI/CD setup | references/cicd.md | | Troubleshooting | references/troubleshooting.md |
| Script | Purpose |
|--------|---------|
| scripts/new_package.sh | Create new Swift package with config files |
| scripts/run_tests.sh | Run tests with common options |
| scripts/format_and_lint.sh | Format and lint Swift code |
| scripts/simulator.sh | Quick simulator management |
| Asset | Purpose |
|-------|---------|
| assets/Package.swift.template | Swift package template |
| assets/.swiftformat | SwiftFormat configuration |
| assets/.swiftlint.yml | SwiftLint configuration |
| assets/ExportOptions/ | Archive export plist templates |
| Task | Command |
|------|---------|
| Build package | swift build |
| Build release | swift build -c release |
| Run tests | swift test |
| Update deps | swift package update |
| List simulators | xcrun simctl list devices |
| Boot simulator | xcrun simctl boot "iPhone 15" |
| Install app | xcrun simctl install booted ./App.app |
| Format code | swiftformat . |
| Lint code | swiftlint |
# iOS Simulator
-destination 'platform=iOS Simulator,name=iPhone 15'
# macOS
-destination 'platform=macOS'
# Generic iOS (for archives)
-destination 'generic/platform=iOS'
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.