$npx -y skills add zhaojiaqi/MeowHub --skill meowhub-deviceControl your Android phone via MeowHub — screenshot, tap, swipe, type, open apps, execute shell commands, make/accept/end calls, and control audio channels. Use this skill whenever you need to interact with the phone's screen or perform device operations.
| 1 | # MeowHub Device Control |
| 2 | |
| 3 | You have direct control over an Android phone through the MeowHub system-level protocol. This is real device control — equivalent to physical finger touches, undetectable by any application. |
| 4 | |
| 5 | ## ⚠️ MANDATORY: Only use $PREFIX/bin/curl — NEVER use Python/wget/scripts |
| 6 | |
| 7 | **你必须且只能使用 `$PREFIX/bin/curl` 命令来调用所有 API。这是唯一允许的方式。** |
| 8 | |
| 9 | **⚠️ 重要:不要使用 `curl` 或 `/bin/curl` 或 `/system/bin/curl`!系统自带 curl 已损坏。必须使用完整路径 `$PREFIX/bin/curl`。** |
| 10 | |
| 11 | 严格禁止: |
| 12 | - ❌ 使用 `python3`、`python`、`urllib`、`requests` 或任何 Python 代码 |
| 13 | - ❌ 使用 `wget` |
| 14 | - ❌ 编写任何脚本文件(.py, .sh) |
| 15 | - ❌ 使用 `base64` 命令行工具 |
| 16 | - ❌ 使用 `/bin/curl` 或 `/system/bin/curl`(系统 curl 已损坏) |
| 17 | - ❌ 使用裸 `curl` 命令(可能解析到错误的路径) |
| 18 | |
| 19 | 只允许: |
| 20 | - ✅ `$PREFIX/bin/curl`(Termux 预装的 curl,完整路径) |
| 21 | |
| 22 | 违反此规则的任何工具调用都是错误的。如果你发现自己要写 Python,**停下来,改用 $PREFIX/bin/curl**。 |
| 23 | |
| 24 | ## How It Works |
| 25 | |
| 26 | MeowHub provides an HTTP Bridge Server at `http://127.0.0.1:18790`. All device operations go through this bridge via `$PREFIX/bin/curl`. |
| 27 | |
| 28 | ## Quick Reference (直接复制使用) |
| 29 | |
| 30 | ```bash |
| 31 | # 截图 |
| 32 | $PREFIX/bin/curl -s -X POST http://127.0.0.1:18790/api/screenshot -H 'Content-Type: application/json' -d '{"quality":50}' |
| 33 | |
| 34 | # 打开应用 |
| 35 | $PREFIX/bin/curl -s -X POST http://127.0.0.1:18790/api/open_app -H 'Content-Type: application/json' -d '{"name":"com.tencent.mm"}' |
| 36 | |
| 37 | # 点击坐标 |
| 38 | $PREFIX/bin/curl -s -X POST http://127.0.0.1:18790/api/tap -H 'Content-Type: application/json' -d '{"x":540,"y":960}' |
| 39 | |
| 40 | # 输入文字 |
| 41 | $PREFIX/bin/curl -s -X POST http://127.0.0.1:18790/api/type -H 'Content-Type: application/json' -d '{"text":"hello"}' |
| 42 | |
| 43 | # 按键 |
| 44 | $PREFIX/bin/curl -s -X POST http://127.0.0.1:18790/api/press_key -H 'Content-Type: application/json' -d '{"key":"home"}' |
| 45 | |
| 46 | # 检查连接 |
| 47 | $PREFIX/bin/curl -s http://127.0.0.1:18790/api/status |
| 48 | |
| 49 | # 接听来电 |
| 50 | $PREFIX/bin/curl -s -X POST http://127.0.0.1:18790/api/accept_call -H 'Content-Type: application/json' -d '{}' |
| 51 | |
| 52 | # 挂断/拒接电话 |
| 53 | $PREFIX/bin/curl -s -X POST http://127.0.0.1:18790/api/end_call -H 'Content-Type: application/json' -d '{}' |
| 54 | |
| 55 | # 拨打电话 |
| 56 | $PREFIX/bin/curl -s -X POST http://127.0.0.1:18790/api/make_call -H 'Content-Type: application/json' -d '{"number":"13800138000"}' |
| 57 | ``` |
| 58 | |
| 59 | ## Standard Operation Flow (2-3 步完成) |
| 60 | |
| 61 | **你运行在手机本机上。截图返回 base64 图片数据,你的视觉模型可以直接分析,不需要任何中间脚本。** |
| 62 | |
| 63 | 1. **截图 + 分析** — 一步完成。用 `$PREFIX/bin/curl` 调用截图 API,返回的 `image` 字段(base64 JPEG)直接用你的视觉能力分析。 |
| 64 | 2. **操作** — 根据分析结果用 `$PREFIX/bin/curl` 执行操作(点击、输入等) |
| 65 | 3. **验证** — 再用 `$PREFIX/bin/curl` 截图确认结果(可选) |
| 66 | |
| 67 | **截图 API 返回格式:** |
| 68 | ```json |
| 69 | {"image": "<base64-jpeg>", "data": "<base64-jpeg>", "width": 1080, "height": 2340, "mimeType": "image/jpeg"} |
| 70 | ``` |
| 71 | |
| 72 | ## Available Tools (29) |
| 73 | |
| 74 | ### Connection |
| 75 | |
| 76 | | Tool | Endpoint | Method | Description | |
| 77 | |------|----------|--------|-------------| |
| 78 | | `check_connection` | `/api/status` | GET | Check bridge & socket connection status | |
| 79 | |
| 80 | ### Visual & Information |
| 81 | |
| 82 | | Tool | Endpoint | Method | Key Parameters | |
| 83 | |------|----------|--------|---------------| |
| 84 | | `screenshot` | `/api/screenshot` | POST | quality(1-100), maxSize(resolution) | |
| 85 | | `get_ui_tree` | `/api/get_ui_tree` | POST | (none) | |
| 86 | | `find_element` | `/api/find_element` | POST | text, resourceId, className | |
| 87 | | `read_ui_text` | `/api/read_ui_text` | POST | filter, exclude | |
| 88 | | `get_device_info` | `/api/device_info` | POST | type: apps/battery/storage/network/all | |
| 89 | |
| 90 | ### Touch & Input |
| 91 | |
| 92 | | Tool | Endpoint | Method | Key Parameters | |
| 93 | |------|----------|--------|---------------| |
| 94 | | `tap` | `/api/tap` | POST | x, y | |
| 95 | | `long_click` | `/api/long_click` | POST | x, y | |
| 96 | | `swipe` | `/api/swipe` | POST | startX, startY, endX, endY, duration(ms) | |
| 97 | | `scroll` | `/api/scroll` | POST | direction: up/down/left/right | |
| 98 | | `type_text` | `/api/type` | POST | text | |
| 99 | | `press_key` | `/api/press_key` | POST | key: home/back/power/recent/volume_up/volume_down/enter | |
| 100 | | `click_by_text` | `/api/click_by_text` | POST | text, index(if multiple) | |
| 101 | |
| 102 | ### App Management |
| 103 | |
| 104 | | Tool | Endpoint | Method | Key Parameters | |
| 105 | |------|----------|--------|---------------| |
| 106 | | `open_app` | `/api/open_app` | POST | **name (必须是包名,如 `com.tencent.mm`)** | |
| 107 | | `list_packages` | `/api/list_packages` | POST | thirdPartyOnly(bool), includeVersions(bool) | |
| 108 | | `get_app_info` | `/api/get_app_info` | POST | package (package name) | |
| 109 | | `force_stop_app` | `/api/force_stop_app` | POST | package (package name) | |
| 110 | | `uninstall_app` | `/api/uninstall_app` | POST | package, keepData(bool) | |
| 111 | | `install_apk` | `/api/install_apk` | POST | path (APK path on device) | |
| 112 | | `clear_app_data` | `/api/clear_app_data` | POST | package (package name) | |
| 113 | |
| 114 | ### System |
| 115 | |
| 116 | | Tool | Endpoint | Method | Key Parameters | |
| 117 | |------|----------|--------|---------------| |
| 118 | | `execute_shell` | `/api/execute_shell` | POST | command, timeout(sec) | |
| 119 | |
| 120 | ### SMS |
| 121 | |
| 122 | | To |