Appearance
LLM Environment Tools
CLI tools that improve LLM coding agent performance. An agent's effectiveness depends on its environment — the binaries in PATH directly affect output quality, token efficiency, and accuracy.
Based on Claude Code told me what tools it needs to work faster by Stephane Derosiaux.
Why These Tools Matter
LLM agents operate under a hard constraint: the context window. Every command run and every output read consumes tokens from a fixed budget. Tools on this list improve the signal-to-noise ratio through three mechanisms:
- Structured output improves parsing reliability. The model does text comprehension, not structured data access. Tools that add explicit boundaries (line numbers, separated sections) reduce ambiguity and mistakes.
- Shorter commands reduce generation errors. Every token in a generated shell command is a chance for a syntax mistake. Concise syntax has less error surface. This compounds across sessions with 50+ commands.
- Declarative interfaces collapse multi-step reasoning. SQL instead of a multi-step Python script is fewer reasoning decisions, fewer failure points. The model describes what it wants instead of planning how to get it.
Recommended Tools
Search and Navigation
- ripgrep (
rg) — Fast grep that respects.gitignore. Cleaner results mean fewer irrelevant lines in the context window. - fd — Modern
find. Comparefind . -name "*.vue" -not -path "*/node_modules/*"tofd -e vue. Shorter commands, fewer syntax errors,.gitignore-aware by default. - eza — Modern
lswith tree view, git status, and structured columns.eza --tree --git-ignore --level=3replaces multi-stepfind/lspipelines with a single command that respects.gitignore. - fzf — Fuzzy finder for interactive filtering. Useful in piped chains like
fd -e ts | fzfto present choices instead of guessing.
Data Processing
- DuckDB — Embedded analytical database. Runs SQL directly on CSV, Parquet, or JSON files without import steps or server setup. Replaces multi-step Python scripts with single declarative queries:
duckdb -c "SELECT category, sum(amount) FROM 'data.csv' GROUP BY 1" - jq — JSON processor. Extracts, filters, and reshapes JSON on the command line. Replaces multi-line Python/Node scripts with concise expressions:
curl -s api/endpoint | jq '.data[] | {id, name}'. Particularly valuable because so many tools and APIs emit JSON.
Structured Output
- bat —
catwith syntax highlighting and line numbers. Gives the model structured, numbered output without extra flags. Comparecat -n file.pytobat file.py— bat adds language-aware highlighting and consistent formatting automatically. - git-delta — Structured diff viewer. Adds line numbers and clean section boundaries to
git diffoutput. Raw diffs are a wall of+and-lines; delta makes them navigable. Configure for LLM consumption (see configuration below). - xh — Modern HTTP client. Cleanly separates status codes, headers, and response body. With raw
curl -v, everything is interleaved in stderr/stdout.
Automation
- watchexec — File watcher that reruns commands on changes. Eliminates conversational round-trips:
watchexec -e rs -- cargo testreplaces polling loops or "please run the tests again." - just — Simpler task runner (alternative to Make). No tab sensitivity, no implicit rules — less likely to produce broken task files.
Analysis
- tokei — Code statistics by language. Counts lines of code, comments, and blanks per language in a project. Gives the model a quick structural overview — which languages dominate, how large each component is — without scanning every file:
tokei src/. - semgrep — Pattern-based static analysis. Provides epistemic grounding: an LLM saying "this looks like SQL injection" is probabilistic; semgrep saying "rule X flagged line Y" is deterministic. Combining both (LLM runs semgrep, reads results, reasons about them) anchors soft reasoning to hard evidence.
Install (macOS)
sh
brew install ripgrep fd fzf duckdb bat eza git-delta jq xh watchexec just tokei semgrepGit-Delta Configuration for LLM Consumption
After installing delta, configure git to use it with settings optimized for machine readability:
sh
git config --global core.pager delta
git config --global interactive.diffFilter "delta --color-only"
git config --global delta.navigate true
git config --global delta.line-numbers true
git config --global delta.side-by-side false
git config --global merge.conflictStyle zdiff3Environment Audit Prompt
Run this prompt periodically or when setting up a new machine to diagnose gaps in your agent's environment:
Audit my development environment for LLM agent effectiveness.
- List every binary in my PATH. Identify which ones you can invoke and which are broken, shadowed, or redundant.
- Check for these high-value tools: rg, fd, fzf, duckdb, bat, eza, delta, jq, xh, watchexec, just, tokei, semgrep. Report which are present and which are missing.
- Inspect my shell aliases and git config. Flag anything that produces unstructured output where a structured alternative exists.
- Check my MCP server configuration for broken or missing connections.
- Prioritize findings by impact on your ability to help me effectively.
The tool recommendations are mostly universal (they stem from structural properties of how LLMs consume output). The audit results are personal — they depend on what's already installed, what's broken, and what's misconfigured on each specific machine.
Agent Tool Preferences
Instructions to add to ~/.claude/CLAUDE.md so agents prefer these tools over traditional alternatives. This is the canonical set — the sync procedure below keeps any machine's CLAUDE.md up to date with it.
markdown
## Tool Preferences
When these tools are available, prefer them over traditional alternatives:
- `bat` over `cat` — adds line numbers and syntax highlighting
- `eza` over `ls` — structured columns, tree view, git-aware
- `fd` over `find` — simpler syntax, respects .gitignore
- `rg` over `grep` — faster, respects .gitignore
- `delta` over raw `git diff` — line numbers, clean section boundaries
- `jq` over scripting for JSON — concise, purpose-built
- `duckdb` over scripting for tabular data — SQL on CSV/JSON/Parquet
- `xh` over `curl` — structured output, cleaner status/header/body separation
- `tokei` over `wc`/`cloc` — code stats by language in one command
- `semgrep` over manual pattern review — deterministic static analysisSync Agent Preferences
Sync the canonical tool preferences above into the user's ~/.claude/CLAUDE.md. Follow this procedure exactly.
1. Compare
Read ~/.claude/CLAUDE.md. Look for a ## Tool Preferences section. Extract the list of preference lines (each - \X` over `Y`` entry) as the local set. Extract the same lines from the canonical code block above as the canonical set. Compute the differences:
- missing locally: entries in the canonical set but not in the local file
- extra locally: entries in the local file but not in the canonical set
2. Act based on the comparison
Already in sync — Both sets match exactly. Tell the user their preferences are already in sync. Done.
File has less than the skill — Entries are missing locally. If the ## Tool Preferences section doesn't exist, append the entire canonical block. If it exists, patch in the missing entries. Preserve all other content in ~/.claude/CLAUDE.md. Tell the user what was added.
File has more than the skill — Extra entries exist locally. Present the user with these options using AskUserQuestion:
- (a) Sync extras to the skill — Add the extra entries to the canonical code block above.
- (b) Leave extras in CLAUDE.md only — Keep them locally, don't add them to the skill. No changes made.
- (c) Remove extras from CLAUDE.md — Delete entries from
~/.claude/CLAUDE.mdthat aren't in the canonical set. - (d) Granular decisions — Go through each extra entry one by one and let the user decide.
Recommend whichever option you think is best, with brief reasoning based on what the extra entries actually are.
Both directions — Missing AND extra entries exist. First patch in the missing entries. Then handle the extras using the options above.
3. Preserve other content
When writing ~/.claude/CLAUDE.md, only modify the ## Tool Preferences section. Preserve all other sections and content in the file.