✓ Verified
💻 Development
✓ Enhanced Data
Swiftfindrefs
Use swiftfindrefs (IndexStoreDB) to list every Swift source.
- Rating
- 4.8 (200 reviews)
- Downloads
- 15,489 downloads
- Version
- 1.0.0
Overview
Use swiftfindrefs (IndexStoreDB) to list every Swift source.
Complete Documentation
View Source →
SwiftFindRefs
Purpose
Useswiftfindrefs 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.Rules
- Always run
swiftfindrefsbefore editing any files. - Only edit files returned by
swiftfindrefs. - Do not substitute
grep,rg, IDE search, or filesystem heuristics for reference discovery. - Do not expand the file set manually.
- If IndexStore/DerivedData resolution fails, stop and report the error. Do not guess.
Preconditions
- macOS with Xcode installed
- Project has been built at least once (DerivedData exists)
swiftfindrefsavailable in PATH
Installation
bash
brew tap michaelversus/SwiftFindRefs https://github.com/michaelversus/SwiftFindRefs.git
brew install swiftfindrefs
Canonical command
Prefer providing--projectName and --symbolType when possible.bash
swiftfindrefs \
--projectName <XcodeProjectName> \
--symbolName <SymbolName> \
--symbolType <class|struct|enum|protocol|function|variable>
Optional flags:
--dataStorePath: explicit DataStore (or IndexStoreDB) path; skips discovery-v, --verbose: enables verbose output for diagnostic purposes (flag, no value required)
Output contract
- One absolute file path per line
- Deduplicated
- Script-friendly (safe to pipe line-by-line)
- Ordering is not semantically meaningful
Standard workflows
Workflow A: Find all references
- Run
swiftfindrefsfor the symbol. - Treat the output as the complete reference set.
- If more detail is needed, open only the returned files.
Workflow B: Fix missing imports after moving a symbol
Useswiftfindrefs to restrict scope, then add imports only where needed.bash
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:
- Insert
importin the imports block at the top. - Preserve existing import ordering/grouping.
- Never add duplicate imports.
- Do not reformat unrelated code.
Workflow C: Audit usage before deleting or renaming a symbol
- Run
swiftfindrefsfor the symbol. - If output is empty, treat the symbol as unused (still validate via build/tests if needed).
- If non-empty, review the listed files before changing public API.
References
- CLI details: references/cli.md
- Playbooks: references/workflows.md
- Troubleshooting: references/troubleshooting.md
Installation
Terminal bash
openclaw install swiftfindrefs
Copied!
💻Code Examples
## Installation
-installation.sh
brew tap michaelversus/SwiftFindRefs https://github.com/michaelversus/SwiftFindRefs.git
brew install swiftfindrefs--symbolType <class|struct|enum|protocol|function|variable>
---symboltype-classstructenumprotocolfunctionvariable.txt
Optional flags:
- `--dataStorePath <path>`: explicit DataStore (or IndexStoreDB) path; skips discovery
- `-v, --verbose`: enables verbose output for diagnostic purposes (flag, no value required)
## Output contract
- One absolute file path per line
- Deduplicated
- Script-friendly (safe to pipe line-by-line)
- Ordering is not semantically meaningful
## Standard workflows
### Workflow A: Find all references
1. Run `swiftfindrefs` for the symbol.
2. Treat the output as the complete reference set.
3. If more detail is needed, open only the returned files.
### Workflow B: Fix missing imports after moving a symbol
Use `swiftfindrefs` to restrict scope, then add imports only where needed.example.sh
swiftfindrefs \
--projectName <XcodeProjectName> \
--symbolName <SymbolName> \
--symbolType <class|struct|enum|protocol|function|variable>example.sh
swiftfindrefs -p <Project> -n <Symbol> -t <Type> | while read file; do
if ! grep -q "^import <ModuleName>$" "$file"; then
echo "$file"
fi
doneTags
#ios_and-macos-development
Quick Info
Category Development
Model Claude 3.5
Complexity One-Click
Author michaelversus
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
Ready to Install?
Get started with this skill in seconds
openclaw install swiftfindrefs
Related Skills
✓ Verified
💻 Development
4claw
4claw — a moderated imageboard for AI agents.
🧠 Claude-Ready
)}
★ 4.4 (118)
↓ 4,990
v1.0.0
✓ Verified
💻 Development
Aap Passport
Agent Attestation Protocol - The Reverse Turing Test.
🧠 Claude-Ready
)}
★ 4.3 (89)
↓ 4,621
v1.0.0
✓ Verified
💻 Development
Acestep Lyrics Transcription
Transcribe audio to timestamped lyrics using OpenAI Whisper or ElevenLabs Scribe API.
⚡ GPT-Optimized
)}
★ 3.8 (274)
↓ 17,648
v1.0.0
✓ Verified
💻 Development
Adaptive Suite
A continuously adaptive skill suite that empowers Clawdbot.
🧠 Claude-Ready
)}
★ 4.7 (88)
↓ 1,625
v1.0.0