skills/swift_style/SKILL.md
Swift style guidelines covering naming conventions, code organization, and best practices for writing idiomatic Swift code.
npx skillsauth add swiftzilla/skills swift_styleInstall 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 provides comprehensive style guidelines for writing clean, idiomatic, and maintainable Swift code.
Swift style guidelines cover naming conventions, access control, type selection, and code organization patterns that make your code more readable and professional.
var vs let, naming conventions, immutabilitypublic, private, internal, fileprivate, open| Category | Case | Example |
|----------|------|---------|
| Types & Protocols | UpperCamelCase | String, UIViewController |
| Variables, Functions | lowerCamelCase | userID, fetchData() |
| Boolean Properties | is, has, should | isEmpty, hasPermission |
| Constants | lowerCamelCase | maxConnections |
Need identity or reference semantics?
├── YES → Use Class
└── NO → Need inheritance?
├── YES → Use Class
└── NO → Modeling finite states?
├── YES → Use Enum
└── NO → Use Struct (default)
| Modifier | Visibility | Use When |
|----------|------------|----------|
| private | Enclosing declaration | Strict encapsulation |
| fileprivate | Same file | File-local helpers |
| internal (default) | Same module | Implementation details |
| public | Everywhere | Public API |
| open | Everywhere + subclassable | Extensible frameworks |
let by default - Only use var when mutation neededEach 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.
tools
Swift language structures including collections, optionals, closures, generics, control flow, and core language features.