Agent skill

Foundation Models App Builder

by rryam in rryam/FoundationModelsKit

Build or modify Apple Foundation Models features in Swift, SwiftUI, iOS, and macOS apps.

MITAuto-check passedAI & LLM Engineering

Install Foundation Models App Builder

skills CLI
$ npx skills add rryam/FoundationModelsKit --skill foundation-models-app-builder -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rryam/FoundationModelsKit foundation-models-app-builder --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rryam/FoundationModelsKit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/foundation-models-app-builder .claude/skills/foundation-models-app-builder && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
foundation-models-app-builder
GitHub stars
162
Token cost
~1.1k tokens
SKILL.md length
466 words
Files
13 (incl. references)
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Build or modify Apple Foundation Models features in Swift, SwiftUI, iOS, and macOS apps.

  • Works in 6 steps: Identify the feature shape:… → Load only the reference file for that… → Start from the packaged Swift recipe,… → …
  • Reviewing LanguageModelSession flows
  • SKILL.md covers What This Skill Optimizes For, Workflow, Reference Routing and Core Rules, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Foundation Models App Builder is an agent skill from rryam/FoundationModelsKit. Build or modify Apple Foundation Models features in Swift, SwiftUI, iOS, and macOS apps. Use when adding or reviewing LanguageModelSession flows, model availability checks, streaming, GenerationOptions, @Generable structured output, DynamicGenerationSchema, tool calling, RAG, voice input/output, HealthKit-backed AI, multilingual responses, App Intents, reusable capability boundaries, or production error handling.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including reference files (for example `agents/openai.yaml`, `references/app-intents.md` and `references/architecture.md`).

It sits in AI & LLM Engineering, covering iOS development, Structured output and tool calling and Retrieval-augmented generation. It works with SwiftUI, iOS and macOS. The repository describes itself as: Runtime checks, schema utilities, token accounting, conversation state, and tools for Apple's Foundation Models framework. The licence is MIT.

When your agent uses it

  • Reviewing LanguageModelSession flows
  • Model availability checks
  • GenerationOptions
  • @Generable structured output

Example prompts

  • “/foundation-models-app-builder”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Identify the feature shape: availability, one-shot text, streaming, structured output, dynamic schema, tool calling, RAG, voice…
  2. Load only the reference file for that feature.
  3. Start from the packaged Swift recipe, then adapt naming, UI, permissions, and domain models to the target app.
  4. Keep reusable Foundation Models orchestration out of SwiftUI views when the feature will be shared by app screens, App Intents, CLI…
  5. Add graceful fallback behavior for unavailable Apple Intelligence, unsupported languages, denied permissions, context-window overflow…
  6. Verify with the narrowest build or test command that covers the changed surface.

What it can do on your machine

Read from SKILL.md and the folder at commit 4900266. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Foundation Models App Builder loads about 1.1k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 112 tokens; SKILL.md has 466 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~112
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~11k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rryam/FoundationModelsKit at commit 4900266, republished under its MIT licence (© rryam). 466 words, ~1,075 tokens.

