majinmagros/magros.ai-skills/foundation-models-on-device

Claude Code and agent skill by majinmagros/magros.ai-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when building on-device Apple Intelligence features with text generation, structured output, or tool calling. Triggers on \"foundation-models-on-device\", \"foundation models on device\", \"device\".

Install

npx vskill@latest install majinmagros/magros.ai-skills/foundation-models-on-device

SKILL.md

The same SKILL.md was published earlier as majinmagros/magros.ai-skills/foundation-models-on-device.

FoundationModels: On-Device LLM (iOS 26)

Privacy-preserving on-device LLM via Apple's FoundationModels framework. Detalhes em references/.

When to Activate

  • Building AI-powered features using Apple Intelligence on-device
  • Generating or summarizing text without cloud dependency
  • Extracting structured data from natural language input
  • Implementing custom tool calling for domain-specific AI actions
  • Streaming structured responses for real-time UI updates
  • Need privacy-preserving AI (no data leaves the device)

Core Principles

  1. Availability first — check model.availability before any session
  2. Structured over strings — prefer @Generable + @Guide types
  3. One request per session — check isResponding, fan out sessions
  4. Chunk to 4,096 tokens — instructions + prompt + output combined
  5. Read `.content` — never .output; snapshot-stream partials to UI

Example

swift
let session = LanguageModelSession()
let response = try await session.respond(
to: "Generate a cute rescue cat", generating: CatProfile.self)
print(response.content.name)

References

  • references/availability-sessions.md — availability switch, single/multi-turn, instructions, session rules
  • references/guided-generation.md — @Generable type, structured request, @Guide constraints
  • references/tool-calling.md — Tool definition, session with tools, ToolCallError handling
  • references/streaming-practices.md — snapshot streaming, SwiftUI, decisions, practices, anti-patterns

Checklist

  • [ ] model.availability handled for all unavailability cases
  • [ ] Structured output via @Generable, not string parsing
  • [ ] isResponding checked; inputs fit 4,096 tokens
  • [ ] Results read via response.content
  • [ ] Offline/privacy path verified on-device

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
2
7-day trend score
10

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/majinmagros/magros.ai-skills/foundation-models-on-device/badge)](https://verified-skill.com/skills/majinmagros/magros.ai-skills/foundation-models-on-device)

Something wrong with this skill or its page? Tell us.