| name | cli-tools |
| description | CLI tool management for coding agents. Use when a command fails with 'command not found', installing/updating CLI tools, setting up project environments, or checking dependencies. Provides auto-installation of 74+ tools via optimal package managers, project environment auditing, and batch update capabilities. By Netresearch. |
CLI Tools Skill
Manage CLI tool installation, environment auditing, and updates for coding agents.
Capabilities
- Reactive: Missing Tool Resolution - Auto-detect and install tools when commands fail
- Proactive: Environment Checking - Audit project dependencies and tool versions
- Maintenance: Batch Updates - Update all managed tools across package managers
Triggers
Reactive Mode (Auto-Install Missing Tools)
Activate when observing these error patterns:
bash: <tool>: command not found
zsh: command not found: <tool>
'<tool>' is not recognized as an internal or external command
sh: <tool>: not found
/bin/sh: <tool>: not found
Error: Cannot find module '<tool>'
Proactive Mode (Environment Check)
Activate on user requests:
- "check environment", "check my tools", "audit tools"
- "what's missing", "what's outdated", "update tools"
- "fix my environment", "setup environment"
- "install development tools", "install project dependencies"
- Project initialization or
/sc:loadcontext
Maintenance Mode (Batch Updates)
Activate on:
- "update all tools", "upgrade everything"
- "update package managers", "refresh tools"
Workflows
Workflow 1: Missing Tool Resolution
When a command fails with "command not found":
- Extract tool name from error message
- Resolve catalog entry using
references/binary_to_tool_map.md:rg→ripgrepfd→fdpython3→python
- Check if catalog exists:
catalog/<tool>.json - Execute installation:
scripts/install_tool.sh <tool> install - Verify installation: Check command now works
- Retry original command
Example:
User runs: rg "pattern" src/
Error: bash: rg: command not found
Action sequence:
1. Lookup: rg → ripgrep (from binary_to_tool_map.md)
2. Execute: scripts/install_tool.sh ripgrep install
3. Verify: rg --version
4. Retry: rg "pattern" src/
Workflow 2: Environment Audit
When checking project environment:
- Detect project type:
scripts/detect_project_type.sh text . - Run full audit:
scripts/check_environment.sh audit . - Report findings:
- Missing required tools
- Outdated tools
- PATH issues
- Duplicate installations
- Offer to fix issues found
Example:
User: "check my environment"
Action sequence:
1. Detect: Python project (pyproject.toml found)
2. Required: python, uv
3. Recommended: ruff, black, mypy
4. Check each tool...
5. Report: "Missing: ruff. All others OK."
6. Offer: "Install ruff? [Y/n]"
Workflow 3: Batch Updates
When updating all tools:
- Dry run first to preview changes:
DRY_RUN=1 scripts/auto_update.sh update - Confirm with user before proceeding
- Execute updates by scope:
SCOPE=user scripts/auto_update.sh update - Report results: Updated count, failures
Available Scripts
| Script | Purpose | Usage |
|---|---|---|
install_tool.sh |
Install/update/uninstall tools | install_tool.sh <tool> [install|update|uninstall] |
auto_update.sh |
Batch update all package managers | auto_update.sh [detect|update] |
check_environment.sh |
Audit environment | check_environment.sh [audit|path|project] |
detect_project_type.sh |
Detect project type | detect_project_type.sh [text|json] [dir] |
Catalog Coverage
74 tools across categories:
- Core CLI: ripgrep, fd, fzf, jq, yq, bat, delta, just
- Languages: python, node, rust, go, ruby
- Package Managers: uv, npm, pnpm, cargo, pip, gem
- DevOps: docker, compose, kubectl, terraform, ansible
- Linters: eslint, prettier, ruff, black, shellcheck
- Security: trivy, gitleaks, bandit, semgrep
- Git Tools: gh, glab, git-lfs, delta
Installation Methods
The skill selects the optimal installation method based on catalog priority:
- GitHub Release Binary - Direct download (fastest, no deps)
- Cargo - Rust tools via cargo install
- UV/Pip - Python tools
- NPM - Node tools
- Apt/Brew - System packages (fallback)
Priority: user-level (~/.local/bin, ~/.cargo/bin) over system-level.
References
Load these as needed:
references/binary_to_tool_map.md- Binary name to catalog entry mappingreferences/project_type_requirements.md- Project type to required tools
Error Handling
If installation fails:
- Check error message for root cause
- Try alternative installation method (catalog has multiple)
- Check network connectivity
- Verify package manager is working
- Report failure with actionable guidance
Notes
- jq dependency: Most scripts require
jq. Install it first if missing. - PATH updates: After installation, may need to reload shell or update PATH.
- Permissions: User-level installs do not need sudo. System installs may.
- Offline mode: Cannot install without network, but can audit local tools.