Download SKILL.mdSave it as .claude/skills/foundation-models-app-builder/SKILL.md (or your agent's skills folder). This skill also uses 12 other files; get the full folder from GitHub.
name
foundation-models-app-builder
description
Build or modify Apple Foundation Models features in Swift, SwiftUI, iOS, and macOS apps. Use when adding or reviewing LanguageModelSession flows, model availability checks, streaming, GenerationOptions, @Generable structured output, DynamicGenerationSchema, tool calling, RAG, voice input/output, HealthKit-backed AI, multilingual responses, App Intents, reusable capability boundaries, or production error handling.

Foundation Models App Builder

Use this skill as a self-contained Foundation Models app-building playbook. The recipes live inside this skill so agents can apply the patterns in any Swift app without needing to inspect a particular app repository.

What This Skill Optimizes For

  • Shipping app features, not reciting API docs.
  • Turning Foundation Models into reusable app capabilities with clear Swift types.
  • Keeping model orchestration separate from SwiftUI, App Intents, permissions, and persistence.
  • Choosing the smallest useful pattern: text, structured output, dynamic schema, tool, RAG, voice, or domain-specific integration.
  • Leaving every feature with availability handling, cancellation, recovery, and verification.

Workflow

  1. Identify the feature shape: availability, one-shot text, streaming, structured output, dynamic schema, tool calling, RAG, voice, HealthKit, multilingual, App Intent, or reusable capability extraction.
  2. Load only the reference file for that feature.
  3. Start from the packaged Swift recipe, then adapt naming, UI, permissions, and domain models to the target app.
  4. Keep reusable Foundation Models orchestration out of SwiftUI views when the feature will be shared by app screens, App Intents, CLI commands, widgets, or tests.
  5. Add graceful fallback behavior for unavailable Apple Intelligence, unsupported languages, denied permissions, context-window overflow, rate limits, decoding failures, and guardrail refusals.
  6. Verify with the narrowest build or test command that covers the changed surface.

Reference Routing

  • Reusable app architecture, providers, use cases, SwiftUI adapters: references/architecture.md
  • Availability, sessions, instructions, generation options, streaming, prewarming: references/availability-and-sessions.md
  • Compile-time structured output with @Generable and @Guide: references/structured-generation.md
  • Runtime schemas with DynamicGenerationSchema and GeneratedContent: references/dynamic-schemas.md
  • Foundation Models tools and permission-aware app integrations: references/tool-calling.md
  • Retrieval-augmented generation and grounded prompts: references/rag.md
  • Speech recognition, text-to-speech, and voice state machines: references/voice.md
  • App Intents backed by shared Foundation Models capabilities: references/app-intents.md
  • HealthKit-backed AI features and safety wording: references/healthkit.md
  • Supported languages, language selection, and code switching: references/multilingual.md
  • Generation errors, guardrails, retries, and verification checks: references/common-errors.md
Show full SKILL.md (164 more words)Show less

Core Rules

  • Use @Generable when the output type is known at compile time.
  • Use DynamicGenerationSchema only when the schema is built at runtime.
  • Create a fresh LanguageModelSession for unrelated one-shot tasks; keep a session only when conversation memory matters.
  • Put permissions and user confirmation at app boundaries, not inside model prompts.
  • Keep streaming UI updates cancellable and main-actor safe.
  • Avoid App Intent-only prompt logic. Shared tasks should be callable from the app UI too.
  • Prefer compact, domain-specific instructions over giant prompts.
  • Do not assume Foundation Models are available; check SystemLanguageModel.default.availability.

Feature Contract

When adding a Foundation Models feature, aim to leave behind these pieces:

  • a Swift type that names the task input
  • a Swift type that names the task output
  • a small generation provider or use case
  • a UI, App Intent, or service adapter that calls the use case
  • a model-unavailable path
  • a cancellation path for streaming or long-running work
  • a user-facing recovery path for generation errors
  • a narrow verification command or manual check

© rryam, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 12 other files (references) in skills/foundation-models-app-builder of rryam/FoundationModelsKit.

  • SKILL.md
  • agents/openai.yaml
  • references/app-intents.md
  • references/architecture.md
  • references/availability-and-sessions.md
  • references/common-errors.md
  • references/dynamic-schemas.md
  • references/healthkit.md
  • references/multilingual.md
  • references/rag.md
  • references/structured-generation.md
  • references/tool-calling.md
  • references/voice.md

Open the folder on GitHubat commit 4900266

Compare with similar skills

Foundation Models App Builder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Foundation Models App Builder compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Foundation Models App Builder this skillrryam/FoundationModelsKit162—~1.1kAutomated safety check: PassMIT
Swiftui Expert Skillomarshahine/HomeClaw1754 repos~2.8kAutomated safety check: PassMIT
Hig Project Contextraintree-technology/hig-doctor1435 repos~1.2kAutomated safety check: PassMIT
Swiftui Expert SkillEslzzyl/Pixiv-SwiftUI1111 repos~2.9kAutomated safety check: PassAGPL-3.0
Hig Components Contentraintree-technology/hig-doctor1435 repos~1.3kAutomated safety check: PassMIT
SwiftUI Design SkillWholiver/swiftui-design-skill213—~2.8kAutomated safety check: PassMIT

Similar skills

  • Swiftui Expert Skill

    omarshahine/HomeClaw

    A skill your agent uses when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state management, view composition, performance, Liquid Glass adoption, or Instruments .trace…

    175 GitHub starsUsed in 4 repos~2.8k tokens
    MobileAuto-check passed
  • Hig Project Context

    raintree-technology/hig-doctor

    Create or update a shared Apple design context document that other HIG skills use to tailor guidance.

    143 GitHub starsUsed in 5 repos~1.2k tokens
    MobileAuto-check passed
  • Swiftui Expert Skill

    Eslzzyl/Pixiv-SwiftUI

    A skill your agent uses when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state and @Observable data flow, view composition, resizable layouts, safe areas, display…

    111 GitHub starsUsed in 1 repo~2.9k tokens
    MobileAuto-check passed
  • Hig Components Content

    raintree-technology/hig-doctor

    Apple Human Interface Guidelines for content display components.

    143 GitHub starsUsed in 5 repos~1.3k tokens
    MobileAuto-check passed
  • SwiftUI Design Skill

    Wholiver/swiftui-design-skill

    Guides the agent to design distinctive SwiftUI interfaces for iOS and macOS, with six anti-generic rules, a design direction workflow and a five-dimension review.

    213 GitHub stars~2.8k tokensUpdated 5 mo ago
    MobileAuto-check passed
  • Swiftui Backports

    shaps80/SwiftUIBackports

    Find SwiftUIBackports replacements for SwiftUI APIs unavailable on a project deployment target.

    1.1k GitHub stars~604 tokensUpdated 3 mo ago
    MobileAuto-check passed

More from rryam/FoundationModelsKit

  • Foundation Models Os27 Updater

    rryam/FoundationModelsKit

    Upgrade any Apple Foundation Models Swift app or package from OS 26-era APIs to OS 27 and Xcode 27 APIs.

    162 GitHub stars~2.9k tokensUpdated 9 days ago
    Auto-check passed

Works with

Questions about Foundation Models App Builder

What does Foundation Models App Builder do?

Build or modify Apple Foundation Models features in Swift, SwiftUI, iOS, and macOS apps. Foundation Models App Builder is an agent skill from rryam/FoundationModelsKit. Build or modify Apple Foundation Models features in Swift, SwiftUI, iOS, and macOS apps.

When should I use Foundation Models App Builder?

Foundation Models App Builder fits situations like: reviewing LanguageModelSession flows; model availability checks; generationOptions; @Generable structured output.

How do I install Foundation Models App Builder in Claude Code?

Run `npx skills add rryam/FoundationModelsKit --skill foundation-models-app-builder -a claude-code`. Or copy the skill folder (skills/foundation-models-app-builder in rryam/FoundationModelsKit) into .claude/skills/foundation-models-app-builder in your project. Claude Code loads it when a task matches its description.

How do I install Foundation Models App Builder in Codex?

Run `npx skills add rryam/FoundationModelsKit --skill foundation-models-app-builder -a codex`. Or copy the skill folder (skills/foundation-models-app-builder in rryam/FoundationModelsKit) into .agents/skills/foundation-models-app-builder in your project. Codex loads it when a task matches its description.

Can I use Foundation Models App Builder in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rryam/FoundationModelsKit --skill foundation-models-app-builder -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/foundation-models-app-builder, .gemini/skills/foundation-models-app-builder, .github/skills/foundation-models-app-builder and .opencode/skills/foundation-models-app-builder in your project.

What does Foundation Models App Builder need to run?

SKILL.md names no scripts, command-line tools or credentials: Foundation Models App Builder is instructions for the agent only.

Does Foundation Models App Builder access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Foundation Models App Builder safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Foundation Models App Builder use?

Foundation Models App Builder is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Foundation Models App Builder use?

About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 10k tokens, read only when the agent opens those files.

What are the alternatives to Foundation Models App Builder?

Skills that share tags, products or a category with Foundation Models App Builder: Swiftui Expert Skill (omarshahine/HomeClaw, 175 stars), Hig Project Context (raintree-technology/hig-doctor, 143 stars), Swiftui Expert Skill (Eslzzyl/Pixiv-SwiftUI, 111 stars) and Hig Components Content (raintree-technology/hig-doctor, 143 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Foundation Models App Builder?

rryam (a GitHub organization) maintains it in rryam/FoundationModelsKit, which has 162 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on September 30, 2026.

Source: rryam/FoundationModelsKit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.