axiom-apple-docs について
axiom-apple-docs は、Xcode に含まれる Apple の Markdown 文書と Swift コンパイラ診断を参照するためのガイドです。API やフレームワーク、コンパイルエラーの調査に使え、ローカル文書がない場合の代替手段も案内します。
主な機能
- 01Xcode 公式ドキュメントへの案内
- 02Swift コンパイラ診断の索引
- 03トピック別フレームワークガイドの検索
- 04Xcode 文書がない場合の代替策
活用シーン
- 01Apple API のシグネチャや挙動の確認
- 02Swift コンパイラ診断の理解
- 03フレームワークの公式ガイドの検索
- 04ローカルに Xcode 文書がない場合の調査継続
MCP 対応
README では、axiom-mcp の axiom_read_skill から同じ Xcode ファイルを取得でき、直接ファイルを読む方法の便宜的な選択肢になると説明しています。
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ charleswiltgen/ axiom --skill axiom-apple-docsインストール後、Claude Code で/axiom-apple-docsを入力して読み込まれたか確認します。
同梱ファイルskills/apple-docs-research.md
詳細
Apple Documentation Router
Apple は、LLM 向けの Markdown ドキュメントを Xcode に同梱しています。これらは、Apple のエンジニアが作成した、信頼性が高く最新のガイドおよび診断情報です。ファイルとして直接読み取ってください(Claude Code では Read ツールを使用します)。MCP サーバーや特別なツールは必要ありません。
使用する場面
- Apple の正確な API シグネチャや動作を確認する必要がある場合
- Axiom のスキルが Apple のフレームワークを参照しており、公式情報を確認したい場合
- Swift コンパイラの診断メッセージについて説明が必要な場合
- ユーザーが特定の Apple フレームワークの機能について質問した場合
優先順位:Axiom のスキルは、意見に基づいたガイダンス(判断フロー、アンチパターン、プレッシャーシナリオ)を提供します。Apple のドキュメントは、信頼できる API の詳細を提供します。両方を組み合わせて使用してください。
ドキュメントの読み方
Axiom のセッションコンテキストには、ユーザーが切り替えた Xcode が記載されています。Claude Code では、文字どおりのベースディレクトリが表示されます(「Apple for-LLM Documentation: Xcode detected at <path>」)。その他のハーネスでは、アプリ名が表示されます(「Installed on this machine: Xcode … (<path>)」)。下の表で /Applications/Xcode.app の代わりに、その .app を使用してください。<base>/<filename> をファイルとして読み取ります(Claude Code では Read ツールを使用します)。
デフォルトの Xcode の場所(/Applications/Xcode.app)のベースディレクトリ:
| 内容 | ベースディレクトリ |
|---|---|
| AdditionalDocumentation ガイド | /Applications/Xcode.app/Contents/PlugIns/IDEIntelligenceChat.framework/Versions/A/Resources/AdditionalDocumentation/ |
| Swift コンパイラの診断情報 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/doc/swift/diagnostics/ |
Claude が生成する呼び出しの例:
Read /Applications/Xcode.app/Contents/PlugIns/IDEIntelligenceChat.framework/Versions/A/Resources/AdditionalDocumentation/SwiftUI-Implementing-Liquid-Glass-Design.md
これらのパスはデフォルトのインストール先を想定しています。代わりに、セッションコンテキストに記載されたパスを使用してください。セッションコンテキストがない場合は、AXIOM_XCODE_PATH が設定されていればそれを使用してください。設定されていない場合は xcode-select -p を実行します(DEVELOPER_DIR を尊重します)。このコマンドは <Xcode>.app/Contents/Developer を出力します。/Contents/Developer を取り除き、その .app を上記の /Applications/Xcode.app の代わりに使用してください。/Library/Developer/CommandLineTools が出力された場合、Xcode は選択されていません。/Applications/Xcode.app を試してください。
ガイドファイル(AdditionalDocumentation)
20 個のファイルがあります。{guides base}/{filename} のパスパターンを使って読み取ってください。
UI とデザイン
| トピック | ファイル名 |
|---|---|
| SwiftUI の Liquid Glass | SwiftUI-Implementing-Liquid-Glass-Design.md |
| UIKit の Liquid Glass | UIKit-Implementing-Liquid-Glass-Design.md |
| AppKit の Liquid Glass | AppKit-Implementing-Liquid-Glass-Design.md |
| WidgetKit の Liquid Glass | WidgetKit-Implementing-Liquid-Glass-Design.md |
| SwiftUI の新しいツールバー機能 | SwiftUI-New-Toolbar-Features.md |
| SwiftUI のスタイル付きテキスト編集 | SwiftUI-Styled-Text-Editing.md |
| SwiftUI と WebKit の統合 | SwiftUI-WebKit-Integration.md |
| SwiftUI と AlarmKit の統合 | SwiftUI-AlarmKit-Integration.md |
| Swift Charts の 3D ビジュアライゼーション | Swift-Charts-3D-Visualization.md |
| Foundation AttributedString の更新 | Foundation-AttributedString-Updates.md |
データと永続化
| トピック | ファイル名 |
|---|---|
| SwiftData のクラス継承 | SwiftData-Class-Inheritance.md |
並行処理とパフォーマンス
| トピック | ファイル名 |
|---|---|
| Swift の並行処理の更新 | Swift-Concurrency-Updates.md |
| InlineArray と Span | Swift-InlineArray-Span.md |
Apple Intelligence
| トピック | ファイル名 |
|---|---|
| Foundation Models(デバイス上の LLM) | FoundationModels-Using-on-device-LLM-in-your-app.md |
システム統合
| トピック | ファイル名 |
|---|---|
| App Intents の更新 | AppIntents-Updates.md |
| StoreKit の更新 | StoreKit-Updates.md |
| MapKit GeoToolbox PlaceDescriptors | MapKit-GeoToolbox-PlaceDescriptors.md |
| visionOS 向けウィジェット | Widgets-for-visionOS.md |
アクセシビリティ
| トピック | ファイル名 |
|---|---|
| iOS の Assistive Access | Implementing-Assistive-Access-in-iOS.md |
コンピュータービジョン
| トピック | ファイル名 |
|---|---|
| iOS の Visual Intelligence | Implementing-Visual-Intelligence-in-iOS.md |
Swift Compiler Diagnostics
diagnostics ディレクトリには 46 個のファイルがあります。{diagnostics base}/{filename} のパスパターンを使用して読み取ります。
Concurrency Diagnostics
| Diagnostic | Filename |
|---|---|
| 非隔離コンテキストからのアクター隔離された呼び出し | actor-isolated-call.md |
| 適合性の隔離 | conformance-isolation.md |
| 隔離された適合性 | isolated-conformances.md |
| デフォルトで非隔離かつ非送信 | nonisolated-nonsending-by-default.md |
| Sendable クロージャのキャプチャ | sendable-closure-captures.md |
| Sendable メタタイプ | sendable-metatypes.md |
| 明示的な Sendable 注釈 | explicit-sendable-annotations.md |
| sending クロージャによるデータ競合のリスク | sending-closure-risks-data-race.md |
| sending によるデータ競合のリスク | sending-risks-data-race.md |
| 可変グローバル変数 | mutable-global-variable.md |
| preconcurrency インポート | preconcurrency-import.md |
| 動的排他制御 | dynamic-exclusivity.md |
| 排他制御違反 | exclusivity-violation.md |
Type System Diagnostics
| Diagnostic | Filename |
|---|---|
| Existential any | existential-any.md |
| Existential のメンバーアクセスの制限 | existential-member-access-limitations.md |
| 名目的型 | nominal-types.md |
| 多重継承 | multiple-inheritance.md |
| プロトコル型の適合性なし | protocol-type-non-conformance.md |
| 不透明型の推論 | opaque-type-inference.md |
| 外部参照型 | foreign-reference-type.md |
Build & Migration Diagnostics
| Diagnostic | Filename |
|---|---|
| 非推奨の宣言 | deprecated-declaration.md |
| 将来の Swift バージョンでのエラー | error-in-future-swift-version.md |
| 厳格な言語機能 | strict-language-features.md |
| 厳格なメモリ安全性 | strict-memory-safety.md |
| 実装のみのインポートが非推奨 | implementation-only-deprecated.md |
| メンバーのインポート可視性 | member-import-visibility.md |
| 既知のパスにモジュールがない | missing-module-on-known-paths.md |
| モジュールをテスト可能にできない | module-not-testable.md |
| モジュールバージョンがない | module-version-missing.md |
| Clang 宣言のインポート | clang-declaration-import.md |
| 可用性の未認識の名前 | availability-unrecognized-name.md |
| 常に利用可能なドメイン | always-available-domain.md |
| 今後追加される言語機能 | upcoming-language-features.md |
| 未知の警告グループ | unknown-warning-group.md |
| コンパイルのキャッシュ | compilation-caching.md |
| 組み込み環境での制約 | embedded-restrictions.md |
Swift Language Diagnostics
| Diagnostic | Filename |
|---|---|
| 動的呼び出し可能要件 | dynamic-callable-requirements.md |
| プロパティラッパーの要件 | property-wrapper-requirements.md |
| 結果ビルダーのメソッド | result-builder-methods.md |
| 文字列補間の適合性 | string-interpolation-conformance.md |
| 末尾クロージャの照合 | trailing-closure-matching.md |
| 一時ポインター | temporary-pointers.md |
| 意味的コピー | semantic-copies.md |
| パフォーマンスのヒント | performance-hints.md |
Index
| Diagnostic | Filename |
|---|---|
| 診断グループ(分類体系) | diagnostic-groups.md |
| すべての診断のインデックス | diagnostics.md |
必要な診断が上記にない場合は、まず diagnostics ディレクトリの一覧を取得してください。
ls "<Xcode>.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/doc/swift/diagnostics/"
<Xcode>.app はアプリのセッションコンテキスト名です。セッションコンテキストがない場合は、上記の方法で導き出してください。Command Line Tools でも同じファイルが /Library/Developer/CommandLineTools/usr/share/doc/swift/diagnostics/ にあります。
ファイル名は診断の短縮名に従います(小文字、ハイフン区切り)。
Routing Decision Tree
User question about Apple API/framework?
├── Specific compiler error/warning → Read {diagnostics base}/<diagnostic-name>.md
├── Liquid Glass implementation → Read {guides base}/<Framework>-Implementing-Liquid-Glass-Design.md
├── Swift concurrency patterns → Read {guides base}/Swift-Concurrency-Updates.md
├── Foundation Models / on-device AI → Read {guides base}/FoundationModels-Using-on-device-LLM-in-your-app.md
├── SwiftData features → Read {guides base}/SwiftData-Class-Inheritance.md
├── StoreKit / IAP → Read {guides base}/StoreKit-Updates.md
├── App Intents / Siri → Read {guides base}/AppIntents-Updates.md
├── Charts / visualization → Read {guides base}/Swift-Charts-3D-Visualization.md
├── Text editing / AttributedString → Read {guides base}/SwiftUI-Styled-Text-Editing.md or Foundation-AttributedString-Updates.md
├── WebKit in SwiftUI → Read {guides base}/SwiftUI-WebKit-Integration.md
├── Toolbar features → Read {guides base}/SwiftUI-New-Toolbar-Features.md
└── Other → ls the base directory to see what's available
Xcode を利用できない場合のフォールバック
解決された Xcode に IDEIntelligenceChat.framework のドキュメントディレクトリがない場合(古い Xcode、または Command Line Tools のみがインストールされている場合)は、以下のリストをフォールバックとして利用してください。Swift の診断情報を調べる場合は、まず Command Line Tools に含まれる /Library/Developer/CommandLineTools/usr/share/doc/swift/diagnostics/ を確認してください。
- sosumi.ai(developer.apple.com の Markdown ミラー —
skills/apple-docs-research.mdを参照) - SDK 独自の宣言 — Swift インターフェースと Objective-C ヘッダー(
skills/apple-docs-research.mdにも記載)。Command Line Tools に含まれるのは macOS SDK のみです - 提案 — Apple のドキュメントをすべて参照できるよう、最新の Xcode のインストールを提案してください
黙って処理を失敗させないでください。Xcode のドキュメントをローカルで利用できない場合は、そのことと、どのフォールバックを使用したかをユーザーに伝えてください。
MCP の便利な利用方法
axiom-mcp を使用するクライアントは、レガシー ID(例:apple-guide-swiftui-implementing-liquid-glass-design)を指定して axiom_read_skill を呼び出すこともできます。MCP サーバーは同じ Xcode ファイルを読み込み、同じ内容を返します。どちらの方法も利用できます。ファイルを読み取る方法はどこでも動作し、MCP を使う方法はカタログや検索のワークフローに便利です。
調査方法
同梱ガイドで扱われていない内容については、Apple の完全な API リファレンス、SDK 独自の宣言、WWDC セッションのトランスクリプトとコードを、skills/apple-docs-research.md で確認してください。
リソース
スキル:axiom-swiftui、axiom-concurrency、axiom-data、axiom-ai、axiom-integration