michaelversusmichaelversusCommunityยท2 Agent Skills Included

SwiftFindRefs

Find Swift symbol references and clean testable imports

Locates every Swift source file referencing a symbol by querying Xcode's IndexStoreDB directly. Removes unnecessary @testable import statements from test files automatically after refactoring. Eliminates unreliable text search and manual file hunting during cross-module refactors. Scans large workspaces in parallel using Swift concurrency for fast, accurate results.
npx skills add michaelversus/SwiftFindRefs --all -g -y
Available:

Tells your AI agent which skills are available in this repository and how to load each skill's instructions when a matching task appears.

All Skills in This Repository (2)

Pure Emerald Level Indicators

Frequently Asked Questions

FAQPage Schema
How to install SwiftFindRefs?โ–ผ

Run `npx skills add michaelversus/SwiftFindRefs --all -g -y` in your terminal to install all skills in this repository globally.

How to find all references to a Swift symbol?โ–ผ

Run `swiftfindrefs -p YourProject -n SymbolName -t class` to query Xcode's IndexStoreDB and get a deduplicated list of every file referencing that symbol.

Why use IndexStore instead of grep for refactoring?โ–ผ

Text search misses matches and produces false positives, while IndexStoreDB uses the compiler's own index for complete, accurate reference discovery.

How to remove unnecessary @testable imports?โ–ผ

Run `swiftfindrefs rmUTI -p YourProject` to automatically detect and delete @testable import statements that are no longer needed after making symbols public.

Does SwiftFindRefs work with AI coding agents?โ–ผ

Yes. It includes a SKILL.md that instructs agents to use IndexStore-based reference discovery instead of unreliable grep or IDE search during refactors.

Related Repositories in Software Engineering

View All in Software Engineeringโ†’