foundation-models-pro

foundation-models-pro is a skill for Claude Code from kelvinkosbab/AppBootstrapAI. It costs 79 tokens per session (610 once invoked), scanned A, original, MIT.

A code review guide for Apple Foundation Models, the APIs Apple provides for adding language-model features to apps. It covers model availability, streamed responses, cancellation, errors, and testing without a physical device.

In plain words
What is it for?
Use it to write or review Swift code that runs models on a device, through Apple's private cloud service, or through an external model, including text and multimodal input.
Why use it?
It helps prevent model features from failing on unsupported devices or leaving the interface unresponsive during a response. It also addresses privacy choices and testability.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to write or review Swift code that runs models on a device, through Apple's private cloud service, or through an external model, including text and multimodal input.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kelvinkosbab/appbootstrapai/foundation-models-pro
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 kelvinkosbab/AppBootstrapAI --skill foundation-models-pro
Clone the repo
git clone --depth 1 https://github.com/kelvinkosbab/AppBootstrapAI

Made for: Claude Code.

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 foundation-models-pro

README.md
[![agentmods](https://agentmods.dev/badge/skills/kelvinkosbab/appbootstrapai/foundation-models-pro/github.svg)](https://agentmods.dev/skills/kelvinkosbab/appbootstrapai/foundation-models-pro)
Your own site
<a href="https://agentmods.dev/skills/kelvinkosbab/appbootstrapai/foundation-models-pro"><img src="https://agentmods.dev/badge/skills/kelvinkosbab/appbootstrapai/foundation-models-pro/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 foundation-models-pro

Your own site · 80×15
<a href="https://agentmods.dev/skills/kelvinkosbab/appbootstrapai/foundation-models-pro"><img src="https://agentmods.dev/badge/skills/kelvinkosbab/appbootstrapai/foundation-models-pro.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 610 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.00079 $0.00610
Opus 5.5 $0.00032 $0.00244
Sonnet 5.5 $0.00016 $0.00122
Haiku 4.5 $0.00008 $0.00061

Measured 21d ago against content hash 9acf1e52023a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

foundation-models-pro 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 21d 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.

.claude/skills/foundation-models-pro/SKILL.md · 29 lines

How it starts

The opening of the file, as written. The whole thing — 29 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Make on-device and Apple-hosted model features reliable: available only where they work, responsive while streaming, cancellable, private by default, and testable without a device. This is the deep companion to the always-on apple-foundation-models.md rule. Report only genuine problems.

Several APIs here (PrivateCloudComputeLanguageModel, LanguageModelExecutor, LanguageModelCapabilities, multimodal input) come from the Xcode 27 seeds. Verify each symbol against the SDK in use before citing it in a finding.

Load references/foundation-models.md for the full guidance: session ownership, availability gating with a switch over every unavailable reason, choosing between on-device, Private Cloud Compute, and external models, multimodal input, streaming, error handling, the protocol + mock + simulator pattern, SwiftUI integration, accessibility for streamed output, and complete code patterns. If doing a partial review, read only the matching section.

Review Checklist

  1. Ownership: the session lives in a @MainActor @Observable final class, one per conversation, recreated only when its configuration changes.
  2. Availability: every .unavailable reason handled distinctly, plus a user preference; no session created before the check.
  3. Model choice: the holder depends on any LanguageModel; data that leaves the device has consent, minimum context, a privacy-manifest entry, and per-storefront gating.
  4. Streaming: placeholder appended first and removed on error; Task.isCancelled checked in the loop; defer { isGenerating = false }; send disabled while generating.
  5. Errors: caught broadly, shown localized, logged in full; no matching on beta error cases.
  6. Testability: only the real implementation imports FoundationModels; mock and simulator implementations exist and are injected.
  7. Accessibility: a localized thinking label while streaming, the final text set once.

Output Format

Group findings by severity: blocking (no availability check, data sent off-device without consent, generation that can't be cancelled, isGenerating stuck after an error), degraded (session recreated per prompt, empty bubble left on error, untestable direct imports), polish (naming, accessibility labels). Give each as file:line, the user-visible effect, and the fix with before/after. End with the count per severity and the first three fixes.

Read the full file on GitHub · 29 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 21d ago First seen · 29 lines · 79 tokens per session scan A 9acf1e52023a

Subscribe to this mod's changes

foundation-models-pro is a skill published in the GitHub repository kelvinkosbab/AppBootstrapAI (8 stars, last pushed yesterday), licensed MIT. It adds 79 tokens to every session and 610 once invoked, about $0.0003 per session on Opus 5.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-11-10.

Related

foundation-models-pro compared with skills from other repositories

foundation-models-pro next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
foundation-models-prokelvinkosbab/AppBootstrapAISkill8yesterdayMITA79Claude Code
shepherdchrisbanes/skillsSkill1.2k2d agoApache-2.0A37Claude Code, Codex
kotlin-concurrency-and-flowchrisbanes/skillsSkill1.2k2d agoApache-2.0A60Claude Code
simplify-changeschrisbanes/skillsSkill1.2k2d agoApache-2.0A27Claude Code
kotlin-api-designchrisbanes/skillsSkill1.2k2d agoApache-2.0A46Claude Code
maui-essentials-aidotnet/maui-labsSkill244todayMITA86Claude Code, Codex
app-store-compliancemjmirza/app-store-complianceSkill9.8ktodaynoneA108Claude Code