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 从公开仓库中收录这些内容。

举报或申请下架