phone_system_command — Claude Code prompt: what it does
The phone_system_command prompt for Claude Code and ChatGPT runs Android commands through the connected device shell. Screen input is restricted; use the phone tool for actions on Mika’s display.
Apache-2.0 ★ 9,488 updated 2026-11-16
.claude/commands/phone_system_command.mdWhat phone_system_command does
The prompt runs Android commands in the connected device shell with shell UID permissions, not in the Linux sandbox. Each command has a 10-second timeout and bounded output. MIKA_DISPLAY_ID identifies the task’s virtual display and belongs in commands that inject UI input.
For taps, typing, key presses, opening apps, and text sharing, the prompt directs the agent to the phone tool, which acts on Mika’s screen and checks the result. Shell input for these actions is refused after its first use, while sending text with am start and a SEND intent is always blocked. State and settings queries are unaffected. If a command fails, the prompt says not to try alternate forms. For Claude Code, place the file at .claude/commands/phone_system_command.md.
What it helps with
- run an Android shell command with shell UID permissions
- read device state or settings
- route screen interactions to the phone tool
Example prompts for the agent
- Read the current Android settings through the device shell.
- Check the connected Android device’s state with a shell command.
- Tap the button on Mika’s screen and verify the result with the phone tool.
How to install phone_system_command
Manually: put the files in place
.claude/commands/phone_system_command.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about phone_system_command
How do I install phone_system_command in Claude Code?
Place the prompt file at .claude/commands/phone_system_command.md.
What does phone_system_command do?
It runs Android commands through the connected device shell with shell UID permissions. State and settings queries can use the shell; screen interactions go to the phone tool.
What does phone_system_command need to run?
The task needs a connected Android shell helper. Commands run on the device, not in the Linux sandbox.
Source text
phone_system_command.md · Apache-2.0
Run an Android shell command through this task's connected shell helper, with shell UID permissions. This is the device shell, not the Linux sandbox. The command has a 10 second timeout and bounded output. The MIKA_DISPLAY_ID environment variable identifies this task's virtual display; include it in commands that inject UI input, for example input -d "$MIKA_DISPLAY_ID" tap 500 800. Do not use it to tap, type, press keys, open apps or share text when a phone tool can: those act on Mika's screen and check the result, shell input does not. The first such command runs with a hint naming the right tool; after that, such commands are refused (error use_phone_tool), and text shares (am start with a SEND intent) are always refused: use phone_share_text. Commands that read state or settings are not affected. If a command fails, do not keep trying variations of it.
© wangzan101 · Apache-2.0 · wangzan101/Mika