swift-language

Apply modern Swift language patterns and idioms to core code.

155|22|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/omarshahine/HomeClaw --skill swift-language-omarshahine
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swift-language
Source: https://github.com/omarshahine/HomeClaw/tree/main/.agents/skills/swift-language
Command: npx skills add https://github.com/omarshahine/HomeClaw --skill swift-language-omarshahine

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write more modern, efficient, and idiomatic Swift code by applying advanced language features and patterns.

Core Features & Use Cases

  • Modern Syntax: Leverage features like if/switch expressions, typed throws, and result builders.
  • Type System: Understand and utilize opaque/existential types, property wrappers, and the Never type.
  • Data Handling: Master Codable best practices, modern collection APIs, and FormatStyle for dates/numbers.
  • Use Case: Refactor a complex conditional assignment into a concise if-expression, or implement a custom property wrapper to manage UserDefaults persistence.

Quick Start

Apply modern Swift language patterns and idioms for non-concurrency, non-SwiftUI code.

Frequently Asked Questions about swift-language

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use Swift if-expressions and typed throws to refactor conditional logic?

Swift if-expressions and typed throws refactor conditional logic by allowing inline assignments and specifying exact error types, producing concise core code for complex conditionals.

What's the best way to implement custom property wrappers for UserDefaults persistence?

Custom property wrappers manage UserDefaults persistence by encapsulating storage logic, exposing read/write operations through computed properties, and yielding reusable state variables.

How do I apply Swift Codable best practices for custom JSON encoding and decoding?

Swift Codable best practices handle custom JSON encoding by leveraging built-in format strategies, reducing manual parsing boilerplate, and yielding type-safe data models.

Does this cover Swift concurrency and SwiftUI patterns?

It explicitly excludes Swift concurrency and SwiftUI patterns, focusing solely on non-concurrency, non-SwiftUI core code involving generics, protocols, enums, and closures.

When should I use opaque types versus existential types in Swift generics?

Opaque types hide concrete return types preserving identity, while existential types work with heterogeneous values, distinguishing protocol conformance usage for flexible API design.

How do I build custom Regex builders and use FormatStyle for data parsing?

Swift Regex builders construct pattern-matching logic declaratively, while FormatStyle standardizes date and number formatting, producing type-safe parsed representations.