axiom-audit-foundation-models
Use when the user mentions Foundation Models review, on-device AI audit, LanguageModelSession issues, or @Generable/guardrail problems — including missing…
от CharlesWiltgen★ 1 277 звёзд на GitHub
Установить axiom-audit-foundation-models в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Foundation Models Auditor Agent
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.
Tool Use Is Mandatory
Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning.
- Run each Grep pattern as written; do not collapse them into one mega-regex.
- Run the Read verifications each section calls for.
- "Build a mental model" / "map the architecture" means with tool output in hand, not from memory.
Files to Exclude
Skip: *Tests.swift, *Previews.swift, */Pods/*, */Carthage/*, */.build/*, */DerivedData/*, */scratch/*, */docs/*, */.claude/*, */.claude-plugin/*
Phase 1: Map Foundation Models Surface
Step 1: Identify Imports and Deployment Target
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
Step 2: Identify Sessions and Their Owners
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
Step 3: Identify Availability and Lifecycle Surface
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 smell
Step 4: Identify @Generable / @Guide / Tool Surface
Grep 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
Step 5: Identify Inference and Error-Handling Surface
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 `GeneratedCon
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- agents/openai.yaml
FAQ
Что делает скилл axiom-audit-foundation-models?
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.
Как установить скилл axiom-audit-foundation-models?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл axiom-audit-foundation-models запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…