# Axiom audit foundation models

> Axiom audit foundation models is an open-source agent skill for developer tools. Audits Apple Foundation Models code for availability, error handling and structured output. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/CharlesWiltgen/Axiom/tree/main/axiom-codex/skills/axiom-audit-foundation-models
- **Repository:** https://github.com/charleswiltgen/axiom
- **GitHub stars:** 1,278
- **License:** MIT
- **Skill name:** axiom-audit-foundation-models
- **Collection:** https://github.com/CharlesWiltgen/Axiom
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill turns the agent into an auditor for Apple's on-device Foundation Models framework. It walks the project to map where LanguageModelSession instances are created and owned, how @Generable types and Tool implementations are used, and how availability and errors are handled, then checks the code against a fixed set of anti-patterns such as missing availability gates, concurrent requests on one session, and manual JSON parsing of model output.

Beyond pattern matching, it reviews for gaps like missing guardrail or context-size handling, unconstrained numeric properties, prompt injection from user text, and absent evaluation suites. Findings are grouped by severity, combined where issues compound, and summarized in a health score with recommended fixes and a test plan.

The skill expects a Swift codebase that imports FoundationModels, and it reads project and xcconfig settings to decide which iOS or macOS 27 checks apply. It uses search and file-read tools to scan source, and it is distributed as an MIT-licensed folder with a SKILL.md and one supporting reference file.

## When your agent uses it

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

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/CharlesWiltgen/Axiom/tree/HEAD/axiom-codex/skills/axiom-audit-foundation-models)
- [License: MIT](https://github.com/CharlesWiltgen/Axiom/tree/HEAD/axiom-codex/skills/axiom-audit-foundation-models)

## Features

- **Availability gate checks:** Finds session creation sites that lack a Foundation Models availability check and missing fallback UI.
- **Error handling review:** Checks catch blocks for guardrail refusals, context-size overflow and the OS 27 error type migration.
- **Generable schema audit:** Reviews @Generable types for @Guide constraints, nested type conformance and frozen enums.
- **Session lifecycle review:** Looks for sessions recreated per tap and concurrent requests that ignore the isResponding state.
- **Prompt injection detection:** Flags user-supplied text interpolated directly into prompts instead of passed as structured inputs.
- **Health score report:** Produces a severity-sorted report with a hardening rating and a test plan.

## Good for

- Check my Apple Intelligence integration for crashes on unsupported devices
- Review my @Generable structs for missing constraints
- Find places where I parse model output with JSONDecoder instead of structured generation
- Audit how my app handles guardrail and context-window errors
- Migrate my Foundation Models error handling to the OS 27 error types

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/axiom-audit-foundation-models` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/axiom-audit-foundation-models &&
cp -R "$tmp/axiom-codex/skills/axiom-audit-foundation-models" ~/.claude/skills/axiom-audit-foundation-models &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/axiom-audit-foundation-models` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/axiom-audit-foundation-models` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/axiom-audit-foundation-models &&
cp -R "$tmp/axiom-codex/skills/axiom-audit-foundation-models" ~/.agents/skills/axiom-audit-foundation-models &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/axiom-audit-foundation-models` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/axiom-audit-foundation-models` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/axiom-audit-foundation-models &&
cp -R "$tmp/axiom-codex/skills/axiom-audit-foundation-models" ~/.cursor/skills/axiom-audit-foundation-models &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/axiom-audit-foundation-models` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/CharlesWiltgen/Axiom.git --path axiom-codex/skills/axiom-audit-foundation-models
```

Or copy the folder to `~/.gemini/skills/axiom-audit-foundation-models` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/axiom-audit-foundation-models`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/axiom-audit-foundation-models &&
cp -R "$tmp/axiom-codex/skills/axiom-audit-foundation-models" ~/.copilot/skills/axiom-audit-foundation-models &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/axiom-audit-foundation-models` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git
```

Then copy `Axiom/axiom-codex/skills/axiom-audit-foundation-models` into your agent's skills folder as `axiom-audit-foundation-models`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Axiom audit foundation models need to run?

It targets Swift projects that use the FoundationModels framework and relies on the agent's search and file-read tools to scan the codebase.

### Does Axiom audit foundation models change my code?

The skill describes auditing and suggests fixes with code examples; it is framed as a review that reports findings rather than editing files.

### When does Axiom audit foundation models trigger?

It is meant for requests about Foundation Models review, on-device AI audits, LanguageModelSession problems, or @Generable and guardrail issues.

### Which licence applies?

The skill is released under the MIT license.

### How do I install Axiom audit foundation models in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/axiom-audit-foundation-models to use it in all your projects, or to .claude/skills/axiom-audit-foundation-models in one project.

### Does Axiom audit foundation models run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Axiom audit foundation models?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Axiom audit foundation models?

The closest alternatives to Axiom audit foundation models are Axiom audit swiftdata, Axiom audit testing, Axiom audit accessibility, Axiom health check and Axiom audit icloud.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Axiom audit swiftdata](https://ai-powered.com/skills/axiom-audit-swiftdata): Axiom audit swiftdata is an open-source agent skill for developer tools.
- [Axiom audit testing](https://ai-powered.com/skills/axiom-audit-testing): Axiom audit testing is an open-source agent skill for developer tools.
- [Axiom audit accessibility](https://ai-powered.com/skills/axiom-audit-accessibility): Axiom audit accessibility is an open-source agent skill for developer tools.
- [Axiom health check](https://ai-powered.com/skills/axiom-health-check): Axiom health check is an open-source agent skill for developer tools.
- [Axiom audit icloud](https://ai-powered.com/skills/axiom-audit-icloud): Axiom audit icloud is an open-source agent skill for developer tools.
- [Axiom audit swiftui architecture](https://ai-powered.com/skills/axiom-audit-swiftui-architecture): Axiom audit swiftui architecture is an open-source agent skill for developer tools.
- [Axiom audit camera](https://ai-powered.com/skills/axiom-audit-camera): Axiom audit camera is an open-source agent skill for developer tools.
- [Foundation models](https://ai-powered.com/skills/foundation-models): Foundation models is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/axiom-audit-foundation-models
