Axiom Apple Docs

CharlesWiltgen/Axiom/axiom-codex/skills/axiom-apple-docs

作者 CharlesWiltgen82c7feafae634a79b4336b3381289441886c122cMIT1.1K 個星標收錄於 2026年10月9日更新於 2026年10月9日儲存庫今天更新

Use when you need Apple's own documentation or a Swift compiler diagnostic explained rather than recalled.

AI 產生的概覽

引導代理讀取 Xcode 內建的 Apple 文件與 Swift 編譯器診斷檔案,以取得權威的 API 細節。

功能
此技能說明如何找出並讀取 Xcode 內建、供 LLM 使用的 Markdown 文件,涵蓋框架指南與 Swift 編譯器診斷。它提供基礎目錄路徑、檔名對照表與路由決策樹,將常見問題對應到特定檔案。它也說明 Xcode 文件無法使用時的回退做法,並提到 MCP 便利路徑。
適用情境
當你需要精確的 Apple API 簽章或行為、需要解釋某個 Swift 編譯器診斷,或想查看某項 Apple 框架功能背後的官方來源時使用。它也適用於 Axiom 技能引用某個 Apple 框架、而你希望同時取得權威文件與帶有立場的指引的情況。
執行需求
需要本機安裝的 Xcode(或 Command Line Tools)及其內建文件,並具備檔案讀取能力(例如 Read 工具)。它可能使用 AXIOM_XCODE_PATH 環境變數或 xcode-select 來解析 Xcode 路徑,回退做法(例如 sosumi.ai 或 developer.apple.com)需要網路存取。此技能不附帶指令碼,僅為說明性指示。

Apple Documentation Router

Apple bundles for-LLM markdown documentation inside Xcode. These are authoritative, up-to-date guides and diagnostics written by Apple engineers. Read them directly as files (in Claude Code, with the Read tool) — no MCP server or special tool required.

When to Use

  • You need the exact API signature or behavior from Apple
  • An Axiom skill references an Apple framework and you want the official source
  • A Swift compiler diagnostic needs explanation
  • The user asks about a specific Apple framework feature

Priority: Axiom skills provide opinionated guidance (decision trees, anti-patterns, pressure scenarios). Apple docs provide authoritative API details. Use both together.

How to Read These Docs

Axiom's session context names the Xcode the user has switched to. In Claude Code it lists the literal base directories ("Apple for-LLM Documentation: Xcode detected at <path>"); other harnesses name the app ("Installed on this machine: Xcode … (<path>)") — substitute that .app for /Applications/Xcode.app in the table below. Read <base>/<filename> as a file (the Read tool in Claude Code).

Default Xcode location (/Applications/Xcode.app) base directories:

ContentBase directory
AdditionalDocumentation guides/Applications/Xcode.app/Contents/PlugIns/IDEIntelligenceChat.framework/Versions/A/Resources/AdditionalDocumentation/
Swift compiler diagnostics/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/doc/swift/diagnostics/

Example invocation Claude should produce:

Read /Applications/Xcode.app/Contents/PlugIns/IDEIntelligenceChat.framework/Versions/A/Resources/AdditionalDocumentation/SwiftUI-Implementing-Liquid-Glass-Design.md

These paths assume the default install; use the path from session context instead. Without session context: use AXIOM_XCODE_PATH if it is set; otherwise run xcode-select -p (it honors DEVELOPER_DIR), which prints <Xcode>.app/Contents/Developer — drop /Contents/Developer and put that .app in place of /Applications/Xcode.app above. If it prints /Library/Developer/CommandLineTools, no Xcode is selected; try /Applications/Xcode.app.

Guide Files (AdditionalDocumentation)

20 files. Read with the path pattern {guides base}/{filename}.

UI & Design

TopicFilename
Liquid Glass in SwiftUISwiftUI-Implementing-Liquid-Glass-Design.md
Liquid Glass in UIKitUIKit-Implementing-Liquid-Glass-Design.md
Liquid Glass in AppKitAppKit-Implementing-Liquid-Glass-Design.md
Liquid Glass in WidgetKitWidgetKit-Implementing-Liquid-Glass-Design.md
SwiftUI new toolbar featuresSwiftUI-New-Toolbar-Features.md
SwiftUI styled text editingSwiftUI-Styled-Text-Editing.md
SwiftUI WebKit integrationSwiftUI-WebKit-Integration.md
SwiftUI AlarmKit integrationSwiftUI-AlarmKit-Integration.md
Swift Charts 3D visualizationSwift-Charts-3D-Visualization.md
Foundation AttributedString updatesFoundation-AttributedString-Updates.md

Data & Persistence

TopicFilename
SwiftData class inheritanceSwiftData-Class-Inheritance.md

Concurrency & Performance

TopicFilename
Swift concurrency updatesSwift-Concurrency-Updates.md
InlineArray and SpanSwift-InlineArray-Span.md

Apple Intelligence

TopicFilename
Foundation Models (on-device LLM)FoundationModels-Using-on-device-LLM-in-your-app.md

System Integration

