run_command · wangzan101, tools — Claude Code prompt for shell commands
This Claude Code prompt runs shell commands in a Linux sandbox. It can also route calls to the current task’s phone tools through mika phone.
Apache-2.0 ★ 9,488 updated 2026-11-16
.claude/commands/run_command.mdWhat run_command does
The prompt executes a shell command in an Alpine Linux sandbox with /workspace as its working directory, using /bin/sh -lc. Its result includes the exit code, timeout status, duration, and network state. Long output is represented by its beginning and end; the complete text is saved at fullOutputPath.
Calls through mika phone go to the current task’s phone tools using their normal execution path. For simple phone actions, the prompt’s instructions say to call those tools directly instead of starting a shell. In Claude Code, place the command file at .claude/commands/run_command.md.
What it helps with
- run a shell command in a Linux sandbox
- check a command’s exit code and output
- route an operation to phone tools through
mika phone
Example prompts for the agent
- Run
pwdin the Linux sandbox and show its result. - Send a settings query through
mika phone query. - Pass a tap operation to the phone tools with
mika phone run.
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?
Place the command file at .claude/commands/run_command.md.
What does run_command do?
It executes shell commands in an Alpine Linux sandbox, using /workspace as the working directory, and returns execution details and output. It also routes mika phone calls to the current task’s phone tools.
What does run_command return after a shell command?
The result includes the exit code, timeout status, duration, and network state. Long output shows its beginning and end, while the full text is saved at fullOutputPath.
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, timedOut, durationMs, the output (head and tail when long; then fullOutputPath has all of it) and whether the network is on. ok is true only when the exit code is 0 and it did not time out. `mika phone <op> '<json-args>'` calls the current task's phone tools through their normal execution path; for example, `mika phone query '{"text":"设置"}'` or `mika phone run '[{"op":"tap","targetText":"设置"}]'`. Use the direct phone tools for simple work to avoid starting a shell.
© wangzan101 · Apache-2.0 · wangzan101/Mika
Similar prompts
All prompts for Agent setup: memory, context, orchestration →run_command by other authors comes first.