# Read-Only Command

> Shell commands that only look, so they never ask.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** safe command, ls cat grep

## Think of it like

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

## 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

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

## 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.

## Why it matters

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

## Common mistake

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

## Three principles

- **Only looks.** Changes nothing.
- **Never asks.** In any mode.
- **Fixed list.** Use allow rules.

## Related terms

- [Compound Command](https://learn.benibix.com/term/ai/bash-compound-command)
- [Bash Permission Rule](https://learn.benibix.com/term/ai/bash-permission-rule)
- [Bash Tool](https://learn.benibix.com/term/ai/bash-tool)

---

Source: https://learn.benibix.com/term/ai/read-only-command
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
