Swift rules

From softspark/ai-toolkit · View interactive version

Swift rules is an AI agent skill from the GitHub repository softspark/ai-toolkit. Swift coding rules: style, patterns, security, testing. Triggers: .swift, Package.swift, .xcodeproj, SwiftUI, Combine, async/await, XCTest.

How to use this skill

Skill file

Swift Rules

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.

Swift Coding Style

Naming

Types

Optionals

Properties

Functions

Access Control

Formatting

Swift Frameworks

SwiftUI

UIKit (Legacy / Hybrid)

Combine

Swift Data

Core Data (Legacy)

Vapor (Server-Side)

Networking

Package Management

Swift Patterns

Error Handling

Protocol-Oriented Design

Async/Await

Actors

SwiftUI Patterns

Codable

Dependency Injection

Anti-Patterns

Swift Security

Keychain

App Transport Security (ATS)

Input Validation

Data Protection

Authentication

Network Security

Code Security

Dependency Security

Swift Testing

Framework

File Naming

Structure (Swift Testing)

Structure (XCTest)

Async Testing

Mocking

UI Testing (XCTest)

Best Practices

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.