axiom-ai
Use when implementing ANY Apple Intelligence or on-device AI feature. Covers Foundation Models, @Generable, LanguageModelSession, structured output, Tool protocol, iOS 26 AI integration.
What this skill does
# Apple Intelligence & AI **You MUST use this skill for ANY Apple Intelligence or Foundation Models work.** ## When to Use Use this router when: - Implementing Apple Intelligence features - Using Foundation Models - Working with LanguageModelSession - Generating structured output with @Generable - Debugging AI generation issues - iOS 26 on-device AI ## AI Approach Triage **First, determine which kind of AI the developer needs:** | Developer Intent | Route To | |-----------------|----------| | On-device text generation (Apple Intelligence) | **Stay here** → Foundation Models skills | | Custom ML model deployment (PyTorch, TensorFlow) | **See skills/ios-ml.md** (hub) → conversion / compression / training files | | Computer vision (image analysis, OCR, segmentation) | **/skill axiom-vision** → Vision framework | | Cloud API integration (OpenAI, generic HTTP) | **/skill axiom-networking** → URLSession patterns | | Cloud Claude integration (Anthropic SDK, Messages API, Claude Agent SDK) | **See `claude-api` skill** (external) → includes automated Opus 4.6 → 4.7 migration | | System AI features (Writing Tools, Genmoji) | No custom code needed — these are system-provided | **Key boundary: Foundation Models vs ML (custom models)** - Foundation Models = Apple's on-device LLM framework (LanguageModelSession, @Generable) - ML = Custom model deployment (CoreML conversion, quantization, MLTensor, speech-to-text) - If developer says "run my own model" → skills/ios-ml.md. If "use Apple Intelligence" → stay here. ## Training Path Boundaries When developers say "I need to train / fine-tune / personalize a model," four distinct paths exist. They are often conflated; each has different output, lifecycle, and runtime compatibility. | Path | Trains | Output | Lifecycle | Routes to | |------|--------|--------|-----------|-----------| | **FM custom adapter** | Apple's frozen on-device 3B LLM (rank-32 LoRA) | `.fmadapter` package, ~160 MB | Build-time per OS version, delivered via Background Assets | `skills/foundation-models-adapters.md` (discipline) + `skills/foundation-models-adapters-ref.md` (toolkit + runtime) + `skills/foundation-models-adapters-diag.md` (failure modes); delivery via `axiom-integration (skills/background-assets.md)` | | **Core ML `MLUpdateTask`** | Your NN-spec model's fully-connected and convolutional layers | Updated `.mlmodelc` saved to disk | Runtime, per-user (on-device personalization) | `skills/coreml-training.md` | | **Create ML** | A new Core ML model from scratch / transfer learning | `.mlmodel` | Build-time, on Mac or iOS (per type) | `skills/coreml-training.md` | | **MLX LM** (`mlx_lm.lora`) | Open-source LLMs on Apple silicon | `adapters/adapters.safetensors` — NOT loadable by Foundation Models | Build-time; not an iOS distribution path | External — outside Axiom scope; treat as adjacent research tool | | **Server LLM fine-tune** | Cloud-hosted model (e.g., vendor fine-tunes) | Cloud artifact, accessed via API | Build-time; runs in cloud | `/skill axiom-networking` for the API integration; the fine-tune workflow is the vendor's domain | **Critical distinctions**: - MLX LM output (`.safetensors`) cannot be loaded into a `LanguageModelSession`. Different toolchain, different deployment target. - `MLUpdateTask` is **NN-spec only** — does not support ML Program (`.mlpackage`) models from modern PyTorch / TensorFlow conversion. This is the main reason it's rarely used in new projects. - FM custom adapters are pinned per-base-model version (per-OS). One adapter does NOT serve every device in your install base — see the Approach Triage section in `skills/foundation-models.md` for the deflection ladder. For the full "which path applies to me?" disambiguation (decision tree, the three week-costing mistakes, per-path routing) → `skills/training-paths.md`. ## Cross-Domain Routing **Foundation Models + concurrency** (session blocking main thread, UI freezes): - Foundation Models sessions are async — blocking likely means missing `await` or running on @MainActor - **Fix here first** using async session patterns in foundation-models skill - If concurrency issue is broader than Foundation Models → **also invoke axiom-concurrency** **Foundation Models + data** (@Generable decoding errors, structured output issues): - @Generable output problems are Foundation Models-specific, NOT generic Codable issues - **Stay here** → foundation-models-diag handles structured output debugging - If developer also has general Codable/serialization questions → **also invoke axiom-data** ## Routing Logic ### Custom Core ML Work (your own models, not Apple's LLM) `skills/ios-ml.md` is the hub (deployment, runtime, speech-to-text). The lifecycle stages have dedicated files: - **Convert** a trained PyTorch/TF/Keras model → `skills/coreml-conversion.md` (`coremltools.convert`, ML Program vs NN-spec, parity validation) - **Compress** it → `skills/coreml-compression.md` (the PTQ-vs-QAT decision, palettization/quantization/pruning) - **Train from scratch / personalize on-device** → `skills/coreml-training.md` (Create ML; `MLUpdateTask` and its NN-spec-only limitation) ### Foundation Models Work **Implementation patterns** → `skills/foundation-models.md` - LanguageModelSession basics - @Generable structured output - Tool protocol integration - Streaming with PartiallyGenerated - Dynamic schemas - 26 WWDC code examples **API reference** → `skills/foundation-models-ref.md` - Complete API documentation - All @Generable examples - Tool protocol patterns - Streaming generation patterns **Diagnostics** → `skills/foundation-models-diag.md` - AI response blocked - Generation slow - Guardrail violations - Context limits exceeded - Model unavailable **Guardrails & safety decisions** → `skills/foundation-models-guardrails.md` - When to use `permissiveContentTransformations` vs `.default` - False-positive triage (correct refusal vs over-restrictive) - Custom safety eval / red-team methodology - Adapter × guardrail interaction (safety erosion) **Custom adapter training (after Approach Triage rungs 1-4)** → `skills/foundation-models-adapters.md` - Decision discipline (when adapter training is justified vs. rungs 1-4) - Maintenance contract (per-OS retrain burden, four-axis eval) - Per-OS variant strategy and runtime fallback - Dataset construction discipline - HIG disclosure for adapter-enhanced features **Adapter toolkit & runtime API** → `skills/foundation-models-adapters-ref.md` - Python toolkit setup (3.11, 32 GB Apple silicon Mac or Linux GPU) - Dataset JSONL schema (chat-turn + tool-calling extension) - `examples.train_adapter`, `examples.train_draft_model`, `examples.generate`, `export.export_fmadapter` - `SystemLanguageModel.Adapter` runtime API and `AssetError` cases - Per-base-model-version compatibility matrix - `com.apple.developer.foundation-model-adapter` entitlement **Adapter-specific diagnostics** → `skills/foundation-models-adapters-diag.md` - `compatibleAdapterNotFound`, `invalidAdapterName`, `invalidAsset` - Tool calls don't fire from adapter - Adapter consumes context window with trivial prompts - Accuracy drops after OS update (FB18924722) - `coremltools.libmilstoragepython` missing on export **Automated scanning** → Launch `foundation-models-auditor` agent or `/axiom:audit foundation-models` Detects anti-patterns AND architectural gaps: - Missing availability checks, main-thread `respond()`, manual JSON parsing, missing specific error catches (guardrail / contextWindow), session created per-tap, no streaming for long output, missing `@Guide` constraints, nested non-`@Generable` types, no fallback UI - Prompt-injection risk from direct user-text interpolation, `@Generable` enums without `@frozen` (future-case crash), missing Cancel UX, missing transcript trimming, stale availability cache after Settings toggle, partial-output validation gaps, Tool errors indistinguishable from session errors, no retry on transient errors Scores: PRODUCTION-RE
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.