generators-spotlight-indexing

Generate Core Spotlight indexing infrastructure for iOS and macOS apps.

4|1|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/AutisticAF/claude-code-apple-dev-plugin --skill generators-spotlight-indexing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generators-spotlight-indexing
Source: https://github.com/AutisticAF/claude-code-apple-dev-plugin/tree/main/skills/generators-spotlight-indexing
Command: npx skills add https://github.com/AutisticAF/claude-code-apple-dev-plugin --skill generators-spotlight-indexing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Many apps need their content discoverable system-wide but lack a robust, production-ready integration with Core Spotlight and Siri suggestions; this Skill provides a complete indexing workflow so user-visible items appear in Spotlight results, handle deep-link continuation, and stay consistent across updates and deletions.

Core Features & Use Cases

  • Protocol-driven indexing: A SpotlightIndexable protocol to convert models into CSSearchableItem objects.
  • Safe concurrency and batching: An actor-wrapped SpotlightIndexManager that batches indexing, supports reindexing, and performs domain-based removals.
  • Rich attributes and thumbnails: A SpotlightAttributeBuilder for fine-grained attribute sets and optional thumbnail support.
  • Deep-link continuation & Siri: SpotlightSearchHandler and NSUserActivity wiring for handling taps and enabling Siri suggestions.
  • View-level sync: Optional ViewModifier to auto-index on appear and remove on disappear for SwiftUI views.
  • Use cases: Indexing articles, products, contacts, tasks, or any custom models to appear in Spotlight and be eligible for Siri predictions.

Quick Start

Generate Core Spotlight indexing infrastructure for my app's Article model with batch initial indexing, thumbnails enabled, and Siri suggestions.

Frequently Asked Questions about generators-spotlight-indexing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make my app content searchable in Spotlight on iOS and macOS?

You can make app content searchable in Spotlight by generating Core Spotlight indexing infrastructure. This involves conforming models to a SpotlightIndexable protocol and using an actor-wrapped manager to batch index items like articles or products directly into system search results.

How does Core Spotlight integration handle deep-link continuation when a user taps a search result?

Core Spotlight integration handles deep-link continuation by wiring a SpotlightSearchHandler with NSUserActivity. When users tap a search result, the app receives the activity and navigates to the corresponding content, making items eligible for Siri predictions.

Can I batch index and remove Core Spotlight items safely using Swift concurrency?

Yes, you can batch index and remove Core Spotlight items safely using an actor-wrapped CSSearchableIndex. This approach satisfies iOS 16+ and macOS 13+ Swift concurrency requirements, supporting batching, reindexing, and domain-based removals without data races.

What's the best way to auto-index SwiftUI views in Spotlight when they appear?

The best way to auto-index SwiftUI views is by applying an optional ViewModifier. This modifier automatically indexes your content when the view appears and removes it from the Spotlight index when the view disappears, ensuring search results stay consistent.

How do I add thumbnails and rich attributes to CSSearchableItem objects for Spotlight?

You add thumbnails and rich attributes to CSSearchableItem objects by using a SpotlightAttributeBuilder. This builder allows fine-grained control over attribute sets and optional thumbnail support, ensuring your articles and products display correctly in Spotlight search results.