Axiom

repository·main·Indexed 21 days ago

https://github.com/charleswiltgen/axiom

A suite of skills, agents, and tools providing AI coding assistants with deep expertise in Apple OS development (iOS, iPadOS, tvOS, watchOS), including Swift 6, SwiftUI, and Apple Intelligence. It enables automated diagnostics for memory leaks, concurrency issues, build failures, and crash symbolication. Axiom is available as an MCP server for tools like Claude Code, VS Code, Cursor, and Gemini CLI, as well as an extension for the Pi coding agent.

Tokens
766K
Snippets
1.6K
Records
2.7K
Agent score
75%

What's inside Axiom

  1. Overview of Xcode MCP

    main

    Xcode provides an MCP (Model Context Protocol) server via xcrun mcpbridge (available since Xcode 26.3) that exposes 20 IDE tools to external AI clients like Claude Code, Cursor, or VS Code.

    Key Requirements & Limitations:

    • Running Xcode: mcpbridge requires a running instance of Xcode with a project currently open.
    • IDE vs. CLI: While xcodebuild can handle builds and tests via the CLI, MCP tools provide unique IDE-specific capabilities such as build state, render previews, and navigator diagnostics that the CLI cannot access.
    • Alternative for Headless/CI: If you cannot run the Xcode GUI (e.g., in headless CI), use the independent CLI path consisting of devicectl + simctl and Axiom's specialized tools (xcui, xclog, xcsym, xcprof).
  2. Overview of Axiom Go CLI Tools

    main

    Axiom provides a suite of standalone, zero-dependency Go command-line tools designed for high-performance automation and LLM consumption. Each tool is a separate Go module built as a universal macOS binary. These tools are optimized for 'token-lean' output, meaning they emit compact JSON, JSONL, or terse markdown by default rather than pretty-printed text, making them ideal for use by AI agents and LLMs.

    Available tools:

    • xclog: Captures simulator or device console output as structured JSON.
    • xcsym: Symbolicates and triages crash files including .ips, MetricKit, .crash, and .xccrashpoint.
    • xcui: Drives and asserts on the simulator UI and accessibility tree.
    • xcprof: Records and analyzes CPU profiles using xctrace/Instruments.
  3. Overview of RealityKit 27 (`OS27`) Capabilities

    main

    RealityKit 27 represents a major release cycle with advanced rendering and simulation capabilities. Key features include:

    • Navigation: NavigationMeshResourceNavigationComponentNavigationController for pathfinding.
    • LOD: LevelOfDetailComponent for automatic mesh detail management.
    • Lighting: Soft shadows via SpotLightComponent.Shadow, lightmaps via LightmapComponent, and runtime skybox/IBL generation via SkyboxGenerator and ImageBasedLightTextureGenerator.
    • Advanced Rendering: Gaussian splats (visionOS), custom reverb meshes for acoustics, and low-level renderer access via LowLevelRenderer (using your own MTLCommandBuffer).
    • Shaders & Deformation: ShaderGraph for code-based shader authoring and LowLevelDeformation for custom GPU mesh deformation.

    Most advanced authoring (light baking, navmesh, character graphs) is handled in Reality Composer Pro 3.

  4. Overview of Axiom Games skills

    main

    Axiom provides a suite of specialized skills, references, diagnostics, and agents designed for building 2D and 3D interactive experiences on Apple platforms. The ecosystem is organized into several key domains:

    Skills (Disciplines)

    • SpriteKit: 2D game development, including scene graphs, physics, and action systems.
    • Game Input: Handling touch controls (via TouchController) and game controllers (via GCController).
    • SceneKit: 3D scene graph rendering, animations, and physics.
    • RealityKit: Entity-Component-System (ECS) architecture for AR and 3D content.
    • Metal Migration: Patterns and APIs for porting OpenGL/DirectX rendering to Metal.
    • USDKit: Working with USD/USDZ files, including stage traversal and compressed exports.

    References & Diagnostics

    • References: Detailed API documentation for spritekit-ref, scenekit-ref, and realitykit-ref.
    • Diagnostics: Troubleshooting tools for spritekit-diag, realitykit-diag, and metal-migration-diag to resolve issues like physics failures, entity loading errors, or shader compilation problems.

    Agents

    • spritekit-auditor: An automated agent that scans SpriteKit code for physics bitmask issues, draw call waste, node accumulation, and action memory leaks.
  5. Overview of Camera Capture capabilities

    main

    The camera-capture skill provides patterns for advanced AVFoundation implementations, categorized into several functional areas:

    Session Architecture

    • AVCaptureSession setup using a dedicated serial queue.
    • Atomic configuration using beginConfiguration and commitConfiguration.
    • Session presets optimized for photo vs. video.

    Capture Patterns

    • Photo capture via AVCapturePhotoOutput.
    • Video recording via AVCaptureMovieFileOutput with audio support.
    • Front/back camera switching with fallback logic.

    Responsive Capture Pipeline (iOS 17+)

    • Zero-shutter-lag using a ring buffer.
    • Responsive capture for overlapping shots and burst-like shooting.
    • Readiness coordinator for managing shutter button states.
    • Deferred processing using proxy images and background tasks.

    Performance and Pro Features

    • Deferred Start (iOS 26+): Speeds up camera launch by showing the preview in roughly half the time.
    • Pro Video Storage (iOS 27): Provides deterministic ProRes file writes.

    Rotation and Lifecycle

    • RotationCoordinator: Automatic rotation tracking (replaces deprecated videoOrientation).
    • Session Lifecycle: Handling interruptions (phone calls, multitasking, thermal pressure) and managing start/stop operations on background queues.
  6. Overview of Axiom bundled CLI tools

    main

    Axiom provides four native command-line tools designed to give AI coding assistants and developers direct access to system-level data that is typically opaque to LLMs. These tools are auto-resolved on your PATH once the plugin is installed.

    Available Tools

    • xclog: Captures simulator and device console output (print, os_log, Logger) as structured JSON/JSONL.
    • xcprof: Records and analyzes Instruments traces, focusing on CPU bottlenecks and user-code attribution.
    • xcsym: Symbolicates and triages crash reports (supporting .ips, MetricKit, legacy .crash, and .xccrashpoint) with automatic dSYM discovery.
    • xcui: Drives and asserts on the simulator UI and accessibility tree (handling waits, assertions, a11y settings, system dialogs, and VoiceOver).

    Output Formats

    By default, all tools emit compact JSON to minimize token usage for LLM consumers.

    • To view output in a human-readable prose format, use the --human flag.
    • To view indented JSON, pipe the output to jq ..
  7. Overview of Network.framework capabilities

    main

    Network.framework is Apple's modern replacement for Berkeley sockets. It provides several high-level advantages over traditional socket programming:

    • Smart Connection Establishment: Implements 'Happy Eyeballs' (racing IPv4/IPv6), proxy evaluation (PAC), VPN detection, and WiFi Assist fallback.
    • User-space Networking: Reduces CPU usage by approximately 30% compared to sockets through memory-mapped regions and reduced context switches.
    • Built-in Security: TLS 1.3 is enabled by default, with support for DTLS (for UDP) and certificate pinning.
    • Mobility: Handles automatic network transitions (e.g., switching from WiFi to cellular) via viability notifications and Multipath TCP.
    • Performance: Supports ECN (Explicit Congestion Notification), service class marking, TCP Fast Open, and UDP batching.
  8. Use the SwiftData skill for Apple persistence tasks

    main

    The swiftdata skill is designed for developers working with Apple's native persistence framework. Use this skill when you need assistance with:

    • Defining @Model classes and managing @Relationship macros.
    • Writing @Query in SwiftUI views for declarative data fetching.
    • Configuring ModelContainer and managing ModelContext operations (insert, fetch, update, delete, batch).
    • Integrating CloudKit synchronization.
    • Implementing Swift 6 concurrency patterns using @MainActor and background actors.
    • Migrating from Realm or Core Data to SwiftData.
    • Utilizing iOS 27 features like sectioned queries and ResultsObserver.

    Decision Guide:

    • Choose SwiftData for native Apple integration and automatic SwiftUI updates.
    • Choose SQLiteData if you prefer working with value types (structs) or need CloudKit record sharing.
    • Choose GRDB if you require complex, fine-grained raw SQL control.
  9. Use the xcui CLI for iOS simulator testing

    main

    The xcui CLI is an Axiom-bundled tool designed for scriptable iOS-simulator UI and accessibility testing. It provides high-level test-harness semantics that simctl and AXe lack, such as waiting for conditions, asserting on the accessibility tree, and handling system dialogs.

    Key Capabilities:

    • Waiting: Poll the accessibility tree for elements to appear or disappear.
    • Assertion: Validate element IDs, labels, values, and traits.
    • Accessibility: Toggle simulator settings like Dynamic Type or Reduce Motion.
    • Dialog Handling: Manage system permission alerts (e.g., Camera, Location).
    • VoiceOver: Validate focus order and announcement sequences without audio capture.

    Important Note on Input: xcui does not handle direct input. For tap, type, swipe, or touch operations, you must call the axe CLI directly. xcui is used to observe and control the environment, while axe provides the HID touch injection.

  10. ShazamKit Skill Suite Overview

    main

    The ShazamKit skill suite provides tools for audio recognition against the Shazam music catalog and custom audio catalogs. It is supported on:

    • iOS 15+, iPadOS 15+, macOS 12+, tvOS 15+, watchOS 8+, visionOS 1+

    Available Skills

    • axiom-shazamkit: A discipline skill covering API decision trees, setup checklists, modern vs legacy paths, custom catalogs, Shazam CLI usage, and troubleshooting.
    • axiom-shazamkit-ref: A reference skill containing technical details for SHManagedSession, SHSession, SHCustomCatalog, SHSignatureGenerator, SHMediaItem, SHMatchedMediaItem, SHLibrary, SHMediaLibrary, SHSignature, SHCatalog, SHMatch, SHError, SHMediaItemProperty, and Shazam CLI commands.
  11. Integrate App Intents for Apple Ecosystem discovery

    main

    Use the App Intents framework to expose your app's functionality to Siri, Apple Intelligence, Shortcuts, Spotlight, and other system experiences. This replaces the older SiriKit custom intents with a modern Swift-first API.

    Key system integrations include:

    • Siri & Apple Intelligence: Voice commands and intelligent interactions.
    • Shortcuts: Automation workflows.
    • Spotlight: Search discovery.
    • WidgetKit & Live Activities: Interactive widgets and dynamic updates.
    • Visual Intelligence: Image-based interactions via the camera.
    • Focus Filters & Control Center: Contextual filtering and custom controls.
  12. Use the Code Signing Reference for iOS/macOS development

    main

    The Code Signing Reference provides a comprehensive guide for managing iOS and macOS code signing workflows. Use this reference to perform tasks related to certificate management, provisioning profile inspection, entitlement extraction, Keychain operations, and Xcode build configurations.

    Common use cases include:

    • Running CLI commands to inspect certificates, profiles, or entitlements.
    • Setting up Keychain management scripts for CI/CD environments.
    • Configuring fastlane match for team certificate management.
    • Looking up Xcode build settings for signing.
    • Checking ITMS error codes and their causes.
    • Deciding between .p8 and .p12 for APNs authentication.
    • Writing ExportOptions.plist for xcodebuild exports.