Skip to main content
skill CX Codex

apple-intelligence — Claude Code skill: Apple Intelligence in your app

Agent instructions for adding on-device LLM features, camera-based visual search and App Intents to an iOS or macOS app.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add rshankras/claude-code-apple-skills --skill apple-intelligence -a claude-code
Open on GitHub

What apple-intelligence does

The skill activates when you ask for on-device text generation, structured model output, camera-driven recognition, or hooks into Siri, Shortcuts and Spotlight. It ships three sections: foundation-models/ covers sessions, @Generable and tool calling; visual-intelligence/ covers IntentValueQuery and SemanticContentDescriptor; app-intents/ covers the AppIntent protocol, entities and App Shortcuts voice phrases.

Two reference files go deeper. One handles model limits, the instructions-over-prompts hierarchy, guardrail handling and evals. The other covers Private Cloud Compute, the LanguageModel protocol for third-party backends, vision input and KV-cache rules. On context size the skill tells you to query model.contextSize rather than hardcode it: 4,096 tokens for the first-gen on-device model, 8,192 for iOS 27 on-device, 32,000 for Private Cloud Compute.

Availability checks and fallback UI are treated as mandatory, not optional. Route a request to a less-private backend and you are expected to redact the context first. The skill targets iOS 27 and macOS 27, so on older systems some of the APIs it describes will not compile.

What it helps with

  • add on-device text generation without calling an external API
  • get structured output through @Generable instead of parsing strings
  • wire up camera-based search with Visual Intelligence
  • expose app actions to Siri, Shortcuts and Spotlight
  • work within context limits and handle guardrail violations

Example prompts for the agent

  • add on-device text generation to my app with Foundation Models
  • make the model return structured output using @Generable
  • set up App Intents so Siri can trigger an action in my app

How to install apple-intelligence

1Skills CLI (Vercel)

npx skills add rshankras/claude-code-apple-skills --skill apple-intelligence -a claude-code

2Manually: put the files in place

~/.claude/skills/apple-intelligence/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/apple-intelligence/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about apple-intelligence

How do I install apple-intelligence in Claude?

Run npx skills add rshankras/claude-code-apple-skills --skill apple-intelligence -a claude-code. The skill file then lives at ~/.claude/skills/apple-intelligence/SKILL.md.

What does apple-intelligence do?

It gives the agent guidance on Apple Intelligence: on-device LLM sessions, camera-based visual search, App Intents for Siri and Shortcuts, prompt engineering and model error handling.

What does the model setup require?

The skill insists on checking model availability and providing fallback UI. Context size comes from model.contextSize at runtime, not from a hardcoded number.

Source text

SKILL.md · MIT
---
name: apple-intelligence
description: Apple Intelligence skills for on-device AI features including Foundation Models, Visual Intelligence, App Intents, and intelligent assistants. Use when implementing AI-powered features.
allowed-tools: [Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion]
last_verified: 2026-07-16
review_by: 2027-06-22
os_version: iOS 27 / macOS 27
---

# Apple Intelligence Skills

Skills for implementing Apple Intelligence features including on-device LLMs, visual recognition, App Intents integration, and intelligent assistants.

## When This Skill Activates

Use this skill when the user:
- Wants to add AI/LLM features to their app
- Needs on-device text generation or understanding
- Asks about Foundation Models or Apple Intelligence
- Wants to implement structured AI output
- Needs prompt engineering guidance
- Wants camera-based visual intelligence features
- Needs Siri, Shortcuts, or Spotlight integration via App Intents
- Wants to expose app actions or content to the system

## Available Skills

### foundation-models/
On-device LLM integration with prompt engineering best practices.
- Model availability checking
- Session management
- @Generable structured output (property-order + schema-injection rules)
- Tool calling patterns
- Snapshot streaming
- Prompt engineering techniques
- `safety-and-guardrails.md` — model limits, the instructions-over-prompts hierarchy, guardrail handling, the four-layer safety stack, evals
- `models-and-agents.md` — Private Cloud Compute, LanguageModel protocol (third-party backends), vision input, DynamicProfile agents, tool-calling modes, KV-cache rules

### visual-intelligence/
Integrate with iOS Visual Intelligence for camera-based search.
- IntentValueQuery implementation
- SemanticContentDescriptor handling
- AppEntity for searchable content
- Display representations
- Deep linking from results

### app-intents/
App Intents for Siri, Shortcuts, Spotlight, and Apple Intelligence.
- AppIntent protocol, parameters, perform()
- AppEntity and entity queries
- App Shortcuts with voice phrases
- IndexedEntity and Spotlight indexing
- Intent modes (background, foreground)
- Interactive snippets with SnippetIntent
- Visual intelligence integration
- Onscreen entities for Siri/ChatGPT
- Multiple choice API
- Swift package support

## Key Principles

### 1. Privacy First
- On-device processing by default; Private Cloud Compute extends capacity without storing prompts (no account/API keys — WWDC26 241)
- When routing to less-private backends, redact context first (see foundation-models/models-and-agents.md)

### 2. Graceful Degradation
- Always check model availability
- Provide fallback UI for unsupported devices
- Handle errors gracefully (incl. guardrail violations — silent for proactive features, explained for user-initiated)

### 3. Efficient Prompting
- Keep prompts focused and specific
- Use structured output when possible
- Respect context window limits — query `model.contextSize`, never hardcode (4,096 first-gen on-device; 8,192 iOS 27 on-device; 32,000 Private Cloud Compute)

## Reference Documentation

- [Foundation Models](https://developer.apple.com/documentation/foundationmodels)
- [Visual Intelligence](https://developer.apple.com/documentation/visualintelligence)
- [App Intents](https://developer.apple.com/documentation/appintents)
- Local captured docs (optional): if `~/Downloads/docs/` contains `FoundationModels-Using-on-device-LLM-in-your-app.md`, `Implementing-Visual-Intelligence-in-iOS.md`, or `AppIntents-Updates.md`, read them for extra detail; skip silently if absent.

© rshankras · MIT · rshankras/claude-code-apple-skills

Similar skills

Everything for Mobile →

From the same set17

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor