Agent skill

Foundation Models Os27 Updater

by rryam in rryam/FoundationModelsKit

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

MITAuto-check passedMobile

Install Foundation Models Os27 Updater

skills CLI
$ npx skills add rryam/FoundationModelsKit --skill foundation-models-os27-updater -a claude-code

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

GitHub CLI
$ gh skill install rryam/FoundationModelsKit foundation-models-os27-updater --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-os27-updater .claude/skills/foundation-models-os27-updater && 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-os27-updater
GitHub stars
162
Token cost
~2.9k tokens
SKILL.md length
1,227 words
Files
2
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

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

  • Modernizing LanguageModelSession code
  • SKILL.md covers Operating Principles, First Pass: Understand The…, SDK Inspection and Migration Decision, plus 5 more sections
  • Calls rg, xcrun and git
  • GenerationOptions

What it does

Foundation Models Os27 Updater is an agent skill from rryam/FoundationModelsKit. Upgrade any Apple Foundation Models Swift app or package from OS 26-era APIs to OS 27 and Xcode 27 APIs. Use when modernizing LanguageModelSession code, GenerationOptions, tool calling, context-window handling, image input, Private Cloud Compute, shared LanguageModel runtimes, reasoning controls, transcript handling, custom executors, feedback, availability gates, docs, examples, tests, or build settings.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Mobile, covering iOS development, Context engineering and Structured output and tool calling. It works with Xcode. 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

  • Modernizing LanguageModelSession code
  • GenerationOptions
  • Context-window handling
  • Private Cloud Compute

Example prompts

  • “/foundation-models-os27-updater”

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

    Shell commands in SKILL.md call:

    • rg
    • xcrun
    • git
    • swift
    • xcodebuild

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

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    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 Os27 Updater loads about 2.9k tokens when it runs. Until then it costs about 110 tokens; SKILL.md has 1,227 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~110
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k

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). 1,227 words, ~2,879 tokens.

Download SKILL.mdSave it as .claude/skills/foundation-models-os27-updater/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
foundation-models-os27-updater
description
Upgrade any Apple Foundation Models Swift app or package from OS 26-era APIs to OS 27 and Xcode 27 APIs. Use when modernizing LanguageModelSession code, GenerationOptions, tool calling, context-window handling, image input, Private Cloud Compute, shared LanguageModel runtimes, reasoning controls, transcript handling, custom executors, feedback, availability gates, docs, examples, tests, or build settings.

Foundation Models OS 27 Updater

Use this skill to migrate a Foundation Models project from the OS 26 API surface to OS 27. The target may be an app, Swift package, sample, CLI, framework, tutorial repo, or documentation repo. Do not assume any specific app or package repository structure.

The goal is not to sprinkle OS 27 names into code. The goal is to make the project take real advantage of OS 27 where it helps: better runtime selection, context management, tool policy, multimodal input, transcript handling, observability, and honest availability behavior.

Operating Principles

  • Start from the target project, not from a generic example.
  • Inspect the installed Xcode 27 SDK before claiming an API exists.
  • Preserve unrelated user changes.
  • Prefer small typed adapters over one giant compatibility layer.
  • Keep OS 27 features discoverable without forcing demos that do not fit the product.
  • Make availability, entitlement, service eligibility, quota, and platform gates visible in code and docs.
  • Compile with Xcode 27 even if runtime smoke tests require OS 27 hardware.

First Pass: Understand The Project

Run a fast audit before editing:

bash
git status --short --branch
rg -n "import FoundationModels|LanguageModelSession|SystemLanguageModel|GenerationOptions|Prompt|Transcript|Tool|@Generable|DynamicGenerationSchema|GeneratedContent|Feedback|Attachment|ImageReference|tokenCount|contextSize" .
rg -n "IPHONEOS_DEPLOYMENT_TARGET|MACOSX_DEPLOYMENT_TARGET|VISIONOS_DEPLOYMENT_TARGET|WATCHOS_DEPLOYMENT_TARGET|platforms:|Package.swift|swift-tools-version" .
find . -maxdepth 3 \( -name "*.xcodeproj" -o -name "*.xcworkspace" -o -name "Package.swift" \)

Then classify the work:

  • App: update user-facing flows, availability UI, build settings, and simulator/device verification.
  • Swift package/framework: expose OS 27 APIs through reusable types; avoid app-specific UI assumptions.
  • Sample/tutorial: add focused examples and comments that teach migration choices.
  • CLI/tooling: expose flags for runtime, context, tool mode, reasoning, and diagnostics where useful.
  • Docs-only repo: update examples, platform requirements, deprecation notes, and verification snippets.

