run_command · wangzan101, entries — Claude Code prompt for shell commands
This Claude Code prompt runs shell commands in a Linux sandbox. Commands use /bin/sh -lc with /workspace as the working directory.
Apache-2.0 ★ 9,488 updated 2026-11-16
.claude/commands/run_command.mdWhat run_command does
run_command executes a shell command in a Linux sandbox and returns its output and exit code. The ok field is true only when the command exits with code 0 and does not time out.
The sandbox uses Alpine and runs commands through /bin/sh -lc from /workspace. Starting with the next call, file tools become available for reading, writing, searching, sharing files, and running bundled scripts.
For Claude Code, save the prompt as .claude/commands/run_command.md.
What it helps with
- run a shell command in a Linux sandbox
- retrieve a command's output and exit code
- access file tools after running a command
Example prompts for the agent
- Run
pwdin the sandbox. - Execute
ls -laand return the output. - Find files named
package.json.
How to install run_command
Manually: put the files in place
.claude/commands/run_command.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about run_command
How do I install run_command in Claude Code?
Save the prompt to .claude/commands/run_command.md.
What does run_command do?
It runs a shell command in a Linux sandbox and returns the output with the exit code. The ok field is true only for exit code 0 when the command does not time out.
Where does run_command execute commands?
Commands run in an Alpine Linux sandbox through /bin/sh -lc, using /workspace as the working directory.
Source text
run_command.md · Apache-2.0
Run a shell command in the Linux sandbox (Alpine, /bin/sh -lc) with /workspace as the working directory. Returns exitCode and the output; ok is true only when the exit code is 0 and it did not time out. From your next call on you also get the file tools (read_file, write_file, search_files, share_file, run_bundled_script).
© wangzan101 · Apache-2.0 · wangzan101/Mika
Similar prompts
All prompts for DevOps and infrastructure →run_command by other authors comes first.