file-nav
Navigate and find files using fd. Use when finding files by name, listing directory contents, exploring project structure, or when the user asks to find/list/show files or directories.
What this skill does
# File Navigation Skill
Use **fd** for finding files and navigating directory structures. fd is a fast, user-friendly alternative to `find`.
## Prerequisites
If `fd` is not installed, recommend the user install it:
```bash
# Arch Linux
sudo pacman -S fd
# Ubuntu/Debian (note: binary is 'fdfind', alias to 'fd')
sudo apt install fd-find
alias fd=fdfind
# macOS
brew install fd
# Cargo
cargo install fd-find
```
## Quick Reference
| Task | Command |
|------|---------|
| Find files by name | `fd "pattern"` |
| List all files | `fd` |
| List directory contents | `fd . directory/ --max-depth 1` |
| Find by extension | `fd -e clj` |
## Core fd Options
### Basic Search
```bash
fd "pattern" # Find files/dirs matching pattern
fd # List all files (like recursive ls)
fd . path/ # List all files under path/
fd "pattern" path/ # Search within specific directory
```
### Filtering by Type
```bash
fd -t f "pattern" # Files only
fd -t d "pattern" # Directories only
fd -t l "pattern" # Symlinks only
fd -t x "pattern" # Executables only
```
### Filtering by Extension
```bash
fd -e clj # All .clj files
fd -e ts -e tsx # All .ts and .tsx files
fd -e md "readme" # Markdown files matching "readme"
```
### Depth Control
```bash
fd --max-depth 1 # Current directory only (like ls)
fd --max-depth 2 # Current + one level down
fd --min-depth 2 # Skip current directory level
```
### Case Sensitivity
```bash
fd "pattern" # Smart case (default)
fd -s "Pattern" # Case sensitive
fd -i "pattern" # Case insensitive
```
### Including Hidden/Ignored Files
```bash
fd -H "pattern" # Include hidden files
fd -I "pattern" # Include gitignored files
fd -u "pattern" # Unrestricted (hidden + ignored)
```
### Exclusion
```bash
fd -E node_modules # Exclude directory
fd -E "*.test.*" # Exclude pattern
fd -E vendor -E dist # Multiple exclusions
```
## Common Tasks
### List Directory Contents (like ls)
```bash
# Current directory only
fd . --max-depth 1
# With file types visible
fd . --max-depth 1 -t f # Files only
fd . --max-depth 1 -t d # Directories only
# Specific directory
fd . src/ --max-depth 1
```
### Explore Project Structure
```bash
# Show top-level structure
fd . --max-depth 1
# Show two levels deep
fd . --max-depth 2
# Show only directories (project skeleton)
fd -t d --max-depth 3
```
### Find Files by Name
```bash
# Find config files
fd config
fd "config\.(json|yaml|edn)"
# Find test files
fd "_test\."
fd "test" -t d # Find test directories
# Find specific file anywhere
fd "^package\.json$"
fd -g "package.json" # Glob mode (exact match)
```
### Find Files by Extension
```bash
# Single extension
fd -e clj
# Multiple extensions
fd -e ts -e tsx -e js -e jsx
# Extension in specific directory
fd -e sql db/
```
### Find Recently Modified
```bash
fd --changed-within 1d # Modified in last day
fd --changed-within 1h # Modified in last hour
fd --changed-before 1w # Modified more than a week ago
```
### Find by Size
```bash
fd --size +1m # Files larger than 1MB
fd --size -10k # Files smaller than 10KB
```
## Output Formats
```bash
fd "pattern" # One path per line (default)
fd -0 "pattern" # Null-separated (for xargs -0)
fd -l "pattern" # Long format (like ls -l)
fd --color always # Force color output
```
## Executing Commands on Results
```bash
fd -e log -x rm # Delete all .log files
fd -e clj -x wc -l # Count lines in each Clojure file
fd -t f -x chmod 644 # Set permissions on all files
```
## Combining with Other Tools
```bash
# Find and grep
fd -e clj -x rg "defn"
# Find and read (use Read tool after fd)
fd "interface.clj" # Find the file
# Then use Read tool on the result
# Count files by extension
fd -e clj | wc -l
```
## Search Patterns
fd uses regex by default:
```bash
fd "^test" # Starts with "test"
fd "test$" # Ends with "test"
fd "test.*spec" # "test" followed by "spec"
fd "\d{4}" # Contains 4 digits
```
For glob patterns:
```bash
fd -g "*.config.js" # Glob mode
fd -g "src/**/*.ts" # Glob with directory
```
## When to Use fd vs rg
| Task | Tool |
|------|------|
| Find files by **name** | `fd` |
| Find files by **content** | `rg` |
| List directory structure | `fd` |
| Search inside files | `rg` |
| Find + search content | `fd -e ext -x rg "pattern"` |
## Performance Tips
1. **Specify directory** - `fd pattern path/` is faster than searching everywhere
2. **Use extension filter** - `fd -e clj` skips irrelevant files
3. **Limit depth** - `--max-depth N` for large trees
4. **Exclude heavy dirs** - `-E node_modules -E .git`
## Examples
### Find all interface files in a project
```bash
fd "interface" -e clj
```
### Show source directory structure
```bash
fd -t d src/ --max-depth 2
```
### Find configuration files
```bash
fd -g "*.{json,yaml,yml,edn,toml}" --max-depth 2
```
### Find test files excluding vendor
```bash
fd "_test\." -E vendor -E node_modules
```
### Find large files
```bash
fd -t f --size +1m -l
```
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.