SDK Inspection

Use the active Xcode 27 SDK as the source of truth. Adapt paths for the user's Xcode:

bash
export DEVELOPER_DIR=/path/to/Xcode-beta.app/Contents/Developer
xcrun --show-sdk-path --sdk iphoneos
xcrun --show-sdk-path --sdk macosx

Search FoundationModels interfaces:

bash
SDK="$(xcrun --show-sdk-path --sdk iphoneos)"
rg -n "final public class PrivateCloudComputeLanguageModel|protocol LanguageModel|contextSize|toolCallingMode|samplingMode|ImageAttachment|ImageReference|reasoning|Transcript|Feedback|LanguageModelExecutor" "$SDK/System/Library/Frameworks/FoundationModels.framework"

If the project has its own generated interface notes, refresh or verify them from SDK interfaces. Do not let stale docs outrank the local SDK.

Migration Decision

Choose one path explicitly:

  • OS 27-only: raise deployment targets and package platforms, simplify code to OS 27 APIs, and remove noisy OS 26 compatibility only where the user wants that.
  • OS 26 + OS 27 compatible: keep the existing OS 26 path and isolate new symbols behind #available wrappers or separate OS 27-only files.
  • Compile-only OS 27 support: update source to build with Xcode 27 while noting runtime features that cannot be exercised on the current host.

For packages, prefer public wrappers that compile for the declared platform matrix. Avoid leaking OS 27-only symbols into APIs that must be consumed from OS 26 without availability annotations.

API Migration Checklist

GenerationOptions

Update renamed or expanded options first because they break builds quickly:

  • Replace deprecated sampling spelling with samplingMode when the SDK exposes it.
  • Add toolCallingMode only where behavior should change.
  • Keep temperature, max tokens, and sampling controls near existing generation configuration.
  • Ensure docs and CLI flags use the same names as the code.
Model Availability

Keep availability checks close to features:

swift
let model = SystemLanguageModel.default
switch model.availability {
case .available:
    break
case .unavailable(let reason):
    // Render or return a clear unavailable state.
}

For OS 27 additions, combine Foundation Models availability with platform checks:

swift
if #available(iOS 27.0, macOS 27.0, visionOS 27.0, *) {
    let contextSize = SystemLanguageModel.default.contextSize
} else {
    // Existing OS 26 fallback.
}
Shared LanguageModel Runtime

If the project has multiple model backends or wants PCC, introduce a small runtime abstraction:

  • .system for SystemLanguageModel.default.
  • .privateCloudCompute for PrivateCloudComputeLanguageModel().
  • .automatic or .pccWhenAvailable only if the app has a clear fallback policy.

Avoid re-resolving adaptive runtime mid-request. Resolve once, create the session from that model, and use the same resolved runtime for diagnostics and token/context accounting.

Private Cloud Compute

Add PCC only when it serves the product or sample. PCC code should report:

  • availability
  • unavailable reason
  • quota status and reset date when available
  • context size, which may be async and throwing
  • supported languages if exposed by the SDK
  • network, service, quota, and eligibility failures

Do not present PCC as guaranteed. Treat it as OS/service/entitlement/network gated.

Context Window And Token Budget

Replace hardcoded context assumptions with runtime information:

  • SystemLanguageModel.contextSize for local model budget when available.
  • PCC context size through the PCC API when available.
  • tokenCount(for:) or existing project token accounting for prompt pressure.
  • Summarization, truncation, or refusal when a prompt exceeds budget.

Good app behavior:

  • show or log budget in diagnostics
  • compact long conversation history before overflow
  • catch context-size-exceeded errors and provide a recovery path
Tool Calling Mode

Map product modes to explicit tool policy:

  • .allowed: normal assistant mode where tools are optional.
  • .required: workflows that must call a tool to be useful, such as fetching current data.
  • .disallowed: drafting, summarization, or privacy-sensitive flows where tools should not run.

Do not rely on prompts alone to prevent tool use when the SDK exposes a policy option.

Show full SKILL.md (507 more words)Show less
Image Input

When adding image support:

  • prefer typed prompt/attachment APIs over stringly image descriptions
  • keep text-only fallbacks
  • gate UIKit/AppKit convenience initializers by platform
  • handle missing image permission or unsupported image content cleanly
  • update examples to show the actual image path or picker behavior
