بنقرة واحدة
swift-guidelines
Official coding standards and best practices derived from Xcode's internal AI chat templates.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Official coding standards and best practices derived from Xcode's internal AI chat templates.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | swift-guidelines |
| description | Official coding standards and best practices derived from Xcode's internal AI chat templates. |
| version | 1 |
| license | MIT |
This skill encapsulates the official coding standards and best practices used by Apple's Xcode IDEIntelligenceChat engine. It serves as the definitive guide for writing modern, compliant Swift code.
Language & Framework Preference:
Concurrency Model:
async/await, actors, Task) over legacy tools like GCD (DispatchQueue) or Combine, unless the existing codebase heavily relies on them.Testing Strategy:
import Testing) instead of XCTest for new test files.@Suite, @Test, and #expect.import Testing
@Suite("Math Tests")
struct MathTests {
@Test("Addition")
func testAddition() {
#expect(1 + 1 == 2)
}
}
Platform Terminology:
SwiftUI Previews Strategy:
#Preview.NavigationStack if the view uses .navigation*, .toolbar*, or .customizationBehavior.List if the view uses .list* modifiers or represents a row.@State or use constant bindings within the preview closure.static variables or globals over creating new instances for preview data (especially for Image/UIImage).@availability unless strictly required (e.g., using @Previewable).Documentation Style:
Code Editing & Generation:
TODOs or placeholders. Generate complete, working code.Tool Usage Protocol (Agentic Behavior):
grep_search, mcp_github_search_code) to find definitions.Tone & Style:
IDEIntelligenceChat.framework resources (Prompt Templates).