{"id":"d4be1998-d733-4074-a41a-5bff411d8194","entityType":"agent","slug":"clawhub-smyx-sunjinhui-smyx-phone-usage-monitoring-analysis","name":"Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能","canonicalUrl":"https://www.xpersona.co/agent/clawhub-smyx-sunjinhui-smyx-phone-usage-monitoring-analysis","canonicalPath":"/agent/clawhub-smyx-sunjinhui-smyx-phone-usage-monitoring-analysis","generatedAt":"2026-10-10T06:30:05.748Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-09T17:40:02.110Z","emptyReason":null},"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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率 Skill: Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能 Owner: smyx-sunjinhui Summary: 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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2.2K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-phone-usage-monitoring-analysis","sourceUrl":"https://clawhub.ai/smyx-sunjinhui/smyx-phone-usage-monitoring-analysis","homepage":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-phone-usage-monitoring-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/smyx-sunjinhui/smyx-phone-usage-monitoring-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-phone-usage-monitoring-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":67,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Based on computer vision, automatically detects employees playing with phones during work hours, supports real-time video stream and image detection, counts the"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T17:40:02.110Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T17:40:02.110Z","emptyReason":null},"stars":null,"forks":null,"downloads":2196,"packageName":null,"latestVersion":"1.0.13","tractionLabel":"2.2K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T17:40:02.110Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T17:40:02.110Z","lastCrawledAt":"2026-10-09T17:40:02.110Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T17:40:02.110Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.13","createdAt":"2026-10-03T15:13:26.916Z","changelog":"- Updated version number in SKILL.md to 1.0.19. - Removed the file skill-card.md. - No changes to core features or behavior described in documentation.","fileCount":30,"zipByteSize":41361},{"version":"1.0.12","createdAt":"2026-09-27T10:58:24.694Z","changelog":"- Updated version number from 1.0.16 to 1.0.18 in documentation. - Removed redundant file: skill-card.md. - Minor adjustments in configuration and documentation to align with latest usage and versioning practices. - No functional or capability changes; all usage examples and API behaviors remain unchanged.","fileCount":30,"zipByteSize":41468},{"version":"1.0.11","createdAt":"2026-09-07T03:20:31.345Z","changelog":"- Updated version to 1.0.16 in SKILL.md. - Minor documentation improvements in SKILL.md; no functional or logic changes indicated. - Removed redundant file: skill-card.md.","fileCount":30,"zipByteSize":41389},{"version":"1.0.10","createdAt":"2026-08-25T21:39:29.725Z","changelog":"- Version bumped from 1.0.13 to 1.0.14. - Documentation updated in SKILL.md; minor edits for clarity and consistency. - Obsolete skill-card.md file was removed. - No changes to code or core functionality.","fileCount":30,"zipByteSize":41585},{"version":"1.0.9","createdAt":"2026-08-17T09:45:28.604Z","changelog":"- Removed the file skill-card.md from the project. - No functional or behavior changes to the skill itself.","fileCount":30,"zipByteSize":41702},{"version":"1.0.8","createdAt":"2026-08-14T23:53:30.272Z","changelog":"- Updated version to 1.0.13 in SKILL.md. - Removed the file skill-card.md. - Made minor changes to configuration and documentation files.","fileCount":30,"zipByteSize":41568},{"version":"1.0.7","createdAt":"2026-08-08T23:42:30.327Z","changelog":"- Updated SKILL.md version to 1.0.12 and revised documentation content. - Removed outdated skill-card.md file. - Kept all workflow, parameter, and usage details consistent and up to date in SKILL.md. - Documentation cleanup and minor formatting improvements.","fileCount":30,"zipByteSize":41838},{"version":"1.0.6","createdAt":"2026-07-26T20:40:30.357Z","changelog":"- Updated SKILL.md to reflect new version 1.0.10 and adjusted content as needed. - Removed the skill-card.md file from the project. - No changes to functionality or features. Documentation and file cleanup only.","fileCount":30,"zipByteSize":41590}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-phone-usage-monitoring-analysis","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-phone-usage-monitoring-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-phone-usage-monitoring-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-phone-usage-monitoring-analysis/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-phone-usage-monitoring-analysis/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-phone-usage-monitoring-analysis/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-phone-usage-monitoring-analysis/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T06:30:05.744Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-phone-usage-monitoring-analysis/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-phone-usage-monitoring-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-phone-usage-monitoring-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-phone-usage-monitoring-analysis/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-09T17:40:02.110Z","emptyReason":null},"readme":"Skill: Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能\n\nOwner: smyx-sunjinhui\n\nSummary: 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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率\n\nTags: latest:1.0.13\n\nVersion history:\n\nv1.0.13 | 2026-10-03T15:13:26.916Z | auto\n\n- Updated version number in SKILL.md to 1.0.19.\n- Removed the file skill-card.md.\n- No changes to core features or behavior described in documentation.\n\nv1.0.12 | 2026-09-27T10:58:24.694Z | auto\n\n- Updated version number from 1.0.16 to 1.0.18 in documentation.\n- Removed redundant file: skill-card.md.\n- Minor adjustments in configuration and documentation to align with latest usage and versioning practices.\n- No functional or capability changes; all usage examples and API behaviors remain unchanged.\n\nv1.0.11 | 2026-09-07T03:20:31.345Z | auto\n\n- Updated version to 1.0.16 in SKILL.md.\n- Minor documentation improvements in SKILL.md; no functional or logic changes indicated.\n- Removed redundant file: skill-card.md.\n\nv1.0.10 | 2026-08-25T21:39:29.725Z | auto\n\n- Version bumped from 1.0.13 to 1.0.14.\n- Documentation updated in SKILL.md; minor edits for clarity and consistency.\n- Obsolete skill-card.md file was removed.\n- No changes to code or core functionality.\n\nv1.0.9 | 2026-08-17T09:45:28.604Z | auto\n\n- Removed the file skill-card.md from the project.\n- No functional or behavior changes to the skill itself.\n\nv1.0.8 | 2026-08-14T23:53:30.272Z | auto\n\n- Updated version to 1.0.13 in SKILL.md.\n- Removed the file skill-card.md.\n- Made minor changes to configuration and documentation files.\n\nv1.0.7 | 2026-08-08T23:42:30.327Z | auto\n\n- Updated SKILL.md version to 1.0.12 and revised documentation content.\n- Removed outdated skill-card.md file.\n- Kept all workflow, parameter, and usage details consistent and up to date in SKILL.md.\n- Documentation cleanup and minor formatting improvements.\n\nv1.0.6 | 2026-07-26T20:40:30.357Z | auto\n\n- Updated SKILL.md to reflect new version 1.0.10 and adjusted content as needed.\n- Removed the skill-card.md file from the project.\n- No changes to functionality or features. Documentation and file cleanup only.\n\nv1.0.5 | 2026-07-19T10:54:27.683Z | auto\n\n- Updated version to 1.0.9.\n- Improved documentation in SKILL.md, including clearer requirements, workflows, and notes.\n- Removed redundant file: skill-card.md.\n- Made adjustments to scripts/smyx_common/scripts/util.py.\n- Updated usage examples and script parameter descriptions for greater clarity.\n\nv1.0.4 | 2026-07-09T07:59:29.932Z | auto\n\n**Version 1.0.4 Changelog**\n\n- Updated configuration handling in `skills/smyx_common/scripts/config.py`.\n- Refined and updated documentation in `SKILL.md`.\n- Removed legacy skill card documentation file (`skill-card.md`).\n\nv1.0.3 | 2026-07-02T05:47:28.375Z | auto\n\n**Major update: skill structure reorganization and privacy protocol enhancement.**\n\n- Refactored directory structure: removed face_analysis module; added new smyx_analysis module for clearer code organization.\n- Updated and expanded documentation (SKILL.md) with stricter privacy rules—now all user identity handling is system-internal, never shown or required from the user.\n- Changed historical analysis queries: now always performed via cloud API, strictly prohibiting use of local memory or manual summaries.\n- Adjusted API and script configuration for more robust history/report list retrieval and clearer parameter handling.\n- Updated supported file formats, input/output procedures, and usage examples to match new structure and privacy flow.\n\nv1.0.2 | 2026-05-14T15:07:43.969Z | auto\n\n- Improved configuration management across dev, test, and production environments.\n- Updated core script logic for phone usage monitoring and analysis.\n- Enhanced open-id retrieval flow and validation.\n- Refactored common utilities and internal imports for better modularity.\n- Bug fixes and codebase cleanup for increased stability.\n\nv1.0.1 | 2026-05-04T11:44:42.436Z | auto\n\n- Added version metadata (\"version: 1.0.0\") to SKILL.md.\n- No functional changes to the skill logic or API contract.\n- Documentation aligned and updated; no changes to workflow or dependencies.\n\nv1.0.0 | 2026-04-17T14:12:23.862Z | auto\n\nphone_usage_monitoring_analysis v1.0.0\n\n- Initial release: smart detection of employee phone usage during work hours using computer vision, supporting both real-time video stream and image analysis.\n- Automatically counts duration and frequency of phone usage per employee, providing visual data reports to help enterprises standardize office behavior and improve efficiency.\n- Strict rules enforced for open-id acquisition and API usage; all report queries must fetch data from cloud interface, never from local memory.\n- Supports automatic behavioral analysis trigger based on user file uploads or relevant keywords; generates Markdown-formatted report lists with direct report links.\n- Comprehensive workflow instructions and usage examples included, with support for multiple office scenarios (open-office, cubicle, meeting-room, etc.).\n\nArchive index:\n\nArchive v1.0.13: 30 files, 41361 bytes\n\nFiles: references/api_doc.md (2662b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/phone_usage_monitoring_analysis.py (9100b), scripts/skill.py (579b), skill-card.md (2109b), SKILL.md (10694b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (156b)\n\nFile v1.0.13:SKILL.md\n\n---\nname: \"phone_usage_monitoring_analysis\"\ndescription: \"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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率\"\nversion: \"1.0.19\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **职场玩手机智能监测技能** |\n| 🎯 核心目标 | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `PHONE_USAGE_MONITORING` |\n\nBased on advanced computer vision and human pose estimation algorithms, this feature automatically detects and\nidentifies employees' phone usage during working hours. The system supports dual detection for both real-time video\nstreams and static images, effectively distinguishing between normal work operations and unauthorized phone usage by\nprecisely analyzing hand movements, device characteristics, and behavioral patterns. Additionally, the system\nautomatically tracks the duration and frequency of phone usage for each employee and generates visualized data reports,\nenabling enterprises to monitor office discipline in real-time. This provides data support for standardizing employee\nbehavior and optimizing management strategies, thereby effectively improving overall work efficiency.\n\n本功能基于先进的计算机视觉与人体姿态估计算法，能够在工作时间内自动检测并识别员工的玩手机行为。系统支持对实时视频流和静态图片进行双重检测，通过精准分析手部动作、设备特征及行为模式，有效区分正常工作操作与违规玩手机行为。同时，系统会自动统计每位员工的玩手机时长与频次，生成可视化数据报表，帮助企业实时掌握办公秩序状况，为规范员工行为、优化管理策略提供数据支撑，从而有效提升整体工作效率\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过办公区域监控视频/图片进行职场玩手机行为智能分析，自动识别工作时间员工玩手机行为，生成办公效率监测报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频/图片分析 |\n| 2 | 手机物体检测 |\n| 3 | 玩手机行为识别 |\n| 4 | 时长统计 |\n| 5 | 频次分析 |\n| 6 | 违规行为预警 |\n| 7 | 办公效率建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供监控视频/图片 URL 或文件需要检测玩手机行为时，默认触发本技能进行办公行为监测分析 |\n| 🔎 明确分析意图 | 当用户明确需要进行办公监测、玩手机检测、员工行为管理，提及玩手机监测、办公效率、员工行为监控、在岗状态检测等关键词，并且上传了视频文件或者图片文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史监测报告、历史效率报告、玩手机监测报告清单、查询历史报告、查看监测报告列表、显示所有监测报告、显示玩手机分析报告，查询办公行为监测报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.phone_usage_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.phone_usage_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备视频/图片输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行玩手机行为监测分析 | 调用 `-m scripts.phone_usage_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频/图片文件路径 | 适用于本地文件分析 |\n| `--url` | 网络媒体 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--detection-type` | 检测类型，可选值：video(视频流检测)/image(图片检测)，默认 video | 按需填写 |\n| `--work-area` | 工作区域类型，可选值：open-office(开放办公)/cubicle(独立工位)/meeting-room(会议室)/other，默认 | 按需填写 |\n| `--list` | 显示历史玩手机监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/phone_usage_monitoring_analysis.py`](scripts/phone_usage_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 格式支持：视频支持 mp4/avi/mov 格式，图片支持 jpg/png/jpeg 格式，最大 10MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供企业内部管理参考，请注意保护员工个人隐私，遵守相关法律法规 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析开放办公区视频\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_video.mp4 --detection-type video --work-area open-office 分析工位监控图片\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_image.jpg --detection-type image --work-area cubicle 分析网络视频流\npython -m scripts.phone_usage_monitoring_analysis --url https://example.com/office_monitor.mp4 --detection-type video --work-area meeting-room 显示历史分析报告/显示分析报告清单列表/显示历史监测报告（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.phone_usage_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.phone_usage_monitoring_analysis --input monitor.mp4 --detection-type video --detail basic\n\n# 保存结果到文件\npython -m scripts.phone_usage_monitoring_analysis --input image.jpg --detection-type image --output result.json\n```\n\nFile v1.0.13:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-phone-usage-monitoring-analysis\",\n  \"version\": \"1.0.13\",\n  \"publishedAt\": 1791040406916\n}\n\nFile v1.0.13:references/api_doc.md\n\n# 职场玩手机行为监测分析 API 文档\n\n## 接口概述\n\n本技能调用云端视觉AI接口，自动识别办公区域员工玩手机行为，支持视频流动态统计和图片静态检测。\n\n## 支持检测的行为类型\n\n| 行为类型 | 描述 | 统计方式 |\n|----------|------|----------|\n| 手持手机 | 员工手持智能手机，屏幕朝向面部 | 按次数/时长统计 |\n| 低头看手机 | 员工低头注视手机屏幕 | 按时长分段统计 |\n| 持续使用 | 连续使用手机超过设定时长（默认3分钟） | 记为违规行为 |\n| 桌面放置 | 手机放置在桌面但未使用 | 不计数 |\n\n## 支持检测区域\n\n| 区域类型 | 特点 |\n|----------|------|\n| 开放办公区 | 多人员工同时监测 |\n| 独立工位 | 单人固定工位监测 |\n| 会议室 | 会议场景监测 |\n| 其他区域 | 自定义区域 |\n\n## API 响应字段说明\n\n### 基础信息\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| id | string | 分析记录ID |\n| data.analysis_time | string | 分析时间 |\n| data.person_detection.status | string | 人员检测状态 |\n| data.person_detection.quality_score | int | 画面质量评分 0-100 |\n\n### 诊断结果\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.diagnosis.compliance_score | int | 整体合规评分 0-100（分数越高越合规）|\n| data.diagnosis.overall_compliance | string | 整体合规状况：合规/轻度违规/中度违规/严重违规 |\n| data.diagnosis.total_phone_usage_count | int | 检测到玩手机行为总次数 |\n| data.diagnosis.total_phone_usage_duration | int | 累计玩手机总时长（秒）|\n| data.diagnosis.phone_usage_behavior | object | 各行为识别结果 |\n| data.diagnosis.usage_duration | object | 时长分段统计结果 |\n| data.diagnosis.area_compliance | object | 各区域合规评估 |\n\n### 预警与建议\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.efficiency_warnings | array[string] | 效率风险警示信息列表 |\n| data.improvement_suggestions | array[string] | 效率提升建议列表 |\n\n## 错误码说明\n\n| 错误码 | 说明 |\n|--------|------|\n| 200 | 请求成功 |\n| 400 | 请求参数错误 |\n| 401 | API 鉴权失败 |\n| 413 | 文件大小超出限制 |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误 |\n| 503 | 服务繁忙，请稍后重试 |\n\n## 合规提示\n\n1. 使用本工具应当遵守国家相关劳动法律法规\n2. 需要提前告知员工监控范围和目的，保护员工个人隐私\n3. 本工具仅辅助办公管理，不建议作为唯一奖惩依据\n4. 建议合理设定允许使用手机的休息时段，平衡工作与休息\n\nFile v1.0.13:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.13:scripts/config.yaml\n\n{}\n\nFile v1.0.13:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.13:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.13:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.13:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.13:skill-card.md\n\n## Description:\n\nAnalyzes workplace videos and images for employee phone use and provides usage summaries, recommendations, and access to historical reports.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nAuthorized workplace managers use the skill to review phone-use patterns in office video or images, generate monitoring reports, and retrieve past reports. Employees' privacy and applicable workplace monitoring rules must be respected.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Workplace video and images can expose sensitive employee information when sent to the cloud service.\n\nMitigation: Use only with authorization to monitor employees and transmit media; review notice, consent, retention, and applicable compliance requirements before use.\n\nRisk: Automatic identity creation or reuse and locally stored tokens may give access to monitoring history.\n\nMitigation: Review identity creation and login, secure the local token database, and restrict access to historical reports.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/smyx-sunjinhui/skills/smyx-phone-usage-monitoring-analysis)\n- [Monitoring API documentation](artifact/references/api_doc.md)\n- [Skill demonstration](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Analysis, Guidance, Text, JSON]\n\n**Output Format:** [Text or JSON; historical reports can be presented as a Markdown table]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Includes monitoring summaries, recommendations, report links, and optional saved results.]\n\n## Skill Version(s):\n\n1.0.13 (source: server-resolved ClawHub release; artifact frontmatter says 1.0.19)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.13:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.13:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.12: 30 files, 41468 bytes\n\nFiles: references/api_doc.md (2662b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/phone_usage_monitoring_analysis.py (9100b), scripts/skill.py (579b), skill-card.md (2357b), SKILL.md (10694b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (156b)\n\nFile v1.0.12:SKILL.md\n\n---\nname: \"phone_usage_monitoring_analysis\"\ndescription: \"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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率\"\nversion: \"1.0.18\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **职场玩手机智能监测技能** |\n| 🎯 核心目标 | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `PHONE_USAGE_MONITORING` |\n\nBased on advanced computer vision and human pose estimation algorithms, this feature automatically detects and\nidentifies employees' phone usage during working hours. The system supports dual detection for both real-time video\nstreams and static images, effectively distinguishing between normal work operations and unauthorized phone usage by\nprecisely analyzing hand movements, device characteristics, and behavioral patterns. Additionally, the system\nautomatically tracks the duration and frequency of phone usage for each employee and generates visualized data reports,\nenabling enterprises to monitor office discipline in real-time. This provides data support for standardizing employee\nbehavior and optimizing management strategies, thereby effectively improving overall work efficiency.\n\n本功能基于先进的计算机视觉与人体姿态估计算法，能够在工作时间内自动检测并识别员工的玩手机行为。系统支持对实时视频流和静态图片进行双重检测，通过精准分析手部动作、设备特征及行为模式，有效区分正常工作操作与违规玩手机行为。同时，系统会自动统计每位员工的玩手机时长与频次，生成可视化数据报表，帮助企业实时掌握办公秩序状况，为规范员工行为、优化管理策略提供数据支撑，从而有效提升整体工作效率\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过办公区域监控视频/图片进行职场玩手机行为智能分析，自动识别工作时间员工玩手机行为，生成办公效率监测报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频/图片分析 |\n| 2 | 手机物体检测 |\n| 3 | 玩手机行为识别 |\n| 4 | 时长统计 |\n| 5 | 频次分析 |\n| 6 | 违规行为预警 |\n| 7 | 办公效率建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供监控视频/图片 URL 或文件需要检测玩手机行为时，默认触发本技能进行办公行为监测分析 |\n| 🔎 明确分析意图 | 当用户明确需要进行办公监测、玩手机检测、员工行为管理，提及玩手机监测、办公效率、员工行为监控、在岗状态检测等关键词，并且上传了视频文件或者图片文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史监测报告、历史效率报告、玩手机监测报告清单、查询历史报告、查看监测报告列表、显示所有监测报告、显示玩手机分析报告，查询办公行为监测报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.phone_usage_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.phone_usage_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备视频/图片输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行玩手机行为监测分析 | 调用 `-m scripts.phone_usage_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频/图片文件路径 | 适用于本地文件分析 |\n| `--url` | 网络媒体 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--detection-type` | 检测类型，可选值：video(视频流检测)/image(图片检测)，默认 video | 按需填写 |\n| `--work-area` | 工作区域类型，可选值：open-office(开放办公)/cubicle(独立工位)/meeting-room(会议室)/other，默认 | 按需填写 |\n| `--list` | 显示历史玩手机监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/phone_usage_monitoring_analysis.py`](scripts/phone_usage_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 格式支持：视频支持 mp4/avi/mov 格式，图片支持 jpg/png/jpeg 格式，最大 10MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供企业内部管理参考，请注意保护员工个人隐私，遵守相关法律法规 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析开放办公区视频\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_video.mp4 --detection-type video --work-area open-office 分析工位监控图片\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_image.jpg --detection-type image --work-area cubicle 分析网络视频流\npython -m scripts.phone_usage_monitoring_analysis --url https://example.com/office_monitor.mp4 --detection-type video --work-area meeting-room 显示历史分析报告/显示分析报告清单列表/显示历史监测报告（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.phone_usage_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.phone_usage_monitoring_analysis --input monitor.mp4 --detection-type video --detail basic\n\n# 保存结果到文件\npython -m scripts.phone_usage_monitoring_analysis --input image.jpg --detection-type image --output result.json\n```\n\nFile v1.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-phone-usage-monitoring-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1790506704694\n}\n\nFile v1.0.12:references/api_doc.md\n\n# 职场玩手机行为监测分析 API 文档\n\n## 接口概述\n\n本技能调用云端视觉AI接口，自动识别办公区域员工玩手机行为，支持视频流动态统计和图片静态检测。\n\n## 支持检测的行为类型\n\n| 行为类型 | 描述 | 统计方式 |\n|----------|------|----------|\n| 手持手机 | 员工手持智能手机，屏幕朝向面部 | 按次数/时长统计 |\n| 低头看手机 | 员工低头注视手机屏幕 | 按时长分段统计 |\n| 持续使用 | 连续使用手机超过设定时长（默认3分钟） | 记为违规行为 |\n| 桌面放置 | 手机放置在桌面但未使用 | 不计数 |\n\n## 支持检测区域\n\n| 区域类型 | 特点 |\n|----------|------|\n| 开放办公区 | 多人员工同时监测 |\n| 独立工位 | 单人固定工位监测 |\n| 会议室 | 会议场景监测 |\n| 其他区域 | 自定义区域 |\n\n## API 响应字段说明\n\n### 基础信息\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| id | string | 分析记录ID |\n| data.analysis_time | string | 分析时间 |\n| data.person_detection.status | string | 人员检测状态 |\n| data.person_detection.quality_score | int | 画面质量评分 0-100 |\n\n### 诊断结果\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.diagnosis.compliance_score | int | 整体合规评分 0-100（分数越高越合规）|\n| data.diagnosis.overall_compliance | string | 整体合规状况：合规/轻度违规/中度违规/严重违规 |\n| data.diagnosis.total_phone_usage_count | int | 检测到玩手机行为总次数 |\n| data.diagnosis.total_phone_usage_duration | int | 累计玩手机总时长（秒）|\n| data.diagnosis.phone_usage_behavior | object | 各行为识别结果 |\n| data.diagnosis.usage_duration | object | 时长分段统计结果 |\n| data.diagnosis.area_compliance | object | 各区域合规评估 |\n\n### 预警与建议\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.efficiency_warnings | array[string] | 效率风险警示信息列表 |\n| data.improvement_suggestions | array[string] | 效率提升建议列表 |\n\n## 错误码说明\n\n| 错误码 | 说明 |\n|--------|------|\n| 200 | 请求成功 |\n| 400 | 请求参数错误 |\n| 401 | API 鉴权失败 |\n| 413 | 文件大小超出限制 |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误 |\n| 503 | 服务繁忙，请稍后重试 |\n\n## 合规提示\n\n1. 使用本工具应当遵守国家相关劳动法律法规\n2. 需要提前告知员工监控范围和目的，保护员工个人隐私\n3. 本工具仅辅助办公管理，不建议作为唯一奖惩依据\n4. 建议合理设定允许使用手机的休息时段，平衡工作与休息\n\nFile v1.0.12:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.12:scripts/config.yaml\n\n{}\n\nFile v1.0.12:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.12:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.12:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.12:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.12:skill-card.md\n\n## Description:\n\nAnalyzes workplace images and video for employee phone use, returning detection results, usage statistics, and reports.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nWorkplace administrators use the skill to review images or video for employee phone use, view usage summaries and warnings, and retrieve historical monitoring reports. Results should inform human review rather than determine employee discipline alone.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Workplace surveillance and third-party cloud processing can expose sensitive employee images, video, and report history.\n\nMitigation: Obtain appropriate legal approval and employee notice before use; restrict access and retention, and approve cloud processing of workplace media.\n\nRisk: Automatically stored or reused identity tokens may link monitoring reports to a user without clearly surfacing that behavior.\n\nMitigation: Review identity handling and access controls before installation; protect tokens and historical reports as sensitive data.\n\nRisk: Phone-use detections and compliance assessments may be inaccurate or taken out of context.\n\nMitigation: Require human review and do not use the skill as the sole basis for employee discipline.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/smyx-sunjinhui/skills/smyx-phone-usage-monitoring-analysis)\n- [Phone usage monitoring API documentation](references/api_doc.md)\n- [Skill demonstration](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON]\n\n**Output Format:** [Structured analysis results in JSON or readable report text; historical reports as a Markdown table]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include usage counts and durations, warnings, recommendations, and report links.]\n\n## Skill Version(s):\n\n1.0.12 (source: ClawHub release metadata; bundled SKILL.md says 1.0.18)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.12:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.12:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.11: 30 files, 41389 bytes\n\nFiles: references/api_doc.md (2662b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/phone_usage_monitoring_analysis.py (9100b), scripts/skill.py (579b), skill-card.md (2118b), SKILL.md (10694b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (472b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (156b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: \"phone_usage_monitoring_analysis\"\ndescription: \"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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率\"\nversion: \"1.0.16\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **职场玩手机智能监测技能** |\n| 🎯 核心目标 | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `PHONE_USAGE_MONITORING` |\n\nBased on advanced computer vision and human pose estimation algorithms, this feature automatically detects and\nidentifies employees' phone usage during working hours. The system supports dual detection for both real-time video\nstreams and static images, effectively distinguishing between normal work operations and unauthorized phone usage by\nprecisely analyzing hand movements, device characteristics, and behavioral patterns. Additionally, the system\nautomatically tracks the duration and frequency of phone usage for each employee and generates visualized data reports,\nenabling enterprises to monitor office discipline in real-time. This provides data support for standardizing employee\nbehavior and optimizing management strategies, thereby effectively improving overall work efficiency.\n\n本功能基于先进的计算机视觉与人体姿态估计算法，能够在工作时间内自动检测并识别员工的玩手机行为。系统支持对实时视频流和静态图片进行双重检测，通过精准分析手部动作、设备特征及行为模式，有效区分正常工作操作与违规玩手机行为。同时，系统会自动统计每位员工的玩手机时长与频次，生成可视化数据报表，帮助企业实时掌握办公秩序状况，为规范员工行为、优化管理策略提供数据支撑，从而有效提升整体工作效率\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过办公区域监控视频/图片进行职场玩手机行为智能分析，自动识别工作时间员工玩手机行为，生成办公效率监测报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频/图片分析 |\n| 2 | 手机物体检测 |\n| 3 | 玩手机行为识别 |\n| 4 | 时长统计 |\n| 5 | 频次分析 |\n| 6 | 违规行为预警 |\n| 7 | 办公效率建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供监控视频/图片 URL 或文件需要检测玩手机行为时，默认触发本技能进行办公行为监测分析 |\n| 🔎 明确分析意图 | 当用户明确需要进行办公监测、玩手机检测、员工行为管理，提及玩手机监测、办公效率、员工行为监控、在岗状态检测等关键词，并且上传了视频文件或者图片文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史监测报告、历史效率报告、玩手机监测报告清单、查询历史报告、查看监测报告列表、显示所有监测报告、显示玩手机分析报告，查询办公行为监测报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.phone_usage_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.phone_usage_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备视频/图片输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行玩手机行为监测分析 | 调用 `-m scripts.phone_usage_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频/图片文件路径 | 适用于本地文件分析 |\n| `--url` | 网络媒体 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--detection-type` | 检测类型，可选值：video(视频流检测)/image(图片检测)，默认 video | 按需填写 |\n| `--work-area` | 工作区域类型，可选值：open-office(开放办公)/cubicle(独立工位)/meeting-room(会议室)/other，默认 | 按需填写 |\n| `--list` | 显示历史玩手机监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/phone_usage_monitoring_analysis.py`](scripts/phone_usage_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 格式支持：视频支持 mp4/avi/mov 格式，图片支持 jpg/png/jpeg 格式，最大 10MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供企业内部管理参考，请注意保护员工个人隐私，遵守相关法律法规 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析开放办公区视频\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_video.mp4 --detection-type video --work-area open-office 分析工位监控图片\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_image.jpg --detection-type image --work-area cubicle 分析网络视频流\npython -m scripts.phone_usage_monitoring_analysis --url https://example.com/office_monitor.mp4 --detection-type video --work-area meeting-room 显示历史分析报告/显示分析报告清单列表/显示历史监测报告（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.phone_usage_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.phone_usage_monitoring_analysis --input monitor.mp4 --detection-type video --detail basic\n\n# 保存结果到文件\npython -m scripts.phone_usage_monitoring_analysis --input image.jpg --detection-type image --output result.json\n```\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-phone-usage-monitoring-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1788751231345\n}\n\nFile v1.0.11:references/api_doc.md\n\n# 职场玩手机行为监测分析 API 文档\n\n## 接口概述\n\n本技能调用云端视觉AI接口，自动识别办公区域员工玩手机行为，支持视频流动态统计和图片静态检测。\n\n## 支持检测的行为类型\n\n| 行为类型 | 描述 | 统计方式 |\n|----------|------|----------|\n| 手持手机 | 员工手持智能手机，屏幕朝向面部 | 按次数/时长统计 |\n| 低头看手机 | 员工低头注视手机屏幕 | 按时长分段统计 |\n| 持续使用 | 连续使用手机超过设定时长（默认3分钟） | 记为违规行为 |\n| 桌面放置 | 手机放置在桌面但未使用 | 不计数 |\n\n## 支持检测区域\n\n| 区域类型 | 特点 |\n|----------|------|\n| 开放办公区 | 多人员工同时监测 |\n| 独立工位 | 单人固定工位监测 |\n| 会议室 | 会议场景监测 |\n| 其他区域 | 自定义区域 |\n\n## API 响应字段说明\n\n### 基础信息\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| id | string | 分析记录ID |\n| data.analysis_time | string | 分析时间 |\n| data.person_detection.status | string | 人员检测状态 |\n| data.person_detection.quality_score | int | 画面质量评分 0-100 |\n\n### 诊断结果\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.diagnosis.compliance_score | int | 整体合规评分 0-100（分数越高越合规）|\n| data.diagnosis.overall_compliance | string | 整体合规状况：合规/轻度违规/中度违规/严重违规 |\n| data.diagnosis.total_phone_usage_count | int | 检测到玩手机行为总次数 |\n| data.diagnosis.total_phone_usage_duration | int | 累计玩手机总时长（秒）|\n| data.diagnosis.phone_usage_behavior | object | 各行为识别结果 |\n| data.diagnosis.usage_duration | object | 时长分段统计结果 |\n| data.diagnosis.area_compliance | object | 各区域合规评估 |\n\n### 预警与建议\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.efficiency_warnings | array[string] | 效率风险警示信息列表 |\n| data.improvement_suggestions | array[string] | 效率提升建议列表 |\n\n## 错误码说明\n\n| 错误码 | 说明 |\n|--------|------|\n| 200 | 请求成功 |\n| 400 | 请求参数错误 |\n| 401 | API 鉴权失败 |\n| 413 | 文件大小超出限制 |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误 |\n| 503 | 服务繁忙，请稍后重试 |\n\n## 合规提示\n\n1. 使用本工具应当遵守国家相关劳动法律法规\n2. 需要提前告知员工监控范围和目的，保护员工个人隐私\n3. 本工具仅辅助办公管理，不建议作为唯一奖惩依据\n4. 建议合理设定允许使用手机的休息时段，平衡工作与休息\n\nFile v1.0.11:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.11:scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.11:skill-card.md\n\n## Description:\n\nDetects potential employee phone use in workplace images or video and produces structured monitoring reports with counts, durations, warnings, suggestions, and report links.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nWorkplace operations or compliance teams use this skill to review authorized office-area images or video for possible phone-use behavior and generate monitoring reports for internal management review.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill processes sensitive workplace images or video for employee phone-use monitoring.\n\nMitigation: Use only with documented authority, employee notice or consent where required, defined retention limits, and review under applicable labor and privacy rules.\n\nRisk: Security evidence flags unsafe network and identity defaults for a skill that handles employee media and report history.\n\nMitigation: Require HTTPS-only endpoints, disable debug HTTP tracing, and provide a way to reset or delete local identity tokens and report history before deployment.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-phone-usage-monitoring-analysis)\n- [Workplace phone usage monitoring API documentation](references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Shell commands, Guidance]\n\n**Output Format:** [Markdown reports and JSON analysis results]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include cloud report links and optional saved output files.]\n\n## Skill Version(s):\n\n1.0.11 (source: server release metadata; SKILL.md frontmatter says 1.0.16)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.11:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.11:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.10: 30 files, 41585 bytes\n\nFiles: references/api_doc.md (2662b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/phone_usage_monitoring_analysis.py (9100b), scripts/skill.py (579b), skill-card.md (2638b), SKILL.md (10694b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (472b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (156b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: \"phone_usage_monitoring_analysis\"\ndescription: \"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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率\"\nversion: \"1.0.14\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **职场玩手机智能监测技能** |\n| 🎯 核心目标 | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `PHONE_USAGE_MONITORING` |\n\nBased on advanced computer vision and human pose estimation algorithms, this feature automatically detects and\nidentifies employees' phone usage during working hours. The system supports dual detection for both real-time video\nstreams and static images, effectively distinguishing between normal work operations and unauthorized phone usage by\nprecisely analyzing hand movements, device characteristics, and behavioral patterns. Additionally, the system\nautomatically tracks the duration and frequency of phone usage for each employee and generates visualized data reports,\nenabling enterprises to monitor office discipline in real-time. This provides data support for standardizing employee\nbehavior and optimizing management strategies, thereby effectively improving overall work efficiency.\n\n本功能基于先进的计算机视觉与人体姿态估计算法，能够在工作时间内自动检测并识别员工的玩手机行为。系统支持对实时视频流和静态图片进行双重检测，通过精准分析手部动作、设备特征及行为模式，有效区分正常工作操作与违规玩手机行为。同时，系统会自动统计每位员工的玩手机时长与频次，生成可视化数据报表，帮助企业实时掌握办公秩序状况，为规范员工行为、优化管理策略提供数据支撑，从而有效提升整体工作效率\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过办公区域监控视频/图片进行职场玩手机行为智能分析，自动识别工作时间员工玩手机行为，生成办公效率监测报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频/图片分析 |\n| 2 | 手机物体检测 |\n| 3 | 玩手机行为识别 |\n| 4 | 时长统计 |\n| 5 | 频次分析 |\n| 6 | 违规行为预警 |\n| 7 | 办公效率建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供监控视频/图片 URL 或文件需要检测玩手机行为时，默认触发本技能进行办公行为监测分析 |\n| 🔎 明确分析意图 | 当用户明确需要进行办公监测、玩手机检测、员工行为管理，提及玩手机监测、办公效率、员工行为监控、在岗状态检测等关键词，并且上传了视频文件或者图片文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史监测报告、历史效率报告、玩手机监测报告清单、查询历史报告、查看监测报告列表、显示所有监测报告、显示玩手机分析报告，查询办公行为监测报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.phone_usage_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.phone_usage_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备视频/图片输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行玩手机行为监测分析 | 调用 `-m scripts.phone_usage_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频/图片文件路径 | 适用于本地文件分析 |\n| `--url` | 网络媒体 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--detection-type` | 检测类型，可选值：video(视频流检测)/image(图片检测)，默认 video | 按需填写 |\n| `--work-area` | 工作区域类型，可选值：open-office(开放办公)/cubicle(独立工位)/meeting-room(会议室)/other，默认 | 按需填写 |\n| `--list` | 显示历史玩手机监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/phone_usage_monitoring_analysis.py`](scripts/phone_usage_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 格式支持：视频支持 mp4/avi/mov 格式，图片支持 jpg/png/jpeg 格式，最大 10MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供企业内部管理参考，请注意保护员工个人隐私，遵守相关法律法规 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析开放办公区视频\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_video.mp4 --detection-type video --work-area open-office 分析工位监控图片\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_image.jpg --detection-type image --work-area cubicle 分析网络视频流\npython -m scripts.phone_usage_monitoring_analysis --url https://example.com/office_monitor.mp4 --detection-type video --work-area meeting-room 显示历史分析报告/显示分析报告清单列表/显示历史监测报告（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.phone_usage_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.phone_usage_monitoring_analysis --input monitor.mp4 --detection-type video --detail basic\n\n# 保存结果到文件\npython -m scripts.phone_usage_monitoring_analysis --input image.jpg --detection-type image --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-phone-usage-monitoring-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1787693969725\n}\n\nFile v1.0.10:references/api_doc.md\n\n# 职场玩手机行为监测分析 API 文档\n\n## 接口概述\n\n本技能调用云端视觉AI接口，自动识别办公区域员工玩手机行为，支持视频流动态统计和图片静态检测。\n\n## 支持检测的行为类型\n\n| 行为类型 | 描述 | 统计方式 |\n|----------|------|----------|\n| 手持手机 | 员工手持智能手机，屏幕朝向面部 | 按次数/时长统计 |\n| 低头看手机 | 员工低头注视手机屏幕 | 按时长分段统计 |\n| 持续使用 | 连续使用手机超过设定时长（默认3分钟） | 记为违规行为 |\n| 桌面放置 | 手机放置在桌面但未使用 | 不计数 |\n\n## 支持检测区域\n\n| 区域类型 | 特点 |\n|----------|------|\n| 开放办公区 | 多人员工同时监测 |\n| 独立工位 | 单人固定工位监测 |\n| 会议室 | 会议场景监测 |\n| 其他区域 | 自定义区域 |\n\n## API 响应字段说明\n\n### 基础信息\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| id | string | 分析记录ID |\n| data.analysis_time | string | 分析时间 |\n| data.person_detection.status | string | 人员检测状态 |\n| data.person_detection.quality_score | int | 画面质量评分 0-100 |\n\n### 诊断结果\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.diagnosis.compliance_score | int | 整体合规评分 0-100（分数越高越合规）|\n| data.diagnosis.overall_compliance | string | 整体合规状况：合规/轻度违规/中度违规/严重违规 |\n| data.diagnosis.total_phone_usage_count | int | 检测到玩手机行为总次数 |\n| data.diagnosis.total_phone_usage_duration | int | 累计玩手机总时长（秒）|\n| data.diagnosis.phone_usage_behavior | object | 各行为识别结果 |\n| data.diagnosis.usage_duration | object | 时长分段统计结果 |\n| data.diagnosis.area_compliance | object | 各区域合规评估 |\n\n### 预警与建议\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.efficiency_warnings | array[string] | 效率风险警示信息列表 |\n| data.improvement_suggestions | array[string] | 效率提升建议列表 |\n\n## 错误码说明\n\n| 错误码 | 说明 |\n|--------|------|\n| 200 | 请求成功 |\n| 400 | 请求参数错误 |\n| 401 | API 鉴权失败 |\n| 413 | 文件大小超出限制 |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误 |\n| 503 | 服务繁忙，请稍后重试 |\n\n## 合规提示\n\n1. 使用本工具应当遵守国家相关劳动法律法规\n2. 需要提前告知员工监控范围和目的，保护员工个人隐私\n3. 本工具仅辅助办公管理，不建议作为唯一奖惩依据\n4. 建议合理设定允许使用手机的休息时段，平衡工作与休息\n\nFile v1.0.10:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.10:scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.10:skill-card.md\n\n## Description:\n\nBased on computer vision, this skill analyzes workplace images or videos to detect employee phone use during work hours, summarize frequency and duration, and return monitoring results and efficiency guidance.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nEnterprise operations teams and workplace management agents use this skill to analyze authorized office monitoring images or videos for phone-use events, report counts and duration, and retrieve prior cloud-hosted monitoring reports. Use should be limited to environments with lawful authority, employee notice, and appropriate privacy controls.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Workplace surveillance analysis may process employee images, video, and behavioral inferences without adequate notice or authority.\n\nMitigation: Use only with lawful authority, employee notice or consent, and documented privacy controls for collection, retention, access, and review.\n\nRisk: The scanner reports silent identity creation or reuse and local token storage.\n\nMitigation: Review account provisioning and token storage before installation, and require explicit consent or administrative approval for identity creation and history lookup.\n\nRisk: The scanner reports media and identifiers are sent to under-disclosed cloud or development endpoints.\n\nMitigation: Verify endpoint ownership, transport security, deployment environment, and retention policy before sending production or employee data.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-phone-usage-monitoring-analysis)\n- [Phone Usage Monitoring API Documentation](references/api_doc.md)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, json, shell commands, guidance]\n\n**Output Format:** [Markdown or JSON analysis reports with report links and optional saved output files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Outputs may include detected phone-use counts, duration statistics, compliance scores, warnings, improvement suggestions, and links to cloud-hosted reports.]\n\n## Skill Version(s):\n\n1.0.10 (source: ClawHub release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.10:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.10:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.9: 30 files, 41702 bytes\n\nFiles: references/api_doc.md (2662b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/phone_usage_monitoring_analysis.py (9100b), scripts/skill.py (579b), skill-card.md (2894b), SKILL.md (10694b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (472b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (155b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: \"phone_usage_monitoring_analysis\"\ndescription: \"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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率\"\nversion: \"1.0.13\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **职场玩手机智能监测技能** |\n| 🎯 核心目标 | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `PHONE_USAGE_MONITORING` |\n\nBased on advanced computer vision and human pose estimation algorithms, this feature automatically detects and\nidentifies employees' phone usage during working hours. The system supports dual detection for both real-time video\nstreams and static images, effectively distinguishing between normal work operations and unauthorized phone usage by\nprecisely analyzing hand movements, device characteristics, and behavioral patterns. Additionally, the system\nautomatically tracks the duration and frequency of phone usage for each employee and generates visualized data reports,\nenabling enterprises to monitor office discipline in real-time. This provides data support for standardizing employee\nbehavior and optimizing management strategies, thereby effectively improving overall work efficiency.\n\n本功能基于先进的计算机视觉与人体姿态估计算法，能够在工作时间内自动检测并识别员工的玩手机行为。系统支持对实时视频流和静态图片进行双重检测，通过精准分析手部动作、设备特征及行为模式，有效区分正常工作操作与违规玩手机行为。同时，系统会自动统计每位员工的玩手机时长与频次，生成可视化数据报表，帮助企业实时掌握办公秩序状况，为规范员工行为、优化管理策略提供数据支撑，从而有效提升整体工作效率\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过办公区域监控视频/图片进行职场玩手机行为智能分析，自动识别工作时间员工玩手机行为，生成办公效率监测报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频/图片分析 |\n| 2 | 手机物体检测 |\n| 3 | 玩手机行为识别 |\n| 4 | 时长统计 |\n| 5 | 频次分析 |\n| 6 | 违规行为预警 |\n| 7 | 办公效率建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供监控视频/图片 URL 或文件需要检测玩手机行为时，默认触发本技能进行办公行为监测分析 |\n| 🔎 明确分析意图 | 当用户明确需要进行办公监测、玩手机检测、员工行为管理，提及玩手机监测、办公效率、员工行为监控、在岗状态检测等关键词，并且上传了视频文件或者图片文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史监测报告、历史效率报告、玩手机监测报告清单、查询历史报告、查看监测报告列表、显示所有监测报告、显示玩手机分析报告，查询办公行为监测报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.phone_usage_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.phone_usage_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备视频/图片输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行玩手机行为监测分析 | 调用 `-m scripts.phone_usage_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频/图片文件路径 | 适用于本地文件分析 |\n| `--url` | 网络媒体 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--detection-type` | 检测类型，可选值：video(视频流检测)/image(图片检测)，默认 video | 按需填写 |\n| `--work-area` | 工作区域类型，可选值：open-office(开放办公)/cubicle(独立工位)/meeting-room(会议室)/other，默认 | 按需填写 |\n| `--list` | 显示历史玩手机监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/phone_usage_monitoring_analysis.py`](scripts/phone_usage_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 格式支持：视频支持 mp4/avi/mov 格式，图片支持 jpg/png/jpeg 格式，最大 10MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供企业内部管理参考，请注意保护员工个人隐私，遵守相关法律法规 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析开放办公区视频\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_video.mp4 --detection-type video --work-area open-office 分析工位监控图片\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_image.jpg --detection-type image --work-area cubicle 分析网络视频流\npython -m scripts.phone_usage_monitoring_analysis --url https://example.com/office_monitor.mp4 --detection-type video --work-area meeting-room 显示历史分析报告/显示分析报告清单列表/显示历史监测报告（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.phone_usage_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.phone_usage_monitoring_analysis --input monitor.mp4 --detection-type video --detail basic\n\n# 保存结果到文件\npython -m scripts.phone_usage_monitoring_analysis --input image.jpg --detection-type image --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-phone-usage-monitoring-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1786959928604\n}\n\nFile v1.0.9:references/api_doc.md\n\n# 职场玩手机行为监测分析 API 文档\n\n## 接口概述\n\n本技能调用云端视觉AI接口，自动识别办公区域员工玩手机行为，支持视频流动态统计和图片静态检测。\n\n## 支持检测的行为类型\n\n| 行为类型 | 描述 | 统计方式 |\n|----------|------|----------|\n| 手持手机 | 员工手持智能手机，屏幕朝向面部 | 按次数/时长统计 |\n| 低头看手机 | 员工低头注视手机屏幕 | 按时长分段统计 |\n| 持续使用 | 连续使用手机超过设定时长（默认3分钟） | 记为违规行为 |\n| 桌面放置 | 手机放置在桌面但未使用 | 不计数 |\n\n## 支持检测区域\n\n| 区域类型 | 特点 |\n|----------|------|\n| 开放办公区 | 多人员工同时监测 |\n| 独立工位 | 单人固定工位监测 |\n| 会议室 | 会议场景监测 |\n| 其他区域 | 自定义区域 |\n\n## API 响应字段说明\n\n### 基础信息\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| id | string | 分析记录ID |\n| data.analysis_time | string | 分析时间 |\n| data.person_detection.status | string | 人员检测状态 |\n| data.person_detection.quality_score | int | 画面质量评分 0-100 |\n\n### 诊断结果\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.diagnosis.compliance_score | int | 整体合规评分 0-100（分数越高越合规）|\n| data.diagnosis.overall_compliance | string | 整体合规状况：合规/轻度违规/中度违规/严重违规 |\n| data.diagnosis.total_phone_usage_count | int | 检测到玩手机行为总次数 |\n| data.diagnosis.total_phone_usage_duration | int | 累计玩手机总时长（秒）|\n| data.diagnosis.phone_usage_behavior | object | 各行为识别结果 |\n| data.diagnosis.usage_duration | object | 时长分段统计结果 |\n| data.diagnosis.area_compliance | object | 各区域合规评估 |\n\n### 预警与建议\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.efficiency_warnings | array[string] | 效率风险警示信息列表 |\n| data.improvement_suggestions | array[string] | 效率提升建议列表 |\n\n## 错误码说明\n\n| 错误码 | 说明 |\n|--------|------|\n| 200 | 请求成功 |\n| 400 | 请求参数错误 |\n| 401 | API 鉴权失败 |\n| 413 | 文件大小超出限制 |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误 |\n| 503 | 服务繁忙，请稍后重试 |\n\n## 合规提示\n\n1. 使用本工具应当遵守国家相关劳动法律法规\n2. 需要提前告知员工监控范围和目的，保护员工个人隐私\n3. 本工具仅辅助办公管理，不建议作为唯一奖惩依据\n4. 建议合理设定允许使用手机的休息时段，平衡工作与休息\n\nFile v1.0.9:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.9:scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.9:skill-card.md\n\n## Description:\n\nDetects possible employee phone use in workplace images or video, produces structured monitoring reports, and can list prior reports from the configured cloud service.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nEnterprise operators and workplace management teams use this skill to analyze authorized office monitoring media for possible phone-use behavior, summarize counts and duration, and review cloud-hosted report history. It is intended as an internal management aid and should not be used as the sole basis for employment decisions.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Employee surveillance media or media URLs may be sent to the configured cloud service.\n\nMitigation: Use only with clear authorization to process workplace monitoring media, disclose monitoring scope and purpose, and avoid sending media that is outside the approved use case.\n\nRisk: Cloud report history is queried by an internally resolved identity.\n\nMitigation: Limit report access to authorized operators and verify that identity-to-report association matches the intended organization or workspace.\n\nRisk: The skill can silently provision identities and store authentication tokens in local workspace data.\n\nMitigation: Run in a controlled workspace, review local token storage practices before installation, and rotate or remove stored credentials when access is no longer needed.\n\nRisk: Phone-use detection outputs may affect employee privacy and workplace decisions.\n\nMitigation: Treat reports as decision-support only, review results with human oversight, and follow applicable labor, privacy, and notice requirements.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-phone-usage-monitoring-analysis)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n- [Workplace phone usage monitoring API documentation](artifact/references/api_doc.md)\n- [Common analysis API documentation](artifact/skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, files, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown or JSON text, with optional local output files.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Can return structured analysis, report links, warnings, suggestions, or a Markdown table of cloud report history.]\n\n## Skill Version(s):\n\n1.0.9 (source: ClawHub release metadata; artifact frontmatter says 1.0.13)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.9:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.9:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.8: 30 files, 41568 bytes\n\nFiles: references/api_doc.md (2662b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/phone_usage_monitoring_analysis.py (9100b), scripts/skill.py (579b), skill-card.md (2556b), SKILL.md (10694b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (472b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (155b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"phone_usage_monitoring_analysis\"\ndescription: \"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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率\"\nversion: \"1.0.13\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **职场玩手机智能监测技能** |\n| 🎯 核心目标 | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `PHONE_USAGE_MONITORING` |\n\nBased on advanced computer vision and human pose estimation algorithms, this feature automatically detects and\nidentifies employees' phone usage during working hours. The system supports dual detection for both real-time video\nstreams and static images, effectively distinguishing between normal work operations and unauthorized phone usage by\nprecisely analyzing hand movements, device characteristics, and behavioral patterns. Additionally, the system\nautomatically tracks the duration and frequency of phone usage for each employee and generates visualized data reports,\nenabling enterprises to monitor office discipline in real-time. This provides data support for standardizing employee\nbehavior and optimizing management strategies, thereby effectively improving overall work efficiency.\n\n本功能基于先进的计算机视觉与人体姿态估计算法，能够在工作时间内自动检测并识别员工的玩手机行为。系统支持对实时视频流和静态图片进行双重检测，通过精准分析手部动作、设备特征及行为模式，有效区分正常工作操作与违规玩手机行为。同时，系统会自动统计每位员工的玩手机时长与频次，生成可视化数据报表，帮助企业实时掌握办公秩序状况，为规范员工行为、优化管理策略提供数据支撑，从而有效提升整体工作效率\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过办公区域监控视频/图片进行职场玩手机行为智能分析，自动识别工作时间员工玩手机行为，生成办公效率监测报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频/图片分析 |\n| 2 | 手机物体检测 |\n| 3 | 玩手机行为识别 |\n| 4 | 时长统计 |\n| 5 | 频次分析 |\n| 6 | 违规行为预警 |\n| 7 | 办公效率建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供监控视频/图片 URL 或文件需要检测玩手机行为时，默认触发本技能进行办公行为监测分析 |\n| 🔎 明确分析意图 | 当用户明确需要进行办公监测、玩手机检测、员工行为管理，提及玩手机监测、办公效率、员工行为监控、在岗状态检测等关键词，并且上传了视频文件或者图片文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史监测报告、历史效率报告、玩手机监测报告清单、查询历史报告、查看监测报告列表、显示所有监测报告、显示玩手机分析报告，查询办公行为监测报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.phone_usage_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.phone_usage_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备视频/图片输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行玩手机行为监测分析 | 调用 `-m scripts.phone_usage_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频/图片文件路径 | 适用于本地文件分析 |\n| `--url` | 网络媒体 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--detection-type` | 检测类型，可选值：video(视频流检测)/image(图片检测)，默认 video | 按需填写 |\n| `--work-area` | 工作区域类型，可选值：open-office(开放办公)/cubicle(独立工位)/meeting-room(会议室)/other，默认 | 按需填写 |\n| `--list` | 显示历史玩手机监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/phone_usage_monitoring_analysis.py`](scripts/phone_usage_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 格式支持：视频支持 mp4/avi/mov 格式，图片支持 jpg/png/jpeg 格式，最大 10MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供企业内部管理参考，请注意保护员工个人隐私，遵守相关法律法规 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析开放办公区视频\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_video.mp4 --detection-type video --work-area open-office 分析工位监控图片\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_image.jpg --detection-type image --work-area cubicle 分析网络视频流\npython -m scripts.phone_usage_monitoring_analysis --url https://example.com/office_monitor.mp4 --detection-type video --work-area meeting-room 显示历史分析报告/显示分析报告清单列表/显示历史监测报告（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.phone_usage_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.phone_usage_monitoring_analysis --input monitor.mp4 --detection-type video --detail basic\n\n# 保存结果到文件\npython -m scripts.phone_usage_monitoring_analysis --input image.jpg --detection-type image --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-phone-usage-monitoring-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1786751610272\n}\n\nFile v1.0.8:references/api_doc.md\n\n# 职场玩手机行为监测分析 API 文档\n\n## 接口概述\n\n本技能调用云端视觉AI接口，自动识别办公区域员工玩手机行为，支持视频流动态统计和图片静态检测。\n\n## 支持检测的行为类型\n\n| 行为类型 | 描述 | 统计方式 |\n|----------|------|----------|\n| 手持手机 | 员工手持智能手机，屏幕朝向面部 | 按次数/时长统计 |\n| 低头看手机 | 员工低头注视手机屏幕 | 按时长分段统计 |\n| 持续使用 | 连续使用手机超过设定时长（默认3分钟） | 记为违规行为 |\n| 桌面放置 | 手机放置在桌面但未使用 | 不计数 |\n\n## 支持检测区域\n\n| 区域类型 | 特点 |\n|----------|------|\n| 开放办公区 | 多人员工同时监测 |\n| 独立工位 | 单人固定工位监测 |\n| 会议室 | 会议场景监测 |\n| 其他区域 | 自定义区域 |\n\n## API 响应字段说明\n\n### 基础信息\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| id | string | 分析记录ID |\n| data.analysis_time | string | 分析时间 |\n| data.person_detection.status | string | 人员检测状态 |\n| data.person_detection.quality_score | int | 画面质量评分 0-100 |\n\n### 诊断结果\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.diagnosis.compliance_score | int | 整体合规评分 0-100（分数越高越合规）|\n| data.diagnosis.overall_compliance | string | 整体合规状况：合规/轻度违规/中度违规/严重违规 |\n| data.diagnosis.total_phone_usage_count | int | 检测到玩手机行为总次数 |\n| data.diagnosis.total_phone_usage_duration | int | 累计玩手机总时长（秒）|\n| data.diagnosis.phone_usage_behavior | object | 各行为识别结果 |\n| data.diagnosis.usage_duration | object | 时长分段统计结果 |\n| data.diagnosis.area_compliance | object | 各区域合规评估 |\n\n### 预警与建议\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.efficiency_warnings | array[string] | 效率风险警示信息列表 |\n| data.improvement_suggestions | array[string] | 效率提升建议列表 |\n\n## 错误码说明\n\n| 错误码 | 说明 |\n|--------|------|\n| 200 | 请求成功 |\n| 400 | 请求参数错误 |\n| 401 | API 鉴权失败 |\n| 413 | 文件大小超出限制 |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误 |\n| 503 | 服务繁忙，请稍后重试 |\n\n## 合规提示\n\n1. 使用本工具应当遵守国家相关劳动法律法规\n2. 需要提前告知员工监控范围和目的，保护员工个人隐私\n3. 本工具仅辅助办公管理，不建议作为唯一奖惩依据\n4. 建议合理设定允许使用手机的休息时段，平衡工作与休息\n\nFile v1.0.8:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.8:scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.8:skill-card.md\n\n## Description:\n\nUses computer vision to analyze workplace images or video for employee phone-use behavior and return structured monitoring reports, warnings, recommendations, and report links.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nEnterprise workplace monitoring or facilities teams use this skill to submit office images, videos, or media URLs for phone-usage detection and to retrieve historical monitoring reports. It is intended as internal management support and should not be used as the sole basis for employee discipline.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Cloud-based analysis of employee images or videos can expose sensitive workplace and personal data.\n\nMitigation: Verify the backend configuration before use, obtain appropriate employee and legal approvals, and define retention and access-control policies before deployment.\n\nRisk: The skill silently creates or reuses persistent backend identity tokens for report access.\n\nMitigation: Use only in workspaces with controlled access, protect local workspace data, and rotate or remove stored identity data when access changes.\n\nRisk: Monitoring reports may be incomplete or misleading if used without human and policy review.\n\nMitigation: Treat results as advisory internal management support and review them against workplace policy, legal requirements, and source media before taking action.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-phone-usage-monitoring-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [Phone usage monitoring API documentation](artifact/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance]\n\n**Output Format:** [Markdown reports or JSON responses, with optional saved output files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include detection counts, duration summaries, compliance scores, warnings, recommendations, historical report tables, and report links.]\n\n## Skill Version(s):\n\n1.0.8 (source: server release metadata; artifact frontmatter states 1.0.13)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.8:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.8:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.7: 30 files, 41838 bytes\n\nFiles: references/api_doc.md (2662b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/phone_usage_monitoring_analysis.py (9100b), scripts/skill.py (579b), skill-card.md (3228b), SKILL.md (10694b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (155b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"phone_usage_monitoring_analysis\"\ndescription: \"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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率\"\nversion: \"1.0.12\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **职场玩手机智能监测技能** |\n| 🎯 核心目标 | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `PHONE_USAGE_MONITORING` |\n\nBased on advanced computer vision and human pose estimation algorithms, this feature automatically detects and\nidentifies employees' phone usage during working hours. The system supports dual detection for both real-time video\nstreams and static images, effectively distinguishing between normal work operations and unauthorized phone usage by\nprecisely analyzing hand movements, device characteristics, and behavioral patterns. Additionally, the system\nautomatically tracks the duration and frequency of phone usage for each employee and generates visualized data reports,\nenabling enterprises to monitor office discipline in real-time. This provides data support for standardizing employee\nbehavior and optimizing management strategies, thereby effectively improving overall work efficiency.\n\n本功能基于先进的计算机视觉与人体姿态估计算法，能够在工作时间内自动检测并识别员工的玩手机行为。系统支持对实时视频流和静态图片进行双重检测，通过精准分析手部动作、设备特征及行为模式，有效区分正常工作操作与违规玩手机行为。同时，系统会自动统计每位员工的玩手机时长与频次，生成可视化数据报表，帮助企业实时掌握办公秩序状况，为规范员工行为、优化管理策略提供数据支撑，从而有效提升整体工作效率\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过办公区域监控视频/图片进行职场玩手机行为智能分析，自动识别工作时间员工玩手机行为，生成办公效率监测报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频/图片分析 |\n| 2 | 手机物体检测 |\n| 3 | 玩手机行为识别 |\n| 4 | 时长统计 |\n| 5 | 频次分析 |\n| 6 | 违规行为预警 |\n| 7 | 办公效率建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供监控视频/图片 URL 或文件需要检测玩手机行为时，默认触发本技能进行办公行为监测分析 |\n| 🔎 明确分析意图 | 当用户明确需要进行办公监测、玩手机检测、员工行为管理，提及玩手机监测、办公效率、员工行为监控、在岗状态检测等关键词，并且上传了视频文件或者图片文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史监测报告、历史效率报告、玩手机监测报告清单、查询历史报告、查看监测报告列表、显示所有监测报告、显示玩手机分析报告，查询办公行为监测报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.phone_usage_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.phone_usage_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备视频/图片输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行玩手机行为监测分析 | 调用 `-m scripts.phone_usage_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频/图片文件路径 | 适用于本地文件分析 |\n| `--url` | 网络媒体 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--detection-type` | 检测类型，可选值：video(视频流检测)/image(图片检测)，默认 video | 按需填写 |\n| `--work-area` | 工作区域类型，可选值：open-office(开放办公)/cubicle(独立工位)/meeting-room(会议室)/other，默认 | 按需填写 |\n| `--list` | 显示历史玩手机监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/phone_usage_monitoring_analysis.py`](scripts/phone_usage_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 格式支持：视频支持 mp4/avi/mov 格式，图片支持 jpg/png/jpeg 格式，最大 10MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供企业内部管理参考，请注意保护员工个人隐私，遵守相关法律法规 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析开放办公区视频\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_video.mp4 --detection-type video --work-area open-office 分析工位监控图片\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_image.jpg --detection-type image --work-area cubicle 分析网络视频流\npython -m scripts.phone_usage_monitoring_analysis --url https://example.com/office_monitor.mp4 --detection-type video --work-area meeting-room 显示历史分析报告/显示分析报告清单列表/显示历史监测报告（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.phone_usage_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.phone_usage_monitoring_analysis --input monitor.mp4 --detection-type video --detail basic\n\n# 保存结果到文件\npython -m scripts.phone_usage_monitoring_analysis --input image.jpg --detection-type image --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-phone-usage-monitoring-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1786232550327\n}\n\nFile v1.0.7:references/api_doc.md\n\n# 职场玩手机行为监测分析 API 文档\n\n## 接口概述\n\n本技能调用云端视觉AI接口，自动识别办公区域员工玩手机行为，支持视频流动态统计和图片静态检测。\n\n## 支持检测的行为类型\n\n| 行为类型 | 描述 | 统计方式 |\n|----------|------|----------|\n| 手持手机 | 员工手持智能手机，屏幕朝向面部 | 按次数/时长统计 |\n| 低头看手机 | 员工低头注视手机屏幕 | 按时长分段统计 |\n| 持续使用 | 连续使用手机超过设定时长（默认3分钟） | 记为违规行为 |\n| 桌面放置 | 手机放置在桌面但未使用 | 不计数 |\n\n## 支持检测区域\n\n| 区域类型 | 特点 |\n|----------|------|\n| 开放办公区 | 多人员工同时监测 |\n| 独立工位 | 单人固定工位监测 |\n| 会议室 | 会议场景监测 |\n| 其他区域 | 自定义区域 |\n\n## API 响应字段说明\n\n### 基础信息\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| id | string | 分析记录ID |\n| data.analysis_time | string | 分析时间 |\n| data.person_detection.status | string | 人员检测状态 |\n| data.person_detection.quality_score | int | 画面质量评分 0-100 |\n\n### 诊断结果\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.diagnosis.compliance_score | int | 整体合规评分 0-100（分数越高越合规）|\n| data.diagnosis.overall_compliance | string | 整体合规状况：合规/轻度违规/中度违规/严重违规 |\n| data.diagnosis.total_phone_usage_count | int | 检测到玩手机行为总次数 |\n| data.diagnosis.total_phone_usage_duration | int | 累计玩手机总时长（秒）|\n| data.diagnosis.phone_usage_behavior | object | 各行为识别结果 |\n| data.diagnosis.usage_duration | object | 时长分段统计结果 |\n| data.diagnosis.area_compliance | object | 各区域合规评估 |\n\n### 预警与建议\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.efficiency_warnings | array[string] | 效率风险警示信息列表 |\n| data.improvement_suggestions | array[string] | 效率提升建议列表 |\n\n## 错误码说明\n\n| 错误码 | 说明 |\n|--------|------|\n| 200 | 请求成功 |\n| 400 | 请求参数错误 |\n| 401 | API 鉴权失败 |\n| 413 | 文件大小超出限制 |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误 |\n| 503 | 服务繁忙，请稍后重试 |\n\n## 合规提示\n\n1. 使用本工具应当遵守国家相关劳动法律法规\n2. 需要提前告知员工监控范围和目的，保护员工个人隐私\n3. 本工具仅辅助办公管理，不建议作为唯一奖惩依据\n4. 建议合理设定允许使用手机的休息时段，平衡工作与休息\n\nFile v1.0.7:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.7:scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.7:skill-card.md\n\n## Description:\n\nDetects workplace phone use in images or video, sends the media to a cloud vision API, and returns structured monitoring results, warnings, suggestions, history data, and report links.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nEnterprise administrators and authorized workplace operations teams use this skill to analyze office-area images or video for employee phone-use events, compliance scores, warnings, and improvement suggestions. It also supports cloud history lookup for prior monitoring reports linked to the resolved user identity.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Employee surveillance and workplace behavior monitoring can be inappropriate or unlawful without authority, notice, consent, and a legitimate business purpose.\n\nMitigation: Use only in authorized workplace monitoring programs with required employee notice or consent, documented scope, and review against applicable labor, privacy, and surveillance rules.\n\nRisk: Media and report data are sent to a vendor cloud service and may contain employee images, workplace activity, and behavioral inferences.\n\nMitigation: Review the vendor's retention, access-control, deletion, and data-processing practices before using real workplace footage; limit uploads to necessary media.\n\nRisk: Automatic identity linkage, history retrieval, and local account/token persistence can expose monitoring history or credentials if the runtime is shared or compromised.\n\nMitigation: Run in a controlled environment, restrict filesystem and account access, protect persisted tokens, and clear local state when rotating users or decommissioning the skill.\n\nRisk: Automated compliance scores and phone-use detections can be wrong or incomplete if image quality, context, or model behavior is unsuitable.\n\nMitigation: Treat results as management-support information, review important findings manually, and avoid using this skill as the sole basis for employment decisions.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-phone-usage-monitoring-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [Workplace phone behavior monitoring API documentation](artifact/references/api_doc.md)\n- [SMYX analysis API documentation](artifact/skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, json, shell commands, files]\n\n**Output Format:** [Markdown or JSON report text, with optional saved output file]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Reports may include compliance scores, detected phone-use counts and duration, warnings, suggestions, cloud history data, and export links.]\n\n## Skill Version(s):\n\n1.0.7 (source: server release metadata; artifact frontmatter reports 1.0.12)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.7:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.7:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.6: 30 files, 41590 bytes\n\nFiles: references/api_doc.md (2662b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/phone_usage_monitoring_analysis.py (9100b), scripts/skill.py (579b), skill-card.md (2514b), SKILL.md (10694b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (155b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"phone_usage_monitoring_analysis\"\ndescription: \"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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **职场玩手机智能监测技能** |\n| 🎯 核心目标 | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `PHONE_USAGE_MONITORING` |\n\nBased on advanced computer vision and human pose estimation algorithms, this feature automatically detects and\nidentifies employees' phone usage during working hours. The system supports dual detection for both real-time video\nstreams and static images, effectively distinguishing between normal work operations and unauthorized phone usage by\nprecisely analyzing hand movements, device characteristics, and behavioral patterns. Additionally, the system\nautomatically tracks the duration and frequency of phone usage for each employee and generates visualized data reports,\nenabling enterprises to monitor office discipline in real-time. This provides data support for standardizing employee\nbehavior and optimizing management strategies, thereby effectively improving overall work efficiency.\n\n本功能基于先进的计算机视觉与人体姿态估计算法，能够在工作时间内自动检测并识别员工的玩手机行为。系统支持对实时视频流和静态图片进行双重检测，通过精准分析手部动作、设备特征及行为模式，有效区分正常工作操作与违规玩手机行为。同时，系统会自动统计每位员工的玩手机时长与频次，生成可视化数据报表，帮助企业实时掌握办公秩序状况，为规范员工行为、优化管理策略提供数据支撑，从而有效提升整体工作效率\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过办公区域监控视频/图片进行职场玩手机行为智能分析，自动识别工作时间员工玩手机行为，生成办公效率监测报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频/图片分析 |\n| 2 | 手机物体检测 |\n| 3 | 玩手机行为识别 |\n| 4 | 时长统计 |\n| 5 | 频次分析 |\n| 6 | 违规行为预警 |\n| 7 | 办公效率建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供监控视频/图片 URL 或文件需要检测玩手机行为时，默认触发本技能进行办公行为监测分析 |\n| 🔎 明确分析意图 | 当用户明确需要进行办公监测、玩手机检测、员工行为管理，提及玩手机监测、办公效率、员工行为监控、在岗状态检测等关键词，并且上传了视频文件或者图片文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史监测报告、历史效率报告、玩手机监测报告清单、查询历史报告、查看监测报告列表、显示所有监测报告、显示玩手机分析报告，查询办公行为监测报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.phone_usage_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.phone_usage_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备视频/图片输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行玩手机行为监测分析 | 调用 `-m scripts.phone_usage_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频/图片文件路径 | 适用于本地文件分析 |\n| `--url` | 网络媒体 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--detection-type` | 检测类型，可选值：video(视频流检测)/image(图片检测)，默认 video | 按需填写 |\n| `--work-area` | 工作区域类型，可选值：open-office(开放办公)/cubicle(独立工位)/meeting-room(会议室)/other，默认 | 按需填写 |\n| `--list` | 显示历史玩手机监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/phone_usage_monitoring_analysis.py`](scripts/phone_usage_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 格式支持：视频支持 mp4/avi/mov 格式，图片支持 jpg/png/jpeg 格式，最大 10MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供企业内部管理参考，请注意保护员工个人隐私，遵守相关法律法规 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析开放办公区视频\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_video.mp4 --detection-type video --work-area open-office 分析工位监控图片\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_image.jpg --detection-type image --work-area cubicle 分析网络视频流\npython -m scripts.phone_usage_monitoring_analysis --url https://example.com/office_monitor.mp4 --detection-type video --work-area meeting-room 显示历史分析报告/显示分析报告清单列表/显示历史监测报告（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.phone_usage_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.phone_usage_monitoring_analysis --input monitor.mp4 --detection-type video --detail basic\n\n# 保存结果到文件\npython -m scripts.phone_usage_monitoring_analysis --input image.jpg --detection-type image --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-phone-usage-monitoring-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1785098430357\n}\n\nFile v1.0.6:references/api_doc.md\n\n# 职场玩手机行为监测分析 API 文档\n\n## 接口概述\n\n本技能调用云端视觉AI接口，自动识别办公区域员工玩手机行为，支持视频流动态统计和图片静态检测。\n\n## 支持检测的行为类型\n\n| 行为类型 | 描述 | 统计方式 |\n|----------|------|----------|\n| 手持手机 | 员工手持智能手机，屏幕朝向面部 | 按次数/时长统计 |\n| 低头看手机 | 员工低头注视手机屏幕 | 按时长分段统计 |\n| 持续使用 | 连续使用手机超过设定时长（默认3分钟） | 记为违规行为 |\n| 桌面放置 | 手机放置在桌面但未使用 | 不计数 |\n\n## 支持检测区域\n\n| 区域类型 | 特点 |\n|----------|------|\n| 开放办公区 | 多人员工同时监测 |\n| 独立工位 | 单人固定工位监测 |\n| 会议室 | 会议场景监测 |\n| 其他区域 | 自定义区域 |\n\n## API 响应字段说明\n\n### 基础信息\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| id | string | 分析记录ID |\n| data.analysis_time | string | 分析时间 |\n| data.person_detection.status | string | 人员检测状态 |\n| data.person_detection.quality_score | int | 画面质量评分 0-100 |\n\n### 诊断结果\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.diagnosis.compliance_score | int | 整体合规评分 0-100（分数越高越合规）|\n| data.diagnosis.overall_compliance | string | 整体合规状况：合规/轻度违规/中度违规/严重违规 |\n| data.diagnosis.total_phone_usage_count | int | 检测到玩手机行为总次数 |\n| data.diagnosis.total_phone_usage_duration | int | 累计玩手机总时长（秒）|\n| data.diagnosis.phone_usage_behavior | object | 各行为识别结果 |\n| data.diagnosis.usage_duration | object | 时长分段统计结果 |\n| data.diagnosis.area_compliance | object | 各区域合规评估 |\n\n### 预警与建议\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.efficiency_warnings | array[string] | 效率风险警示信息列表 |\n| data.improvement_suggestions | array[string] | 效率提升建议列表 |\n\n## 错误码说明\n\n| 错误码 | 说明 |\n|--------|------|\n| 200 | 请求成功 |\n| 400 | 请求参数错误 |\n| 401 | API 鉴权失败 |\n| 413 | 文件大小超出限制 |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误 |\n| 503 | 服务繁忙，请稍后重试 |\n\n## 合规提示\n\n1. 使用本工具应当遵守国家相关劳动法律法规\n2. 需要提前告知员工监控范围和目的，保护员工个人隐私\n3. 本工具仅辅助办公管理，不建议作为唯一奖惩依据\n4. 建议合理设定允许使用手机的休息时段，平衡工作与休息\n\nFile v1.0.6:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.6:scripts/config.yaml\n\n{}\n\nFile v1.0.6:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.6:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.6:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.6:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.6:skill-card.md\n\n## Description: <br>\nThis skill uses computer vision to detect employee phone use in workplace video or images, count duration and frequency, and return structured monitoring reports. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nWorkplace administrators and authorized operations teams use this skill to analyze office monitoring images or video for phone-use events and retrieve structured reports for internal management review. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill sends sensitive workplace monitoring images, videos, and analysis data to cloud APIs. <br>\nMitigation: Use only where the operator is authorized to process workplace monitoring footage, with employee notice or consent, retention rules, and backend access controls confirmed before deployment. <br>\nRisk: URL inputs may cause the backend service to fetch supplied media URLs. <br>\nMitigation: Restrict accepted URL sources and confirm backend fetch controls before allowing URL-based analysis. <br>\nRisk: The skill silently creates or reuses an identity value and stores local identity/token data. <br>\nMitigation: Protect and periodically clear the workspace data directory, the SQLite token store, and data/smyx-api-key.txt; limit filesystem permissions to authorized users. <br>\n\n\n## Reference(s): <br>\n- [职场玩手机行为监测分析 API 文档](references/api_doc.md) <br>\n- [API接口文档](skills/smyx_analysis/references/api_doc.md) <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-phone-usage-monitoring-analysis) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, JSON, files] <br>\n**Output Format:** [Markdown or JSON analysis reports, with an optional saved output file.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include report links and cloud-returned history records; output detail can be basic, standard, or json.] <br>\n\n## Skill Version(s): <br>\n1.0.6 (source: server release metadata; artifact frontmatter states 1.0.10) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.6:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.6:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.5: 30 files, 41623 bytes\n\nFiles: references/api_doc.md (2662b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/phone_usage_monitoring_analysis.py (9100b), scripts/skill.py (579b), skill-card.md (2829b), SKILL.md (10693b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (155b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: \"phone_usage_monitoring_analysis\"\ndescription: \"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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **职场玩手机智能监测技能** |\n| 🎯 核心目标 | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `PHONE_USAGE_MONITORING` |\n\nBased on advanced computer vision and human pose estimation algorithms, this feature automatically detects and\nidentifies employees' phone usage during working hours. The system supports dual detection for both real-time video\nstreams and static images, effectively distinguishing between normal work operations and unauthorized phone usage by\nprecisely analyzing hand movements, device characteristics, and behavioral patterns. Additionally, the system\nautomatically tracks the duration and frequency of phone usage for each employee and generates visualized data reports,\nenabling enterprises to monitor office discipline in real-time. This provides data support for standardizing employee\nbehavior and optimizing management strategies, thereby effectively improving overall work efficiency.\n\n本功能基于先进的计算机视觉与人体姿态估计算法，能够在工作时间内自动检测并识别员工的玩手机行为。系统支持对实时视频流和静态图片进行双重检测，通过精准分析手部动作、设备特征及行为模式，有效区分正常工作操作与违规玩手机行为。同时，系统会自动统计每位员工的玩手机时长与频次，生成可视化数据报表，帮助企业实时掌握办公秩序状况，为规范员工行为、优化管理策略提供数据支撑，从而有效提升整体工作效率\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过办公区域监控视频/图片进行职场玩手机行为智能分析，自动识别工作时间员工玩手机行为，生成办公效率监测报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频/图片分析 |\n| 2 | 手机物体检测 |\n| 3 | 玩手机行为识别 |\n| 4 | 时长统计 |\n| 5 | 频次分析 |\n| 6 | 违规行为预警 |\n| 7 | 办公效率建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供监控视频/图片 URL 或文件需要检测玩手机行为时，默认触发本技能进行办公行为监测分析 |\n| 🔎 明确分析意图 | 当用户明确需要进行办公监测、玩手机检测、员工行为管理，提及玩手机监测、办公效率、员工行为监控、在岗状态检测等关键词，并且上传了视频文件或者图片文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史监测报告、历史效率报告、玩手机监测报告清单、查询历史报告、查看监测报告列表、显示所有监测报告、显示玩手机分析报告，查询办公行为监测报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.phone_usage_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.phone_usage_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备视频/图片输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行玩手机行为监测分析 | 调用 `-m scripts.phone_usage_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频/图片文件路径 | 适用于本地文件分析 |\n| `--url` | 网络媒体 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--detection-type` | 检测类型，可选值：video(视频流检测)/image(图片检测)，默认 video | 按需填写 |\n| `--work-area` | 工作区域类型，可选值：open-office(开放办公)/cubicle(独立工位)/meeting-room(会议室)/other，默认 | 按需填写 |\n| `--list` | 显示历史玩手机监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/phone_usage_monitoring_analysis.py`](scripts/phone_usage_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 格式支持：视频支持 mp4/avi/mov 格式，图片支持 jpg/png/jpeg 格式，最大 10MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供企业内部管理参考，请注意保护员工个人隐私，遵守相关法律法规 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析开放办公区视频\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_video.mp4 --detection-type video --work-area open-office 分析工位监控图片\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_image.jpg --detection-type image --work-area cubicle 分析网络视频流\npython -m scripts.phone_usage_monitoring_analysis --url https://example.com/office_monitor.mp4 --detection-type video --work-area meeting-room 显示历史分析报告/显示分析报告清单列表/显示历史监测报告（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.phone_usage_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.phone_usage_monitoring_analysis --input monitor.mp4 --detection-type video --detail basic\n\n# 保存结果到文件\npython -m scripts.phone_usage_monitoring_analysis --input image.jpg --detection-type image --output result.json\n```\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-phone-usage-monitoring-analysis\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1784458467683\n}\n\nFile v1.0.5:references/api_doc.md\n\n# 职场玩手机行为监测分析 API 文档\n\n## 接口概述\n\n本技能调用云端视觉AI接口，自动识别办公区域员工玩手机行为，支持视频流动态统计和图片静态检测。\n\n## 支持检测的行为类型\n\n| 行为类型 | 描述 | 统计方式 |\n|----------|------|----------|\n| 手持手机 | 员工手持智能手机，屏幕朝向面部 | 按次数/时长统计 |\n| 低头看手机 | 员工低头注视手机屏幕 | 按时长分段统计 |\n| 持续使用 | 连续使用手机超过设定时长（默认3分钟） | 记为违规行为 |\n| 桌面放置 | 手机放置在桌面但未使用 | 不计数 |\n\n## 支持检测区域\n\n| 区域类型 | 特点 |\n|----------|------|\n| 开放办公区 | 多人员工同时监测 |\n| 独立工位 | 单人固定工位监测 |\n| 会议室 | 会议场景监测 |\n| 其他区域 | 自定义区域 |\n\n## API 响应字段说明\n\n### 基础信息\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| id | string | 分析记录ID |\n| data.analysis_time | string | 分析时间 |\n| data.person_detection.status | string | 人员检测状态 |\n| data.person_detection.quality_score | int | 画面质量评分 0-100 |\n\n### 诊断结果\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.diagnosis.compliance_score | int | 整体合规评分 0-100（分数越高越合规）|\n| data.diagnosis.overall_compliance | string | 整体合规状况：合规/轻度违规/中度违规/严重违规 |\n| data.diagnosis.total_phone_usage_count | int | 检测到玩手机行为总次数 |\n| data.diagnosis.total_phone_usage_duration | int | 累计玩手机总时长（秒）|\n| data.diagnosis.phone_usage_behavior | object | 各行为识别结果 |\n| data.diagnosis.usage_duration | object | 时长分段统计结果 |\n| data.diagnosis.area_compliance | object | 各区域合规评估 |\n\n### 预警与建议\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.efficiency_warnings | array[string] | 效率风险警示信息列表 |\n| data.improvement_suggestions | array[string] | 效率提升建议列表 |\n\n## 错误码说明\n\n| 错误码 | 说明 |\n|--------|------|\n| 200 | 请求成功 |\n| 400 | 请求参数错误 |\n| 401 | API 鉴权失败 |\n| 413 | 文件大小超出限制 |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误 |\n| 503 | 服务繁忙，请稍后重试 |\n\n## 合规提示\n\n1. 使用本工具应当遵守国家相关劳动法律法规\n2. 需要提前告知员工监控范围和目的，保护员工个人隐私\n3. 本工具仅辅助办公管理，不建议作为唯一奖惩依据\n4. 建议合理设定允许使用手机的休息时段，平衡工作与休息\n\nFile v1.0.5:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.5:scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.5:skill-card.md\n\n## Description: <br>\nDetects workplace phone usage in images or video streams using cloud computer-vision analysis, then returns structured monitoring results, usage counts, duration statistics, recommendations, and report links. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nEnterprise operators and workplace-management teams use this skill to analyze office surveillance images, videos, or media URLs for phone-use behavior and to retrieve historical monitoring reports. The output is intended as an internal management aid and should be reviewed alongside privacy, labor, and workplace-notice requirements. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill performs workplace surveillance analysis and may process employee images or videos. <br>\nMitigation: Confirm employee notice or consent, lawful workplace-monitoring basis, retention rules, and human review before operational use. <br>\nRisk: Media and report queries are sent to a cloud service with historical report access. <br>\nMitigation: Use only approved media, verify backend access controls and retention settings, and avoid submitting sensitive footage outside the intended workspace. <br>\nRisk: The skill may reuse or create an identity and store authentication tokens in local workspace data. <br>\nMitigation: Run in an isolated workspace, review the workspace data file and SQLite database before use, and remove stored credentials when access should end. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill listing](https://clawhub.ai/smyx-sunjinhui/skills/smyx-phone-usage-monitoring-analysis) <br>\n- [Publisher profile](https://clawhub.ai/user/smyx-sunjinhui) <br>\n- [Workplace phone usage monitoring API documentation](references/api_doc.md) <br>\n- [Shared API documentation](skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, json, files, guidance] <br>\n**Output Format:** [Markdown or JSON analysis report with optional saved output file and report-link text] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Requires image/video input or a media URL; can also query historical cloud reports.] <br>\n\n## Skill Version(s): <br>\n1.0.5 (source: ClawHub release metadata; artifact frontmatter states 1.0.9) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.5:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.5:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.4: 30 files, 41505 bytes\n\nFiles: references/api_doc.md (2662b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/phone_usage_monitoring_analysis.py (9100b), scripts/skill.py (579b), skill-card.md (2713b), SKILL.md (10693b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28605b), _meta.json (155b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: \"phone_usage_monitoring_analysis\"\ndescription: \"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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率\"\nversion: \"1.0.7\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **职场玩手机智能监测技能** |\n| 🎯 核心目标 | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `PHONE_USAGE_MONITORING` |\n\nBased on advanced computer vision and human pose estimation algorithms, this feature automatically detects and\nidentifies employees' phone usage during working hours. The system supports dual detection for both real-time video\nstreams and static images, effectively distinguishing between normal work operations and unauthorized phone usage by\nprecisely analyzing hand movements, device characteristics, and behavioral patterns. Additionally, the system\nautomatically tracks the duration and frequency of phone usage for each employee and generates visualized data reports,\nenabling enterprises to monitor office discipline in real-time. This provides data support for standardizing employee\nbehavior and optimizing management strategies, thereby effectively improving overall work efficiency.\n\n本功能基于先进的计算机视觉与人体姿态估计算法，能够在工作时间内自动检测并识别员工的玩手机行为。系统支持对实时视频流和静态图片进行双重检测，通过精准分析手部动作、设备特征及行为模式，有效区分正常工作操作与违规玩手机行为。同时，系统会自动统计每位员工的玩手机时长与频次，生成可视化数据报表，帮助企业实时掌握办公秩序状况，为规范员工行为、优化管理策略提供数据支撑，从而有效提升整体工作效率\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过办公区域监控视频/图片进行职场玩手机行为智能分析，自动识别工作时间员工玩手机行为，生成办公效率监测报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频/图片分析 |\n| 2 | 手机物体检测 |\n| 3 | 玩手机行为识别 |\n| 4 | 时长统计 |\n| 5 | 频次分析 |\n| 6 | 违规行为预警 |\n| 7 | 办公效率建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供监控视频/图片 URL 或文件需要检测玩手机行为时，默认触发本技能进行办公行为监测分析 |\n| 🔎 明确分析意图 | 当用户明确需要进行办公监测、玩手机检测、员工行为管理，提及玩手机监测、办公效率、员工行为监控、在岗状态检测等关键词，并且上传了视频文件或者图片文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史监测报告、历史效率报告、玩手机监测报告清单、查询历史报告、查看监测报告列表、显示所有监测报告、显示玩手机分析报告，查询办公行为监测报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.phone_usage_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.phone_usage_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备视频/图片输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行玩手机行为监测分析 | 调用 `-m scripts.phone_usage_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频/图片文件路径 | 适用于本地文件分析 |\n| `--url` | 网络媒体 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--detection-type` | 检测类型，可选值：video(视频流检测)/image(图片检测)，默认 video | 按需填写 |\n| `--work-area` | 工作区域类型，可选值：open-office(开放办公)/cubicle(独立工位)/meeting-room(会议室)/other，默认 | 按需填写 |\n| `--list` | 显示历史玩手机监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/phone_usage_monitoring_analysis.py`](scripts/phone_usage_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 格式支持：视频支持 mp4/avi/mov 格式，图片支持 jpg/png/jpeg 格式，最大 10MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供企业内部管理参考，请注意保护员工个人隐私，遵守相关法律法规 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析开放办公区视频\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_video.mp4 --detection-type video --work-area open-office 分析工位监控图片\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_image.jpg --detection-type image --work-area cubicle 分析网络视频流\npython -m scripts.phone_usage_monitoring_analysis --url https://example.com/office_monitor.mp4 --detection-type video --work-area meeting-room 显示历史分析报告/显示分析报告清单列表/显示历史监测报告（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.phone_usage_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.phone_usage_monitoring_analysis --input monitor.mp4 --detection-type video --detail basic\n\n# 保存结果到文件\npython -m scripts.phone_usage_monitoring_analysis --input image.jpg --detection-type image --output result.json\n```\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-phone-usage-monitoring-analysis\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1783583969932\n}\n\nFile v1.0.4:references/api_doc.md\n\n# 职场玩手机行为监测分析 API 文档\n\n## 接口概述\n\n本技能调用云端视觉AI接口，自动识别办公区域员工玩手机行为，支持视频流动态统计和图片静态检测。\n\n## 支持检测的行为类型\n\n| 行为类型 | 描述 | 统计方式 |\n|----------|------|----------|\n| 手持手机 | 员工手持智能手机，屏幕朝向面部 | 按次数/时长统计 |\n| 低头看手机 | 员工低头注视手机屏幕 | 按时长分段统计 |\n| 持续使用 | 连续使用手机超过设定时长（默认3分钟） | 记为违规行为 |\n| 桌面放置 | 手机放置在桌面但未使用 | 不计数 |\n\n## 支持检测区域\n\n| 区域类型 | 特点 |\n|----------|------|\n| 开放办公区 | 多人员工同时监测 |\n| 独立工位 | 单人固定工位监测 |\n| 会议室 | 会议场景监测 |\n| 其他区域 | 自定义区域 |\n\n## API 响应字段说明\n\n### 基础信息\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| id | string | 分析记录ID |\n| data.analysis_time | string | 分析时间 |\n| data.person_detection.status | string | 人员检测状态 |\n| data.person_detection.quality_score | int | 画面质量评分 0-100 |\n\n### 诊断结果\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.diagnosis.compliance_score | int | 整体合规评分 0-100（分数越高越合规）|\n| data.diagnosis.overall_compliance | string | 整体合规状况：合规/轻度违规/中度违规/严重违规 |\n| data.diagnosis.total_phone_usage_count | int | 检测到玩手机行为总次数 |\n| data.diagnosis.total_phone_usage_duration | int | 累计玩手机总时长（秒）|\n| data.diagnosis.phone_usage_behavior | object | 各行为识别结果 |\n| data.diagnosis.usage_duration | object | 时长分段统计结果 |\n| data.diagnosis.area_compliance | object | 各区域合规评估 |\n\n### 预警与建议\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.efficiency_warnings | array[string] | 效率风险警示信息列表 |\n| data.improvement_suggestions | array[string] | 效率提升建议列表 |\n\n## 错误码说明\n\n| 错误码 | 说明 |\n|--------|------|\n| 200 | 请求成功 |\n| 400 | 请求参数错误 |\n| 401 | API 鉴权失败 |\n| 413 | 文件大小超出限制 |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误 |\n| 503 | 服务繁忙，请稍后重试 |\n\n## 合规提示\n\n1. 使用本工具应当遵守国家相关劳动法律法规\n2. 需要提前告知员工监控范围和目的，保护员工个人隐私\n3. 本工具仅辅助办公管理，不建议作为唯一奖惩依据\n4. 建议合理设定允许使用手机的休息时段，平衡工作与休息\n\nFile v1.0.4:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.4:scripts/config.yaml\n\n{}\n\nFile v1.0.4:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.4:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.4:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.4:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.4:skill-card.md\n\n## Description: <br>\nUses computer vision to analyze workplace images or video for employee phone-use behavior, duration, frequency, warnings, suggestions, and report links. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nEnterprise operators and developers use this skill to submit authorized workplace monitoring images, videos, or media URLs for phone-usage detection and management reports. It can also query previously generated cloud reports for the resolved user identity. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Workplace monitoring footage or media URLs may be sent to external lifeemergence/open.lifeemergence services. <br>\nMitigation: Use only with authorized footage and approved service endpoints, and confirm employee notice, consent, retention, and data-handling requirements before deployment. <br>\nRisk: The skill may silently create or reuse an identity and store service tokens locally. <br>\nMitigation: Review local SQLite identity and token storage before installation, restrict filesystem access, and confirm account ownership and token lifecycle controls. <br>\nRisk: Phone-use analysis can affect employee management decisions and may be incomplete or mistaken. <br>\nMitigation: Treat reports as management aids rather than sole evidence for discipline, and require human review under the organization's labor, privacy, and compliance policies. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-phone-usage-monitoring-analysis) <br>\n- [Skill Demo](https://lifeemergence.com/sample.html) <br>\n- [Phone Usage Monitoring API Documentation](references/api_doc.md) <br>\n- [Analysis API Documentation](skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, JSON, Shell commands, Guidance] <br>\n**Output Format:** [Markdown reports or JSON analysis output, with optional saved result files] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include report links, compliance scores, phone-use counts, duration statistics, warnings, and suggestions.] <br>\n\n## Skill Version(s): <br>\n1.0.4 (source: ClawHub release evidence; artifact frontmatter says 1.0.7) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.4:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.4:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3","readmeExcerpt":"Skill: Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能 Owner: smyx-sunjinhui Summary: 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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.phone_usage_monitoring_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析开放办公区视频\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_video.mp4 --detection-type video --work-area open-office 分析工位监控图片\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_image.jpg --detection-type image --work-area cubicle 分析网络视频流\npython -m scripts.phone_usage_monitoring_analysis --url https://example.com/office_monitor.mp4 --detection-type video --work-area meeting-room 显示历史分析报告/显示分析报告清单列表/显示历史监测报告（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.phone_usage_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.phone_usage_monitoring_analysis --input monitor.mp4 --detection-type video --detail basic\n\n# 保存结果到文件\npython -m scripts.phone_usage_monitoring_analysis --input image.jpg --detection-type image --output result.json"},{"language":"bash","snippet":"python -m scripts.phone_usage_monitoring_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析开放办公区视频\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_video.mp4 --detection-type video --work-area open-office 分析工位监控图片\npython -m scripts.phone_usage_monitoring_analysis --input /path/to/office_image.jpg --detection-type image --work-area cubicle 分析网络视频流\npython -m scripts.phone_usage_monitoring_analysis --url https://example.com/office_monitor.mp4 --detection-type video --work-area meeting-room 显示历史分析报告/显示分析报告清单列表/显示历史监测报告（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.phone_usage_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.phone_usage_monitoring_analysis --input monitor.mp4 --detection-type video --detail basic\n\n# 保存结果到文件\npython -m scripts.phone_usage_monitoring_analysis --input image.jpg --detection-type image --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"phone_usage_monitoring_analysis\"\ndescription: \"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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率\"\nversion: \"1.0.19\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **职场玩手机智能监测技能** |\n| 🎯 核心目标 | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `PHONE_USAGE_MONITORING` |\n\nBased on advanced computer vision and human pose estimation algorithms, this feature automatically detects and\nidentifies employees' phone usage during working hours. The system supports dual detection for both real-time video\nstreams and static images, effectively distinguishing between normal work operations and unauthorized phone usage by\nprecisely analyzing hand movements, device characteristics, and behavioral patterns. Additionally, the system\nautomatically tracks the duration and frequency of phone usage for each employee and generates visualized data reports,\nenabling enterprises to monitor office discipline in real-time. This provides data support for standardizing employee\nbehavior and optimizing management strategies, thereby effectively improving overall work efficiency.\n\n本功能基于先进的计算机视觉与人体姿态估计算法，能够在工作时间内自动检测并识别员工的玩手机行为。系统支持对实时视频流和静态图片进行双重检测，通过精准分析手部动作、设备特征及行为模式，有效区分正常工作操作与违规玩手机行为。同时，系统会自动统计每位员工的玩手机时长与频次，生成可视化数据报表，帮助企业实时掌握办公秩序状况，为规范员工行为、优化管理策略提供数据支撑，从而有效提升整体工作效率\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过办公区域监控视频/图片进行职场玩手机行为智能分析，自动识别工作时间员工玩手机行为，生成办公效率监测报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频/图片分析 |\n| 2 | 手机物体检测 |\n| 3 | 玩手机行为识别 |\n| 4 | 时长统计 |\n| 5 | 频次分析 |\n| 6 | 违规行为预警 |\n| 7 | 办公效率建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供监控视频/图片 URL 或文件需要检测玩手机行为时，默认触发本技能进行办公行为监测分析 |\n| 🔎 明确分析意图 | 当用户明确需要进行办公监测、玩手机检测、员工行为管理，提及玩手机监测、办公效率、员工行为监控、在岗状态检测等关键词，并且上传了视频文件或者图片文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史监测报告、历史效率报告、玩手机监测报告清单、查询历史报告、查看监测报告列表、显示所有监测报告、显示玩手机分析报告，查询办公行为监测报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.phone_usage_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.phone_usage_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-phone-usage-monitoring-analysis\",\n  \"version\": \"1.0.13\",\n  \"publishedAt\": 1791040406916\n}"},{"path":"references/api_doc.md","content":"# 职场玩手机行为监测分析 API 文档\n\n## 接口概述\n\n本技能调用云端视觉AI接口，自动识别办公区域员工玩手机行为，支持视频流动态统计和图片静态检测。\n\n## 支持检测的行为类型\n\n| 行为类型 | 描述 | 统计方式 |\n|----------|------|----------|\n| 手持手机 | 员工手持智能手机，屏幕朝向面部 | 按次数/时长统计 |\n| 低头看手机 | 员工低头注视手机屏幕 | 按时长分段统计 |\n| 持续使用 | 连续使用手机超过设定时长（默认3分钟） | 记为违规行为 |\n| 桌面放置 | 手机放置在桌面但未使用 | 不计数 |\n\n## 支持检测区域\n\n| 区域类型 | 特点 |\n|----------|------|\n| 开放办公区 | 多人员工同时监测 |\n| 独立工位 | 单人固定工位监测 |\n| 会议室 | 会议场景监测 |\n| 其他区域 | 自定义区域 |\n\n## API 响应字段说明\n\n### 基础信息\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| id | string | 分析记录ID |\n| data.analysis_time | string | 分析时间 |\n| data.person_detection.status | string | 人员检测状态 |\n| data.person_detection.quality_score | int | 画面质量评分 0-100 |\n\n### 诊断结果\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.diagnosis.compliance_score | int | 整体合规评分 0-100（分数越高越合规）|\n| data.diagnosis.overall_compliance | string | 整体合规状况：合规/轻度违规/中度违规/严重违规 |\n| data.diagnosis.total_phone_usage_count | int | 检测到玩手机行为总次数 |\n| data.diagnosis.total_phone_usage_duration | int | 累计玩手机总时长（秒）|\n| data.diagnosis.phone_usage_behavior | object | 各行为识别结果 |\n| data.diagnosis.usage_duration | object | 时长分段统计结果 |\n| data.diagnosis.area_compliance | object | 各区域合规评估 |\n\n### 预警与建议\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| data.efficiency_warnings | array[string] | 效率风险警示信息列表 |\n| data.improvement_suggestions | array[string] | 效率提升建议列表 |\n\n## 错误码说明\n\n| 错误码 | 说明 |\n|--------|------|\n| 200 | 请求成功 |\n| 400 | 请求参数错误 |\n| 401 | API 鉴权失败 |\n| 413 | 文件大小超出限制 |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误 |\n| 503 | 服务繁忙，请稍后重试 |\n\n## 合规提示\n\n1. 使用本工具应当遵守国家相关劳动法律法规\n2. 需要提前告知员工监控范围和目的，保护员工个人隐私\n3. 本工具仅辅助办公管理，不建议作为唯一奖惩依据\n4. 建议合理设定允许使用手机的休息时段，平衡工作与休息"},{"path":"skills/smyx_analysis/references/api_doc.md","content":"# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |"},{"path":"scripts/config.yaml","content":"{}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测，统计玩手机时长与频次，帮助企业规范办公秩序，提升工作效率 Skill: Workplace Phone Usage Smart Monitoring Skill | 职场玩手机智能监测技能 Owner: smyx-sunjinhui Summary: 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. | 职场玩手机智能监测技能，基于计算机视觉自动检测工作时间员工玩手机行为，支持视频流和图片实时检测","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":960,"uniquenessScore":47,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T17:40:02.110Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T17:40:02.110Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:30:05.748Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}