axiom-foundation-models-ref

axiom-foundation-models-ref is a skill for Claude Code, Codex from ComeOnOliver/skillshub. It costs 49 tokens per session (6,441 once invoked), scanned A, original, MIT.

A reference for Apple’s Foundation Models framework, which runs a small language model directly on supported Apple devices. It covers text generation, structured results, streaming, and tool use.

In plain words
What is it for?
Use it when building on-device summarisation, extraction, classification, or structured text-generation features in Apple apps.
Why use it?
It explains which tasks the on-device model suits and helps avoid problems such as overflowing its context limit or using it for complex world knowledge.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building on-device summarisation, extraction, classification, or structured text-generation features in Apple apps.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/comeonoliver/skillshub/axiom-foundation-models-ref
Install

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.

Any agent
npx skills add ComeOnOliver/skillshub --skill axiom-foundation-models-ref
Clone the repo
git clone --depth 1 https://github.com/ComeOnOliver/skillshub

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for axiom-foundation-models-ref

README.md
[![agentmods](https://agentmods.dev/badge/skills/comeonoliver/skillshub/axiom-foundation-models-ref/github.svg)](https://agentmods.dev/skills/comeonoliver/skillshub/axiom-foundation-models-ref)
Your own site
<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.

agentmods 80×15 button for axiom-foundation-models-ref

Your own site · 80×15
<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>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,441 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 9d ago against content hash 8bce230f1006, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

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.

skills/CharlesWiltgen/Axiom/axiom-foundation-models-ref/SKILL.md · 1,091 lines

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 trees
  • axiom-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)
)

Read the full file on GitHub · 1,091 lines

Changes

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.

  1. 9d ago First seen · 1,091 lines · 49 tokens per session scan A 8bce230f1006

Subscribe to this mod's changes

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.