swiftfindrefs

Locate Swift source files referencing a symbol via Xcode's IndexStoreDB.

41|4|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/michaelversus/SwiftFindRefs --skill swiftfindrefs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftfindrefs
Source: https://github.com/michaelversus/SwiftFindRefs/tree/main/swiftfindrefs
Command: npx skills add https://github.com/michaelversus/SwiftFindRefs --skill swiftfindrefs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the process of finding all references to a specific symbol within a Swift project, preventing incomplete refactors and ensuring code integrity.

Core Features & Use Cases

  • Symbol Reference Discovery: Precisely locates every file referencing a given symbol using Xcode's IndexStoreDB.
  • Refactoring Assistance: Essential for cross-module refactors, fixing missing imports, and auditing symbol usage before deletion or renaming.
  • Use Case: When moving a data model between modules, use this Skill to identify all files that need updating, ensuring no references are missed.

Quick Start

Use the swiftfindrefs skill to find all references to the symbol 'UserSession' of type 'class' in the current project.

Frequently Asked Questions about swiftfindrefs

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

FAQPage Schema
How do I find all references to a symbol in a Swift project?

To find all references to a Swift symbol, query Xcode's IndexStoreDB to locate every source file referencing it. This ensures accurate cross-module refactoring and code auditing by preventing incomplete updates.

What's the best way to audit Swift code for symbol usage before refactoring?

Auditing Swift symbol usage before refactoring requires locating every file that references the target symbol. Querying Xcode's IndexStoreDB discovers all references, preventing incomplete refactors and ensuring code integrity.

Do I need Xcode installed to search for Swift symbol references?

Yes, searching for Swift symbol references requires macOS with Xcode installed. The project must also have been built previously to generate the IndexStoreDB data needed for accurate symbol search.

Can I locate cross-module symbol dependencies in Swift without missing files?

Locating cross-module symbol dependencies in Swift requires querying Xcode's IndexStoreDB. This precisely discovers all source files referencing a specified symbol, ensuring no files are missed during refactoring or model relocation.

Why does Swift symbol search fail if the project has not been built?

Swift symbol search fails if the project has not been built because the query relies on Xcode's IndexStoreDB. This database is generated during the build process and is essential for locating symbol references.

When do I need to query IndexStoreDB for Swift code navigation?

You need to query IndexStoreDB for Swift code navigation when moving data models between modules, fixing missing imports, or auditing symbol usage before deletion. It accurately locates all files requiring updates.