Agent skill · Frontend

axiom-foundation-models

Use when implementing on-device AI with Apple's Foundation Models framework — prevents context overflow, blocking UI, wrong model use cases, and manual JSON parsing when @Generable should be used. iOS 26+, macOS 26+, iPadOS 26+, axiom-visionOS 26+

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill axiom-foundation-models-charleswiltgen-axiom --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 42 KB
Bundled scripts: none
Version: 1.0.0
Path: skills/ai-ml/axiom-foundation-models-charleswiltgen-axiom/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Prompts an agent to assist implementing on-device AI using Apple Foundation Models, emphasizing structured output with @Generable, streaming for long generations, and patterns for safe, async usage on Apple devices.

How it works

  • Recommends using on-device Foundation Models for tasks like summarization, extraction, and classification, and building tool-calling patterns for external data.
  • Encourages preventing context overflow and UI blocking, with guidance to use asynchronous patterns and background tasks.
  • Introduces Pattern 2 (@Generable) to produce type-safe, structured outputs by defining a Swift @Generable struct and calling session.respond(to: generating: Type.self).
  • Describes how constrained decoding via @Generable ensures the model outputs conform to the defined schema, avoiding manual JSON parsing.
  • Provides guidance for streaming (Pattern 3) when generation exceeds 1 second, with a loop over partial results to update the UI incrementally.
  • Covers error handling for guardrail violations and unsupported languages, and includes an availability check for Apple Intelligence-enabled devices and regions.
  • Outlines a decision tree and several first-step checks (availability, use case, schema design, tools, streaming).

When to use it

  • Use when implementing on-device AI features with Foundation Models.
  • Use for text summarization, classification, extraction, and building structured outputs via @Generable.
  • Use when you need streaming for long generations or when you need to call external data via tools.
  • Use to debug context overflow, guardrail violations, availability, and language support issues.

What it can touch

  • Tools and APIs mentioned include LanguageModelSession, @Generable types, streamResponse, and supporting Swift constructs as shown in examples. The skill references Foundation Models, and methods like respond(to:), generating:, and streamResponse are used in code snippets.

Caveats

  • Emphasizes that Foundation Models are suited for summarization, extraction, and classification, not world knowledge or complex reasoning.
  • Warns against blocking the main thread and against manual JSON parsing; recommends @Generable to guarantee structure.
  • Requires availability on Apple Intelligence devices in supported regions and handling of guardrails, languages, and context overflow.
  • Contains several conditional patterns and examples; outcomes depend on correct implementation of @Generable schemas and proper error handling.
From the SKILL.md

# Foundation Models — On-Device AI for Apple Platforms ## When to Use This Skill Use when: - Implementing on-device AI features with Foundation Models - Adding text summarization, classification, or extraction capabilities - Creating structured output from LLM responses - Building tool-calling patterns for external data integration - Streaming generated content for better UX - Debugging Foundation Models issues (context overflow, slow generation, wrong output) - Deciding between Foundation Models vs server LLMs (ChatGPT, Claude, etc.) #### Related Skills - Use `axiom-foundation-models-diag` for systematic troubleshooting (context exceeded, guardrail violations, availability problems) - Use `axiom-foundation-models-ref` for complete API reference with all WWDC code examples --- ## Red Flags — Anti-Patterns That Will Fail ### ❌ Using for World Knowledge **Why it fails**: The on-device model is 3 billion parameters, optimized for summarization, extraction, classification — **NOT** world knowledge or complex reasoning. **Example of wrong use**: ```swift // ❌ BAD - Asking for world knowledge let session = LanguageModelSession() let response = try await session.respond(to: "What's the ca

What's inside
Steps it walks through
  1. When to Use This Skill
  2. Red Flags — Anti-Patterns That Will Fail
  3. ❌ Using for World Knowledge
  4. ❌ Blocking Main Thread
  5. ❌ Manual JSON Parsing
  6. ❌ Ignoring Availability Check
  7. ❌ Single Huge Prompt
  8. ❌ Not Handling Context Overflow
  9. ❌ Not Handling Guardrail Violations
  10. ❌ Not Handling Unsupported Language
  11. Mandatory First Steps
  12. 1. Check Availability
  13. 2. Identify Use Case
  14. 3. Design @Generable Schema
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the axiom-foundation-models skill do?

Use when implementing on-device AI with Apple's Foundation Models framework — prevents context overflow, blocking UI, wrong model use cases, and manual JSON parsing when @Generable should be used. iOS 26+, macOS 26+, iPadOS 26+, axiom-visionOS 26+

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill axiom-foundation-models-charleswiltgen-axiom --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going