hmohamed01/swift-developer/swift-knowledge

Claude Code and agent skill by hmohamed01/swift-developer

Trust tier 3
  • community
Source check pending

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

Comprehensive Swift development knowledge for iOS/macOS applications, Swift packages, and modern Swift patterns. Use when working with: (1) xcodebuild commands and Xcode projects, (2) Swift Package Manager, (3) SwiftUI views and patterns, (4) Swift 6 concurrency (async/await, actors, Sendable), (5) XCTest and Swift Testing frameworks, (6) iOS simulator management with simctl, (7) Code signing and app distribution, (8) SwiftFormat and SwiftLint configuration.

Install

npx vskill@latest install hmohamed01/swift-developer/swift-knowledge

SKILL.md

Swift Development Knowledge

Prerequisites

  • macOS with Xcode 15+ (Xcode 16+ for Swift 6)
  • Xcode Command Line Tools: xcode-select --install
  • Verify: xcodebuild -version and swift --version

Quick Reference

Essential Commands
TaskCommand
Build packageswift build
Build releaseswift build -c release
Run testsswift test
Update depsswift package update
List simulatorsxcrun simctl list devices
Boot simulatorxcrun simctl boot "iPhone 15"
Install appxcrun simctl install booted ./App.app
Format codeswiftformat .
Lint codeswiftlint
Common Destinations
bash
# iOS Simulator
-destination 'platform=iOS Simulator,name=iPhone 15'
# macOS
-destination 'platform=macOS'
# Generic iOS (for archives)
-destination 'generic/platform=iOS'

Official Documentation

For authoritative reference, use Apple's official Swift documentation from the GitHub swift-book repository.

IMPORTANT: Apple's developer.apple.com uses a Single Page Application (SPA) that requires JavaScript, so WebFetch cannot extract content from it. Instead, use the raw GitHub URLs below which provide static markdown that WebFetch can process.

Swift Language Documentation (GitHub)

Base URL: https://raw.githubusercontent.com/swiftlang/swift-book/main/TSPL.docc/

TopicURL
Concurrencyhttps://raw.githubusercontent.com/swiftlang/swift-book/main/TSPL.docc/LanguageGuide/Concurrency.md
Protocolshttps://raw.githubusercontent.com/swiftlang/swift-book/main/TSPL.docc/LanguageGuide/Protocols.md
Genericshttps://raw.githubusercontent.com/swiftlang/swift-book/main/TSPL.docc/LanguageGuide/Generics.md
Error Handlinghttps://raw.githubusercontent.com/swiftlang/swift-book/main/TSPL.docc/LanguageGuide/ErrorHandling.md
Closureshttps://raw.githubusercontent.com/swiftlang/swift-book/main/TSPL.docc/LanguageGuide/Closures.md
Memory Safetyhttps://raw.githubusercontent.com/swiftlang/swift-book/main/TSPL.docc/LanguageGuide/MemorySafety.md
Access Controlhttps://raw.githubusercontent.com/swiftlang/swift-book/main/TSPL.docc/LanguageGuide/AccessControl.md
Macroshttps://raw.githubusercontent.com/swiftlang/swift-book/main/TSPL.docc/LanguageGuide/Macros.md
Opaque Typeshttps://raw.githubusercontent.com/swiftlang/swift-book/main/TSPL.docc/LanguageGuide/OpaqueTypes.md
Initializationhttps://raw.githubusercontent.com/swiftlang/swift-book/main/TSPL.docc/LanguageGuide/Initialization.md
Propertieshttps://raw.githubusercontent.com/swiftlang/swift-book/main/TSPL.docc/LanguageGuide/Properties.md
Methodshttps://raw.githubusercontent.com/swiftlang/swift-book/main/TSPL.docc/LanguageGuide/Methods.md
Attributeshttps://raw.githubusercontent.com/swiftlang/swift-book/main/TSPL.docc/ReferenceManual/Attributes.md
Typeshttps://raw.githubusercontent.com/swiftlang/swift-book/main/TSPL.docc/ReferenceManual/Types.md
Declarationshttps://raw.githubusercontent.com/swiftlang/swift-book/main/TSPL.docc/ReferenceManual/Declarations.md

Use WebFetch with these URLs to retrieve specific language feature details when implementing Swift code.

Note: SwiftUI framework documentation is NOT available on GitHub. For SwiftUI-specific APIs, rely on the reference files in this skill and your training knowledge.

Additional GitHub Documentation Sources

Beyond the Swift Book, these repositories provide authoritative documentation:

RepositoryUse ForURL
Swift TestingSwift Testing framework (@Test, #expect)https://github.com/apple/swift-testing
Swift EvolutionLatest language proposals and featureshttps://github.com/apple/swift-evolution/tree/main/proposals
Swift Compiler DocsCompiler internals and ABIhttps://github.com/apple/swift/tree/main/docs
Swift Async AlgorithmsAsync sequences and algorithmshttps://github.com/apple/swift-async-algorithms

Example WebFetch URLs:

  • Swift Testing: https://raw.githubusercontent.com/apple/swift-testing/main/README.md
  • Evolution Proposal: https://raw.githubusercontent.com/apple/swift-evolution/main/proposals/0401-remove-property-wrapper-isolation.md
  • Async Algorithms: https://raw.githubusercontent.com/apple/swift-async-algorithms/main/README.md

Reference Files

Detailed documentation for specific topics:

TopicFile
SwiftUI patternsreferences/swiftui-patterns.md
Swift 6 concurrencyreferences/concurrency.md
Testing patternsreferences/testing-patterns.md
Architecture patternsreferences/architecture.md
Best practicesreferences/best-practices.md
Swift Package Managerreferences/spm.md
xcodebuild commandsreferences/xcodebuild.md
Simulator controlreferences/simctl.md
Code signingreferences/code-signing.md
CI/CD setupreferences/cicd.md
Troubleshootingreferences/troubleshooting.md

Included Scripts

ScriptPurpose
scripts/new_package.shCreate new Swift package with config files
scripts/run_tests.shRun tests with common options
scripts/format_and_lint.shFormat and lint Swift code
scripts/simulator.shQuick simulator management

Run scripts from the skill directory:

bash
$CLAUDE_PLUGIN_ROOT/skills/swift-knowledge/scripts/new_package.sh MyPackage

Asset Templates

AssetPurpose
assets/Package.swift.templateSwift package manifest template
assets/.swiftformatSwiftFormat configuration
assets/.swiftlint.ymlSwiftLint configuration

Best Practices Summary

DO
  • Use SwiftUI + @Observable for iOS 17+ projects
  • Use async/await for all async operations
  • Store secrets in Keychain, not UserDefaults
  • Use @MainActor for UI-related code
  • Enable strict concurrency checking
  • Test on real devices before release
DON'T
  • Force unwrap without safety checks
  • Block main thread with sync operations
  • Store API keys in source code
  • Ignore Swift 6 concurrency warnings
  • Skip error handling

Security

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

Quality evaluation

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

Source

Popularity

Repository stars
5
Repository forks
1
7-day trend score
9

Stars and forks are for the whole GitHub repository, not this skill alone. 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/hmohamed01/swift-developer/swift-knowledge/badge)](https://verified-skill.com/skills/hmohamed01/swift-developer/swift-knowledge)

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