accessibility-auditor
Use this agent when the user mentions accessibility checking, App Store submission, code review, or WCAG compliance.
Use this agent 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.
> /plugin marketplace add charleswiltgen/axiom > /plugin install axiom@axiom-marketplace
How it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Use this agent 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: foundation-models-auditor description: "Use this agent 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." model: inherit readonly: true is_background: true
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 this agent when the user mentions accessibility checking, App Store submission, code review, or WCAG compliance.
Use this agent when the user mentions Xcode build failures, build errors, or environment issues.
Use this agent when the user mentions slow builds, build performance, or build time optimization.
Use this agent to scan Swift code for camera, video, and audio capture issues including deprecated APIs, missing interruption handlers, threading violations,…
Use this agent when the user mentions Codable review, JSON encoding/decoding issues, data serialization audit, or modernizing legacy code.
Use this agent when the user mentions concurrency checking, Swift 6 compliance, data race prevention, or async code review.