Swiftui Expert Skill
AFK-surf/OpenBridge
Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, modern APIs, Swift concurrency, and iOS 26+ Liquid Glass adoption.
Swift coding rules: style, patterns, security, testing. An agent skill from softspark/ai-toolkit.
$ npx skills add softspark/ai-toolkit --skill swift-rules -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install softspark/ai-toolkit swift-rules --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/app/skills/swift-rules .claude/skills/swift-rules && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "swift-rules" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/swift-rules into .claude/skills/swift-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-rules", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/softspark/ai-toolkit/tree/main/app/skills/swift-rulesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add softspark/ai-toolkit --skill swift-rules -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install softspark/ai-toolkit swift-rules --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .agents/skills && cp -r skills-src/app/skills/swift-rules .agents/skills/swift-rules && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "swift-rules" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/swift-rules into .agents/skills/swift-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-rules", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add softspark/ai-toolkit --skill swift-rules -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install softspark/ai-toolkit swift-rules --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/app/skills/swift-rules .cursor/skills/swift-rules && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "swift-rules" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/swift-rules into .cursor/skills/swift-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-rules", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/softspark/ai-toolkit.git --path app/skills/swift-rules--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add softspark/ai-toolkit --skill swift-rules -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install softspark/ai-toolkit swift-rules --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/app/skills/swift-rules .gemini/skills/swift-rules && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "swift-rules" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/swift-rules into .gemini/skills/swift-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-rules", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install softspark/ai-toolkit swift-rulesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add softspark/ai-toolkit --skill swift-rules -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .github/skills && cp -r skills-src/app/skills/swift-rules .github/skills/swift-rules && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "swift-rules" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/swift-rules into .github/skills/swift-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-rules", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add softspark/ai-toolkit --skill swift-rules -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install softspark/ai-toolkit swift-rules --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/app/skills/swift-rules .opencode/skills/swift-rules && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "swift-rules" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/swift-rules into .opencode/skills/swift-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-rules", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
swift-rulesSwift coding rules: style, patterns, security, testing. An agent skill from softspark/ai-toolkit.
Swift Rules is an agent skill from softspark/ai-toolkit. Swift coding rules: style, patterns, security, testing. Triggers: .swift, Package.swift, .xcodeproj, SwiftUI, Combine, async/await, XCTest.
Its SKILL.md is about 3.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Mobile, covering iOS development. It works with SwiftUI and Swift. The repository describes itself as: Professional-grade AI coding toolkit: 94 skills, 44 agents, multi-platform (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Antigravity, Codex CLI… The licence is Apache-2.0.
Read from SKILL.md and the folder at commit d64db2b. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadFrom allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
swiftxcodebuildFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Swift Rules loads about 3.5k tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 1,659 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from softspark/ai-toolkit at commit d64db2b, republished under its Apache-2.0 licence (© softspark). 1,659 words, ~3,544 tokens.
.claude/skills/swift-rules/SKILL.md (or your agent's skills folder).These rules come from app/rules/swift/ in ai-toolkit. They cover
the project's standards for coding style, frameworks, patterns,
security, and testing in Swift. Apply them when writing or
reviewing Swift code.
NS or UI prefix for your types).removeElement(at:) not remove(i:).isEmpty, hasChildren, canSubmit.struct over class by default (value semantics, no reference cycles).class only when reference semantics or inheritance is required.enum with associated values for modeling finite states.protocol for defining capabilities. Prefer protocol composition.typealias for complex generic signatures for readability.guard let for early exit on nil. Use if let for conditional binding.!) unless failure is a programming error.?? for default values: let name = user?.name ?? "Unknown".user?.address?.city.map / flatMap on optionals for transformations.let by default. Use var only when mutation is required.var fullName: String { ... }.willSet, didSet) for side effects on change.lazy var for expensive initialization deferred until first access.@Published (Combine) for observable properties in classes.func move(from source: Int, to destination: Int).func contains(_ element: T).throws / async throws for fallible operations.private for implementation details. Use fileprivate sparingly.internal (default) for module-scoped access.public for framework API. Use open only when subclassing is intended.private(set) for read-only external access with internal mutation..swiftlint.yml and .swiftformat to the repository.VStack, HStack, ZStack for layout composition.List with ForEach for dynamic content. Use LazyVStack for large lists.NavigationStack (iOS 16+) with navigationDestination(for:) for type-safe navigation..task { } modifier for async data loading tied to view lifecycle.@ViewBuilder for conditional view composition in custom containers.PreviewProvider or #Preview macro for rapid UI iteration.UIHostingController to embed SwiftUI views in UIKit.UIViewRepresentable to wrap UIKit views in SwiftUI.UIStackView for layout.UICollectionViewCompositionalLayout for complex collection layouts.Coordinator pattern for delegate-based UIKit interop in SwiftUI.Publisher / Subscriber for reactive data streams.sink for subscribing. Store cancellables in Set<AnyCancellable>.map, filter, flatMap, combineLatest for stream transformation.@Published on class properties for automatic publisher generation.AsyncSequence (async/await) over Combine for new code.@Model macro for persistent model definitions.@Query in SwiftUI views for automatic fetching and observation.ModelContext for CRUD operations: context.insert(item), context.delete(item).#Predicate macro for type-safe query filtering.ModelConfiguration for custom store locations and migration options.NSPersistentContainer for stack setup.NSFetchRequest with NSPredicate for querying.performBackgroundTask for background context operations.routes.get("users") for route definitions.Content protocol for request/response body codable conformance.async/await natively (Vapor 4+ is fully async).URLSession with async/await for HTTP requests.Codable with JSONDecoder for response parsing.URLCache and ETag for response caching.timeoutIntervalForRequest on URLSessionConfiguration.TaskLocal for request-scoped values (tracing, auth context).Package.swift with exact version or version ranges.Package.resolved committed to the repository for reproducible builds.enum AppError: Error for typed, exhaustive error handling.throws functions with do-catch for recoverable errors.Result<Success, Failure> for asynchronous error propagation.try? for optional conversion. Use try! only in tests or guaranteed paths.LocalizedError conformance for user-facing error messages.protocol Fetchable { func fetch() async throws -> Data }.func process(_ item: Sendable & Codable).associatedtype Output.some Protocol (opaque types) for return types hiding concrete implementations.async functions for all asynchronous operations.async let for concurrent, independent operations.TaskGroup for dynamic parallelism with collected results.Task { } to bridge sync to async. Avoid .task { } in views for complex logic.withThrowingTaskGroup for concurrent operations that can fail.actor for thread-safe mutable state (replaces manual locks).@MainActor for UI-related state and methods.nonisolated for actor methods that do not access mutable state.GlobalActor for custom isolation domains.await calls on actors to reduce suspension points.@State for view-local mutable state.@Binding for child-to-parent state communication.@Observable (Observation framework) for model objects (preferred over @ObservedObject).@Environment for dependency injection: @Environment(\.modelContext).ViewModifier for reusable view transformations.Codable for JSON serialization/deserialization.CodingKeys enum for custom key mapping.JSONDecoder with .convertFromSnakeCase for API compatibility.@propertyWrapper for custom decoding strategies (e.g., date formats).nestedContainer for flattening nested JSON structures.@Environment in SwiftUI for framework-provided values.swift-dependencies library for testable, controlled dependency management.@Dependency(\.apiClient) var apiClient for automatic resolution.guard let or ??.[weak self] in closures capturing self.Task or DispatchQueue.global().kSecAttrAccessibleWhenUnlockedThisDeviceOnly for sensitive items.KeychainAccess or similar wrapper libraries for cleaner API.UserDefaults (unencrypted plist on disk).NSAllowsArbitraryLoads exception.URLSessionDelegate for custom pinning.NSRegularExpression or Swift Regex for pattern validation.UITextField / TextField to prevent abuse.Data Protection API: set FileProtectionType.complete on sensitive files.CryptoKit for hashing (SHA256), encryption (AES.GCM), and signing.SecureEnclave for hardware-backed key storage on supported devices.withUnsafeMutableBytes { $0.initializeMemory(as: UInt8.self, repeating: 0) }.@Sendable closures to prevent data races in concurrent access.AuthenticationServices for Sign in with Apple and passkeys.LocalAuthentication (Face ID / Touch ID) for biometric auth.URLSession with certificate pinning for sensitive API calls.Content-Type headers before parsing.Codable for structured deserialization (prevents injection).[weak self] in closures to prevent retain cycles and memory leaks.@Sendable and actor isolation for thread-safe concurrent code.UnsafePointer / UnsafeMutablePointer unless absolutely necessary.#if DEBUG guards for debug-only code. Never ship debug features.Package.resolved.Package.swift of dependencies for unusual build plugins.import Testing) for new projects (Swift 5.10+).FooTests.swift in Tests/ target.@Test attribute (Swift Testing) or test prefix (XCTest) for test methods.@Suite (Swift Testing) for test grouping.@Test("description") for individual test cases.@Test(arguments: [...]) for parameterized tests.#expect(condition) for assertions. Use #require(condition) for preconditions.#expect(throws: FooError.self) { try riskyOperation() } for error testing.@Suite structs for grouping. Properties serve as shared setup.setUp() / tearDown() for per-test initialization and cleanup.setUpWithError() for throwing setup code.XCTAssertEqual, XCTAssertTrue, XCTAssertNil for assertions.XCTAssertThrowsError for exception testing.expectation(description:) + wait(for:timeout:) for async assertions.async test functions: @Test func fetchUser() async throws { ... }.confirmation() (Swift Testing) for event-based async assertions.XCTestExpectation with fulfillment() for callback-based async.AsyncSequence with for await loops and assertion on collected values.swift-dependencies for environment-controlled dependency overrides.@Dependency property wrapper for automatic mock injection in tests.XCUIApplication for UI automation tests.app.buttons["Submit"].tap() for interaction simulation.waitForExistence(timeout:) for async UI element appearance.@testable import when possible.@testable import Module only when testing internal members is necessary.withDependencies { } for scoped dependency overrides in tests.swift test or xcodebuild test in CI.© softspark, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in app/skills/swift-rules of softspark/ai-toolkit.
Open the folder on GitHubat commit d64db2b
Swift Rules next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Swift Rules this skillsoftspark/ai-toolkit | 179 | — | ~3.5k | Automated safety check: Pass | Apache-2.0 | |
| Swiftui Expert SkillAFK-surf/OpenBridge | 430 | 2 repos | ~3.9k | Automated safety check: Pass | MIT | |
| macOS DevelopmentKartikLabhshetwar/better-shot | 2.4k | 2 repos | ~735 | Automated safety check: Pass | Custom licence | |
| Implement Featuretddworks/SkillsManager | 169 | — | ~2.6k | Automated safety check: Pass | None | |
| Swiftui AnimationAstraFoundry/KumoApp | 290 | — | ~4.1k | Automated safety check: Pass | AGPL-3.0 | |
| Implement Featuretddworks/ClaudeBar | 1.5k | — | ~4.1k | Automated safety check: Pass | Apache-2.0 |
AFK-surf/OpenBridge
Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, modern APIs, Swift concurrency, and iOS 26+ Liquid Glass adoption.
KartikLabhshetwar/better-shot
Comprehensive macOS development guidance including Swift 6+, SwiftUI, SwiftData, architecture patterns, AppKit bridging, and macOS 26 Tahoe APIs.
tddworks/SkillsManager
Guide for implementing features following architecture-first design, TDD, rich domain models, and Swift 6.2 patterns.
AstraFoundry/KumoApp
Implement, review, or improve SwiftUI animations and transitions.
tddworks/ClaudeBar
Guide for implementing features in ClaudeBar following architecture-first design, TDD, rich domain models, and Swift 6.2 patterns.
microsoft/SwiftStreamingMarkdown
Record and validate swift-snapshot-testing snapshots in the SwiftStreamingMarkdown package: regenerate reference PNGs, run snapshot tests, and diff failed snapshots.
softspark/ai-toolkit
Prepare or verify a project QA environment with source identity, readiness, browser access, evidence paths and owned cleanup.
softspark/ai-toolkit
Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. An agent skill from softspark/ai-toolkit.
softspark/ai-toolkit
Analyzes code quality, complexity, patterns across codebase.
softspark/ai-toolkit
Drives a brief, specification, issue or existing PR through implementation, review, tests and QA to a ready PR.
softspark/ai-toolkit
Direct technical voice for docs, README, user-facing text. An agent skill from softspark/ai-toolkit.
softspark/ai-toolkit
Detect/generate/debug CI pipeline config (GitHub Actions, GitLab CI).
Categories
Swift coding rules: style, patterns, security, testing. An agent skill from softspark/ai-toolkit. Swift Rules is an agent skill from softspark/ai-toolkit. Swift coding rules: style, patterns, security, testing.
Swift Rules fits situations like: tasks that involve iOS development.
Run `npx skills add softspark/ai-toolkit --skill swift-rules -a claude-code`. Or copy the skill folder (app/skills/swift-rules in softspark/ai-toolkit) into .claude/skills/swift-rules in your project. Claude Code loads it when a task matches its description.
Run `npx skills add softspark/ai-toolkit --skill swift-rules -a codex`. Or copy the skill folder (app/skills/swift-rules in softspark/ai-toolkit) into .agents/skills/swift-rules in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add softspark/ai-toolkit --skill swift-rules -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/swift-rules, .gemini/skills/swift-rules, .github/skills/swift-rules and .opencode/skills/swift-rules in your project.
Going by SKILL.md and its folder, Swift Rules needs the command-line tools its instructions call (swift and xcodebuild). Its frontmatter pre-approves these tools: Read.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Swift Rules is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.5k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Swift Rules: Swiftui Expert Skill (AFK-surf/OpenBridge, 430 stars), macOS Development (KartikLabhshetwar/better-shot, 2.4k stars), Implement Feature (tddworks/SkillsManager, 169 stars) and Swiftui Animation (AstraFoundry/KumoApp, 290 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
softspark (a GitHub user) maintains it in softspark/ai-toolkit, which has 179 GitHub stars. The repository holds 112 skills in this directory. The repository was last updated on October 7, 2026.
Source: softspark/ai-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.