Install
openclaw skills install swiftfindrefsUse swiftfindrefs (IndexStoreDB) to list every Swift source file referencing a symbol. Mandatory for “find references”, “fix missing imports”, and cross-module refactors. Do not replace with grep/rg or IDE search.
openclaw skills install swiftfindrefsUse swiftfindrefs to locate every Swift source file that references a given symbol by querying Xcode’s IndexStore (DerivedData). This skill exists to prevent incomplete refactors caused by text search or heuristics.
swiftfindrefs before editing any files.swiftfindrefs.grep, rg, IDE search, or filesystem heuristics for reference discovery.swiftfindrefs available in PATHbrew tap michaelversus/SwiftFindRefs https://github.com/michaelversus/SwiftFindRefs.git
brew install swiftfindrefs
Prefer providing --projectName and --symbolType when possible.
swiftfindrefs \
--projectName <XcodeProjectName> \
--symbolName <SymbolName> \
--symbolType <class|struct|enum|protocol|function|variable>
Optional flags:
--dataStorePath <path>: explicit DataStore (or IndexStoreDB) path; skips discovery-v, --verbose: enables verbose output for diagnostic purposes (flag, no value required)swiftfindrefs for the symbol.Use swiftfindrefs to restrict scope, then add imports only where needed.
swiftfindrefs -p <Project> -n <Symbol> -t <Type> | while read file; do
if ! grep -q "^import <ModuleName>$" "$file"; then
echo "$file"
fi
done
Then for each printed file:
import <ModuleName> in the imports block at the top.swiftfindrefs for the symbol.