swift-coding-standards

Enforce Swift naming, formatting, access control, and error handling conventions.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/kleon6436/GitHubCopilotSettings --skill swift-coding-standards-kleon6436
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: swift-coding-standards
Source: https://github.com/kleon6436/GitHubCopilotSettings/tree/main/skills/swift-coding-standards
Command: npx skills add https://github.com/kleon6436/GitHubCopilotSettings --skill swift-coding-standards-kleon6436

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

このスキルは Swift コードのコーディング規約を定義・適用することで、コードの一貫性と品質を保ち、コードレビューの負荷を低減します。

Core Features & Use Cases

  • 型・プロトコル・列挙型の命名規則として UpperCamelCase の使用を推奨します。
  • 変数・定数・関数・メソッドには lowerCamelCase を適用し、ブール値には is/has/can などのプレフィックスを使います。
  • フォーマット・アクセス制御・エラーハンドリング・コメント規約など、Swift コードの主要スタイルと規範を統一します。
  • Use Case: 大規模な Swift プロジェクトにおいて、統一されたスタイルで読解性と保守性を向上させます。

Quick Start

プロジェクトにこの規約を適用して、型名は UpperCamelCase、変数名は lowerCamelCase、適切なアクセス制御とコメント規約を守ってください。

Frequently Asked Questions about swift-coding-standards

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

FAQPage Schema
How do I enforce Swift coding standards for naming and formatting?▼

To enforce Swift coding standards, apply UpperCamelCase for types and protocols, lowerCamelCase for variables and methods, and use 4-space indentation with a 120-character limit.

What are the best practices for Swift error handling and optional unwrapping?▼

Swift error handling best practices involve consistent optional handling and strict error propagation rules to ensure code safety and reduce runtime crashes during execution.

How do I apply Swift access control rules during a code review?▼

To apply Swift access control rules during code reviews, verify appropriate access modifiers and ensure consistent documentation comments are used across all new implementations and refactoring tasks.

Can I use these coding conventions for large Swift projects?▼

Yes, you can use these coding conventions for large Swift projects to improve readability and maintainability, ensuring a unified style across the entire codebase and reducing review overhead.

What is the correct brace style and indentation for Swift code?▼

The correct Swift brace style is K&R, utilizing 4 spaces for indentation and strictly maintaining a maximum line length of 120 characters to ensure consistent formatting.