edwardzhang/sps-cli/swift

Claude Code and agent skill by edwardzhang/sps-cli

Trust tier 3
  • community
Source check pending

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

Swift language skill — value types, optionals, async/await, testing. Primarily iOS / macOS / server-side Swift. Pair with `mobile` end skill and `coding-standards` for cross-language principles.

Install

npx vskill@latest install edwardzhang/sps-cli/swift

SKILL.md

The same SKILL.md was published earlier as edwardzhang/sps-cli/swift.

Swift

Value types, optionals, async/await, actors. Strong type system, ARC memory management.

When to load

  • Project is iOS / macOS / watchOS / tvOS / visionOS
  • Server-side Swift (Vapor, Hummingbird)
  • Swift Package Manager projects
  • Interop with Objective-C or C

Core principles

  1. Value types first. struct and enum — safe by default, no shared mutation.
  2. Optionals are types, not null. Unwrap with if let, guard let, ??. Never ! outside IBOutlets / truly-impossible cases.
  3. `let` by default, `var` only when mutating.
  4. Throwing functions for expected failure. Result for async results where throws is awkward.
  5. `async/await` for asynchronous code. No raw callbacks in new code.
  6. Actors for mutable shared state across concurrent code. Not DispatchQueue.sync.
  7. Protocols + extensions for composable behaviour.
  8. Strong typing over stringly-typed APIs. Enums with associated values beat dictionaries of magic keys.

How to use references

ReferenceWhen to load
`references/idioms.md`Value types, optionals, protocols, closures, guard, pattern matching
`references/concurrency.md`async/await, Task, actors, @MainActor, cancellation, AsyncSequence
`references/testing.md`XCTest, Swift Testing (Swift 6+), async tests, UI tests

Forbidden patterns (auto-reject)

  • ! force-unwrap except for IBOutlets or documented invariants
  • as! force-cast without a test that proves the type is guaranteed
  • fatalError outside of truly-unreachable code (use preconditionFailure + message at minimum)
  • DispatchQueue.main.sync from a background queue (deadlock risk)
  • DispatchSemaphore to bridge sync/async in production — use await
  • Shared mutable state without an actor or a serial queue
  • Any / AnyObject as an API type when concrete types would work
  • String-matching on error messages
  • Force unwrapping try! outside tests
  • print for production logging (use Logger / os_log)

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
3
7-day trend score
7

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/edwardzhang/sps-cli/swift/badge)](https://verified-skill.com/skills/edwardzhang/sps-cli/swift)

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