⌨️! Shell Mode
Also known as bang prefix, run a shell command in Claude Code
The ! prefix that runs your own shell command and puts its output in the chat.
Think of it like
It is like doing a job by hand while a friend looks on. Then you ask what they think.
Example
Leo types ! npm test. The tests fail, and Claude explains why without a second prompt.
Why it matters
You can run a quick command yourself and still give Claude what it printed.
Definition
Example code
console
! npm testCommon mistake
Key takeaways
- 1Your command, run now. No approval.
- 2Output joins the chat. Claude replies.
- 3Outside the sandbox. Not fenced.