Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add ComeOnOliver/skillshub --skill axiom-foundation-models-refgit clone --depth 1 https://github.com/ComeOnOliver/skillshubWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/comeonoliver/skillshub/axiom-foundation-models-ref)<a href="https://agentmods.dev/skills/comeonoliver/skillshub/axiom-foundation-models-ref"><img src="https://agentmods.dev/badge/skills/comeonoliver/skillshub/axiom-foundation-models-ref/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/comeonoliver/skillshub/axiom-foundation-models-ref"><img src="https://agentmods.dev/badge/skills/comeonoliver/skillshub/axiom-foundation-models-ref.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.06441 |
| Opus 5 | $0.00024 | $0.03220 |
| Sonnet 5 | $0.00010 | $0.01288 |
| Haiku 4.5 | $0.00005 | $0.00644 |
Grade A, and why
axiom-foundation-models-ref scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 1,091 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Foundation Models Framework — Complete API Reference
Overview
The Foundation Models framework provides access to Apple's on-device Large Language Model (3 billion parameters, 2-bit quantized) with a Swift API. This reference covers every API, all WWDC 2025 code examples, and comprehensive implementation patterns.
Model Specifications
3B parameter model, 2-bit quantized, 4096 token context (input + output combined). Optimized for on-device summarization, extraction, classification, and generation. NOT suited for world knowledge, complex reasoning, math, or translation. Runs entirely on-device — no network, no cost, no data leaves device.
When to Use This Reference
Use this reference when:
- Implementing Foundation Models features
- Understanding API capabilities
- Looking up specific code examples
- Planning architecture with Foundation Models
- Migrating from prototype to production
- Debugging implementation issues
Related Skills:
axiom-foundation-models— Discipline skill with anti-patterns, pressure scenarios, decision treesaxiom-foundation-models-diag— Diagnostic skill for troubleshooting issues
LanguageModelSession
Overview
LanguageModelSession is the core class for interacting with the model. It maintains conversation history (transcript), handles multi-turn interactions, and manages model state.
Creating a Session
Basic Creation:
import FoundationModels
let session = LanguageModelSession()
With Custom Instructions:
let session = LanguageModelSession(instructions: """
You are a friendly barista in a pixel art coffee shop.
Respond to the player's question concisely.
"""
)
From WWDC 301:1:05
With Tools:
let session = LanguageModelSession(
tools: [GetWeatherTool()],
instructions: "Help user with weather forecasts."
)
From WWDC 286:15:03
With Specific Model/Use Case:
let session = LanguageModelSession(
model: SystemLanguageModel(useCase: .contentTagging)
)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 1,091 lines · 49 tokens per session scan A 8bce230f1006
axiom-foundation-models-ref is a skill published in the GitHub repository ComeOnOliver/skillshub (63 stars, last pushed 2mo ago), licensed MIT. It adds 49 tokens to every session and 6,441 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
foundation-models-on-device
Apple FoundationModels framework for on-device LLM — text generation, guided generation with @Generable, tool calling, and snapshot streaming in iOS 26+.
mle-workflow
Production machine-learning engineering workflow for data contracts, reproducible training, model evaluation, deployment, monitoring, and rollback. Use when building, reviewing, or hardening ML systems beyond one-off notebooks.
pytorch-patterns
PyTorch deep learning patterns and best practices for building robust, efficient, and reproducible training pipelines, model architectures, and data loading.
swift-protocol-di-testing
Protocol-based dependency injection for testable Swift code — mock file system, network, and external APIs using focused protocols and Swift Testing.
swift-actor-persistence
Thread-safe data persistence in Swift using actors — in-memory cache with file-backed storage, eliminating data races by design.
firebase-ai
Use when setting up firebaseai, generating text/chat with Gemini, streaming AI output, building multimodal prompts, or handling AI errors.