Detect available CLI tools, select optimal tool for tasks, research alternatives when tools underperform. Use when choosing between CLI tools, tool seems slow or limited, need to search/view/process files, checking available tooling.
Detects available CLI tools and selects the optimal one for each task, suggesting faster alternatives when better tools are available. Automatically runs detection and provides fallback options when preferred tools are missing.
/plugin marketplace add outfitter-dev/agents/plugin install baselayer@outfitterThis skill inherits all available tools. When active, it can use any tool Claude has access to.
examples/tool-upgrade.mdreferences/alternatives.mdreferences/detection-script.mdreferences/tool-catalog.mdscripts/README.mdscripts/checkers/http.tsscripts/checkers/json.tsscripts/checkers/navigation.tsscripts/checkers/search.tsscripts/checkers/viewers.tsscripts/index.tsscripts/types.tsscripts/utils.tsSelect optimal CLI tools → graceful fallback → research when needed.
<when_to_use>
NOT for: tasks where tool choice is predetermined, simple one-line commands
</when_to_use>
<detection>Run detection script before selecting tools:
bun /Users/mg/Developer/outfitter/agents/baselayer/skills/use-the-best-tool/scripts/index.ts
Parse output to determine:
Cache results per session — no need to re-run unless tool availability changes.
</detection> <selection>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.
</fallback> <research>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.
</research> <workflow>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)"
</examples>
<rules>
ALWAYS:
NEVER:
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.