douyin-search
Skill54 starsChanged 23 days agoApache-2.0View on GitHub
演示如何使用 uiautomator2-mcp-server 进行抖音搜索操作的 AI 技能示例
2 other projects use a version of this.
Adopted by
Most recently taken up by
- glidea/supersearch-skillstheir own version, first seen Aug 2, 2026
- Divem/yuanwen-skillstheir own version, first seen May 31, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Divem/yuanwen-skills★ 4same name
- glidea/supersearch-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- android-ui-testSkill
- release-managerSkill
The file
Files
抖音搜索自动化示例
这是一个演示如何在抖音应用中进行搜索操作的 AI 技能示例。
功能演示
本技能展示了以下 uiautomator2-mcp-server 工具的使用:
- 应用启动: 使用
app_start或shell_command启动抖音 - UI 交互: 使用
click点击搜索按钮和搜索框 - 文本输入: 使用
set_focused_text输入搜索关键词(绕过 IME 限制) - 键盘操作: 使用
press_key模拟 Enter 键执行搜索 - 结果交互: 点击搜索结果列表中的视频缩略图,打开并观看视频
使用场景
场景 1: 演示对话式自动化
向 AI 说:"在抖音搜索 [关键词] 视频"
例如:"在抖音搜索猫咪视频" 或 "在抖音搜索美食视频"
AI 将自动执行:
- 启动抖音应用
- 点击搜索按钮
- 点击搜索框
- 输入关键词(如"猫咪"、"美食"等)
- 按 Enter 搜索
- 从搜索结果列表中点击第一个视频
- 观看几秒后返回
技能参数
| 参数 | 说明 | 示例 |
关键词 | 要搜索的内容 | 猫咪、美食、旅游、音乐等 |
操作流程
用户: "在抖音搜索 [关键词] 视频"
AI 执行步骤:
┌─────────────────────────────────────┐
│ 1. press_key("home") │ 返回主页
│ 2. shell_command(am start ...) │ 启动抖音
│ 3. delay(2秒) │ 等待加载
│ 4. click(980, 120) │ 点击搜索按钮
│ 5. delay(1.5秒) │ 等待界面
│ 6. click(540, 120) │ 点击搜索框
│ 7. delay(1.5秒) │ 等待键盘
│ 8. set_focused_text("[关键词]") │ 输入用户指定的关键词
│ 9. press_key("enter") │ 执行搜索
│ 10. delay(3秒) │ 等待结果
│ 11. click(540, 350) │ 点击搜索结果列表中的第一个视频
│ 12. delay(5秒) │ 观看视频播放
│ 13. press_key("back") │ 返回
│ 14. press_key("home") │ 回到主页
└─────────────────────────────────────┘关键技术点
1. 绕过 IME 限制的文本输入
工具: set_focused_text
优势: 不依赖输入法,适用于 OPPO/ColorOS 等有限制的设备
用法: 确保输入框已聚焦后直接设置文本2. 元素定位策略
本 Skill 使用坐标点击作为示例,但实际应用中应优先使用更可靠的定位方法:
# 方法 1: XPath 定位(推荐)
element_click(xpath="//android.widget.TextView[@text='搜索']")
优点: 不依赖坐标,适应布局变化
缺点: 需要了解应用 UI 结构
# 方法 2: 坐标点击(本示例使用)
click(x, y)
优点: 简单直接,适合演示
缺点: 硬编码,布局变化时失效
# 方法 3: 混合方案
先用坐标快速定位,再用 XPath 验证和调整
优点: 兼顾速度和可靠性本示例使用的坐标(仅供参考,实际使用时应动态获取):
- 搜索按钮: (980, 120) - 屏幕右上角,放大镜图标
- 搜索框中心: (540, 120) - 屏幕顶部中央,输入区域
- 搜索结果: (540, 350) - 搜索结果列表中的第一个视频缩略图
改进建议:使用 dump_hierarchy 获取 UI 结构,然后用 XPath 定位元素
3. 时序控制
启动等待: 2秒 - 应用启动和加载
点击延迟: 1.5秒 - 界面切换和动画
搜索等待: 3秒 - 网络请求和结果加载
观看时长: 5秒 - 视频播放演示设备兼容性
- 屏幕尺寸: 1080x2400 (其他尺寸需按比例调整坐标)
- 抖音版本: 通用 (基于标准界面布局,版本更新可能影响坐标)
- 系统要求: Android 8.0+,USB 调试已开启
扩展建议
可以根据需要扩展此技能:
- 使用 XPath 定位: 替换硬编码坐标,提高可靠性
- 截图保存: 使用
save_screenshot保存图片文件,而非返回 base64- 优点: 文件可被其他 MCP 工具处理(如图片识别)
- 避免将大量二进制数据加入 messages
- 搜索更多内容: 美食、旅游、音乐等
- 交互操作: 点赞、评论、分享
- 滑动浏览: 上下滑动查看更多结果
- 多关键词: 依次搜索多个主题
- 动态坐标适配: 根据屏幕尺寸自动计算坐标
预期效果
执行后应看到:
- ✅ 抖音应用成功启动
- ✅ 搜索框中出现用户指定的关键词
- ✅ 搜索结果列表显示多个视频缩略图
- ✅ 点击后视频全屏播放
- ✅ 观看几秒后自动返回,回到主页
这是一个简单但完整的示例,展示了 AI 如何通过自然语言控制 Android 设备进行复杂的应用操作。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

