Skip to content

Commit fc57ffe

Browse files
authored
feat: add preferred tools reference table (#11)
## Summary - Add "Preferred Tools" quick-reference table mapping legacy -> modern alternatives (14 tool pairings) - Add hyperfine benchmarking tool guidance with usage examples - New `references/preferred-tools.md` with detailed usage patterns, install commands, and integration tips - Cross-references to file-search, data-tools, git-workflow, and security-audit skills ## Motivation The cli-tools skill manages installation but gives no guidance on WHICH tool to pick for a task. Agents waste tokens using grep on JSON or find when fd exists. ## Changes - `skills/cli-tools/SKILL.md` - Added "Preferred Tools" section with decision table after Capabilities, before Triggers - `skills/cli-tools/references/preferred-tools.md` - Detailed tool comparison and patterns (430+ lines)
2 parents 5825d72 + e871b01 commit fc57ffe

2 files changed

Lines changed: 476 additions & 0 deletions

File tree

skills/cli-tools/SKILL.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,47 @@ Manage CLI tool installation, environment auditing, and updates.
1313
2. **Proactive**: Audit project dependencies and tool versions
1414
3. **Maintenance**: Batch update all managed tools
1515

16+
## Preferred Tools
17+
18+
When multiple tools can accomplish the same task, prefer the modern alternative for speed, correctness, and simpler syntax.
19+
20+
| Instead of... | Use... | Why | Skill |
21+
|--------------|--------|-----|-------|
22+
| `grep` on code | `rg` (ripgrep) | 10x faster, respects .gitignore, better regex | file-search |
23+
| `find` | `fd` | 5x faster, simpler syntax, respects .gitignore | file-search |
24+
| `grep` on PDFs/docs | `rga` (ripgrep-all) | Searches inside PDFs, Office, archives, SQLite | file-search |
25+
| `cloc` / `wc -l` | `tokei` or `scc` | 10-100x faster, accurate language detection | file-search |
26+
| `grep`/`awk` on JSON | `jq` | Structured extraction, handles nesting/escaping | data-tools |
27+
| `sed`/`awk` on YAML | `yq` | Syntax-aware, preserves comments and formatting | data-tools |
28+
| `sed` on JSON | `jq` or `dasel` | Correct escaping, handles nested paths | data-tools |
29+
| `awk`/Python on CSV | `qsv` | Handles quoting, headers, 100x faster on large files | data-tools |
30+
| `sed` on TOML/XML | `dasel` | Universal format support, in-place editing | data-tools |
31+
| `diff` on code | `difft` (difftastic) | Syntax-aware, ignores formatting-only changes | git-workflow |
32+
| `git commit --fixup` | `git absorb` | Auto-detects correct parent commit | git-workflow |
33+
| Manual security grep | `semgrep --config auto` | Pre-built OWASP/CWE rulesets, AST-aware | security-audit |
34+
| `time` for benchmarks | `hyperfine` | Statistical analysis, warmup runs, comparison | (this skill) |
35+
| `cat` for viewing | `bat` | Syntax highlighting, line numbers, git integration | - |
36+
37+
### hyperfine - Command Benchmarking
38+
39+
Statistical benchmarking tool. Use instead of ad-hoc `time` measurements.
40+
41+
```bash
42+
# Benchmark a command (10 runs with warmup)
43+
hyperfine 'fd -e py'
44+
45+
# Compare two commands
46+
hyperfine 'find . -name "*.py"' 'fd -e py'
47+
48+
# With warmup and minimum runs
49+
hyperfine --warmup 3 --min-runs 20 'rg pattern'
50+
51+
# Export results
52+
hyperfine --export-markdown bench.md 'command1' 'command2'
53+
```
54+
55+
**When to use:** When optimizing commands, comparing tool performance, or proving one approach is faster than another. Provides mean, stddev, min, max, and comparison percentages.
56+
1657
## Triggers
1758

1859
**Reactive** (auto-install):
@@ -159,6 +200,7 @@ When system prevents normal installation, use these alternatives:
159200

160201
- `references/binary_to_tool_map.md` - Binary to catalog mapping
161202
- `references/project_type_requirements.md` - Project type requirements
203+
- `references/preferred-tools.md` - Detailed comparison and usage patterns for preferred tools
162204

163205
---
164206

0 commit comments

Comments
 (0)