This skill should be used when choosing CLI tools, a tool seems slow, or when "best tool", "which tool", or "tool alternatives" are mentioned.
Select optimal CLI tools → graceful fallback → research when needed.
NOT for: tasks where tool choice is predetermined, simple one-line commands
Run detection script before selecting tools:
bun /Users/mg/Developer/outfitter/agents/outfitter/skills/which-tool/scripts/index.ts
Parse output to determine:
Cache results per session — no need to re-run unless tool availability changes.
Map task to best available tool:
| Task | Preferred | Fallback | Legacy | Notes |
|---|---|---|---|---|
| Find files by name | fd |
- | find |
fd: faster, better defaults |
| Search file contents | rg |
- | grep |
rg: respects .gitignore, faster |
| AST-aware code search | sg |
rg |
grep |
sg: structure-aware queries |
| Process JSON | jq |
- | python/node |
jq: domain-specific language |
| View file with syntax | bat |
- | cat |
bat: syntax highlighting, git diff |
| List directory | eza |
- | ls |
eza: modern output, icons |
| View git diff | delta |
- | git diff |
delta: side-by-side, syntax highlighting |
| Navigate directories | zoxide |
- | cd |
zoxide: frecency-based jumping |
| Fuzzy select | fzf |
- | - | fzf: interactive filtering |
| HTTP requests | httpie |
- | curl |
httpie: human-friendly syntax |
Selection algorithm:
When preferred tool unavailable:
Minor improvement (preferred 10–30% better):
Significant improvement (preferred 2x+ better):
◇ Alternative: {TOOL} would be {BENEFIT} — install with {COMMAND}Critical gap (task extremely tedious with fallback):
◆ Caution: {TOOL} recommended for this task — {FALLBACK} will be slow/limitedNever block on missing tools — graceful degradation always.
Trigger research when:
Research workflow:
{TASK} CLI tool 2025 or {TASK} CLI tool 2024Present findings:
If research yields strong candidate → add to selection table for future reference.
Standard flow:
Research flow:
△ This seems slow — research alternatives?Scenario: Search for authentication code
Task: Find all files containing "authentication"
Detection: rg available
Selection: Use rg over grep
rg "authentication" --type ts --type js
Scenario: Find config files
Task: Find all YAML files in project
Detection: fd available
Selection: Use fd over find
fd -e yaml -e yml
Scenario: Process API response
Task: Extract specific fields from JSON
Detection: jq unavailable
Fallback: Use node/python
Suggestion: ◇ Alternative: jq would simplify this — install with brew install jq
node -e "console.log(JSON.parse(require('fs').readFileSync(0, 'utf-8')).field)"
ALWAYS:
NEVER: