Skip to content
BENIBIX Learn

Read-Only Command

AI⌨️ Claude CodeConfiguration

Also known as safe command, ls cat grep

Shell commands that only look, so they never ask.

Think of it like

It is like looking at a shop window. You do not need to ask to look.

Example

Claude runs ls and grep a dozen times to learn Lucy's code. None of them stop to ask her.

Why it matters

Looking around is most of the work. Asking for each look would make Claude slow to use.

Definition

A read-only command is a shell command Claude Code knows only looks and changes nothing. Examples are ls, cat, head, grep, find, wc, diff, pwd and the read-only forms of git. These run with no prompt in every mode. The list is built in, and you cannot change it. A find with -delete, or a write with >, still asks.

Example code

console
$ ls src && grep -r TODO src
# both read-only: runs with no prompt
$ find . -name '*.tmp' -delete
# -delete writes: asks first
Looking is free, deleting is not.

Common mistake

Trying to add your own commands to the list. It is fixed. Write an allow rule instead.

Key takeaways

  1. 1
    Only looks. Changes nothing.
  2. 2
    Never asks. In any mode.
  3. 3
    Fixed list. Use allow rules.