swiftzilla/skills

swift_style

Swift style guidelines covering naming conventions, code organization, and best practices for writing idiomatic Swift code.

First seen Jan 28, 2026

Installation

$ npx skills add swiftzilla/skills --skill swift_style

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from swiftzilla/skills · top by installs.

npx skills add swiftzilla/skills

Browse all from swiftzilla/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 7
License Proprietary
Default branch main
Open issues 1
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0
LicenseProprietary
CompatibilityAll Swift versions
More metadata
version
1.0
author
SwiftZilla
website
https://swiftzilla.dev

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,829 B
  • docs SUMMARY.md 142 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 37 installs

SKILL.md

Swift Style

This skill provides comprehensive style guidelines for writing clean, idiomatic, and maintainable Swift code.

Overview

Swift style guidelines cover naming conventions, access control, type selection, and code organization patterns that make your code more readable and professional.

Available References

Naming & Conventions

  • [Variables and Constants](./references/variables.md) - var vs let, naming conventions, immutability
  • [Functions](./references/functions.md) - Function naming, parameter labels, return types

Types & Protocols

  • [Types](./references/types.md) - Struct vs Class vs Enum, value vs reference semantics
  • [Protocols](./references/protocols.md) - Protocol-Oriented Programming (POP), composition, extensions

Code Organization

  • [Access Control](./references/access_control.md) - public, private, internal, fileprivate, open

Quick Reference

Naming Conventions

Category Case Example
Types & Protocols UpperCamelCase String, UIViewController
Variables, Functions lowerCamelCase userID, fetchData()
Boolean Properties is, has, should isEmpty, hasPermission
Constants lowerCamelCase maxConnections

Type Selection Guide

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)

Access Levels

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

Best Practices

  1. Default to structs - Use simplest type that expresses intent
  2. Use let by default - Only use var when mutation needed
  3. Prefer protocols over inheritance - More flexible composition
  4. Keep functions focused - Single responsibility
  5. Use access control - Expose only what's necessary
  6. Follow naming conventions - Descriptive, Swifty names

For More Information

Each reference file contains detailed information, code examples, and best practices for specific topics. Visit https://swiftzilla.dev for comprehensive Swift documentation.