Swift
Use $swift <task>; optional test, build, and icon actions select the
same internal task paths. Complete the requested task with the smallest local
reference set; specialist references are procedures, not independent skills.
Resolve the target before loading
- Establish the target package, Xcode project/scheme, or asset catalog from the
request and project evidence. Ask and wait when a monorepo has several
plausible targets. An intentional explicit target/version override wins;
report the override separately from the observed configuration.
- For version-sensitive work read the target's
SWIFT_VERSION,
SWIFT_STRICT_CONCURRENCY, deployment target, and applicable Package.swift
tools version. The installed swift --version is execution-environment
evidence, not target compatibility. Preserve the precision of the evidence.
- Missing, conflicting, or broad incompatible constraints require a question
and an answer before version-specific references or dependent actions. A
migration needs an explicit destination version. For several destinations,
group resources, changes, and verification by target.
Select only the task's resources
| Task |
Local procedure |
Load additional references when needed |
| Swift language/concurrency/errors |
language |
concurrency, value/reference, error handling; approachable-concurrency only for resolved Swift 6.2+ |
| SwiftUI state/navigation/interop |
UI |
observation-state, navigation, mvvm-coordinator, interop |
Test authoring and strategy (test) |
testing |
swift-testing-api, xctest-bridging, xcuitest, snapshot-testing, test-taxonomy, protocol-di-host-testing |
| iOS SDK persistence/privacy/crypto/OCR |
platform |
matching SDK reference only |
Xcode/SPM/lint/CI (build) |
build |
swiftlint-config, xcodebuild-spm, scheme-signing |
In-app symbol imageset (icon) |
icon |
local icon scripts below |
Language rules also apply to code produced by another path; load the relevant
language reference only if its compatibility or concurrency rules are needed.
Read local references from this skill directory. Project source/configuration
and external tools are explicit task inputs; a missing bundled resource is
BLOCKED, not a reason to search an installed peer or repository module.
Actions and authority
Implementation requests authorize scoped source/tests/configuration edits;
review and build/check requests stay read-only apart from explicit build outputs.
Run the project's test-first workflow for business behavior. Retain separate
local build, simulator/device, SDK/provider, and visual evidence. Missing tools
produce NOT_RUN or UNAVAILABLE, never a successful verification.
For icons, agree on the requested catalog, name, source, color, and dimensions;
search and preview before generating. Run scripts/iconify_gen.sh for Iconify
(network + curl + a rasterizer) or scripts/generate_icons.swift for SF Symbols
(macOS). Resolve paths from this skill directory and pass the explicit consumer
catalog using --output. Verify 1x/2x/3x PNGs and Contents.json, then inspect the
2x PNG visually. These scripts generate in-app .imageset glyphs; an AppIcon
request needs its own size matrix. Generation grants no commit or publication
permission. Preserve external capability failures as non-pass evidence.
Completion
Report the resolved target/version and selected specialty; the resulting code,
review findings, build commands/configuration, three-layer test plan, or imageset
path; checks actually run and their verdicts; and unresolved compatibility,
privacy, device, or visual gaps. Each specialist procedure retains its output
and verification contract. A focused test result is separate from device or
Host acceptance.
1---2name: swift3description: 'Swift and iOS development, SwiftUI architecture, async tests, SDK privacy, Xcode/SPM builds, and asset-catalog icons. Use for Swift/iOS tasks or test, build, icon actions. Not for web/Android assets or general raster editing. Output: target-compatible implementation or review, verification evidence, or an imageset.'4metadata:5 source: https://skillmd.com/skills/hmj1026/swift6 dhpk-capability-id: dhpk.skill.swift7 dhpk-name-style: portable-family8 dhpk-invocation-class: implicit-eligible9---1011# Swift1213Use `$swift <task>`; optional `test`, `build`, and `icon` actions select the14same internal task paths. Complete the requested task with the smallest local15reference set; specialist references are procedures, not independent skills.1617## Resolve the target before loading18191. Establish the target package, Xcode project/scheme, or asset catalog from the20 request and project evidence. Ask and wait when a monorepo has several21 plausible targets. An intentional explicit target/version override wins;22 report the override separately from the observed configuration.232. For version-sensitive work read the target's `SWIFT_VERSION`,24 `SWIFT_STRICT_CONCURRENCY`, deployment target, and applicable Package.swift25 tools version. The installed `swift --version` is execution-environment26 evidence, not target compatibility. Preserve the precision of the evidence.273. Missing, conflicting, or broad incompatible constraints require a question28 and an answer before version-specific references or dependent actions. A29 migration needs an explicit destination version. For several destinations,30 group resources, changes, and verification by target.3132## Select only the task's resources3334| Task | Local procedure | Load additional references when needed |35| --- | --- | --- |36| Swift language/concurrency/errors | [language](references/language.md) | concurrency, value/reference, error handling; approachable-concurrency only for resolved Swift 6.2+ |37| SwiftUI state/navigation/interop | [UI](references/ui.md) | observation-state, navigation, mvvm-coordinator, interop |38| Test authoring and strategy (`test`) | [testing](references/testing.md) | swift-testing-api, xctest-bridging, xcuitest, snapshot-testing, test-taxonomy, protocol-di-host-testing |39| iOS SDK persistence/privacy/crypto/OCR | [platform](references/platform.md) | matching SDK reference only |40| Xcode/SPM/lint/CI (`build`) | [build](references/build.md) | swiftlint-config, xcodebuild-spm, scheme-signing |41| In-app symbol imageset (`icon`) | [icon](references/icon.md) | local icon scripts below |4243Language rules also apply to code produced by another path; load the relevant44language reference only if its compatibility or concurrency rules are needed.45Read local references from this skill directory. Project source/configuration46and external tools are explicit task inputs; a missing bundled resource is47`BLOCKED`, not a reason to search an installed peer or repository module.4849## Actions and authority5051Implementation requests authorize scoped source/tests/configuration edits;52review and build/check requests stay read-only apart from explicit build outputs.53Run the project's test-first workflow for business behavior. Retain separate54local build, simulator/device, SDK/provider, and visual evidence. Missing tools55produce `NOT_RUN` or `UNAVAILABLE`, never a successful verification.5657For icons, agree on the requested catalog, name, source, color, and dimensions;58search and preview before generating. Run `scripts/iconify_gen.sh` for Iconify59(network + curl + a rasterizer) or `scripts/generate_icons.swift` for SF Symbols60(macOS). Resolve paths from this skill directory and pass the explicit consumer61catalog using `--output`. Verify 1x/2x/3x PNGs and Contents.json, then inspect the622x PNG visually. These scripts generate in-app `.imageset` glyphs; an AppIcon63request needs its own size matrix. Generation grants no commit or publication64permission. Preserve external capability failures as non-pass evidence.6566## Completion6768Report the resolved target/version and selected specialty; the resulting code,69review findings, build commands/configuration, three-layer test plan, or imageset70path; checks actually run and their verdicts; and unresolved compatibility,71privacy, device, or visual gaps. Each specialist procedure retains its output72and verification contract. A focused test result is separate from device or73Host acceptance.