Skip to content

Update global CLAUDE.md tool preferences: rg, ast-grep, fd, sd, jq, timeout rules #17

Description

@nichm

Problem

Claude Code defaults to grep, find, sed, cat even when faster/better alternatives are installed. It doesn't auto-detect installed tools — must be told explicitly via CLAUDE.md.

Changes needed in ~/.claude/CLAUDE.md (deployed by install.sh)

Tool preferences section

## Available CLI Tools
**Search (prefer in order):**
- `rg` — use instead of `grep`. Respects .gitignore automatically.
- `ast-grep` (`sg`) — for structural/syntax-aware code search (function calls, patterns)
- `fd` — use instead of `find`

**Replace/view:**
- `sd` — use instead of `sed`
- `bat` — use instead of `cat` for file viewing
- `difft` — use for diff review (AST-aware)

**Data:**
- `jq` — all JSON querying
- `yq` — all YAML querying
- `scc` — codebase stats instead of `cloc`

Command safety section

## Command Safety
- Always wrap shell commands: `timeout 30 <command>`
- For long operations: `timeout 120 <command>`
- Use `--timeout` flags when tools support them natively (e.g. `rg --timeout 10`)

Subagent routing

## Subagent Routing
**Parallel** (all must be true): 3+ independent tasks, no shared files, no state dependency
**Sequential** (any triggers): task B needs output from A, shared files, unclear scope
**Background**: research/analysis not blocking current work

Every subagent dispatch: include scope, file references, expected output, success criteria.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🤖 scrumbotScrumbot is analyzing this issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions