This skill helps you write idiomatic Swift by applying naming, organization, and best-practice guidelines for clean, maintainable code.
npx playbooks add skill swiftzilla/skills --skill swift_style
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.
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.