Dynamic Instructions And Profiles

If the app has user-selectable personas or modes, move them into typed configuration:

  • model/runtime
  • instructions
  • generation options
  • tool policy
  • reasoning level
  • language/locale
  • safety or privacy mode

Keep reset/default behavior obvious so users can return to a known profile.

Reasoning Controls

Expose reasoning controls only when users can understand the tradeoff:

  • use small labels like light, balanced, deep, or project-specific names
  • explain cost/latency/quality implications in docs or settings text
  • avoid claiming better answers without measuring or demonstrating it
Transcript Handling

Update transcript parsing, rendering, replay, export, and logging for new segment types:

  • text segments
  • tool calls and tool results
  • reasoning segments
  • attachments
  • custom or unknown segments
  • feedback-related entries if present

Make switches exhaustive. If preserving transcripts matters, store unknown/custom segments instead of dropping them.

Custom Executors

If the project implements a custom model executor:

  • update method signatures to the Xcode 27 shape
  • keep streaming channel behavior cancellable
  • test the executor with a fake response path
  • document whether the executor supports tools, images, reasoning, and structured output
Feedback And Observability

Use OS 27 feedback/transcript surfaces to improve debugging:

  • attach feedback to the relevant transcript/session when supported
  • record runtime, availability, context size, token count, tool mode, and error category
  • avoid logging private prompt or Health/Contacts/Calendar data unless the app already has consented diagnostics

Code Organization Patterns

For apps:

text
Models/
  FoundationModelRuntime.swift
  FoundationModelAvailabilityState.swift
Services/
  FoundationModelClient.swift
  ContextBudgetManager.swift
Views/
  ModelUnavailableView.swift
  RuntimeDiagnosticsView.swift

For packages:

text
Sources/PackageName/
  Runtime/
  Context/
  Tools/
  Transcripts/
Tests/PackageNameTests/

Keep SwiftUI views thin. Put Foundation Models orchestration in services/use cases so CLI, widgets, App Intents, and tests can reuse it.

Documentation Updates

Update docs when code behavior changes:

  • minimum Xcode version
  • deployment targets and platform matrix
  • Apple Intelligence requirements
  • PCC entitlement or service eligibility requirements
  • OS 26 fallback behavior, if preserved
  • OS 27-only examples
  • build command using DEVELOPER_DIR
  • runtime testing limitations on non-OS 27 hosts

Avoid vague phrasing like "uses latest APIs" without naming what changed.

Verification Matrix

Choose the narrowest checks that cover the change:

bash
git diff --check
DEVELOPER_DIR=/path/to/Xcode-beta.app/Contents/Developer swift build
DEVELOPER_DIR=/path/to/Xcode-beta.app/Contents/Developer swift test
DEVELOPER_DIR=/path/to/Xcode-beta.app/Contents/Developer xcodebuild -project App.xcodeproj -scheme "App" -destination "platform=iOS Simulator,name=iPhone 17 Pro" -derivedDataPath ./build-xcode27 build

Also verify manually when possible:

  • model availability renders correctly when unavailable
  • system runtime can generate a simple response
  • PCC unavailable state is graceful
  • context budget displays or logs correctly
  • tool mode changes behavior
  • image prompt path works or falls back cleanly
  • transcript export/replay does not crash on new segments

If runtime smoke tests require OS 27 hardware or entitlement approval, say that plainly in the final report and PR body.

PR Expectations

A good migration PR should include:

  • short summary of which OS 27 surfaces were adopted
  • whether OS 26 compatibility was kept or dropped
  • files touched by category: build settings, runtime code, UI/examples, docs/tests
  • validation commands and results
  • runtime limitations that could not be tested locally
  • follow-up work only when it is truly outside the current safe scope

Do not claim a feature is live just because it compiles. For OS/service-gated APIs like PCC, distinguish compile support, availability probing, entitlement status, and real runtime success.

© 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 1 other file in skills/foundation-models-os27-updater of rryam/FoundationModelsKit.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 4900266

Compare with similar skills

