职场玩手机智能监测技能
by @smyx-sunjinhui
Based on computer vision, automatically detects employees playing with phones during work hours, supports real-time video stream and image detection, counts...
clawhub install smyx-phone-usage-monitoring-analysis📖 About This Skill
name: "phone_usage_monitoring_analysis" description: "Based on computer vision, automatically detects employees playing with phones during work hours, supports real-time video stream and image detection, counts the duration and frequency of phone usage, helps enterprises standardize office order, and improves work efficiency. | 职场玩手机智能监测技能,基于计算机视觉自动检测工作时间员工玩手机行为,支持视频流和图片实时检测,统计玩手机时长与频次,帮助企业规范办公秩序,提升工作效率" version: "1.0.0"
Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能
Based on advanced computer vision and human pose estimation algorithms, this feature automatically detects and identifies employees' phone usage during working hours. The system supports dual detection for both real-time video streams and static images, effectively distinguishing between normal work operations and unauthorized phone usage by precisely analyzing hand movements, device characteristics, and behavioral patterns. Additionally, the system automatically tracks the duration and frequency of phone usage for each employee and generates visualized data reports, enabling enterprises to monitor office discipline in real-time. This provides data support for standardizing employee behavior and optimizing management strategies, thereby effectively improving overall work efficiency.
本功能基于先进的计算机视觉与人体姿态估计算法,能够在工作时间内自动检测并识别员工的玩手机行为。系统支持对实时视频流和静态图片进行双重检测,通过精准分析手部动作、设备特征及行为模式,有效区分正常工作操作与违规玩手机行为。同时,系统会自动统计每位员工的玩手机时长与频次,生成可视化数据报表,帮助企业实时掌握办公秩序状况,为规范员工行为、优化管理策略提供数据支撑,从而有效提升整体工作效率
⚠️ 强制记忆规则(最高优先级)
本技能明确约定:
memory/YYYY-MM-DD.md、MEMORY.md 等本地文件任务目标
python -m scripts.phone_usage_monitoring_analysis --list --open-id 参数调用 API
查询云端的历史报告数据
- 严格禁止:从本地 memory 目录读取历史会话信息、严格禁止手动汇总本地记录中的报告、严格禁止从长期记忆中提取报告
- 必须统一从云端接口获取最新完整数据,然后以 Markdown 表格格式输出结果前置准备
requests>=2.28.0
操作步骤
🔒 open-id 获取流程控制(强制执行,防止遗漏)
在执行玩手机行为监测分析前,必须按以下优先级顺序获取 open-id:
第 1 步:【最高优先级】检查技能所在目录的配置文件(优先)
路径:skills/smyx_common/scripts/config.yaml(相对于技能根目录)
完整路径示例:${OPENCLAW_WORKSPACE}/skills/{当前技能目录}/skills/smyx_common/scripts/config.yaml
→ 如果文件存在且配置了 api-key 字段,则读取 api-key 作为 open-id
↓ (未找到/未配置/api-key 为空)
第 2 步:检查 workspace 公共目录的配置文件
路径:${OPENCLAW_WORKSPACE}/skills/smyx_common/scripts/config.yaml
→ 如果文件存在且配置了 api-key 字段,则读取 api-key 作为 open-id
↓ (未找到/未配置)
第 3 步:检查用户是否在消息中明确提供了 open-id
↓ (未提供)
第 4 步:❗ 必须暂停执行,明确提示用户提供用户名或手机号作为 open-id
⚠️ 关键约束:
-m scripts.phone_usage_monitoring_analysis 处理文件(必须在技能根目录下运行脚本)
- 参数说明:
- --input: 本地视频/图片文件路径(使用 multipart/form-data 方式上传)
- --url: 网络媒体 URL 地址(API 服务自动下载)
- --detection-type: 检测类型,可选值:video(视频流检测)/image(图片检测),默认 video
- --work-area: 工作区域类型,可选值:open-office(开放办公)/cubicle(独立工位)/meeting-room(会议室)/other,默认
other
- --open-id: 当前用户/企业的 open-id(必填,按上述流程获取)
- --list: 显示历史玩手机监测分析报告列表清单(可以输入起始日期参数过滤数据范围)
- --api-key: API 访问密钥(可选)
- --api-url: API 服务地址(可选,使用默认值)
- --detail: 输出详细程度(basic/standard/json,默认 json)
- --output: 结果输出文件路径(可选)
4. 查看分析结果
- 接收结构化的办公效率监测报告
- 包含:监测区域信息、检测统计结果、玩手机行为识别数据、时长频次统计、违规行为预警、效率提升建议资源索引
注意事项
玩手机行为监测报告-{记录id}形式拼接, "点击查看"
列使用
🔗 查看报告
格式的超链接,用户点击即可直接跳转到对应的完整报告页面。
使用示例
# 分析开放办公区视频(以下只是示例,禁止直接使用openclaw-control-ui 作为 open-id)
python -m scripts.phone_usage_monitoring_analysis --input /path/to/office_video.mp4 --detection-type video --work-area open-office --open-id openclaw-control-ui分析工位监控图片(以下只是示例,禁止直接使用openclaw-control-ui 作为 open-id)
python -m scripts.phone_usage_monitoring_analysis --input /path/to/office_image.jpg --detection-type image --work-area cubicle --open-id openclaw-control-ui分析网络视频流(以下只是示例,禁止直接使用openclaw-control-ui 作为 open-id)
python -m scripts.phone_usage_monitoring_analysis --url https://example.com/office_monitor.mp4 --detection-type video --work-area meeting-room --open-id openclaw-control-ui显示历史分析报告/显示分析报告清单列表/显示历史监测报告(自动触发关键词:查看历史监测报告、历史报告、监测报告清单等)
python -m scripts.phone_usage_monitoring_analysis --list --open-id openclaw-control-ui输出精简报告
python -m scripts.phone_usage_monitoring_analysis --input monitor.mp4 --detection-type video --open-id your-open-id --detail basic保存结果到文件
python -m scripts.phone_usage_monitoring_analysis --input image.jpg --detection-type image --open-id your-open-id --output result.json