apple-intelligence — скилл для Claude Code: Apple Intelligence
Набор инструкций для агента, который помогает встроить on-device LLM, визуальный поиск и App Intents в приложение под iOS и macOS.
npx skills add rshankras/claude-code-apple-skills --skill apple-intelligence -a claude-codeЧто делает apple-intelligence
Скилл включается, когда вы просите добавить в приложение работу с языковой моделью на устройстве, структурированный вывод, распознавание по камере или интеграцию с Siri, Shortcuts и Spotlight. Внутри три раздела: foundation-models/ про сессии, @Generable и вызов инструментов, visual-intelligence/ про IntentValueQuery и SemanticContentDescriptor, app-intents/ про AppIntent, сущности и голосовые фразы App Shortcuts.
Отдельные файлы разбирают безопасность и модели: ограничения модели, иерархию «инструкции важнее промптов», обработку срабатывания guardrails, Private Cloud Compute и протокол LanguageModel для сторонних бэкендов. Контекстное окно скилл советует не хардкодить, а запрашивать через model.contextSize — у первой версии on-device модели это 4,096 токенов, у iOS 27 on-device 8,192, у Private Cloud Compute 32,000.
Главное требование — проверять доступность модели и держать запасной интерфейс для устройств, где её нет. Если маршрутизируете запросы на менее приватные бэкенды, контекст придётся вычищать заранее. Скилл рассчитан на iOS 27 и macOS 27, так что на более старых системах часть API не соберётся.
Какие задачи решает
- добавить генерацию текста на устройстве без обращения к внешнему API
- получить структурированный вывод через
@Generableвместо разбора строк - подключить поиск по камере через Visual Intelligence
- вывести действия приложения в Siri, Shortcuts и Spotlight
- разобраться с лимитами контекста и срабатыванием guardrails
Примеры запросов агенту
- добавь в приложение on-device генерацию текста через Foundation Models
- сделай структурированный вывод ответа модели через @Generable
- подключи App Intents, чтобы действие приложения вызывалось из Siri
Как установить apple-intelligence
1Через Skills CLI (Vercel)
npx skills add rshankras/claude-code-apple-skills --skill apple-intelligence -a claude-code2Вручную: положить файлы
~/.claude/skills/apple-intelligence/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/apple-intelligence/
1Через Skills CLI (Vercel)
npx skills add rshankras/claude-code-apple-skills --skill apple-intelligence -a codex2Вручную: положить файлы
.agents/skills/apple-intelligence/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add rshankras/claude-code-apple-skills --skill apple-intelligence -a cursor2Вручную: положить файлы
.cursor/skills/apple-intelligence/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install rshankras/claude-code-apple-skills apple-intelligence2Вручную: положить файлы
.github/skills/apple-intelligence/SKILL.md1Через Skills CLI (Vercel)
npx skills add rshankras/claude-code-apple-skills --skill apple-intelligence -a gemini-cli2Командой платформы
gemini skills install https://github.com/rshankras/claude-code-apple-skills --path skills/apple-intelligenceВручную: положить файлы
.devin/skills/apple-intelligence/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add rshankras/claude-code-apple-skills --skill apple-intelligence -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о apple-intelligence
Как установить apple-intelligence в Claude?
Выполните npx skills add rshankras/claude-code-apple-skills --skill apple-intelligence -a claude-code. После этого файл скилла лежит по пути ~/.claude/skills/apple-intelligence/SKILL.md.
Что делает apple-intelligence?
Даёт агенту инструкции по Apple Intelligence: работа с on-device LLM, визуальный поиск по камере, App Intents для Siri и Shortcuts, промпт-инжиниринг и обработка ошибок модели.
Что нужно, чтобы модель заработала?
Скилл требует проверять доступность модели и предусматривать запасной интерфейс. Контекстное окно запрашивается через model.contextSize, а не задаётся числом в коде.
Исходный текст
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