cli-tools
npx machina-cli add skill netresearch/cli-tools-skill/cli-tools --openclawCLI Tools Skill
Manage CLI tool installation, environment auditing, and updates.
Triggers
Reactive (auto-install):
bash: <tool>: command not found
Proactive (audit): "check environment", "what's missing", "update tools"
Capabilities
- Reactive: Auto-install missing tools on "command not found"
- Proactive: Audit project dependencies and tool versions
- Maintenance: Batch update all managed tools
Preferred Tools
When multiple tools can accomplish the same task, prefer the modern alternative for speed, correctness, and simpler syntax.
| Instead of... | Use... | Why | Skill |
|---|---|---|---|
grep on code | rg (ripgrep) | 10x faster, respects .gitignore | file-search |
find | fd | 5x faster, simpler syntax | file-search |
grep on PDFs/docs | rga (ripgrep-all) | Searches inside PDFs, archives | file-search |
cloc / wc -l | tokei or scc | 10-100x faster, accurate | file-search |
grep/awk on JSON | jq | Structured extraction | data-tools |
sed/awk on YAML | yq | Syntax-aware, preserves comments | data-tools |
sed on JSON | jq or dasel | Correct escaping | data-tools |
awk/Python on CSV | qsv | Handles quoting, 100x faster | data-tools |
sed on TOML/XML | dasel | Universal format support | data-tools |
diff on code | difft (difftastic) | Syntax-aware diffs | git-workflow |
git commit --fixup | git absorb | Auto-detects parent commit | git-workflow |
| Manual security grep | semgrep --config auto | AST-aware, OWASP rulesets | security-audit |
time for benchmarks | hyperfine | Statistical analysis, comparison | (this skill) |
cat for viewing | bat | Syntax highlighting, git integration | - |
Workflows
Missing Tool Resolution
- Diagnose: check if tool exists elsewhere (
which,command -v,type -a) - Install: lookup in
references/binary_to_tool_map.md, runscripts/install_tool.sh <tool> install - Verify: confirm with
which <tool>and<tool> --version, retry original command
See references/resolution-workflow.md for detailed diagnostic and verification steps.
Environment Audit
scripts/check_environment.sh audit .
Scripts
| Script | Purpose |
|---|---|
install_tool.sh | Install/update/uninstall tools |
auto_update.sh | Batch update package managers |
check_environment.sh | Audit environment |
detect_project_type.sh | Detect project type |
Catalog (74 tools)
Core CLI, Languages, Package Managers, DevOps, Linters, Security, Git Tools
References
| Reference | Use when... |
|---|---|
references/binary_to_tool_map.md | Mapping binary names to catalog entries |
references/project_type_requirements.md | Checking what tools a project type needs |
references/preferred-tools.md | Detailed usage patterns and examples for preferred tools |
references/resolution-workflow.md | Full diagnostic/install/verify workflow for missing tools |
references/troubleshooting.md | PATH issues, permission problems, installation blocked |
Contributing: https://github.com/netresearch/cli-tools-skill
Source
git clone https://github.com/netresearch/cli-tools-skill/blob/main/skills/cli-tools/SKILL.mdView on GitHub Overview
The cli-tools skill automates the installation of missing CLI utilities, audits project environments, and batch updates managed tools. It reacts when a command is not found, proactively checks what's missing, and keeps tooling up to date across projects.
How This Skill Works
It monitors shell executions for 'command not found' errors and uses a reference map to install the appropriate tool via install_tool.sh. For audits, it runs check_environment.sh audit to enumerate dependencies and versions, and for maintenance it executes auto_update.sh to update all managed tools.
When to Use It
- When you type a command and receive 'command not found' and want the tool installed automatically.
- When starting a new project and you need to ensure all required CLI tools are installed.
- When you want to audit a repository to see missing or outdated tools and their versions.
- When you need to batch update all managed tools to the latest versions.
- When you want to switch to faster or more reliable modern alternatives as recommended.
Quick Start
- Step 1: Try a command; if it's missing, cli-tools will auto-install the appropriate tool.
- Step 2: If you want to audit, run scripts/check_environment.sh audit . to enumerate dependencies and versions.
- Step 3: For maintenance, run scripts/auto_update.sh to batch-update all managed tools.
Best Practices
- Reference references/binary_to_tool_map.md for exact mappings to install.
- Prefer modern alternatives (as noted in preferred-tools) for speed and correctness.
- Verify installations with which <tool> and <tool> --version after install.
- Run environment audits regularly (CI or pre-commit) to catch drift early.
- Use the provided scripts (install_tool.sh, auto_update.sh, check_environment.sh) for consistent operations.
Example Use Cases
- A developer types a missing command and the tool auto-installs automatically.
- A project kickoff runs scripts/check_environment.sh audit . to list missing tools and versions.
- The team runs auto_update.sh to refresh all managed tools in one sweep.
- Codebase searches switch from grep to ripgrep (rg) following the preferred-tools guidance.
- Cloning a repo triggers the resolution workflow to diagnose and install missing tools.