TopicFilename
App Intents updatesAppIntents-Updates.md
StoreKit updatesStoreKit-Updates.md
MapKit GeoToolbox PlaceDescriptorsMapKit-GeoToolbox-PlaceDescriptors.md
Widgets for visionOSWidgets-for-visionOS.md

Accessibility

TopicFilename
Assistive Access in iOSImplementing-Assistive-Access-in-iOS.md

Computer Vision

TopicFilename
Visual Intelligence in iOSImplementing-Visual-Intelligence-in-iOS.md

Swift Compiler Diagnostics

46 files in the diagnostics directory. Read with the path pattern {diagnostics base}/{filename}.

Concurrency Diagnostics

DiagnosticFilename
Actor-isolated call from nonisolated contextactor-isolated-call.md
Conformance isolationconformance-isolation.md
Isolated conformancesisolated-conformances.md
Nonisolated nonsending by defaultnonisolated-nonsending-by-default.md
Sendable closure capturessendable-closure-captures.md
Sendable metatypessendable-metatypes.md
Explicit Sendable annotationsexplicit-sendable-annotations.md
Sending closure risks data racesending-closure-risks-data-race.md
Sending risks data racesending-risks-data-race.md
Mutable global variablemutable-global-variable.md
Preconcurrency importpreconcurrency-import.md
Dynamic exclusivitydynamic-exclusivity.md
Exclusivity violationexclusivity-violation.md

Type System Diagnostics

DiagnosticFilename
Existential anyexistential-any.md
Existential member access limitationsexistential-member-access-limitations.md
Nominal typesnominal-types.md
Multiple inheritancemultiple-inheritance.md
Protocol type non-conformanceprotocol-type-non-conformance.md
Opaque type inferenceopaque-type-inference.md
Foreign reference typeforeign-reference-type.md

Build & Migration Diagnostics

DiagnosticFilename
Deprecated declarationdeprecated-declaration.md
Error in future Swift versionerror-in-future-swift-version.md
Strict language featuresstrict-language-features.md
Strict memory safetystrict-memory-safety.md
Implementation only deprecatedimplementation-only-deprecated.md
Member import visibilitymember-import-visibility.md
Missing module on known pathsmissing-module-on-known-paths.md
Module not testablemodule-not-testable.md
Module version missingmodule-version-missing.md
Clang declaration importclang-declaration-import.md
Availability unrecognized nameavailability-unrecognized-name.md
Always-available domainalways-available-domain.md
Upcoming language featuresupcoming-language-features.md
Unknown warning groupunknown-warning-group.md
Compilation cachingcompilation-caching.md
Embedded restrictionsembedded-restrictions.md

Swift Language Diagnostics

DiagnosticFilename
Dynamic callable requirementsdynamic-callable-requirements.md
Property wrapper requirementsproperty-wrapper-requirements.md
Result builder methodsresult-builder-methods.md
String interpolation conformancestring-interpolation-conformance.md
Trailing closure matchingtrailing-closure-matching.md
Temporary pointerstemporary-pointers.md
Semantic copiessemantic-copies.md
Performance hintsperformance-hints.md

Index

DiagnosticFilename
Diagnostic groups (taxonomy)diagnostic-groups.md
All diagnostics indexdiagnostics.md

If a diagnostic you need isn't listed above, list the diagnostics directory first:

ls "<Xcode>.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/doc/swift/diagnostics/"

<Xcode>.app is the app session context names; without session context, derive it as above. Command Line Tools keep the same files at /Library/Developer/CommandLineTools/usr/share/doc/swift/diagnostics/.

Filenames follow the diagnostic's short name (lowercase, hyphenated).

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

Fallback When Xcode Is Unavailable

If the resolved Xcode has no IDEIntelligenceChat.framework documentation directory (older Xcode, or only Command Line Tools installed), fall back to the list below. For a Swift diagnostic, first try the Command Line Tools copy at /Library/Developer/CommandLineTools/usr/share/doc/swift/diagnostics/.

  1. sosumi.ai (markdown mirror of developer.apple.com — see skills/apple-docs-research.md)
  2. WebFetch of the equivalent developer.apple.com URL
  3. Suggest installing the latest Xcode for full Apple docs coverage

Do not silently fail — tell the user when Xcode docs aren't available locally and which fallback you used.

MCP Convenience Path

Clients using axiom-mcp can also invoke axiom_read_skill with the legacy ID (e.g., apple-guide-swiftui-implementing-liquid-glass-design). The MCP server reads the same Xcode files and returns the same content. Both paths are supported — the file-Read path works everywhere; the MCP path is a convenience for catalog/search workflows.

Research Methodology

For WWDC transcript capture (Chrome auto-capture), sosumi.ai documentation access, and multi-session research workflows, see skills/apple-docs-research.md [blocked].

Resources

Skills: axiom-swiftui, axiom-concurrency, axiom-data, axiom-ai, axiom-integration

來源與署名

來源:CharlesWiltgen/Axiom位於axiom-codex/skills/axiom-apple-docs提交82c7fea

授權條款: MIT

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架