Skip to main content
prompt GP ChatGPT

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/run_command.md
Open on GitHub

What 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 pwd in 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.md

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.

From the same set132

The whole set →
phone_scroll The phone_scroll Claude Code prompt scrolls an Android app screen. Set a direction, gesture amount, or scroll region. GP ChatGPT ★ 9,488repo stars phone_open_link The phone_open_link Claude Code prompt opens an Android page on the virtual display from a settings action or URI. Request a target page directly instead of navigating through the app. GP ChatGPT ★ 9,488repo stars phone_observe The phone_observe Claude Code prompt reads a phone’s virtual display and its accessibility tree. The agent can locate a control or dialog before tapping it. GP ChatGPT ★ 9,488repo stars phone_collect phone_collect — a prompt for Claude Code and ChatGPT reads text across consecutive Android app screens with local scrolling. It gathers long chat logs, feeds, and lists while merging overlapping lines. GP ChatGPT ★ 9,488repo stars web_capture The web_capture Claude Code prompt lists XHR/fetch responses received by the current tab. It helps inspect data a page loaded through an API. GP ChatGPT ★ 9,488repo stars swipe This Claude Code prompt describes swipes between two interface points. It covers page scrolling, carousel gestures, and how to read the action result. GP ChatGPT ★ 9,488repo stars web_navigate web_navigate — a Claude Code prompt for opening HTTP and HTTPS addresses in Mika's built-in browser. Initiates web navigation before screen tools take over. GP ChatGPT ★ 9,488repo stars history_read The history_read Claude Code prompt retrieves details from earlier conversation turns. Use it to resume an interrupted task without collecting the same findings again. GP ChatGPT ★ 9,488repo stars

Project sponsors

Companies that keep this analytics open