Foundation Models Os27 Updater 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 Os27 Updater compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Foundation Models Os27 Updater this skillrryam/FoundationModelsKit162—~2.9kAutomated safety check: PassMIT
Agent Recorder FixturesSwiftedMind/SwiftAgent227—~906Automated safety check: PassMIT
xc-plugin State Managementconorluddy/xclaude-plugin183—~4kAutomated safety check: PassMIT
iOS Memgraph Analysisdpearson2699/swift-ios-skills1.2k—~2.4kAutomated safety check: PassCustom licence
iOS Simulator Workflowsconorluddy/xclaude-plugin183—~3.3kAutomated safety check: PassMIT
Xcodebuildmcpw-winter/dot314139—~196Automated safety check: PassMIT

Similar skills

  • Agent Recorder Fixtures

    SwiftedMind/SwiftAgent

    Record real OpenAI/Anthropic HTTP back-and-forth (requests + responses, including streaming text/event-stream) and print paste-ready Swift fixtures for SwiftAgent unit tests (ReplayHTTPClient) using…

    227 GitHub stars~906 tokensUpdated 8 mo ago
    MobileAuto-check passed
  • xc-plugin State Management

    conorluddy/xclaude-plugin

    Teaches how xc-plugin saves tokens with progressive disclosure, cached responses and consistent configuration, so large device lists and build logs arrive as summaries first.

    183 GitHub stars~4k tokensUpdated 29 days ago
    Agent WorkflowsAuto-check passed
  • iOS Memgraph Analysis

    dpearson2699/swift-ios-skills

    A skill your agent uses when capturing or analyzing an iOS .memgraph, especially when the task mentions a memory leak, heap growth, persistent memory increase, ownership path, or matched-capture…

    1.2k GitHub stars~2.4k tokensUpdated 2 mo ago
    MobileAuto-check passed
  • iOS Simulator Workflows

    conorluddy/xclaude-plugin

    Manages iOS Simulator devices and apps through the execute_simulator_command MCP tool instead of raw simctl: boot, create and delete devices, install and launch apps, screenshots and diagnostics.

    183 GitHub stars~3.3k tokensUpdated 29 days ago
    MobileAuto-check passed
  • Xcodebuildmcp

    w-winter/dot314

    Build/test Xcode projects via the XcodeBuildMCP MCP server using a local CLI wrapper for pi (no MCP support).

    139 GitHub stars~196 tokensUpdated today
    MobileAuto-check passed
  • macOS Spm App Packaging

    Dimillian/Skills

    Scaffold, build, and package SwiftPM-based macOS apps without an Xcode project.

    4k GitHub starsUsed in 5 repos~1.2k tokens
    MobileAuto-check passed

More from rryam/FoundationModelsKit

  • Foundation Models App Builder

    rryam/FoundationModelsKit

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

    162 GitHub stars~1.1k tokensUpdated 10 days ago
    Auto-check passed

Works with

Questions about Foundation Models Os27 Updater

What does Foundation Models Os27 Updater do?

Upgrade any Apple Foundation Models Swift app or package from OS 26-era APIs to OS 27 and Xcode 27 APIs. Foundation Models Os27 Updater is an agent skill from rryam/FoundationModelsKit. Upgrade any Apple Foundation Models Swift app or package from OS 26-era APIs to OS 27 and Xcode 27 APIs.

When should I use Foundation Models Os27 Updater?

Foundation Models Os27 Updater fits situations like: modernizing LanguageModelSession code; generationOptions; context-window handling; private Cloud Compute.

How do I install Foundation Models Os27 Updater in Claude Code?

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

How do I install Foundation Models Os27 Updater in Codex?

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

Can I use Foundation Models Os27 Updater 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-os27-updater -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-os27-updater, .gemini/skills/foundation-models-os27-updater, .github/skills/foundation-models-os27-updater and .opencode/skills/foundation-models-os27-updater in your project.

What does Foundation Models Os27 Updater need to run?

Going by SKILL.md and its folder, Foundation Models Os27 Updater needs the command-line tools its instructions call (rg, xcrun, git, swift and xcodebuild).

Does Foundation Models Os27 Updater access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Foundation Models Os27 Updater 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 Os27 Updater use?

Foundation Models Os27 Updater 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 Os27 Updater use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Foundation Models Os27 Updater?

Skills that share tags, products or a category with Foundation Models Os27 Updater: Agent Recorder Fixtures (SwiftedMind/SwiftAgent, 227 stars), xc-plugin State Management (conorluddy/xclaude-plugin, 183 stars), iOS Memgraph Analysis (dpearson2699/swift-ios-skills, 1.2k stars) and iOS Simulator Workflows (conorluddy/xclaude-plugin, 183 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Foundation Models Os27 Updater?

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.