skills/swift_structure/SKILL.md
Swift language structures including collections, optionals, closures, generics, control flow, and core language features.
npx skillsauth add swiftzilla/skills swift_structureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill covers Swift's core language structures and features for building robust applications.
Swift structure skills cover the fundamental building blocks of the language: collections, optionals, control flow, closures, and other essential language features.
| Collection | Order | Duplicates | Use When | |------------|-------|------------|----------| | Array | Ordered | Allowed | Indexed access needed | | Dictionary | Unordered | Keys unique | Key-based lookup | | Set | Unordered | Not allowed | Uniqueness required |
// Optional binding
if let value = optional { }
guard let value = optional else { return }
// Nil coalescing
let value = optional ?? defaultValue
// Optional chaining
let result = object?.property?.method()
array.map { $0 * 2 } // Transform
array.filter { $0 > 0 } // Select
array.reduce(0, +) // Combine
array.compactMap { Int($0) } // Transform + remove nil
array.flatMap { $0 } // Flatten
Each reference file contains detailed information, code examples, and best practices for specific topics. Visit https://swiftzilla.dev for comprehensive Swift documentation.
tools
Use this skill when you need expert Swift/iOS architectural guidance, semantic codebase analysis, or PR impact reviews. It provides a senior mentor layer for Swift (SwiftUI, UIKit, Combine, Concurrency) and a semantic engine to query local code context. Trigger this skill to: 1. Validate architectural patterns before implementation using 'ask'. 2. Find and map local code dependencies using 'context'. 3. Analyze the risk and blast radius of a PR using 'review'. 4. Generate system overviews for onboarding using 'onboard'. 5. Troubleshoot runtime crashes with semantic LLDB tools using 'debug'. Activate even if specific keywords are missing but the intent is improving Swift code quality or understanding project structure.
development
Swift Testing framework for unit tests, integration tests, and async testing with modern syntax.
development
SwiftUI framework concepts including property wrappers, state management, and reactive UI patterns.
development
Swift style guidelines covering naming conventions, code organization, and best practices for writing idiomatic Swift code.