/ 目錄 / 演練場 / Axiom (xOS Dev Skills)
● 社群 CharlesWiltgen ⚡ 即開即用

Axiom (xOS Dev Skills)

作者 CharlesWiltgen · CharlesWiltgen/Axiom

不會與 Swift 6 打架的 Apple 平台開發 — 涵蓋 SwiftUI、結構化並發、@Observable 及現代建置工具的固定見解 skills。

Axiom 是一個用於在 iOS/iPadOS/watchOS/tvOS 上交付正式應用程式的 Claude Code skill 套件。它強制執行現代慣例:SwiftUI 優先、@Observable 取代 ObservableObject、async/await 取代 completion handler、值類型,以及 Swift 6 並發規則。包含無障礙功能檢查、App Store 準備度,以及 Xcode 專案衛生。

為什麼要用

核心特性

即時演示

實際使用效果

就緒

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "axiom-xos-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/CharlesWiltgen/Axiom",
        "~/.claude/skills/axiom"
      ],
      "_inferred": true
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "axiom-xos-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/CharlesWiltgen/Axiom",
        "~/.claude/skills/axiom"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "axiom-xos-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/CharlesWiltgen/Axiom",
        "~/.claude/skills/axiom"
      ],
      "_inferred": true
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "axiom-xos-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/CharlesWiltgen/Axiom",
        "~/.claude/skills/axiom"
      ],
      "_inferred": true
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "axiom-xos-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/CharlesWiltgen/Axiom",
        "~/.claude/skills/axiom"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "axiom-xos-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/CharlesWiltgen/Axiom",
          "~/.claude/skills/axiom"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add axiom-xos-skill -- git clone https://github.com/CharlesWiltgen/Axiom ~/.claude/skills/axiom

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: Axiom (xOS Dev Skills)

將 ViewModel 遷移到 @Observable

👤 採用 iOS 17+ 的 iOS 開發者 ⏱ ~45 min advanced

何時使用: 應用程式支援 iOS 17+ 但 ViewModel 仍使用 ObservableObject + @Published。

前置條件
  • 已安裝 Skill — git clone https://github.com/CharlesWiltgen/Axiom ~/.claude/skills/axiom
  • 最低 iOS 17 部署目標 — 在專案設定中修改
步驟
  1. 盤點
    Axiom:列出專案中每個 ObservableObject + @Published。標記哪些是葉節點,哪些是共享的。✓ 已複製
    → 帶有形狀 + 相依提示的清單
  2. 遷移一個
    將 ProfileViewModel 重構為 @Observable。保持公開 API 穩定。更新其 View 消費者的 binding。✓ 已複製
    → VM 已遷移;View 中使用 @Bindable;沒有殘留 @Published
  3. 驗證
    為 scheme 執行 xcodebuild。回報任何警告。✓ 已複製
    → 乾淨建置;無 Swift 6 警告

結果: 現代的 @Observable 程式碼庫,View 更整潔。

注意事項
  • 現有測試依賴 @Published 投影($name) — 測試需要重寫;並非所有存取模式都能直接對應
搭配使用: filesystem · ios-simulator-mcp

修復 Swift 6 並發警告

👤 為 Swift 6 嚴格並發做準備的 iOS 開發者 ⏱ ~60 min advanced

何時使用: 建置時有大量 Sendable/actor 警告。

步驟
  1. 分類
    Axiom concurrency-clean:將警告分類為:(1)actor 隔離、(2)Sendable 一致性、(3)資料競爭風險。✓ 已複製
    → 分類清單
  2. 修復 actor 隔離
    先處理第 1 類。提議最小化修復;偏好在 UI 類型上使用 @MainActor,而非全域隔離。✓ 已複製
    → 手術式修改;不是大面積撒 @MainActor

結果: 乾淨的 Swift 6 建置,具有刻意設計的並發邊界。

注意事項
  • 用 @MainActor 作為「消除警告」的捷徑 — Skill 會標記這個;改用適當的 actor 設計

執行無障礙功能稽核

👤 發版前的 iOS 團隊 ⏱ ~60 min intermediate

何時使用: 即將提交 App Store;你想確保 VoiceOver/Dynamic Type 都有涵蓋到。

步驟
  1. 掃描 View
    Axiom a11y:掃描 SwiftUI View。標記缺少 accessibilityLabel、硬編碼字型大小、低對比度顏色用法。✓ 已複製
    → 每個 View 的問題清單
  2. 修補前 10 個問題
    套用前 10 個問題的修復。Dynamic Type 使用系統字型。✓ 已複製
    → 修補已套用;建置仍然乾淨

結果: 應用程式通過基本的 VoiceOver 操作測試。

注意事項
  • 自動生成的標籤與使用者心理模型不符 — 以能表達意圖的標籤覆寫
搭配使用: ios-simulator-mcp

組合

與其他 MCP 搭配,撬動十倍槓桿

axiom-xos-skill + ios-simulator-mcp

套用 Skill 建議 + 在模擬器上冒煙測試

Axiom:遷移 ProfileVM。然後 iOS-Simulator:啟動、截取個人資料畫面。✓ 已複製
axiom-xos-skill + filesystem

跨專案套用修補程式

Axiom concurrency-clean:為 src/ 產生修補程式。Filesystem:套用它們。✓ 已複製
axiom-xos-skill + xcodebuildmcp

重構後的建置驗證

遷移後,XcodeBuild:為模擬器建置。回報警告。✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
vm_migrate_observable viewmodel_path 每個 VM 的遷移 0
concurrency_clean scope Swift 6 準備 0
a11y_scan scope 發版前 0
appstore_checklist (none) 提交前 0
xcode_hygiene project 定期清理 0

成本與限制

運行它的成本

API 配額
N/A
每次呼叫 Token 數
專案掃描 10k–40k token
費用
免費
提示
將稽核範圍限定在一個功能/資料夾;不要對整個大型應用程式進行扇出

安全

權限、密鑰、影響範圍

最小權限: filesystem-read filesystem-write
憑證儲存:
資料出站:

故障排查

常見錯誤與修復

遷移破壞了 @Bindable 用法

部分 View 需要 @Bindable 包裝器;確認 Skill 沒有漏掉

並發修復無聲地改變了語意

遷移後務必執行測試;並發修改很微妙

無障礙功能建議感覺很樣板化

Skill 遵循 Apple HIG;用你自己的標籤收緊

替代方案

Axiom (xOS Dev Skills) 對比其他方案

替代方案何時用它替代權衡
AvdLee Swift Concurrency Skill你只需要並發,不需要更廣泛的套件範圍較窄
Apple 自己的 Swift Migrator你想要 Apple 認可的遷移互動性較低;對專案的感知度較低
twostraws SwiftUI Agent Skill只聚焦於 SwiftUI不同的個人見解

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills