Keyboard Shortcut
! — run a bash command directly
Starting your input with ! runs the rest as a literal shell command, without Claude interpreting or reasoning about it first.
Not every command needs Claude's involvement — sometimes you just want to run git status or ls and see the output, without spending a turn asking Claude to do it for you. Prefixing your input with ! sends it straight to the shell.
The output still shows up in the conversation, so Claude can see and react to it on your next message — this is a shortcut for running things yourself, not a way to hide commands from context.
It's a small thing, but it adds up: fewer unnecessary tool-call round-trips for the commands you already know you want to run.
!git statusFrequently asked questions
What does ! — run a bash command directly do in Claude Code?
Starting your input with ! runs the rest as a literal shell command, without Claude interpreting or reasoning about it first.
How do I use it?
Try: !git status
Any caveats to know about?
It's a small thing, but it adds up: fewer unnecessary tool-call round-trips for the commands you already know you want to run.
Is this covered in the Claude Code Toolkit?
Yes — ! — run a bash command directly and patterns like it are part of the full command, hook, and template pack included with a Claude Code Toolkit subscription.
Want the full command, hook, and template pack?
This is one pattern out of the full Claude Code Toolkit — subscribe for the complete set, plus everything we add going forward.
Subscribe to the toolkit — $79/mo