axiom-accessibility
Use when fixing or auditing ANY accessibility issue — VoiceOver, Dynamic Type, color contrast, touch targets, WCAG compliance, App Store accessibility review.
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.
$ npx -y skills add charleswiltgen/axiom --skill axiom-audit-foundation-models --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/axiom-audit-foundation-modelsContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
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, watchdog termination, 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/*`
Glob: **/*.swift, **/*.xcconfig 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:` — synchronous-style structured response - `\.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:
Write a brief **Foundation Models Map** (5-10 lines) summarizing:
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.
Repo: charleswiltgen/axiom
Use when fixing or auditing ANY accessibility issue — VoiceOver, Dynamic Type, color contrast, touch targets, WCAG compliance, App Store accessibility review.
Use when implementing, testing, or evaluating ANY Apple Intelligence, on-device AI, or speech-to-text feature. Covers Foundation Models, @Generable,…
Use when the user has a crash log (.ips, MetricKit JSON, legacy .crash text, .xccrashpoint bundle, or pasted text) that needs analysis.
Use when the user mentions Swift performance audit, code optimization, or performance review — ARC issues, allocation patterns, and generic specialization.
Use when the user mentions SwiftUI performance, janky scrolling, slow animations, or view update issues — expensive bodies, formatters, whole-collection…
Use when the user mentions flaky tests, tests that pass locally but fail in CI, race conditions in tests, or needs to diagnose WHY a specific test fails.