foundation-models-specialist

foundation-models-specialist is an agent for Claude Code from The-Artificer-of-Ciphers-LLC/skills-from-the-artificer. It costs 55 tokens per session (879 once invoked), scanned A, original, MIT.

A specialist for Apple's Foundation Models framework, which runs a built-in language model on supported iPhone and Mac systems. It covers text sessions, structured results, guided responses, tool calling, prompts, and checks for device availability.

In plain words
What is it for?
Use it to add on-device summarization, entity extraction, short conversations, structured output, prompt constraints, and fallback behavior on supported Apple platforms.
Why use it?
It helps apps handle model limits and unavailable devices without crashing. It also reduces ambiguity when an app needs the model to return data in a defined structure rather than free-form text.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the swift-agents plugin — 16 agents, 3 hooks shipped together

Good fit Use it to add on-device summarization, entity extraction, short conversations, structured output, prompt constraints, and fallback behavior on supported Apple platforms.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/the-artificer-of-ciphers-llc/skills-from-the-artificer/foundation-models-specialist
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.

Clone the repo
git clone --depth 1 https://github.com/The-Artificer-of-Ciphers-LLC/skills-from-the-artificer

Made for: Claude Code.

Or install swift-agents, the plugin that ships this one along with the rest of its 16 agents, 3 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/the-artificer-of-ciphers-llc/skills-from-the-artificer/foundation-models-specialist/github.svg)](https://agentmods.dev/agents/the-artificer-of-ciphers-llc/skills-from-the-artificer/foundation-models-specialist)
Your own site
<a href="https://agentmods.dev/agents/the-artificer-of-ciphers-llc/skills-from-the-artificer/foundation-models-specialist"><img src="https://agentmods.dev/badge/agents/the-artificer-of-ciphers-llc/skills-from-the-artificer/foundation-models-specialist/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-specialist

Your own site · 80×15
<a href="https://agentmods.dev/agents/the-artificer-of-ciphers-llc/skills-from-the-artificer/foundation-models-specialist"><img src="https://agentmods.dev/badge/agents/the-artificer-of-ciphers-llc/skills-from-the-artificer/foundation-models-specialist.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 879 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.00055 $0.00879
Opus 5.5 $0.00022 $0.00352
Sonnet 5.5 $0.00011 $0.00176
Haiku 4.5 $0.00006 $0.00088

Measured today against content hash 0727bff6d0b6, 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-specialist 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 today.

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.

swift-agents/.github/agents/foundation-models-specialist.agent.md · 130 lines

How it starts

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

Foundation Models Specialist

You are an expert in Apple's Foundation Models framework (iOS 26 / macOS Tahoe). On-device ~3B parameter model. No API keys, no network, no cost.

Key Facts

  • Context window: 4096 tokens total (input + output combined)
  • Languages: 15 supported
  • Capabilities: Summarization, entity extraction, text understanding, short dialog
  • Limitations: Not suited for complex math, code generation, or factual accuracy

Availability — Always Check

switch SystemLanguageModel.default.availability {
case .available: // Proceed
case .unavailable(.appleIntelligenceNotEnabled): // Show settings guidance
case .unavailable(.modelNotReady): // Model downloading
case .unavailable(.deviceNotEligible): // Cannot run
default: // Graceful fallback
}

Never crash on unavailability. Always provide a fallback.

Session Management

  • Sessions are stateful (multi-turn context maintained automatically)
  • One request at a time per session (session.isResponding)
  • Prewarm with session.prewarm() before user interaction
  • Save/restore transcripts: LanguageModelSession(transcript: saved)

Structured Output with @Generable

@Generable
struct Recipe {
    @Guide(description: "The recipe name.")
    let name: String

    @Guide(description: "Steps.", .count(2))
    let steps: [String]

    @Guide(description: "Prep time in minutes.", .range(1...120))
    let prepTime: Int
}

@Guide Constraints

  • description: — Natural language hint
  • .anyOf([values]) — Restrict to enumerated values
  • .count(n) — Fixed array length
  • .range(min...max) — Numeric range
  • Regex patterns for string format

Property Ordering

Properties generate in declaration order. Place foundational data before dependent data.

Tool Calling

struct WeatherTool: Tool {
    var name = "weather"
    var description = "Get current weather for a city."
    @Generable struct Arguments { @Guide(description: "City name.") let city: String }

    nonisolated func call(arguments: Arguments) async throws -> ToolOutput {
        let weather = try await fetchWeather(arguments.city)
        return ToolOutput(weather.description)
    }
}

Read the full file on GitHub · 130 lines

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. today First seen · 130 lines · 55 tokens per session scan A 0727bff6d0b6

Subscribe to this mod's changes

foundation-models-specialist is an agent published in the GitHub repository The-Artificer-of-Ciphers-LLC/skills-from-the-artificer (6 stars, last pushed yesterday), licensed MIT. It adds 55 tokens to every session and 879 once invoked, about $0.0002 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-10-15.

Related

Other agents, from other repositories

prompt-engineering-expert

Provides expert prompt engineering capabilities specializing in advanced prompting techniques, LLM optimization, and AI system design. Masters chain-of-thought, constitutional AI, and production prompt strategies. Use PROACTIVELY for prompt creation, optimization, document/code analysis prompts, or AI system design.…

giuseppe-trisciuoglio/developer-kit · 70 tokens

prompt-engineer

Use when: creating new prompts, optimizing existing prompts, reviewing prompt quality, designing agents or skills. Do NOT use for: code implementation (use domain expert), non-prompt tasks.

fusengine/agents · 41 tokens

prompts-guide

Interactive guide for using prompt-factory skill to generate mega-prompts. Helps choose from 69 presets or create custom prompts, select formats (XML/Claude/ChatGPT/Gemini), and explains usage. Use when user wants to generate production-ready prompts for any LLM.

alirezarezvani/claude-code-skill-factory · 60 tokens

ai-engineer

Owns the engineering of AI/LLM features in mobile apps: on-device inference (Core ML, TFLite, MLC), server-side inference (Anthropic, OpenAI, hosted Llama), prompt engineering for in-app agents, eval harnesses, latency/cost budgets, and fallback UX. Engage when adding any AI-driven feature to the app.

cenconq25/claude-code-app-studio · 77 tokens

ai-engineer

Use this agent to build AI/LLM features - Claude API integration, prompt design, tool use, RAG/embeddings, streaming, evals, cost and latency tuning. Give it the feature and the quality bar.

T4LEL/Claude-Arsenal · 50 tokens

optimizer

Optimize prompts for clarity, coverage, and model reliability without changing intent.

joseph0926/prompt-shield · 15 tokens