lang-swift

Enforce Google Swift Style and modern Swift practices for consistent code.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/dragoscirjan/opencode-config --skill lang-swift
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lang-swift
Source: https://github.com/dragoscirjan/opencode-config/tree/main/skills/lang-swift
Command: npx skills add https://github.com/dragoscirjan/opencode-config --skill lang-swift

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams write Swift code that is consistent, safe, and easy to maintain by turning style and architectural preferences into clear guidance.

Core Features & Use Cases

  • Style Guidance: Follow Google Swift Style for readable, idiomatic code.
  • Tooling Alignment: Use swift-format, SwiftLint, and XCTest or Swift Testing to keep code and tests consistent.
  • Modern Swift Practices: Prefer structs, protocol-oriented design, Result, throws, guard let, async/await, Actors, and Codable.
  • Use Case: Apply it when reviewing a new Swift feature, refactoring a model layer, or setting project-wide conventions for a team.

Quick Start

Ask the assistant to review or write Swift code using this skill and apply its standards to the current task.

Frequently Asked Questions about lang-swift

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

FAQPage Schema
How do I enforce a consistent Swift code style across my iOS team?

Standardize Swift code style by adopting Google Swift Style alongside swift-format and SwiftLint to enforce consistent formatting, safety, and architectural conventions across iOS, macOS, and server-side Swift projects.

What is the best way to structure Swift models for maintainability?

The best way to structure Swift models for maintainability is using a struct-first design combined with protocol-oriented patterns and Codable serialization to ensure safe, clean, and maintainable data layers.

How do I handle errors and asynchronous operations in modern Swift?

Handle errors and asynchronous operations in modern Swift by using Result, throws, guard let, and async/await concurrency with Actors to build safe, reliable, and concurrent application logic.

Does this Swift standardization approach support server-side Swift and macOS tooling?

Yes, this Swift standardization approach supports server-side Swift and macOS tooling scenarios, ensuring style, safety, concurrency, and serialization choices remain consistent across application, library, and tooling environments.

Can I use Swift Testing instead of XCTest for consistent test practices?

Yes, you can use either Swift Testing or XCTest to keep code and tests consistent, standardizing your Swift testing practices while aligning with modern tooling and safety conventions.