File contents 飞书考勤打卡
使用 ClawPaw MCP 工具远程操作手机完成飞书打卡。全程使用 snapshot 读取 UI,不使用 screenshot。
Step 1 — 启动飞书
shell → monkey -p com.ss.android.lark -c android.intent.category.LAUNCHER 1
然后 snapshot 确认飞书已打开(检查是否出现飞书相关 UI 元素)。如果 snapshot 结果为空或元素很少,等 2 秒后重试。
Step 2 — 导航到打卡页面
snapshot 检查当前页面
如果当前不在工作台(没有「假勤」等应用图标):
寻找底部 tab 栏的「更多」→ tap
snapshot → 找到「工作台」→ tap
snapshot 找到「假勤」(橙色人形图标)→ 从 bounds 计算中心坐标 → tap
snapshot 确认进入打卡页面(检查是否有「应上班」「应下班」「打卡」等文字)
如果没有出现预期内容,等 2 秒后重新 snapshot
Step 3 — 判断打卡状态并执行
snapshot 读取打卡页面,根据 text 内容判断场景:
场景 A:正常打卡
找到 text 为「上班打卡」或「下班打卡」的元素
从 bounds [left,top][right,bottom] 计算中心坐标 x=(left+right)/2, y=(top+bottom)/2
tap 该坐标
场景 B:补卡(已缺卡)
页面显示「未打卡」+「缺卡」+「更新打卡」
找到 text 为「更新打卡」的元素 → 从 bounds 计算中心坐标 → tap
Step 4 — 处理弹窗
打卡后可能出现弹窗,snapshot 检查:
4a. 确认弹窗(「确定更新打卡吗?」)
在 snapshot 结果中找到 text 为「确定」的元素(注意不是「取消」)
从 bounds 计算中心坐标 → tap
4b. 迟到打卡页面
如果打卡时间晚于上班时间,会弹出「迟到打卡」半屏页面:
在 snapshot 中找到备注区域(text 含「请填写迟到原因」或「备注」)
tap 备注输入框
type_text 填写迟到原因(如果用户提供了 $ARGUMENTS,用它作为原因;否则留空跳过)
snapshot → 找到底部 text 为「迟到打卡」的按钮元素(注意:页面标题和提交按钮都叫「迟到打卡」,选 bounds 在页面底部、y 值更大的那个)
从 bounds 计算中心坐标 → tap
Step 5 — 验证结果
snapshot 确认打卡成功:检查页面是否包含「已打卡」文字
向用户报告:打卡时间、打卡地点、是否迟到
重要注意事项
全程用 snapshot,不用 screenshot — snapshot 返回设备真实像素坐标,screenshot 仅在 snapshot 完全无内容时才作为 fallback
必须用坐标 tap,不能用 text tap — 飞书是小程序 WebView 架构,tap 的 text 匹配在 WebView 内不可靠,必须从 snapshot 的 bounds 计算中心坐标后用 tap(x, y) 点击
元素 ID 不稳定 — 飞书 WebView 内的元素 ID 以 _n_ 开头且每次可能变化,永远按 text 内容在 snapshot 结果中定位目标元素
等待加载 — 飞书小程序加载较慢,如果 snapshot 中没有预期元素,等 2 秒后重试,最多重试 3 次
多个同名元素 — 页面可能有多个 text 相同的元素(如标题和按钮都叫「迟到打卡」),用 bounds 的 y 坐标区分:按钮通常在页面底部(y 值更大)
1 --- 2 name: feishu-checkin 3 description: Feishu Checkin 4 --- 5 6 # 飞书考勤打卡 7 8 使用 ClawPaw MCP 工具远程操作手机完成飞书打卡。全程使用 `snapshot` 读取 UI,不使用 `screenshot`。 9 10 ## Step 1 — 启动飞书 11 12 ``` 13 shell → monkey -p com.ss.android.lark -c android.intent.category.LAUNCHER 1 14 ``` 15 16 然后 `snapshot` 确认飞书已打开(检查是否出现飞书相关 UI 元素)。如果 snapshot 结果为空或元素很少,等 2 秒后重试。 17 18 ## Step 2 — 导航到打卡页面 19 20 1. `snapshot` 检查当前页面 21 2. 如果当前不在工作台(没有「假勤」等应用图标): 22 - 寻找底部 tab 栏的「更多」→ `tap` 23 - `snapshot` → 找到「工作台」→ `tap` 24 3. `snapshot` 找到「假勤」(橙色人形图标)→ 从 bounds 计算中心坐标 → `tap` 25 4. `snapshot` 确认进入打卡页面(检查是否有「应上班」「应下班」「打卡」等文字) 26 - 如果没有出现预期内容,等 2 秒后重新 `snapshot` 27 28 ## Step 3 — 判断打卡状态并执行 29 30 `snapshot` 读取打卡页面,根据 text 内容判断场景: 31 32 ### 场景 A:正常打卡 33 - 找到 text 为「上班打卡」或「下班打卡」的元素 34 - 从 bounds `[left,top][right,bottom]` 计算中心坐标 `x=(left+right)/2, y=(top+bottom)/2` 35 - `tap` 该坐标 36 37 ### 场景 B:补卡(已缺卡) 38 - 页面显示「未打卡」+「缺卡」+「更新打卡」 39 - 找到 text 为「更新打卡」的元素 → 从 bounds 计算中心坐标 → `tap` 40 41 ## Step 4 — 处理弹窗 42 43 打卡后可能出现弹窗,`snapshot` 检查: 44 45 ### 4a. 确认弹窗(「确定更新打卡吗?」) 46 - 在 snapshot 结果中找到 text 为「确定」的元素(注意不是「取消」) 47 - 从 bounds 计算中心坐标 → `tap` 48 49 ### 4b. 迟到打卡页面 50 如果打卡时间晚于上班时间,会弹出「迟到打卡」半屏页面: 51 1. 在 snapshot 中找到备注区域(text 含「请填写迟到原因」或「备注」) 52 2. `tap` 备注输入框 53 3. `type_text` 填写迟到原因(如果用户提供了 `$ARGUMENTS`,用它作为原因;否则留空跳过) 54 4. `snapshot` → 找到底部 text 为「迟到打卡」的按钮元素(注意:页面标题和提交按钮都叫「迟到打卡」,选 bounds 在页面底部、y 值更大的那个) 55 5. 从 bounds 计算中心坐标 → `tap` 56 57 ## Step 5 — 验证结果 58 59 - `snapshot` 确认打卡成功:检查页面是否包含「已打卡」文字 60 - 向用户报告:打卡时间、打卡地点、是否迟到 61 62 ## 重要注意事项 63 64 1. **全程用 snapshot,不用 screenshot** — snapshot 返回设备真实像素坐标,screenshot 仅在 snapshot 完全无内容时才作为 fallback 65 2. **必须用坐标 tap,不能用 text tap** — 飞书是小程序 WebView 架构,`tap` 的 text 匹配在 WebView 内不可靠,必须从 snapshot 的 bounds 计算中心坐标后用 `tap(x, y)` 点击 66 3. **元素 ID 不稳定** — 飞书 WebView 内的元素 ID 以 `_n_` 开头且每次可能变化,永远按 text 内容在 snapshot 结果中定位目标元素 67 4. **等待加载** — 飞书小程序加载较慢,如果 snapshot 中没有预期元素,等 2 秒后重试,最多重试 3 次 68 5. **多个同名元素** — 页面可能有多个 text 相同的元素(如标题和按钮都叫「迟到打卡」),用 bounds 的 y 坐标区分:按钮通常在页面底部(y 值更大)
dvcrn/openclaw-skills-marketplace/tree/main/plugins/wzliu888--clawpaw-phone-control/skills/clawpaw-setup/usecase-example/feishu-checkin commit 13accee1d8
Frequently asked questions How do I install the Feishu Checkin skill? Run npx skillmds@latest add dvcrn/feishu-checkin in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Feishu Checkin skill do? Feishu Checkin It is listed under Coding & Dev Tools on SkillMD.
Is Feishu Checkin safe to use? This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Feishu Checkin? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Feishu Checkin free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Feishu Checkin? dvcrn (@dvcrn) published this skill. Their other Agent Skills are listed on their SkillMD profile.