camilool8/harness-engineering-templates/foundation-models-app-intent

Claude Code and agent skill by camilool8/harness-engineering-templates

Trust tier 3
  • community
Source check pending

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

Wire Apple Foundation Models to an App Intent — typed guided generation, tool calls, streaming. Includes the device-gating fallback pattern.

Install

npx vskill@latest install camilool8/harness-engineering-templates/foundation-models-app-intent

SKILL.md

The same SKILL.md was published earlier as camilool8/harness-engineering-templates/foundation-models-app-intent.

Foundation Models in an App Intent

When to use

  • On-device summarization / extraction / classification / rewriting for an App Intent surface (Siri, Shortcuts, Spotlight, Widgets).
  • NOT for: world knowledge, advanced reasoning, multi-turn chat — push those to a hosted LLM with explicit 5.1.2(i) consent.

Pattern

swift
import FoundationModels
import AppIntents
@available(iOS 18.0, *)
struct SummarizeNotesIntent: AppIntent {
static let title: LocalizedStringResource = "Summarize Notes"
@Parameter(title: "Notes")
var notes: [String]
func perform() async throws -> some IntentResult & ProvidesDialog {
guard SystemLanguageModel.default.isAvailable else {
// Apple Intelligence not available on this device — fall back.
return .result(dialog: "Summaries are not available on this device.")
}
let session = LanguageModelSession()
let summary = try await session.respond(to: "Summarize these notes: \(notes.joined(separator: "\n"))")
return .result(dialog: "\(summary.content)")
}
}

Device gating

SystemLanguageModel.default.isAvailable is the canonical check. Always ship the non-Apple-Intelligence path.

Guarded outputs

Use LanguageModelSession.respond(to:generating:) with a @Generable Swift type for structured output. Validate at the boundary; do not pass raw model output to a privileged sink.

Security

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

Quality evaluation

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

Source

Popularity

7-day trend score
5

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/camilool8/harness-engineering-templates/foundation-models-app-intent/badge)](https://verified-skill.com/skills/camilool8/harness-engineering-templates/foundation-models-app-intent)

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