app-store
App Store optimization and marketing skills for descriptions, screenshots, keywords, review responses, and comprehensive promotional strategy. Use when user…
On-device LLM integration using Apple's Foundation Models framework. Use when implementing AI text generation, structured output, or tool calling.
$ npx -y skills add rshankras/claude-code-apple-skills --skill foundation-models --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/foundation-modelsContext preview
The summary Claude sees to decide when to auto-load this skill.
On-device LLM integration using Apple's Foundation Models framework. Use when implementing AI text generation, structured output, or tool calling.
name: foundation-models description: On-device LLM integration using Apple's Foundation Models framework. Use when implementing AI text generation, structured output, or tool calling. 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
Integrate Apple's on-device LLM into your apps for privacy-preserving AI features. Companion references: **safety-and-guardrails.md** (model limits, prompt design, the four-layer safety stack), **models-and-agents.md** (Private Cloud Compute, `LanguageModel` protocol, vision input, `DynamicProfile` agentic sessions — the iOS 27 wave), and **utilities-package.md** (Apple's open-source utilities package: OpenAI-compatible endpoints, just-in-time Skills, history compression).
The on-device model is ~3B parameters (2-bit quantized): built for **summarization, extraction, classification, tagging, revision, short chat** — not math, code generation, facts, or world knowledge (WWDC25 248). For capability boundaries, prompt-design rules, and the safety stack, read `safety-and-guardrails.md` first. For anything bigger, `PrivateCloudComputeLanguageModel` (32k context, reasoning) and third-party backends are in `models-and-agents.md`.
import FoundationModels
struct IntelligentView: View {
private var model = SystemLanguageModel.default
var body: some View {
switch model.availability {
case .available:
ContentView()
case .unavailable(.deviceNotEligible):
UnsupportedDeviceView()
case .unavailable(.appleIntelligenceNotEnabled):
EnableIntelligenceView()
case .unavailable(.modelNotReady):
ModelDownloadingView()
case .unavailable(let reason):
ErrorView(reason: reason)
}
}
}// Simple session
let session = LanguageModelSession()
// Session with instructions
let session = LanguageModelSession(instructions: """
You are a helpful cooking assistant.
Provide concise, practical advice for home cooks.
""")let response = try await session.respond(to: "What's a quick dinner idea?") print(response.content)
Instructions set the model's persona and constraints. They're prioritized over prompts.
[Role] + [Task] + [Style] + [Safety]
**Example:**
let instructions = """
You are a fitness coach specializing in home workouts.
Help users create exercise routines based on their equipment and goals.
Keep responses under 100 words and use bullet points for exercises.
Decline requests for medical advice and suggest consulting a doctor.
"""| Component | Purpose | Example | |-----------|---------|---------| | **Role** | Define persona | "You are a travel expert" | | **Task** | What to do | "Help plan itineraries" | | **Style** | Output format | "Use bullet points, be concise" | | **Safety** | Boundaries | "Don't provide medical advice" |
Prompts are user inputs. Make them:
| Principle | Bad | Good | |-----------|-----|------| | **Specific** | "Help with cooking" | "Suggest a 30-minute vegetarian dinner" | | **Constrained** | "Tell me about dogs" | "Describe Golden Retrievers in 3 sentences" | | **Focused** | "I need help with many things" | "What ingredients substitute for eggs in baking?" |
**Question Pattern:**
let prompt = "What are three ways to reduce food waste at home?"
**Command Pattern:**
let prompt = "Create a weekly meal plan for a family of four, budget-friendly."
**Extraction Pattern:**
let prompt = """
Extract the following from this email:
- Sender name
- Meeting date
- Action items
Email: \(emailContent)
"""**Transformation Pattern:**
let prompt = "Rewrite this text to be more formal: \(casualText)"
Get typed Swift data instead of raw strings.
@Generable(description: "A recipe suggestion")
struct Recipe {
var name: String
@Guide(description: "Cooking time in minutes", .range(5...180))
var cookingTime: Int
@Guide(description: "Difficulty level", .options(["Easy", "Medium", "Hard"]))
var difficulty: String
@Guide(description: "List of ingredients", .count(3...15))
var ingredients: [String]
@Guide(description: "Step-by-step instructions")
var instructions: [String]
}| Constraint | Use Case | Example | |------------|----------|---------| | `.range(min...max)` | Numeric bounds | `.range(1...100)` | | `.options([...])` | Enum-like choices | `.options(["Low", "Medium", "High"])` | | `.count(n)` | Exact array length | `.count(5)` | | `.count(min...max)` | Array length range | `.count(3...10)` |
A collection of Claude Code skills for iOS, macOS, watchOS, visionOS, and Apple platform development. These skills help you plan and build apps, maintain code quality, ensure HIG compliance, and guide you from idea to App Store.
Repo: rshankras/claude-code-apple-skills
App Store optimization and marketing skills for descriptions, screenshots, keywords, review responses, and comprehensive promotional strategy. Use when user…
Privacy-preserving ad measurement with AdAttributionKit (SKAdNetwork's successor) — install and re-engagement attribution, conversion-value strategy under…
Generate compelling App Store descriptions that convert browsers into users. Use when writing initial descriptions, improving existing copy, or drafting…
Apple Search Ads campaign strategy for indie developers — paid acquisition, keyword bidding, budget planning, and ROAS optimization. Use when user asks about…
Take a one-time in-app purchase from MISSING_METADATA to READY_TO_SUBMIT in App Store Connect — set its price schedule and localized display name/description…
Optimize app title, subtitle, and keywords for maximum App Store discoverability. Use when launching a new app, improving search rankings, entering new…