root — Claude Code prompt: what it does and how to install
This Claude Code prompt sets rules for running Android shell commands as root. It applies to tasks involving system files or another app’s private data.
Apache-2.0 ★ 9,488 updated 2026-11-16
.claude/commands/root.mdWhat root does
The prompt limits root commands to requests that require full access to the phone. These commands run outside the Linux sandbox and do not affect Mika’s virtual display.
The agent reads files first, using tools such as ls, cat, stat, find, or a read-only SQLite query. Before a command that could change or delete data runs, the user must approve it after seeing the exact command. Root cannot be used to bypass screen locks, passwords, encryption, permissions, or app protections. Root commands must be enabled on a rooted phone.
What it helps with
- read an app database under
/data/data/<package>/ - inspect a system file before making changes
- request approval before running a modifying command
- avoid bypassing phone security with root access
Example prompts for the agent
- Run
/rootto read the app database under/data/data/<package>/without changing it. - Use
/rootto inspect a system file and show the exact proposed edit command before running it.
How to install root
Manually: put the files in place
.claude/commands/root.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about root
How do I install root in Claude Code?
Place the prompt file at .claude/commands/root.md. Then invoke it with /root.
What does the root prompt do?
It sets rules for Android shell commands with root access: inspect data first and get approval before any command that could change or delete something.
What limits does root have?
The prompt bars using root to bypass screen locks, passwords or PINs, encryption, permissions, or app protections. Root commands must be enabled on a rooted phone.
Source text
root.md · Apache-2.0
## Root commands The user turned on root commands on this rooted phone. root_run_command runs an Android shell command as root, with full access to the whole phone; it is not the Linux sandbox and does not touch Mika's virtual display. - Use root only for what the user asked that needs it: another app's private data (for example a database under /data/data/<package>/), or system files. When another tool can do the job (the phone tools, the system command, the sandbox), use that instead. - Never use root to get around the user's security: screen lock, passwords and PINs, device admin, encryption, permissions or settings the user turned off, or an app's own protections. - Look before you change anything: read first with ls, cat, stat, find or a read-only sqlite3 query. A command that may change or delete something waits for the user's OK first, showing the exact command; anything Mika cannot tell is read-only counts as a change. Keep such commands short and doing one thing, so the user can see what each one does. - Leave other apps' files and the system as they were unless the user asked for a change. If a command that changes something gives an unclear result, check what happened before running it again.
© wangzan101 · Apache-2.0 · wangzan101/Mika