axiom-accessibility
Use when fixing or auditing ANY accessibility issue — VoiceOver, Dynamic Type, color contrast, touch targets, WCAG compliance,…
Use when the user mentions Foundation Models review, on-device AI audit, LanguageModelSession issues, or @Generable/guardrail problems — including missing availability checks, manual JSON parsing, and guardrail handling.
Claude Code
$ npx -y skills add charleswiltgen/axiom --skill axiom-audit-foundation-models --agent claude-code
Codex
$ npx skills add charleswiltgen/axiom --skill axiom-audit-foundation-models -a codex -y
Cursor
$ npx skills add charleswiltgen/axiom --skill axiom-audit-foundation-models -a cursor -y
Gemini CLI
$ npx skills add charleswiltgen/axiom --skill axiom-audit-foundation-models -a gemini-cli -y
GitHub Copilot
$ npx skills add charleswiltgen/axiom --skill axiom-audit-foundation-models -a github-copilot -y
OpenCode
$ npx skills add charleswiltgen/axiom --skill axiom-audit-foundation-models -a opencode -y
Windsurf
$ npx skills add charleswiltgen/axiom --skill axiom-audit-foundation-models -a windsurf -y
name: axiom-audit-foundation-models description: Use when the user mentions Foundation Models review, on-device AI audit, LanguageModelSession issues, or @Generable/guardrail problems — including missing availability checks, manual JSON parsing, and guardrail handling. license: MIT
You are an expert at detecting Foundation Models (Apple Intelligence) issues — both known anti-patterns AND missing/incomplete patterns that cause crashes on unsupported devices, concurrent-request errors, guardrail-refusal UX failures, prompt injection, structured-output parsing breakage, and session lifecycle waste.
Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning.
Skip: `*Tests.swift`, `*Previews.swift`, `*/Pods/*`, `*/Carthage/*`, `*/.build/*`, `*/DerivedData/*`, `*/scratch/*`, `*/docs/*`, `*/.claude/*`, `*/.claude-plugin/*`
Establish the actual project, target, configuration and SDK before making deployment-specific recommendations. Discover both `project.pbxproj` and JSON5 `project.xcproj` at any depth, excluding dependency/cache directories. Read project/target settings and included xcconfig files, including conditional keys and array values. Label structural values "declared; effective value unverified"; a first match is not an evaluated target. For effective values, the owning workflow can obtain a matching authorized Xcode settings capture using `axiom-build (skills/build-performance.md)`, "Project selection and effective settings". Do not launch Xcode under file-read-only scope. Apply target/phase file membership and synchronized-folder exception sets before assigning a source finding to a target; otherwise report it as a codebase match with target ownership unverified.
Glob: **/*.swift, **/*.xcconfig, **/project.pbxproj, **/project.xcproj Grep for: - `import\s+FoundationModels` — files using the framework - `IPHONEOS_DEPLOYMENT_TARGET`, `MACOSX_DEPLOYMENT_TARGET` — must be iOS 26+/macOS 26+ - `if #available\(iOS\s+26`, `if #available\(macOS\s+26` — availability gates - `@available\(iOS\s+26`, `@available\(macOS\s+26` — type-level availability
Grep for: - `LanguageModelSession\(` — session construction sites (where is each created?) - `var\s+session:\s*LanguageModelSession`, `let\s+session:\s*LanguageModelSession` — ownership - `@State\s+.*LanguageModelSession`, `@StateObject` patterns near sessions - `class\s+\w+(Service|Manager|ViewModel)` containing session ownership
Grep for:
- `SystemLanguageModel\.default\.availability` — availability check sites
- `\.availability` — any availability access
- `\.unavailable`, `\.available` — availability cases handled
- `\.deviceNotEligible`, `\.appleIntelligenceNotEnabled`, `\.modelNotReady` — the three real UnavailableReason cases
- `\.task\s*\{`, `Task\s*\{`, `\.onAppear` near session creation — lifecycle anchors
- `Button.*LanguageModelSession`, `onTapGesture.*LanguageModelSession` — session-in-action smellGrep for: - `@Generable` — structured-output types (count + names) - `@Guide\(` — property-level constraints (count) - `:\s*Tool\b`, `:\s*FoundationModels\.Tool` — Tool protocol conformance - `func call\(arguments:` — Tool implementation methods - `enum\s+\w+\s*:.*Generable`, `@Generable\s+enum` — generable enums (need @frozen check) - `@frozen` near @Generable enums — frozen enum discipline
Grep for: - `\.respond\(to:` — single response, returned when generation finishes - `\.streamResponse\(to:` — streaming response - `\.respond\(to:.*generating:` — structured @Generable response - `PartiallyGenerated` — streaming partial output type - `LanguageModelError` — OS27 error type (the current one) - `LanguageModelSession\.GenerationError` — 26-cycle error type, **deprecated in 27.0** - `SystemLanguageModel\.Error`, `LanguageModelSession\.Error` — the errors that split OUT of the old enum - `GeneratedContent\.ParsingError` — where `.decodingFailure` went - `\.contextSizeExceeded|\.exceededContextWindowSize` — same failure, new/old spelling - `\.guardrailViolation`, `\.refusal`, `\.rateLimited`, `\.timeout` — specific catch arms - `try\s+await.*respond` — actual call sites - `Task\.cancel\(\)`, `\.task\(id:` — cancellation surface - `\.transcript`, `transcript\.` — conversation history access
**Search BOTH error spellings.** The 27 SDK deprecated `LanguageModelSession.GenerationError` in favor of `LanguageModelError`, and split `assetsUnavailable` / `concurrentRequests` / `decodingFailure` out into `SystemLanguageModel.Error`, `LanguageModelSession.Error`, and `GeneratedContent.ParsingError`. A project written against the 27 API contains **none** of the old identifiers — grepping only for those reports a modern codebase as having no error handling at all, which is the opposite of the truth. See `axiom-ai (skills/foundation-models-ref.md)` for the full migration table.
Read 1-2 representative AI files (AIService / ChatViewModel / similar) to understand:
Battle-tested skills, agents, and tools for modern Apple OS development — Swift 6, SwiftUI, Liquid Glass, Apple Intelligence, and more. Supports Claude Code, Codex, and all other popular coding harnesses and AI-savvy IDEs.
Use when fixing or auditing ANY accessibility issue — VoiceOver, Dynamic Type, color contrast, touch targets, WCAG compliance,…
Use when implementing, testing, or evaluating ANY Apple Intelligence, on-device AI, or speech-to-text feature. Covers Foundation…
Use when the user has a crash log (.ips, MetricKit JSON, legacy .crash text, .xccrashpoint bundle, or pasted text) that needs…
Use when the user mentions Swift performance audit, code optimization, or performance review — ARC issues, allocation patterns,…
Use when the user mentions SwiftUI performance, janky scrolling, slow animations, or view update issues — expensive bodies,…
Use when the user mentions flaky tests, tests that pass locally but fail in CI, race conditions in tests, or needs to diagnose…
Decompile Android APK, XAPK, JAR, and AAR files using jadx or Fernflower/Vineflower. Reverse engineer Android apps, extract HTTP…