{"id":"169a5cc5-c4aa-4142-bb2e-869fd538ee6b","entityType":"agent","slug":"clawhub-smyx-sunjinhui-smyx-teen-screen-addiction-detection-ana","name":"Teen Phone / Game Screen Addiction Detection | 青少年沉迷手机/游戏行为识别","canonicalUrl":"https://www.xpersona.co/agent/clawhub-smyx-sunjinhui-smyx-teen-screen-addiction-detection-ana","canonicalPath":"/agent/clawhub-smyx-sunjinhui-smyx-teen-screen-addiction-detection-ana","generatedAt":"2026-10-11T08:46:29.306Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-11T05:56:25.586Z","emptyReason":null},"description":"Using fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。 Skill: Teen Phone / Game Screen Addiction Detection | 青少年沉迷手机/游戏行为识别 Owner: smyx-sunjinhui Summary: Using fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-teen-screen-addiction-detection-analysis","sourceUrl":"https://clawhub.ai/smyx-sunjinhui/smyx-teen-screen-addiction-detection-analysis","homepage":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-teen-screen-addiction-detection-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/smyx-sunjinhui/smyx-teen-screen-addiction-detection-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-teen-screen-addiction-detection-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":61,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Using fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward >"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T05:56:25.586Z","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-11T05:56:25.586Z","emptyReason":null},"stars":null,"forks":null,"downloads":1140,"packageName":null,"latestVersion":"1.0.6","tractionLabel":"1.1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T05:56:25.505Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T05:56:25.586Z","lastCrawledAt":"2026-10-11T05:56:25.505Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T05:56:25.505Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.6","createdAt":"2026-09-28T16:37:33.479Z","changelog":"- Removed the file `skill-card.md` from the skill package. - No changes to core features or user functionality. - All documentation and current usage instructions remain as described in SKILL.md.","fileCount":31,"zipByteSize":42681},{"version":"1.0.5","createdAt":"2026-09-24T11:34:25.142Z","changelog":"- Updated skill version to 1.0.16. - SKILL.md revised to reflect latest capabilities and workflow. - Removed redundant file: skill-card.md. - Updated configuration details in skills/smyx_common/scripts/config.yaml. - Documentation and usage instructions streamlined for clarity.","fileCount":31,"zipByteSize":42727},{"version":"1.0.4","createdAt":"2026-09-13T07:54:29.428Z","changelog":"- Updated skill documentation in SKILL.md with new information and improvements. - Removed the redundant skill-card.md file. - Version bumped from 1.0.12 to 1.0.14. - No changes to core functionality; documentation and metadata only.","fileCount":31,"zipByteSize":42830},{"version":"1.0.3","createdAt":"2026-08-26T06:52:34.399Z","changelog":"- Updated version number in SKILL.md from 1.0.5 to 1.0.12. - Removed the file skill-card.md. - Modified configuration and utility script files: config.yaml and util.py. - No changes to user-facing functionality or features described in documentation.","fileCount":31,"zipByteSize":42851},{"version":"1.0.2","createdAt":"2026-07-07T19:14:11.504Z","changelog":"- Updated version to 1.0.5. - Documentation update in SKILL.md: version bump, minor text clarifications. - Removed redundant file: skill-card.md.","fileCount":31,"zipByteSize":42693},{"version":"1.0.1","createdAt":"2026-07-01T08:09:28.211Z","changelog":"- Skill documentation and codebase fully updated for v1.0.4 with new feature and policy clarifications. - Strongly clarified: user identity parameters are now handled internally and never shown or requested from users. - Updated SKILL.md to streamline usage instructions, focusing on privacy, consent, and best practices for minors. - All history/report queries now strictly use the cloud API; local/manual/long-term memory access is prohibited. - Old unnecessary files (legacy api_service.py, skill-card.md) removed; references and scripts refactored. - Enhanced example usage and error-handling notes to reduce risk of misclassification or privacy violation.","fileCount":31,"zipByteSize":42520},{"version":"1.0.0","createdAt":"2026-05-27T06:00:38.875Z","changelog":"Initial release: Screen addiction detection and analysis for teens. - Monitors adolescent screen time and posture via fixed cameras at home, study rooms, or schools. - Detects head pitch angle (down > 45°), hand-held device posture, and classifies behavior (screen use, reading, writing). - Tracks continuous and daily screen-looking time; triggers reminders if thresholds (e.g., >30 min/session or >2 hours/day) are exceeded. - Sends notifications and friendly reminders to parents via app or smart devices to promote healthy habits. - Provides structured reports, addiction level assessment, and daily summaries for parental reference. - Strict open-id (user identification) acquisition process for report management and history lookup. - Designed for real-time monitoring, early intervention to prevent myopia, cervical-spine issues, and gaming addiction.","fileCount":32,"zipByteSize":39459}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-teen-screen-addiction-detection-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-teen-screen-addiction-detection-ana/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-teen-screen-addiction-detection-ana/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-teen-screen-addiction-detection-ana/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-teen-screen-addiction-detection-ana/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-teen-screen-addiction-detection-ana/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-teen-screen-addiction-detection-ana/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-11T08:46:29.303Z"}},"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-teen-screen-addiction-detection-ana/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-teen-screen-addiction-detection-ana/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-teen-screen-addiction-detection-ana/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-teen-screen-addiction-detection-ana/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-11T05:56:25.586Z","emptyReason":null},"readme":"Skill: Teen Phone / Game Screen Addiction Detection | 青少年沉迷手机/游戏行为识别\n\nOwner: smyx-sunjinhui\n\nSummary: Using fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。\n\nTags: latest:1.0.6\n\nVersion history:\n\nv1.0.6 | 2026-09-28T16:37:33.479Z | auto\n\n- Removed the file `skill-card.md` from the skill package.\n- No changes to core features or user functionality.\n- All documentation and current usage instructions remain as described in SKILL.md.\n\nv1.0.5 | 2026-09-24T11:34:25.142Z | auto\n\n- Updated skill version to 1.0.16.\n- SKILL.md revised to reflect latest capabilities and workflow.\n- Removed redundant file: skill-card.md.\n- Updated configuration details in skills/smyx_common/scripts/config.yaml.\n- Documentation and usage instructions streamlined for clarity.\n\nv1.0.4 | 2026-09-13T07:54:29.428Z | auto\n\n- Updated skill documentation in SKILL.md with new information and improvements.\n- Removed the redundant skill-card.md file.\n- Version bumped from 1.0.12 to 1.0.14.\n- No changes to core functionality; documentation and metadata only.\n\nv1.0.3 | 2026-08-26T06:52:34.399Z | auto\n\n- Updated version number in SKILL.md from 1.0.5 to 1.0.12.\n- Removed the file skill-card.md.\n- Modified configuration and utility script files: config.yaml and util.py.\n- No changes to user-facing functionality or features described in documentation.\n\nv1.0.2 | 2026-07-07T19:14:11.504Z | auto\n\n- Updated version to 1.0.5.\n- Documentation update in SKILL.md: version bump, minor text clarifications.\n- Removed redundant file: skill-card.md.\n\nv1.0.1 | 2026-07-01T08:09:28.211Z | auto\n\n- Skill documentation and codebase fully updated for v1.0.4 with new feature and policy clarifications.\n- Strongly clarified: user identity parameters are now handled internally and never shown or requested from users.\n- Updated SKILL.md to streamline usage instructions, focusing on privacy, consent, and best practices for minors.\n- All history/report queries now strictly use the cloud API; local/manual/long-term memory access is prohibited.\n- Old unnecessary files (legacy api_service.py, skill-card.md) removed; references and scripts refactored.\n- Enhanced example usage and error-handling notes to reduce risk of misclassification or privacy violation.\n\nv1.0.0 | 2026-05-27T06:00:38.875Z | auto\n\nInitial release: Screen addiction detection and analysis for teens.\n\n- Monitors adolescent screen time and posture via fixed cameras at home, study rooms, or schools.\n- Detects head pitch angle (down > 45°), hand-held device posture, and classifies behavior (screen use, reading, writing).\n- Tracks continuous and daily screen-looking time; triggers reminders if thresholds (e.g., >30 min/session or >2 hours/day) are exceeded.\n- Sends notifications and friendly reminders to parents via app or smart devices to promote healthy habits.\n- Provides structured reports, addiction level assessment, and daily summaries for parental reference.\n- Strict open-id (user identification) acquisition process for report management and history lookup.\n- Designed for real-time monitoring, early intervention to prevent myopia, cervical-spine issues, and gaming addiction.\n\nArchive index:\n\nArchive v1.0.6: 31 files, 42681 bytes\n\nFiles: references/api_doc.md (4886b), scripts/__init__.py (50b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_teen_screen_addiction_detection_analysis.py (3718b), skill-card.md (2347b), SKILL.md (14125b), 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 (164b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"smyx-teen-screen-addiction-detection-analysis\"\ndescription: \"Using fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。\"\nversion: \"1.0.16\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Teen Phone / Game Screen Addiction Detection | 青少年沉迷手机/游戏行为识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **青少年沉迷手机/游戏行为识别** |\n| 🎯 核心目标 | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_TEEN_SCREEN_ADDICTION_DETECTION_ANALYSIS` |\n\nUsing fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. When continuous screen-looking exceeds a configured threshold (e.g., single session > 30 minutes, or daily total > 2 hours), a 'phone/game addiction' reminder is generated, suggesting parental guidance and healthy eye-use habits. This helps prevent adolescent myopia, cervical-spine issues and gaming addiction. Application scenarios: family study, adolescent bedroom, study rooms, school classrooms. The system monitors in real time and pushes reminders via mobile APP or links to smart devices to issue voice prompts when over-time use is detected. Skill features: long head-down phone use among adolescents easily causes myopia, cervical-spine disease and social barriers. AI auto-monitoring and reminders help parents objectively understand their child's eye-use habits, enabling timely intervention and protecting vision. Can be integrated into smart-home cameras or family-education APPs as a practical family-health management tool.\n\n通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。该技能有助于预防青少年近视、颈椎问题及游戏成瘾。应用场景：家庭书房、青少年卧室、自习室、学校教室。系统实时监测，当沉迷行为超时时通过手机APP推送提醒或联动智能设备发出语音提示。技能特点：青少年长时间低头看手机，易导致近视、颈椎病、社交障碍等。通过AI自动监测并提醒，可帮助家长客观了解孩子用眼习惯，及时干预，保护视力健康。该技能可集成到智能家居摄像头或家庭教育APP中，成为家庭健康管理的实用工具。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的青少年健康行为监测 AI。你的任务是分析固定摄像头的视频，检测青少年头部姿态（俯仰角）和手持设备姿势，判断是否正在低头看手机或玩游戏。统计单次连续低头时长和每日累计时长，当超过阈值时输出温和、尊重的提醒，并区分写作业 / 看书 / 网课等正常学习行为不计入沉迷时长。不要提供医疗诊断，仅输出基于视觉的行为统计。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭/自习室/学校固定摄像头视频，识别头部俯仰角（> 45° 视为低头看屏幕）+ 手部抓握设备姿态（手机/平板/掌机）+ 手臂弯曲 → 区分 `looking_at_screen` / `normal_reading` / `writing` / `lifting_head` / `other` 姿态 → 统计单次连续低头时长 + 日累计时长 + 段次数 + 最长单段 + 夜间时长 → 输出 4 档沉迷等级（normal / mild / notable / heavy）+ 友好提醒 + 给家长的日报摘要\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体关键点 + 头部姿态估计（pitch 角） |\n| 2 | 手部抓握检测 |\n| 3 | 手臂弯曲姿态判定 |\n| 4 | 设备边界框检测（参考） |\n| 5 | 姿态状态多分类（含 normal_reading / writing 排除项） |\n| 6 | 连续低头时长统计 |\n| 7 | 日累计/段次数/最长单段/夜间时长统计 |\n| 8 | 单次阈值（30 min / 60 min）与日累计阈值（2 h / 4 h）双触发 |\n| 9 | 夜间熬夜玩屏幕提醒（22:00-06:00 ≥ 30 min） |\n| 10 | 温和友好提醒文本生成 |\n| 11 | 家长日报摘要 |\n| 12 | 温和动作建议（push_eye_break / push_parent_notice / suggest_outdoor_activity / suggest_bedtime / observe_only） |\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.smyx_teen_screen_addiction_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_teen_screen_addiction_detection_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.smyx_teen_screen_addiction_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地家庭/自习室/学校固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络家庭/自习室/学校固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，青少年健康行为监测场景默认 `other` | 按需填写 |\n| `--list` | 显示青少年沉迷手机/游戏行为识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_teen_screen_addiction_detection_analysis.py`](scripts/smyx_teen_screen_addiction_detection_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 视频，最大 10MB；**关键**：侧面/斜侧上半身视角，可观察头部俯仰角与手臂姿态 |\n| 🔎 使用提醒 | **必须**正确区分写作业 / 看书 / 网课（前方有书本/课本、头部朝下但角度多在 30-45° 之间）与\"低头看屏幕\"，避免将正常学习行为误报为沉迷 |\n| 🔎 使用提醒 | 短时低头取物、写字时短暂低头等情形不应计入连续低头段；建议连续 ≥ 5 分钟才计为 1 段 |\n| 🧑‍⚖️ 结果性质 | 红线约束：**禁止**输出\"游戏成瘾症\"等精神医学诊断或量表评分；**禁止**长期存储青少年原始视频；**禁止**未经监护人同意将数据提供给学校或第三方；**禁止**使用强惩罚性语言 |\n| 🔎 使用提醒 | 涉及未成年人，必须取得**监护人 + 青少年本人**双重知情同意；建议提前与孩子沟通用途与边界，避免成为家庭冲突导火索 |\n| 🔎 使用提醒 | 友好提醒文案统一使用**温和、尊重、可执行**的措辞（如\"眼睛该休息啦~ 起来走 3 分钟\"），**避免**指责性表达 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地青少年使用屏幕视频\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input /path/to/study_room.mp4\n\n# 分析网络青少年使用屏幕视频\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --url https://example.com/study_room.mp4\n\n# 显示历史青少年沉迷手机/游戏报告（自动触发关键词：查看孩子沉迷手机历史报告、家长日报清单等）\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-teen-screen-addiction-detection-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1790613453479\n}\n\nFile v1.0.6:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放青少年沉迷手机/游戏行为识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动青少年沉迷手机/游戏行为识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取低头时长统计 + 沉迷等级 + 健康提醒\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史沉迷行为记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_TEEN_SCREEN_ADDICTION_DETECTION_ANALYSIS` - 青少年沉迷手机/游戏行为识别\n\n## 输入约束\n\n- 摄像头：家庭书房 / 青少年卧室 / 自习室 / 学校教室固定摄像头，能拍到**侧面或斜侧上半身**（便于计算头部俯仰角与手臂姿态）\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p；光照稳定（含夜间偷玩场景需红外补光）\n- 视频时长建议 ≥ 30 分钟，过短样本无法统计\"单次连续低头\"\n- 多人场景需按目标跟踪，避免身份串扰（家庭成员/同学）\n- 隐私敏感场景必须启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n### 姿态识别\n- `head_pitch_angle_deg` - 头部俯仰角（向下为正，> 45° 视为\"低头看屏幕\"姿态）\n- `hand_holding_device_detected` - 是否检测到手部抓握设备（手机/平板/掌机）+ 手臂弯曲姿态\n- `device_in_view_box` - 设备在视野中的边界框（参考指标）\n- `posture_state` - 当前姿态状态（looking_at_screen / normal_reading / writing / lifting_head / other）\n\n### 时长统计\n- `current_continuous_screen_min` - 当前连续低头看屏幕时长（分钟）\n- `daily_total_screen_min` - 当日累计看屏幕总时长（分钟）\n- `session_count_today` - 当日累计独立看屏幕段次数（≥ 5 分钟视为 1 段）\n- `longest_session_today_min` - 当日最长单段时长\n- `night_screen_minutes` - 夜间（22:00-06:00）看屏幕时长（参考指标，潜在熬夜）\n\n## 阈值与等级（默认值，可在配置中覆盖）\n\n- 单次连续 ≥ **30 分钟** → 建议起身休息（looking_too_long_session）\n- 单次连续 ≥ **60 分钟** → 强烈建议起身休息（looking_too_long_critical）\n- 日累计 ≥ **2 小时** → 沉迷预警（addiction_warning）\n- 日累计 ≥ **4 小时** → 沉迷重度预警（addiction_critical）\n- 夜间（22:00-06:00）≥ **30 分钟** → 熬夜玩屏幕提醒（late_night_warning）\n- 写作业 / 看书 / 网课（前方有书本 + 头部朝下但角度 < 45°）应识别为 `normal_reading` 或 `writing`，**不计入沉迷时长**\n\n## 输出字段（参考）\n\n- `time_window` / `subject_count`（仅本场景，**禁止跨场景身份关联**）\n- `current_posture` / `head_pitch_angle_deg` / `hand_holding_device_detected`\n- `current_continuous_screen_min` / `daily_total_screen_min` / `session_count_today` / `longest_session_today_min` / `night_screen_minutes`\n- `addiction_level` - 沉迷等级（normal / mild / notable / heavy）\n- `dominant_device_guess` - 设备类型猜测（phone / tablet / handheld_console / unknown，**仅用于提示文案，不做识别留存**）\n- `alert_type` - 提醒类型（looking_too_long_session / looking_too_long_critical / addiction_warning / addiction_critical / late_night_warning / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `friendly_reminder` - 友好提醒文本（如\"宝贝，你已经连续看屏幕 45 分钟了，眼睛该休息啦~ 起来走 3 分钟、看看 6 米外的窗外吧\"）\n- `parent_summary` - 给家长的日报摘要（如\"今日累计看屏幕 2 小时 35 分（已超 2 小时阈值），最长单段 52 分钟，建议在饭后约定 30 分钟亲子户外散步\"）\n- `recommend_action` - 建议动作（push_eye_break / push_parent_notice / suggest_outdoor_activity / suggest_bedtime / observe_only）\n\n## 强制约束与红线\n\n- ❌ **禁止**输出\"游戏成瘾症\"等精神医学诊断或量表评分\n- ❌ **禁止**长期存储青少年原始视频\n- ❌ **禁止**未经监护人同意便将数据提供给学校、机构或第三方\n- ❌ **禁止**使用强惩罚性语言（如\"再玩就没饭吃\"），统一使用**温和、尊重、可执行**的建议\n- ✅ 涉及未成年人，必须取得**监护人 + 青少年本人**双重知情同意；建议提前与孩子沟通用途与边界\n- ✅ 写作业 / 看书 / 网课场景必须正确归类，**不得**将正常学习行为误报为\"沉迷\"\n\n> 仅输出基于视觉的客观姿态与时长统计与温和家庭提醒，**不构成游戏成瘾的精神医学诊断**；任何疑似行为成瘾的判定与干预必须由专业心理医生评估制定。\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:\n\nAnalyzes camera footage of teens for screen-use posture and duration, then provides screen-time summaries and gentle reminders when configured thresholds are exceeded.\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\nParents, guardians, and authorized caregivers use the skill to review teen screen-use estimates from camera footage and receive gentle reminders and daily summaries. It also supports retrieving previous reports from a cloud service.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Camera footage of minors is sent to cloud APIs for analysis.\n\nMitigation: Require explicit consent from both guardian and teen; confirm cloud endpoints, access controls, retention, and deletion terms before use.\n\nRisk: Monitoring in private or school settings may expose sensitive behavior and identities.\n\nMitigation: Avoid bedrooms and school deployments without a clear privacy and deletion process; restrict access to footage and reports.\n\nRisk: The skill may silently create or reuse identities and store service tokens and profile data locally.\n\nMitigation: Treat the local workspace database as sensitive, limit access, and review identity and token storage before installing.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/smyx-sunjinhui/skills/smyx-teen-screen-addiction-detection-analysis)\n- [Skill 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 reports, Markdown report tables, and JSON results]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Screen-use duration estimates, posture classifications, alerts, gentle recommendations, and report links; not a medical diagnosis.]\n\n## Skill Version(s):\n\n1.0.6 (source: server-resolved ClawHub release; bundled 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.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: 31 files, 42727 bytes\n\nFiles: references/api_doc.md (4886b), scripts/__init__.py (50b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_teen_screen_addiction_detection_analysis.py (3718b), skill-card.md (2471b), SKILL.md (14125b), 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 (164b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: \"smyx-teen-screen-addiction-detection-analysis\"\ndescription: \"Using fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。\"\nversion: \"1.0.16\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Teen Phone / Game Screen Addiction Detection | 青少年沉迷手机/游戏行为识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **青少年沉迷手机/游戏行为识别** |\n| 🎯 核心目标 | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_TEEN_SCREEN_ADDICTION_DETECTION_ANALYSIS` |\n\nUsing fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. When continuous screen-looking exceeds a configured threshold (e.g., single session > 30 minutes, or daily total > 2 hours), a 'phone/game addiction' reminder is generated, suggesting parental guidance and healthy eye-use habits. This helps prevent adolescent myopia, cervical-spine issues and gaming addiction. Application scenarios: family study, adolescent bedroom, study rooms, school classrooms. The system monitors in real time and pushes reminders via mobile APP or links to smart devices to issue voice prompts when over-time use is detected. Skill features: long head-down phone use among adolescents easily causes myopia, cervical-spine disease and social barriers. AI auto-monitoring and reminders help parents objectively understand their child's eye-use habits, enabling timely intervention and protecting vision. Can be integrated into smart-home cameras or family-education APPs as a practical family-health management tool.\n\n通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。该技能有助于预防青少年近视、颈椎问题及游戏成瘾。应用场景：家庭书房、青少年卧室、自习室、学校教室。系统实时监测，当沉迷行为超时时通过手机APP推送提醒或联动智能设备发出语音提示。技能特点：青少年长时间低头看手机，易导致近视、颈椎病、社交障碍等。通过AI自动监测并提醒，可帮助家长客观了解孩子用眼习惯，及时干预，保护视力健康。该技能可集成到智能家居摄像头或家庭教育APP中，成为家庭健康管理的实用工具。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的青少年健康行为监测 AI。你的任务是分析固定摄像头的视频，检测青少年头部姿态（俯仰角）和手持设备姿势，判断是否正在低头看手机或玩游戏。统计单次连续低头时长和每日累计时长，当超过阈值时输出温和、尊重的提醒，并区分写作业 / 看书 / 网课等正常学习行为不计入沉迷时长。不要提供医疗诊断，仅输出基于视觉的行为统计。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭/自习室/学校固定摄像头视频，识别头部俯仰角（> 45° 视为低头看屏幕）+ 手部抓握设备姿态（手机/平板/掌机）+ 手臂弯曲 → 区分 `looking_at_screen` / `normal_reading` / `writing` / `lifting_head` / `other` 姿态 → 统计单次连续低头时长 + 日累计时长 + 段次数 + 最长单段 + 夜间时长 → 输出 4 档沉迷等级（normal / mild / notable / heavy）+ 友好提醒 + 给家长的日报摘要\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体关键点 + 头部姿态估计（pitch 角） |\n| 2 | 手部抓握检测 |\n| 3 | 手臂弯曲姿态判定 |\n| 4 | 设备边界框检测（参考） |\n| 5 | 姿态状态多分类（含 normal_reading / writing 排除项） |\n| 6 | 连续低头时长统计 |\n| 7 | 日累计/段次数/最长单段/夜间时长统计 |\n| 8 | 单次阈值（30 min / 60 min）与日累计阈值（2 h / 4 h）双触发 |\n| 9 | 夜间熬夜玩屏幕提醒（22:00-06:00 ≥ 30 min） |\n| 10 | 温和友好提醒文本生成 |\n| 11 | 家长日报摘要 |\n| 12 | 温和动作建议（push_eye_break / push_parent_notice / suggest_outdoor_activity / suggest_bedtime / observe_only） |\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.smyx_teen_screen_addiction_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_teen_screen_addiction_detection_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.smyx_teen_screen_addiction_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地家庭/自习室/学校固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络家庭/自习室/学校固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，青少年健康行为监测场景默认 `other` | 按需填写 |\n| `--list` | 显示青少年沉迷手机/游戏行为识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_teen_screen_addiction_detection_analysis.py`](scripts/smyx_teen_screen_addiction_detection_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 视频，最大 10MB；**关键**：侧面/斜侧上半身视角，可观察头部俯仰角与手臂姿态 |\n| 🔎 使用提醒 | **必须**正确区分写作业 / 看书 / 网课（前方有书本/课本、头部朝下但角度多在 30-45° 之间）与\"低头看屏幕\"，避免将正常学习行为误报为沉迷 |\n| 🔎 使用提醒 | 短时低头取物、写字时短暂低头等情形不应计入连续低头段；建议连续 ≥ 5 分钟才计为 1 段 |\n| 🧑‍⚖️ 结果性质 | 红线约束：**禁止**输出\"游戏成瘾症\"等精神医学诊断或量表评分；**禁止**长期存储青少年原始视频；**禁止**未经监护人同意将数据提供给学校或第三方；**禁止**使用强惩罚性语言 |\n| 🔎 使用提醒 | 涉及未成年人，必须取得**监护人 + 青少年本人**双重知情同意；建议提前与孩子沟通用途与边界，避免成为家庭冲突导火索 |\n| 🔎 使用提醒 | 友好提醒文案统一使用**温和、尊重、可执行**的措辞（如\"眼睛该休息啦~ 起来走 3 分钟\"），**避免**指责性表达 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地青少年使用屏幕视频\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input /path/to/study_room.mp4\n\n# 分析网络青少年使用屏幕视频\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --url https://example.com/study_room.mp4\n\n# 显示历史青少年沉迷手机/游戏报告（自动触发关键词：查看孩子沉迷手机历史报告、家长日报清单等）\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --output result.json\n```\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-teen-screen-addiction-detection-analysis\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1790249665142\n}\n\nFile v1.0.5:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放青少年沉迷手机/游戏行为识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动青少年沉迷手机/游戏行为识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取低头时长统计 + 沉迷等级 + 健康提醒\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史沉迷行为记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_TEEN_SCREEN_ADDICTION_DETECTION_ANALYSIS` - 青少年沉迷手机/游戏行为识别\n\n## 输入约束\n\n- 摄像头：家庭书房 / 青少年卧室 / 自习室 / 学校教室固定摄像头，能拍到**侧面或斜侧上半身**（便于计算头部俯仰角与手臂姿态）\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p；光照稳定（含夜间偷玩场景需红外补光）\n- 视频时长建议 ≥ 30 分钟，过短样本无法统计\"单次连续低头\"\n- 多人场景需按目标跟踪，避免身份串扰（家庭成员/同学）\n- 隐私敏感场景必须启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n### 姿态识别\n- `head_pitch_angle_deg` - 头部俯仰角（向下为正，> 45° 视为\"低头看屏幕\"姿态）\n- `hand_holding_device_detected` - 是否检测到手部抓握设备（手机/平板/掌机）+ 手臂弯曲姿态\n- `device_in_view_box` - 设备在视野中的边界框（参考指标）\n- `posture_state` - 当前姿态状态（looking_at_screen / normal_reading / writing / lifting_head / other）\n\n### 时长统计\n- `current_continuous_screen_min` - 当前连续低头看屏幕时长（分钟）\n- `daily_total_screen_min` - 当日累计看屏幕总时长（分钟）\n- `session_count_today` - 当日累计独立看屏幕段次数（≥ 5 分钟视为 1 段）\n- `longest_session_today_min` - 当日最长单段时长\n- `night_screen_minutes` - 夜间（22:00-06:00）看屏幕时长（参考指标，潜在熬夜）\n\n## 阈值与等级（默认值，可在配置中覆盖）\n\n- 单次连续 ≥ **30 分钟** → 建议起身休息（looking_too_long_session）\n- 单次连续 ≥ **60 分钟** → 强烈建议起身休息（looking_too_long_critical）\n- 日累计 ≥ **2 小时** → 沉迷预警（addiction_warning）\n- 日累计 ≥ **4 小时** → 沉迷重度预警（addiction_critical）\n- 夜间（22:00-06:00）≥ **30 分钟** → 熬夜玩屏幕提醒（late_night_warning）\n- 写作业 / 看书 / 网课（前方有书本 + 头部朝下但角度 < 45°）应识别为 `normal_reading` 或 `writing`，**不计入沉迷时长**\n\n## 输出字段（参考）\n\n- `time_window` / `subject_count`（仅本场景，**禁止跨场景身份关联**）\n- `current_posture` / `head_pitch_angle_deg` / `hand_holding_device_detected`\n- `current_continuous_screen_min` / `daily_total_screen_min` / `session_count_today` / `longest_session_today_min` / `night_screen_minutes`\n- `addiction_level` - 沉迷等级（normal / mild / notable / heavy）\n- `dominant_device_guess` - 设备类型猜测（phone / tablet / handheld_console / unknown，**仅用于提示文案，不做识别留存**）\n- `alert_type` - 提醒类型（looking_too_long_session / looking_too_long_critical / addiction_warning / addiction_critical / late_night_warning / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `friendly_reminder` - 友好提醒文本（如\"宝贝，你已经连续看屏幕 45 分钟了，眼睛该休息啦~ 起来走 3 分钟、看看 6 米外的窗外吧\"）\n- `parent_summary` - 给家长的日报摘要（如\"今日累计看屏幕 2 小时 35 分（已超 2 小时阈值），最长单段 52 分钟，建议在饭后约定 30 分钟亲子户外散步\"）\n- `recommend_action` - 建议动作（push_eye_break / push_parent_notice / suggest_outdoor_activity / suggest_bedtime / observe_only）\n\n## 强制约束与红线\n\n- ❌ **禁止**输出\"游戏成瘾症\"等精神医学诊断或量表评分\n- ❌ **禁止**长期存储青少年原始视频\n- ❌ **禁止**未经监护人同意便将数据提供给学校、机构或第三方\n- ❌ **禁止**使用强惩罚性语言（如\"再玩就没饭吃\"），统一使用**温和、尊重、可执行**的建议\n- ✅ 涉及未成年人，必须取得**监护人 + 青少年本人**双重知情同意；建议提前与孩子沟通用途与边界\n- ✅ 写作业 / 看书 / 网课场景必须正确归类，**不得**将正常学习行为误报为\"沉迷\"\n\n> 仅输出基于视觉的客观姿态与时长统计与温和家庭提醒，**不构成游戏成瘾的精神医学诊断**；任何疑似行为成瘾的判定与干预必须由专业心理医生评估制定。\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:\n\nAnalyzes fixed-camera images or video to estimate adolescent screen-looking posture, summarize screen-time behavior, and produce gentle family-facing reminders without making medical diagnoses.\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\nParents, guardians, and education or smart-home operators use this skill to review camera footage for head-down screen posture, daily screen-time patterns, and family-friendly intervention reminders. The skill is intended for behavior monitoring and reporting, not clinical diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Minor-related home or school camera footage may be sent to a cloud service for analysis.\n\nMitigation: Use only with guardian and adolescent consent, limit recordings to appropriate spaces, and confirm the publisher's retention, deletion, and access-control practices before deployment.\n\nRisk: The skill can create or reuse a local identity with stored tokens.\n\nMitigation: Run it in a controlled environment, review where credentials are stored, and establish an account revocation or cleanup process before operational use.\n\nRisk: Screen-time labels can be mistaken for clinical conclusions or punitive judgments.\n\nMitigation: Present outputs as posture and duration observations only, avoid medical diagnosis language, and use the skill's gentle reminder posture for family-facing guidance.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-teen-screen-addiction-detection-analysis)\n- [API interface documentation](references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance]\n\n**Output Format:** [Markdown text with JSON-style structured report content and optional report link]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May save report output to a file when requested; analysis and history lookup use a documented cloud service.]\n\n## Skill Version(s):\n\n1.0.5 (source: server release metadata; artifact 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.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: 31 files, 42830 bytes\n\nFiles: references/api_doc.md (4886b), scripts/__init__.py (50b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_teen_screen_addiction_detection_analysis.py (3718b), skill-card.md (2655b), SKILL.md (14125b), 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 (164b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: \"smyx-teen-screen-addiction-detection-analysis\"\ndescription: \"Using fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。\"\nversion: \"1.0.14\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Teen Phone / Game Screen Addiction Detection | 青少年沉迷手机/游戏行为识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **青少年沉迷手机/游戏行为识别** |\n| 🎯 核心目标 | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_TEEN_SCREEN_ADDICTION_DETECTION_ANALYSIS` |\n\nUsing fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. When continuous screen-looking exceeds a configured threshold (e.g., single session > 30 minutes, or daily total > 2 hours), a 'phone/game addiction' reminder is generated, suggesting parental guidance and healthy eye-use habits. This helps prevent adolescent myopia, cervical-spine issues and gaming addiction. Application scenarios: family study, adolescent bedroom, study rooms, school classrooms. The system monitors in real time and pushes reminders via mobile APP or links to smart devices to issue voice prompts when over-time use is detected. Skill features: long head-down phone use among adolescents easily causes myopia, cervical-spine disease and social barriers. AI auto-monitoring and reminders help parents objectively understand their child's eye-use habits, enabling timely intervention and protecting vision. Can be integrated into smart-home cameras or family-education APPs as a practical family-health management tool.\n\n通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。该技能有助于预防青少年近视、颈椎问题及游戏成瘾。应用场景：家庭书房、青少年卧室、自习室、学校教室。系统实时监测，当沉迷行为超时时通过手机APP推送提醒或联动智能设备发出语音提示。技能特点：青少年长时间低头看手机，易导致近视、颈椎病、社交障碍等。通过AI自动监测并提醒，可帮助家长客观了解孩子用眼习惯，及时干预，保护视力健康。该技能可集成到智能家居摄像头或家庭教育APP中，成为家庭健康管理的实用工具。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的青少年健康行为监测 AI。你的任务是分析固定摄像头的视频，检测青少年头部姿态（俯仰角）和手持设备姿势，判断是否正在低头看手机或玩游戏。统计单次连续低头时长和每日累计时长，当超过阈值时输出温和、尊重的提醒，并区分写作业 / 看书 / 网课等正常学习行为不计入沉迷时长。不要提供医疗诊断，仅输出基于视觉的行为统计。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭/自习室/学校固定摄像头视频，识别头部俯仰角（> 45° 视为低头看屏幕）+ 手部抓握设备姿态（手机/平板/掌机）+ 手臂弯曲 → 区分 `looking_at_screen` / `normal_reading` / `writing` / `lifting_head` / `other` 姿态 → 统计单次连续低头时长 + 日累计时长 + 段次数 + 最长单段 + 夜间时长 → 输出 4 档沉迷等级（normal / mild / notable / heavy）+ 友好提醒 + 给家长的日报摘要\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体关键点 + 头部姿态估计（pitch 角） |\n| 2 | 手部抓握检测 |\n| 3 | 手臂弯曲姿态判定 |\n| 4 | 设备边界框检测（参考） |\n| 5 | 姿态状态多分类（含 normal_reading / writing 排除项） |\n| 6 | 连续低头时长统计 |\n| 7 | 日累计/段次数/最长单段/夜间时长统计 |\n| 8 | 单次阈值（30 min / 60 min）与日累计阈值（2 h / 4 h）双触发 |\n| 9 | 夜间熬夜玩屏幕提醒（22:00-06:00 ≥ 30 min） |\n| 10 | 温和友好提醒文本生成 |\n| 11 | 家长日报摘要 |\n| 12 | 温和动作建议（push_eye_break / push_parent_notice / suggest_outdoor_activity / suggest_bedtime / observe_only） |\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.smyx_teen_screen_addiction_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_teen_screen_addiction_detection_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.smyx_teen_screen_addiction_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地家庭/自习室/学校固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络家庭/自习室/学校固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，青少年健康行为监测场景默认 `other` | 按需填写 |\n| `--list` | 显示青少年沉迷手机/游戏行为识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_teen_screen_addiction_detection_analysis.py`](scripts/smyx_teen_screen_addiction_detection_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 视频，最大 10MB；**关键**：侧面/斜侧上半身视角，可观察头部俯仰角与手臂姿态 |\n| 🔎 使用提醒 | **必须**正确区分写作业 / 看书 / 网课（前方有书本/课本、头部朝下但角度多在 30-45° 之间）与\"低头看屏幕\"，避免将正常学习行为误报为沉迷 |\n| 🔎 使用提醒 | 短时低头取物、写字时短暂低头等情形不应计入连续低头段；建议连续 ≥ 5 分钟才计为 1 段 |\n| 🧑‍⚖️ 结果性质 | 红线约束：**禁止**输出\"游戏成瘾症\"等精神医学诊断或量表评分；**禁止**长期存储青少年原始视频；**禁止**未经监护人同意将数据提供给学校或第三方；**禁止**使用强惩罚性语言 |\n| 🔎 使用提醒 | 涉及未成年人，必须取得**监护人 + 青少年本人**双重知情同意；建议提前与孩子沟通用途与边界，避免成为家庭冲突导火索 |\n| 🔎 使用提醒 | 友好提醒文案统一使用**温和、尊重、可执行**的措辞（如\"眼睛该休息啦~ 起来走 3 分钟\"），**避免**指责性表达 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地青少年使用屏幕视频\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input /path/to/study_room.mp4\n\n# 分析网络青少年使用屏幕视频\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --url https://example.com/study_room.mp4\n\n# 显示历史青少年沉迷手机/游戏报告（自动触发关键词：查看孩子沉迷手机历史报告、家长日报清单等）\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --output result.json\n```\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-teen-screen-addiction-detection-analysis\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1789286069428\n}\n\nFile v1.0.4:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放青少年沉迷手机/游戏行为识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动青少年沉迷手机/游戏行为识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取低头时长统计 + 沉迷等级 + 健康提醒\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史沉迷行为记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_TEEN_SCREEN_ADDICTION_DETECTION_ANALYSIS` - 青少年沉迷手机/游戏行为识别\n\n## 输入约束\n\n- 摄像头：家庭书房 / 青少年卧室 / 自习室 / 学校教室固定摄像头，能拍到**侧面或斜侧上半身**（便于计算头部俯仰角与手臂姿态）\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p；光照稳定（含夜间偷玩场景需红外补光）\n- 视频时长建议 ≥ 30 分钟，过短样本无法统计\"单次连续低头\"\n- 多人场景需按目标跟踪，避免身份串扰（家庭成员/同学）\n- 隐私敏感场景必须启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n### 姿态识别\n- `head_pitch_angle_deg` - 头部俯仰角（向下为正，> 45° 视为\"低头看屏幕\"姿态）\n- `hand_holding_device_detected` - 是否检测到手部抓握设备（手机/平板/掌机）+ 手臂弯曲姿态\n- `device_in_view_box` - 设备在视野中的边界框（参考指标）\n- `posture_state` - 当前姿态状态（looking_at_screen / normal_reading / writing / lifting_head / other）\n\n### 时长统计\n- `current_continuous_screen_min` - 当前连续低头看屏幕时长（分钟）\n- `daily_total_screen_min` - 当日累计看屏幕总时长（分钟）\n- `session_count_today` - 当日累计独立看屏幕段次数（≥ 5 分钟视为 1 段）\n- `longest_session_today_min` - 当日最长单段时长\n- `night_screen_minutes` - 夜间（22:00-06:00）看屏幕时长（参考指标，潜在熬夜）\n\n## 阈值与等级（默认值，可在配置中覆盖）\n\n- 单次连续 ≥ **30 分钟** → 建议起身休息（looking_too_long_session）\n- 单次连续 ≥ **60 分钟** → 强烈建议起身休息（looking_too_long_critical）\n- 日累计 ≥ **2 小时** → 沉迷预警（addiction_warning）\n- 日累计 ≥ **4 小时** → 沉迷重度预警（addiction_critical）\n- 夜间（22:00-06:00）≥ **30 分钟** → 熬夜玩屏幕提醒（late_night_warning）\n- 写作业 / 看书 / 网课（前方有书本 + 头部朝下但角度 < 45°）应识别为 `normal_reading` 或 `writing`，**不计入沉迷时长**\n\n## 输出字段（参考）\n\n- `time_window` / `subject_count`（仅本场景，**禁止跨场景身份关联**）\n- `current_posture` / `head_pitch_angle_deg` / `hand_holding_device_detected`\n- `current_continuous_screen_min` / `daily_total_screen_min` / `session_count_today` / `longest_session_today_min` / `night_screen_minutes`\n- `addiction_level` - 沉迷等级（normal / mild / notable / heavy）\n- `dominant_device_guess` - 设备类型猜测（phone / tablet / handheld_console / unknown，**仅用于提示文案，不做识别留存**）\n- `alert_type` - 提醒类型（looking_too_long_session / looking_too_long_critical / addiction_warning / addiction_critical / late_night_warning / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `friendly_reminder` - 友好提醒文本（如\"宝贝，你已经连续看屏幕 45 分钟了，眼睛该休息啦~ 起来走 3 分钟、看看 6 米外的窗外吧\"）\n- `parent_summary` - 给家长的日报摘要（如\"今日累计看屏幕 2 小时 35 分（已超 2 小时阈值），最长单段 52 分钟，建议在饭后约定 30 分钟亲子户外散步\"）\n- `recommend_action` - 建议动作（push_eye_break / push_parent_notice / suggest_outdoor_activity / suggest_bedtime / observe_only）\n\n## 强制约束与红线\n\n- ❌ **禁止**输出\"游戏成瘾症\"等精神医学诊断或量表评分\n- ❌ **禁止**长期存储青少年原始视频\n- ❌ **禁止**未经监护人同意便将数据提供给学校、机构或第三方\n- ❌ **禁止**使用强惩罚性语言（如\"再玩就没饭吃\"），统一使用**温和、尊重、可执行**的建议\n- ✅ 涉及未成年人，必须取得**监护人 + 青少年本人**双重知情同意；建议提前与孩子沟通用途与边界\n- ✅ 写作业 / 看书 / 网课场景必须正确归类，**不得**将正常学习行为误报为\"沉迷\"\n\n> 仅输出基于视觉的客观姿态与时长统计与温和家庭提醒，**不构成游戏成瘾的精神医学诊断**；任何疑似行为成瘾的判定与干预必须由专业心理医生评估制定。\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: dev\n\nFile v1.0.4:skill-card.md\n\n## Description:\n\nAnalyzes fixed-camera images or videos of adolescents to estimate head-down screen-use posture, screen-time duration, alert level, and family-facing reminders without making a medical diagnosis.\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\nExternal users and family-health application developers use this skill to analyze home, study-room, or classroom camera footage for adolescent screen-use posture, cumulative screen-looking time, and gentle intervention reminders. It is intended for behavioral reporting and caregiver guidance, not clinical diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill processes children's camera footage and identity-linked report history through a cloud service.\n\nMitigation: Use only with documented guardian and youth consent, clear retention and deletion practices, controlled access to reports, and appropriate limits on where cameras are used.\n\nRisk: Evidence security summary reports hidden identity setup, local token storage, history access, and insecure default HTTP endpoints.\n\nMitigation: Confirm HTTPS-only transport, token handling, account separation, and history access controls before installation or deployment.\n\nRisk: Screen-use classification can be mistaken for normal study behaviors or treated as a diagnosis.\n\nMitigation: Review outputs as behavioral signals only, exclude reading, writing, and online classes when appropriate, and avoid medical or punitive conclusions.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-teen-screen-addiction-detection-analysis)\n- [Publisher profile](https://clawhub.ai/user/smyx-sunjinhui)\n- [API interface documentation](references/api_doc.md)\n- [Skill usage 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 text containing structured JSON analysis, report links, history lists, and reminder guidance.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May save the rendered analysis text to a user-specified output file.]\n\n## Skill Version(s):\n\n1.0.4 (source: ClawHub release metadata; artifact frontmatter lists 1.0.14)\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.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\n\nArchive v1.0.3: 31 files, 42851 bytes\n\nFiles: references/api_doc.md (4886b), scripts/__init__.py (50b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_teen_screen_addiction_detection_analysis.py (3718b), skill-card.md (2711b), SKILL.md (14125b), 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 (164b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: \"smyx-teen-screen-addiction-detection-analysis\"\ndescription: \"Using fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。\"\nversion: \"1.0.12\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Teen Phone / Game Screen Addiction Detection | 青少年沉迷手机/游戏行为识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **青少年沉迷手机/游戏行为识别** |\n| 🎯 核心目标 | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_TEEN_SCREEN_ADDICTION_DETECTION_ANALYSIS` |\n\nUsing fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. When continuous screen-looking exceeds a configured threshold (e.g., single session > 30 minutes, or daily total > 2 hours), a 'phone/game addiction' reminder is generated, suggesting parental guidance and healthy eye-use habits. This helps prevent adolescent myopia, cervical-spine issues and gaming addiction. Application scenarios: family study, adolescent bedroom, study rooms, school classrooms. The system monitors in real time and pushes reminders via mobile APP or links to smart devices to issue voice prompts when over-time use is detected. Skill features: long head-down phone use among adolescents easily causes myopia, cervical-spine disease and social barriers. AI auto-monitoring and reminders help parents objectively understand their child's eye-use habits, enabling timely intervention and protecting vision. Can be integrated into smart-home cameras or family-education APPs as a practical family-health management tool.\n\n通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。该技能有助于预防青少年近视、颈椎问题及游戏成瘾。应用场景：家庭书房、青少年卧室、自习室、学校教室。系统实时监测，当沉迷行为超时时通过手机APP推送提醒或联动智能设备发出语音提示。技能特点：青少年长时间低头看手机，易导致近视、颈椎病、社交障碍等。通过AI自动监测并提醒，可帮助家长客观了解孩子用眼习惯，及时干预，保护视力健康。该技能可集成到智能家居摄像头或家庭教育APP中，成为家庭健康管理的实用工具。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的青少年健康行为监测 AI。你的任务是分析固定摄像头的视频，检测青少年头部姿态（俯仰角）和手持设备姿势，判断是否正在低头看手机或玩游戏。统计单次连续低头时长和每日累计时长，当超过阈值时输出温和、尊重的提醒，并区分写作业 / 看书 / 网课等正常学习行为不计入沉迷时长。不要提供医疗诊断，仅输出基于视觉的行为统计。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭/自习室/学校固定摄像头视频，识别头部俯仰角（> 45° 视为低头看屏幕）+ 手部抓握设备姿态（手机/平板/掌机）+ 手臂弯曲 → 区分 `looking_at_screen` / `normal_reading` / `writing` / `lifting_head` / `other` 姿态 → 统计单次连续低头时长 + 日累计时长 + 段次数 + 最长单段 + 夜间时长 → 输出 4 档沉迷等级（normal / mild / notable / heavy）+ 友好提醒 + 给家长的日报摘要\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体关键点 + 头部姿态估计（pitch 角） |\n| 2 | 手部抓握检测 |\n| 3 | 手臂弯曲姿态判定 |\n| 4 | 设备边界框检测（参考） |\n| 5 | 姿态状态多分类（含 normal_reading / writing 排除项） |\n| 6 | 连续低头时长统计 |\n| 7 | 日累计/段次数/最长单段/夜间时长统计 |\n| 8 | 单次阈值（30 min / 60 min）与日累计阈值（2 h / 4 h）双触发 |\n| 9 | 夜间熬夜玩屏幕提醒（22:00-06:00 ≥ 30 min） |\n| 10 | 温和友好提醒文本生成 |\n| 11 | 家长日报摘要 |\n| 12 | 温和动作建议（push_eye_break / push_parent_notice / suggest_outdoor_activity / suggest_bedtime / observe_only） |\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.smyx_teen_screen_addiction_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_teen_screen_addiction_detection_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.smyx_teen_screen_addiction_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地家庭/自习室/学校固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络家庭/自习室/学校固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，青少年健康行为监测场景默认 `other` | 按需填写 |\n| `--list` | 显示青少年沉迷手机/游戏行为识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_teen_screen_addiction_detection_analysis.py`](scripts/smyx_teen_screen_addiction_detection_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 视频，最大 10MB；**关键**：侧面/斜侧上半身视角，可观察头部俯仰角与手臂姿态 |\n| 🔎 使用提醒 | **必须**正确区分写作业 / 看书 / 网课（前方有书本/课本、头部朝下但角度多在 30-45° 之间）与\"低头看屏幕\"，避免将正常学习行为误报为沉迷 |\n| 🔎 使用提醒 | 短时低头取物、写字时短暂低头等情形不应计入连续低头段；建议连续 ≥ 5 分钟才计为 1 段 |\n| 🧑‍⚖️ 结果性质 | 红线约束：**禁止**输出\"游戏成瘾症\"等精神医学诊断或量表评分；**禁止**长期存储青少年原始视频；**禁止**未经监护人同意将数据提供给学校或第三方；**禁止**使用强惩罚性语言 |\n| 🔎 使用提醒 | 涉及未成年人，必须取得**监护人 + 青少年本人**双重知情同意；建议提前与孩子沟通用途与边界，避免成为家庭冲突导火索 |\n| 🔎 使用提醒 | 友好提醒文案统一使用**温和、尊重、可执行**的措辞（如\"眼睛该休息啦~ 起来走 3 分钟\"），**避免**指责性表达 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地青少年使用屏幕视频\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input /path/to/study_room.mp4\n\n# 分析网络青少年使用屏幕视频\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --url https://example.com/study_room.mp4\n\n# 显示历史青少年沉迷手机/游戏报告（自动触发关键词：查看孩子沉迷手机历史报告、家长日报清单等）\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --output result.json\n```\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-teen-screen-addiction-detection-analysis\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1787727154399\n}\n\nFile v1.0.3:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放青少年沉迷手机/游戏行为识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动青少年沉迷手机/游戏行为识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取低头时长统计 + 沉迷等级 + 健康提醒\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史沉迷行为记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_TEEN_SCREEN_ADDICTION_DETECTION_ANALYSIS` - 青少年沉迷手机/游戏行为识别\n\n## 输入约束\n\n- 摄像头：家庭书房 / 青少年卧室 / 自习室 / 学校教室固定摄像头，能拍到**侧面或斜侧上半身**（便于计算头部俯仰角与手臂姿态）\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p；光照稳定（含夜间偷玩场景需红外补光）\n- 视频时长建议 ≥ 30 分钟，过短样本无法统计\"单次连续低头\"\n- 多人场景需按目标跟踪，避免身份串扰（家庭成员/同学）\n- 隐私敏感场景必须启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n### 姿态识别\n- `head_pitch_angle_deg` - 头部俯仰角（向下为正，> 45° 视为\"低头看屏幕\"姿态）\n- `hand_holding_device_detected` - 是否检测到手部抓握设备（手机/平板/掌机）+ 手臂弯曲姿态\n- `device_in_view_box` - 设备在视野中的边界框（参考指标）\n- `posture_state` - 当前姿态状态（looking_at_screen / normal_reading / writing / lifting_head / other）\n\n### 时长统计\n- `current_continuous_screen_min` - 当前连续低头看屏幕时长（分钟）\n- `daily_total_screen_min` - 当日累计看屏幕总时长（分钟）\n- `session_count_today` - 当日累计独立看屏幕段次数（≥ 5 分钟视为 1 段）\n- `longest_session_today_min` - 当日最长单段时长\n- `night_screen_minutes` - 夜间（22:00-06:00）看屏幕时长（参考指标，潜在熬夜）\n\n## 阈值与等级（默认值，可在配置中覆盖）\n\n- 单次连续 ≥ **30 分钟** → 建议起身休息（looking_too_long_session）\n- 单次连续 ≥ **60 分钟** → 强烈建议起身休息（looking_too_long_critical）\n- 日累计 ≥ **2 小时** → 沉迷预警（addiction_warning）\n- 日累计 ≥ **4 小时** → 沉迷重度预警（addiction_critical）\n- 夜间（22:00-06:00）≥ **30 分钟** → 熬夜玩屏幕提醒（late_night_warning）\n- 写作业 / 看书 / 网课（前方有书本 + 头部朝下但角度 < 45°）应识别为 `normal_reading` 或 `writing`，**不计入沉迷时长**\n\n## 输出字段（参考）\n\n- `time_window` / `subject_count`（仅本场景，**禁止跨场景身份关联**）\n- `current_posture` / `head_pitch_angle_deg` / `hand_holding_device_detected`\n- `current_continuous_screen_min` / `daily_total_screen_min` / `session_count_today` / `longest_session_today_min` / `night_screen_minutes`\n- `addiction_level` - 沉迷等级（normal / mild / notable / heavy）\n- `dominant_device_guess` - 设备类型猜测（phone / tablet / handheld_console / unknown，**仅用于提示文案，不做识别留存**）\n- `alert_type` - 提醒类型（looking_too_long_session / looking_too_long_critical / addiction_warning / addiction_critical / late_night_warning / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `friendly_reminder` - 友好提醒文本（如\"宝贝，你已经连续看屏幕 45 分钟了，眼睛该休息啦~ 起来走 3 分钟、看看 6 米外的窗外吧\"）\n- `parent_summary` - 给家长的日报摘要（如\"今日累计看屏幕 2 小时 35 分（已超 2 小时阈值），最长单段 52 分钟，建议在饭后约定 30 分钟亲子户外散步\"）\n- `recommend_action` - 建议动作（push_eye_break / push_parent_notice / suggest_outdoor_activity / suggest_bedtime / observe_only）\n\n## 强制约束与红线\n\n- ❌ **禁止**输出\"游戏成瘾症\"等精神医学诊断或量表评分\n- ❌ **禁止**长期存储青少年原始视频\n- ❌ **禁止**未经监护人同意便将数据提供给学校、机构或第三方\n- ❌ **禁止**使用强惩罚性语言（如\"再玩就没饭吃\"），统一使用**温和、尊重、可执行**的建议\n- ✅ 涉及未成年人，必须取得**监护人 + 青少年本人**双重知情同意；建议提前与孩子沟通用途与边界\n- ✅ 写作业 / 看书 / 网课场景必须正确归类，**不得**将正常学习行为误报为\"沉迷\"\n\n> 仅输出基于视觉的客观姿态与时长统计与温和家庭提醒，**不构成游戏成瘾的精神医学诊断**；任何疑似行为成瘾的判定与干预必须由专业心理医生评估制定。\n\nFile v1.0.3: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.3:scripts/config.yaml\n\n{}\n\nFile v1.0.3:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.3: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.3: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.3: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.3:skill-card.md\n\n## Description:\n\nAnalyzes fixed-camera video or video URLs to estimate adolescent screen-use posture, session duration, daily screen-looking time, alert level, and respectful family guidance without making a medical diagnosis.\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\nExternal users and developers use this skill to analyze home, study-room, or school fixed-camera video for teen phone or game screen-use indicators, produce structured reports, and query prior cloud reports. It is intended to support monitoring and gentle family reminders, not clinical diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill handles minors' camera footage or video URLs and cloud report data.\n\nMitigation: Use only with informed consent from guardians and the adolescent, confirm retention and sharing controls, and avoid uploading unnecessary or long-lived raw video.\n\nRisk: The skill silently creates or reuses local identities and stores tokens in a local database.\n\nMitigation: Review local data storage, token handling, and deletion controls before deployment, and restrict access to the workspace data directory.\n\nRisk: The bundled configuration includes dev/private HTTP endpoints and cloud-history queries.\n\nMitigation: Confirm production endpoint configuration, transport security, and authorization boundaries before using the skill with real data.\n\nRisk: Behavior classification may be mistaken for a medical or psychiatric assessment.\n\nMitigation: Present results as visual posture and screen-time observations only, and route clinical concerns to qualified professionals.\n\n## Reference(s):\n\n- [API Reference](references/api_doc.md)\n- [Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-teen-screen-addiction-detection-analysis)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, guidance]\n\n**Output Format:** [Markdown text containing structured JSON results, report links, or history lists]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include posture states, screen-time totals, alert levels, recommended actions, parent summaries, and report export links.]\n\n## Skill Version(s):\n\n1.0.3 (source: server release evidence; artifact frontmatter lists 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.3:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.3:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.2: 31 files, 42693 bytes\n\nFiles: references/api_doc.md (4886b), scripts/__init__.py (50b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_teen_screen_addiction_detection_analysis.py (3718b), skill-card.md (2610b), SKILL.md (14124b), 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 (164b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: \"smyx-teen-screen-addiction-detection-analysis\"\ndescription: \"Using fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。\"\nversion: \"1.0.5\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Teen Phone / Game Screen Addiction Detection | 青少年沉迷手机/游戏行为识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **青少年沉迷手机/游戏行为识别** |\n| 🎯 核心目标 | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_TEEN_SCREEN_ADDICTION_DETECTION_ANALYSIS` |\n\nUsing fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. When continuous screen-looking exceeds a configured threshold (e.g., single session > 30 minutes, or daily total > 2 hours), a 'phone/game addiction' reminder is generated, suggesting parental guidance and healthy eye-use habits. This helps prevent adolescent myopia, cervical-spine issues and gaming addiction. Application scenarios: family study, adolescent bedroom, study rooms, school classrooms. The system monitors in real time and pushes reminders via mobile APP or links to smart devices to issue voice prompts when over-time use is detected. Skill features: long head-down phone use among adolescents easily causes myopia, cervical-spine disease and social barriers. AI auto-monitoring and reminders help parents objectively understand their child's eye-use habits, enabling timely intervention and protecting vision. Can be integrated into smart-home cameras or family-education APPs as a practical family-health management tool.\n\n通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。该技能有助于预防青少年近视、颈椎问题及游戏成瘾。应用场景：家庭书房、青少年卧室、自习室、学校教室。系统实时监测，当沉迷行为超时时通过手机APP推送提醒或联动智能设备发出语音提示。技能特点：青少年长时间低头看手机，易导致近视、颈椎病、社交障碍等。通过AI自动监测并提醒，可帮助家长客观了解孩子用眼习惯，及时干预，保护视力健康。该技能可集成到智能家居摄像头或家庭教育APP中，成为家庭健康管理的实用工具。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的青少年健康行为监测 AI。你的任务是分析固定摄像头的视频，检测青少年头部姿态（俯仰角）和手持设备姿势，判断是否正在低头看手机或玩游戏。统计单次连续低头时长和每日累计时长，当超过阈值时输出温和、尊重的提醒，并区分写作业 / 看书 / 网课等正常学习行为不计入沉迷时长。不要提供医疗诊断，仅输出基于视觉的行为统计。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭/自习室/学校固定摄像头视频，识别头部俯仰角（> 45° 视为低头看屏幕）+ 手部抓握设备姿态（手机/平板/掌机）+ 手臂弯曲 → 区分 `looking_at_screen` / `normal_reading` / `writing` / `lifting_head` / `other` 姿态 → 统计单次连续低头时长 + 日累计时长 + 段次数 + 最长单段 + 夜间时长 → 输出 4 档沉迷等级（normal / mild / notable / heavy）+ 友好提醒 + 给家长的日报摘要\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体关键点 + 头部姿态估计（pitch 角） |\n| 2 | 手部抓握检测 |\n| 3 | 手臂弯曲姿态判定 |\n| 4 | 设备边界框检测（参考） |\n| 5 | 姿态状态多分类（含 normal_reading / writing 排除项） |\n| 6 | 连续低头时长统计 |\n| 7 | 日累计/段次数/最长单段/夜间时长统计 |\n| 8 | 单次阈值（30 min / 60 min）与日累计阈值（2 h / 4 h）双触发 |\n| 9 | 夜间熬夜玩屏幕提醒（22:00-06:00 ≥ 30 min） |\n| 10 | 温和友好提醒文本生成 |\n| 11 | 家长日报摘要 |\n| 12 | 温和动作建议（push_eye_break / push_parent_notice / suggest_outdoor_activity / suggest_bedtime / observe_only） |\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.smyx_teen_screen_addiction_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_teen_screen_addiction_detection_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.smyx_teen_screen_addiction_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地家庭/自习室/学校固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络家庭/自习室/学校固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，青少年健康行为监测场景默认 `other` | 按需填写 |\n| `--list` | 显示青少年沉迷手机/游戏行为识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_teen_screen_addiction_detection_analysis.py`](scripts/smyx_teen_screen_addiction_detection_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 视频，最大 10MB；**关键**：侧面/斜侧上半身视角，可观察头部俯仰角与手臂姿态 |\n| 🔎 使用提醒 | **必须**正确区分写作业 / 看书 / 网课（前方有书本/课本、头部朝下但角度多在 30-45° 之间）与\"低头看屏幕\"，避免将正常学习行为误报为沉迷 |\n| 🔎 使用提醒 | 短时低头取物、写字时短暂低头等情形不应计入连续低头段；建议连续 ≥ 5 分钟才计为 1 段 |\n| 🧑‍⚖️ 结果性质 | 红线约束：**禁止**输出\"游戏成瘾症\"等精神医学诊断或量表评分；**禁止**长期存储青少年原始视频；**禁止**未经监护人同意将数据提供给学校或第三方；**禁止**使用强惩罚性语言 |\n| 🔎 使用提醒 | 涉及未成年人，必须取得**监护人 + 青少年本人**双重知情同意；建议提前与孩子沟通用途与边界，避免成为家庭冲突导火索 |\n| 🔎 使用提醒 | 友好提醒文案统一使用**温和、尊重、可执行**的措辞（如\"眼睛该休息啦~ 起来走 3 分钟\"），**避免**指责性表达 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地青少年使用屏幕视频\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input /path/to/study_room.mp4\n\n# 分析网络青少年使用屏幕视频\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --url https://example.com/study_room.mp4\n\n# 显示历史青少年沉迷手机/游戏报告（自动触发关键词：查看孩子沉迷手机历史报告、家长日报清单等）\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --output result.json\n```\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-teen-screen-addiction-detection-analysis\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1783451651504\n}\n\nFile v1.0.2:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放青少年沉迷手机/游戏行为识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动青少年沉迷手机/游戏行为识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取低头时长统计 + 沉迷等级 + 健康提醒\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史沉迷行为记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_TEEN_SCREEN_ADDICTION_DETECTION_ANALYSIS` - 青少年沉迷手机/游戏行为识别\n\n## 输入约束\n\n- 摄像头：家庭书房 / 青少年卧室 / 自习室 / 学校教室固定摄像头，能拍到**侧面或斜侧上半身**（便于计算头部俯仰角与手臂姿态）\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p；光照稳定（含夜间偷玩场景需红外补光）\n- 视频时长建议 ≥ 30 分钟，过短样本无法统计\"单次连续低头\"\n- 多人场景需按目标跟踪，避免身份串扰（家庭成员/同学）\n- 隐私敏感场景必须启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n### 姿态识别\n- `head_pitch_angle_deg` - 头部俯仰角（向下为正，> 45° 视为\"低头看屏幕\"姿态）\n- `hand_holding_device_detected` - 是否检测到手部抓握设备（手机/平板/掌机）+ 手臂弯曲姿态\n- `device_in_view_box` - 设备在视野中的边界框（参考指标）\n- `posture_state` - 当前姿态状态（looking_at_screen / normal_reading / writing / lifting_head / other）\n\n### 时长统计\n- `current_continuous_screen_min` - 当前连续低头看屏幕时长（分钟）\n- `daily_total_screen_min` - 当日累计看屏幕总时长（分钟）\n- `session_count_today` - 当日累计独立看屏幕段次数（≥ 5 分钟视为 1 段）\n- `longest_session_today_min` - 当日最长单段时长\n- `night_screen_minutes` - 夜间（22:00-06:00）看屏幕时长（参考指标，潜在熬夜）\n\n## 阈值与等级（默认值，可在配置中覆盖）\n\n- 单次连续 ≥ **30 分钟** → 建议起身休息（looking_too_long_session）\n- 单次连续 ≥ **60 分钟** → 强烈建议起身休息（looking_too_long_critical）\n- 日累计 ≥ **2 小时** → 沉迷预警（addiction_warning）\n- 日累计 ≥ **4 小时** → 沉迷重度预警（addiction_critical）\n- 夜间（22:00-06:00）≥ **30 分钟** → 熬夜玩屏幕提醒（late_night_warning）\n- 写作业 / 看书 / 网课（前方有书本 + 头部朝下但角度 < 45°）应识别为 `normal_reading` 或 `writing`，**不计入沉迷时长**\n\n## 输出字段（参考）\n\n- `time_window` / `subject_count`（仅本场景，**禁止跨场景身份关联**）\n- `current_posture` / `head_pitch_angle_deg` / `hand_holding_device_detected`\n- `current_continuous_screen_min` / `daily_total_screen_min` / `session_count_today` / `longest_session_today_min` / `night_screen_minutes`\n- `addiction_level` - 沉迷等级（normal / mild / notable / heavy）\n- `dominant_device_guess` - 设备类型猜测（phone / tablet / handheld_console / unknown，**仅用于提示文案，不做识别留存**）\n- `alert_type` - 提醒类型（looking_too_long_session / looking_too_long_critical / addiction_warning / addiction_critical / late_night_warning / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `friendly_reminder` - 友好提醒文本（如\"宝贝，你已经连续看屏幕 45 分钟了，眼睛该休息啦~ 起来走 3 分钟、看看 6 米外的窗外吧\"）\n- `parent_summary` - 给家长的日报摘要（如\"今日累计看屏幕 2 小时 35 分（已超 2 小时阈值），最长单段 52 分钟，建议在饭后约定 30 分钟亲子户外散步\"）\n- `recommend_action` - 建议动作（push_eye_break / push_parent_notice / suggest_outdoor_activity / suggest_bedtime / observe_only）\n\n## 强制约束与红线\n\n- ❌ **禁止**输出\"游戏成瘾症\"等精神医学诊断或量表评分\n- ❌ **禁止**长期存储青少年原始视频\n- ❌ **禁止**未经监护人同意便将数据提供给学校、机构或第三方\n- ❌ **禁止**使用强惩罚性语言（如\"再玩就没饭吃\"），统一使用**温和、尊重、可执行**的建议\n- ✅ 涉及未成年人，必须取得**监护人 + 青少年本人**双重知情同意；建议提前与孩子沟通用途与边界\n- ✅ 写作业 / 看书 / 网课场景必须正确归类，**不得**将正常学习行为误报为\"沉迷\"\n\n> 仅输出基于视觉的客观姿态与时长统计与温和家庭提醒，**不构成游戏成瘾的精神医学诊断**；任何疑似行为成瘾的判定与干预必须由专业心理医生评估制定。\n\nFile v1.0.2: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.2:scripts/config.yaml\n\n{}\n\nFile v1.0.2:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.2: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.2: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.2: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.2:skill-card.md\n\n## Description: <br>\nAnalyzes fixed-camera videos to estimate adolescents' head posture and handheld-device use, summarize screen-looking time, and produce behavior reminders and 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>\nParents, guardians, educators, and developers use this skill to analyze home, study-room, or classroom camera videos for screen-looking posture patterns and generate structured reports with gentle intervention suggestions. It is intended for visual behavior statistics, not medical diagnosis. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can upload sensitive videos of minors to a remote service. <br>\nMitigation: Use only with guardian and child consent, confirm the destination service, and require documented retention, deletion, authorization, and access-control practices before deployment. <br>\nRisk: Cloud report history and account identity reuse can expose reports beyond the intended user. <br>\nMitigation: Restrict history lookups to authorized users, verify report access controls, and avoid broad automatic history retrieval unless the user has a clear need. <br>\nRisk: Visual classification may mistake normal reading, writing, or online classes for problematic screen use. <br>\nMitigation: Review outputs before acting, keep reminders gentle, and do not treat the report as a diagnosis or disciplinary basis. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-teen-screen-addiction-detection-analysis) <br>\n- [API documentation](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, shell commands, guidance] <br>\n**Output Format:** [Markdown or JSON analysis reports with optional shell command examples] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include posture statistics, screen-time summaries, reminder text, report links, and history-report tables.] <br>\n\n## Skill Version(s): <br>\n1.0.2 (source: server release metadata; artifact frontmatter says 1.0.5) <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.2:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.2:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.1: 31 files, 42520 bytes\n\nFiles: references/api_doc.md (4886b), scripts/__init__.py (50b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_teen_screen_addiction_detection_analysis.py (3718b), skill-card.md (2840b), SKILL.md (14124b), 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 (22801b), 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 (164b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: \"smyx-teen-screen-addiction-detection-analysis\"\ndescription: \"Using fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。\"\nversion: \"1.0.4\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Teen Phone / Game Screen Addiction Detection | 青少年沉迷手机/游戏行为识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **青少年沉迷手机/游戏行为识别** |\n| 🎯 核心目标 | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_TEEN_SCREEN_ADDICTION_DETECTION_ANALYSIS` |\n\nUsing fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. When continuous screen-looking exceeds a configured threshold (e.g., single session > 30 minutes, or daily total > 2 hours), a 'phone/game addiction' reminder is generated, suggesting parental guidance and healthy eye-use habits. This helps prevent adolescent myopia, cervical-spine issues and gaming addiction. Application scenarios: family study, adolescent bedroom, study rooms, school classrooms. The system monitors in real time and pushes reminders via mobile APP or links to smart devices to issue voice prompts when over-time use is detected. Skill features: long head-down phone use among adolescents easily causes myopia, cervical-spine disease and social barriers. AI auto-monitoring and reminders help parents objectively understand their child's eye-use habits, enabling timely intervention and protecting vision. Can be integrated into smart-home cameras or family-education APPs as a practical family-health management tool.\n\n通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。该技能有助于预防青少年近视、颈椎问题及游戏成瘾。应用场景：家庭书房、青少年卧室、自习室、学校教室。系统实时监测，当沉迷行为超时时通过手机APP推送提醒或联动智能设备发出语音提示。技能特点：青少年长时间低头看手机，易导致近视、颈椎病、社交障碍等。通过AI自动监测并提醒，可帮助家长客观了解孩子用眼习惯，及时干预，保护视力健康。该技能可集成到智能家居摄像头或家庭教育APP中，成为家庭健康管理的实用工具。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的青少年健康行为监测 AI。你的任务是分析固定摄像头的视频，检测青少年头部姿态（俯仰角）和手持设备姿势，判断是否正在低头看手机或玩游戏。统计单次连续低头时长和每日累计时长，当超过阈值时输出温和、尊重的提醒，并区分写作业 / 看书 / 网课等正常学习行为不计入沉迷时长。不要提供医疗诊断，仅输出基于视觉的行为统计。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭/自习室/学校固定摄像头视频，识别头部俯仰角（> 45° 视为低头看屏幕）+ 手部抓握设备姿态（手机/平板/掌机）+ 手臂弯曲 → 区分 `looking_at_screen` / `normal_reading` / `writing` / `lifting_head` / `other` 姿态 → 统计单次连续低头时长 + 日累计时长 + 段次数 + 最长单段 + 夜间时长 → 输出 4 档沉迷等级（normal / mild / notable / heavy）+ 友好提醒 + 给家长的日报摘要\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体关键点 + 头部姿态估计（pitch 角） |\n| 2 | 手部抓握检测 |\n| 3 | 手臂弯曲姿态判定 |\n| 4 | 设备边界框检测（参考） |\n| 5 | 姿态状态多分类（含 normal_reading / writing 排除项） |\n| 6 | 连续低头时长统计 |\n| 7 | 日累计/段次数/最长单段/夜间时长统计 |\n| 8 | 单次阈值（30 min / 60 min）与日累计阈值（2 h / 4 h）双触发 |\n| 9 | 夜间熬夜玩屏幕提醒（22:00-06:00 ≥ 30 min） |\n| 10 | 温和友好提醒文本生成 |\n| 11 | 家长日报摘要 |\n| 12 | 温和动作建议（push_eye_break / push_parent_notice / suggest_outdoor_activity / suggest_bedtime / observe_only） |\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.smyx_teen_screen_addiction_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_teen_screen_addiction_detection_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.smyx_teen_screen_addiction_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地家庭/自习室/学校固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络家庭/自习室/学校固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，青少年健康行为监测场景默认 `other` | 按需填写 |\n| `--list` | 显示青少年沉迷手机/游戏行为识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_teen_screen_addiction_detection_analysis.py`](scripts/smyx_teen_screen_addiction_detection_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 视频，最大 10MB；**关键**：侧面/斜侧上半身视角，可观察头部俯仰角与手臂姿态 |\n| 🔎 使用提醒 | **必须**正确区分写作业 / 看书 / 网课（前方有书本/课本、头部朝下但角度多在 30-45° 之间）与\"低头看屏幕\"，避免将正常学习行为误报为沉迷 |\n| 🔎 使用提醒 | 短时低头取物、写字时短暂低头等情形不应计入连续低头段；建议连续 ≥ 5 分钟才计为 1 段 |\n| 🧑‍⚖️ 结果性质 | 红线约束：**禁止**输出\"游戏成瘾症\"等精神医学诊断或量表评分；**禁止**长期存储青少年原始视频；**禁止**未经监护人同意将数据提供给学校或第三方；**禁止**使用强惩罚性语言 |\n| 🔎 使用提醒 | 涉及未成年人，必须取得**监护人 + 青少年本人**双重知情同意；建议提前与孩子沟通用途与边界，避免成为家庭冲突导火索 |\n| 🔎 使用提醒 | 友好提醒文案统一使用**温和、尊重、可执行**的措辞（如\"眼睛该休息啦~ 起来走 3 分钟\"），**避免**指责性表达 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地青少年使用屏幕视频\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input /path/to/study_room.mp4\n\n# 分析网络青少年使用屏幕视频\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --url https://example.com/study_room.mp4\n\n# 显示历史青少年沉迷手机/游戏报告（自动触发关键词：查看孩子沉迷手机历史报告、家长日报清单等）\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --output result.json\n```\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-teen-screen-addiction-detection-analysis\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1782893368211\n}\n\nFile v1.0.1:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放青少年沉迷手机/游戏行为识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动青少年沉迷手机/游戏行为识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取低头时长统计 + 沉迷等级 + 健康提醒\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史沉迷行为记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_TEEN_SCREEN_ADDICTION_DETECTION_ANALYSIS` - 青少年沉迷手机/游戏行为识别\n\n## 输入约束\n\n- 摄像头：家庭书房 / 青少年卧室 / 自习室 / 学校教室固定摄像头，能拍到**侧面或斜侧上半身**（便于计算头部俯仰角与手臂姿态）\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p；光照稳定（含夜间偷玩场景需红外补光）\n- 视频时长建议 ≥ 30 分钟，过短样本无法统计\"单次连续低头\"\n- 多人场景需按目标跟踪，避免身份串扰（家庭成员/同学）\n- 隐私敏感场景必须启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n### 姿态识别\n- `head_pitch_angle_deg` - 头部俯仰角（向下为正，> 45° 视为\"低头看屏幕\"姿态）\n- `hand_holding_device_detected` - 是否检测到手部抓握设备（手机/平板/掌机）+ 手臂弯曲姿态\n- `device_in_view_box` - 设备在视野中的边界框（参考指标）\n- `posture_state` - 当前姿态状态（looking_at_screen / normal_reading / writing / lifting_head / other）\n\n### 时长统计\n- `current_continuous_screen_min` - 当前连续低头看屏幕时长（分钟）\n- `daily_total_screen_min` - 当日累计看屏幕总时长（分钟）\n- `session_count_today` - 当日累计独立看屏幕段次数（≥ 5 分钟视为 1 段）\n- `longest_session_today_min` - 当日最长单段时长\n- `night_screen_minutes` - 夜间（22:00-06:00）看屏幕时长（参考指标，潜在熬夜）\n\n## 阈值与等级（默认值，可在配置中覆盖）\n\n- 单次连续 ≥ **30 分钟** → 建议起身休息（looking_too_long_session）\n- 单次连续 ≥ **60 分钟** → 强烈建议起身休息（looking_too_long_critical）\n- 日累计 ≥ **2 小时** → 沉迷预警（addiction_warning）\n- 日累计 ≥ **4 小时** → 沉迷重度预警（addiction_critical）\n- 夜间（22:00-06:00）≥ **30 分钟** → 熬夜玩屏幕提醒（late_night_warning）\n- 写作业 / 看书 / 网课（前方有书本 + 头部朝下但角度 < 45°）应识别为 `normal_reading` 或 `writing`，**不计入沉迷时长**\n\n## 输出字段（参考）\n\n- `time_window` / `subject_count`（仅本场景，**禁止跨场景身份关联**）\n- `current_posture` / `head_pitch_angle_deg` / `hand_holding_device_detected`\n- `current_continuous_screen_min` / `daily_total_screen_min` / `session_count_today` / `longest_session_today_min` / `night_screen_minutes`\n- `addiction_level` - 沉迷等级（normal / mild / notable / heavy）\n- `dominant_device_guess` - 设备类型猜测（phone / tablet / handheld_console / unknown，**仅用于提示文案，不做识别留存**）\n- `alert_type` - 提醒类型（looking_too_long_session / looking_too_long_critical / addiction_warning / addiction_critical / late_night_warning / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `friendly_reminder` - 友好提醒文本（如\"宝贝，你已经连续看屏幕 45 分钟了，眼睛该休息啦~ 起来走 3 分钟、看看 6 米外的窗外吧\"）\n- `parent_summary` - 给家长的日报摘要（如\"今日累计看屏幕 2 小时 35 分（已超 2 小时阈值），最长单段 52 分钟，建议在饭后约定 30 分钟亲子户外散步\"）\n- `recommend_action` - 建议动作（push_eye_break / push_parent_notice / suggest_outdoor_activity / suggest_bedtime / observe_only）\n\n## 强制约束与红线\n\n- ❌ **禁止**输出\"游戏成瘾症\"等精神医学诊断或量表评分\n- ❌ **禁止**长期存储青少年原始视频\n- ❌ **禁止**未经监护人同意便将数据提供给学校、机构或第三方\n- ❌ **禁止**使用强惩罚性语言（如\"再玩就没饭吃\"），统一使用**温和、尊重、可执行**的建议\n- ✅ 涉及未成年人，必须取得**监护人 + 青少年本人**双重知情同意；建议提前与孩子沟通用途与边界\n- ✅ 写作业 / 看书 / 网课场景必须正确归类，**不得**将正常学习行为误报为\"沉迷\"\n\n> 仅输出基于视觉的客观姿态与时长统计与温和家庭提醒，**不构成游戏成瘾的精神医学诊断**；任何疑似行为成瘾的判定与干预必须由专业心理医生评估制定。\n\nFile v1.0.1: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.1:scripts/config.yaml\n\n{}\n\nFile v1.0.1:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.1: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.1: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.1: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.1:skill-card.md\n\n## Description: <br>\nAnalyzes fixed-camera image or video of adolescents to estimate screen-looking posture and duration, then returns behavior statistics, reminder levels, and family guidance without making a medical diagnosis. <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>\nExternal users and developers use this skill to send fixed-camera youth study, home, or classroom footage to a cloud analysis service for screen-use posture classification, duration statistics, reminders, and report history. The output is intended for family health and supervision workflows, not clinical diagnosis. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill may send selected video, image, or URL inputs involving minors to a vendor cloud service. <br>\nMitigation: Use only with guardian and youth consent, avoid private spaces unless strictly necessary, and confirm the provider's retention, deletion, and access policies before deployment. <br>\nRisk: Report history can be linked to a persistent local or cloud identity that is created or reused silently. <br>\nMitigation: Review account-token handling, restrict report access, and confirm how identities and report histories can be audited, rotated, or deleted. <br>\nRisk: Behavior classification may be mistaken for a medical or disciplinary conclusion. <br>\nMitigation: Treat outputs as visual posture and duration estimates only, require human review for interventions, and avoid clinical diagnosis or punitive language. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-teen-screen-addiction-detection-analysis) <br>\n- [Publisher profile](https://clawhub.ai/user/smyx-sunjinhui) <br>\n- [API interface documentation](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, shell commands, guidance] <br>\n**Output Format:** [Markdown summaries and JSON analysis or report-history data, with optional report links.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include screen-use posture states, duration statistics, alert levels, friendly reminders, parent summaries, and cloud report-history tables.] <br>\n\n## Skill Version(s): <br>\n1.0.1 (source: server release metadata; artifact frontmatter reports 1.0.4) <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.1:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.1:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.0: 32 files, 39459 bytes\n\nFiles: references/api_doc.md (4886b), scripts/__init__.py (50b), scripts/api_service.py (1704b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_teen_screen_addiction_detection_analysis.py (3702b), skill-card.md (2687b), SKILL.md (17067b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (2094b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1857b), 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 (3706b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (45b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2518b), 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 (22771b), skills/smyx_common/scripts/config.yaml (463b), skills/smyx_common/scripts/dao.py (11119b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (17963b), _meta.json (164b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: \"smyx-teen-screen-addiction-detection-analysis\"\ndescription: \"Using fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. When continuous screen-looking exceeds a configured threshold (e.g., single session > 30 minutes, or daily total > 2 hours), a 'phone/game addiction' reminder is generated, suggesting parental guidance and healthy eye-use habits. This helps prevent adolescent myopia, cervical-spine issues and gaming addiction. Application scenarios: family study, adolescent bedroom, study rooms, school classrooms. The system monitors in real time and pushes reminders via mobile APP or links to smart devices to issue voice prompts when over-time use is detected. Skill features: long head-down phone use among adolescents easily causes myopia, cervical-spine disease and social barriers. AI auto-monitoring and reminders help parents objectively understand their child's eye-use habits, enabling timely intervention and protecting vision. Can be integrated into smart-home cameras or family-education APPs as a practical family-health management tool. | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。该技能有助于预防青少年近视、颈椎问题及游戏成瘾。应用场景：家庭书房、青少年卧室、自习室、学校教室。系统实时监测，当沉迷行为超时时通过手机APP推送提醒或联动智能设备发出语音提示。技能特点：青少年长时间低头看手机，易导致近视、颈椎病、社交障碍等。通过AI自动监测并提醒，可帮助家长客观了解孩子用眼习惯，及时干预，保护视力健康。该技能可集成到智能家居摄像头或家庭教育APP中，成为家庭健康管理的实用工具。\"\nversion: \"1.0.0\"\n---\n\n# Teen Phone / Game Screen Addiction Detection | 青少年沉迷手机/游戏行为识别\n\nUsing fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. When continuous screen-looking exceeds a configured threshold (e.g., single session > 30 minutes, or daily total > 2 hours), a 'phone/game addiction' reminder is generated, suggesting parental guidance and healthy eye-use habits. This helps prevent adolescent myopia, cervical-spine issues and gaming addiction. Application scenarios: family study, adolescent bedroom, study rooms, school classrooms. The system monitors in real time and pushes reminders via mobile APP or links to smart devices to issue voice prompts when over-time use is detected. Skill features: long head-down phone use among adolescents easily causes myopia, cervical-spine disease and social barriers. AI auto-monitoring and reminders help parents objectively understand their child's eye-use habits, enabling timely intervention and protecting vision. Can be integrated into smart-home cameras or family-education APPs as a practical family-health management tool.\n\n通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。该技能有助于预防青少年近视、颈椎问题及游戏成瘾。应用场景：家庭书房、青少年卧室、自习室、学校教室。系统实时监测，当沉迷行为超时时通过手机APP推送提醒或联动智能设备发出语音提示。技能特点：青少年长时间低头看手机，易导致近视、颈椎病、社交障碍等。通过AI自动监测并提醒，可帮助家长客观了解孩子用眼习惯，及时干预，保护视力健康。该技能可集成到智能家居摄像头或家庭教育APP中，成为家庭健康管理的实用工具。\n\n## 🎯 AI 角色\n\n**假设你是一个专业的青少年健康行为监测 AI。你的任务是分析固定摄像头的视频，检测青少年头部姿态（俯仰角）和手持设备姿势，判断是否正在低头看手机或玩游戏。统计单次连续低头时长和每日累计时长，当超过阈值时输出温和、尊重的提醒，并区分写作业 / 看书 / 网课等正常学习行为不计入沉迷时长。不要提供医疗诊断，仅输出基于视觉的行为统计。**\n\n## 任务目标\n\n- 本 Skill 用于：基于家庭/自习室/学校固定摄像头视频，识别头部俯仰角（> 45° 视为低头看屏幕）+ 手部抓握设备姿态（手机/平板/掌机）+ 手臂弯曲 → 区分 `looking_at_screen` / `normal_reading` / `writing` / `lifting_head` / `other` 姿态 → 统计单次连续低头时长 + 日累计时长 + 段次数 + 最长单段 + 夜间时长 → 输出 4 档沉迷等级（normal / mild / notable / heavy）+ 友好提醒 + 给家长的日报摘要\n- 能力包含：人体关键点 + 头部姿态估计（pitch 角）、手部抓握检测、手臂弯曲姿态判定、设备边界框检测（参考）、姿态状态多分类（含 normal_reading / writing 排除项）、连续低头时长统计、日累计/段次数/最长单段/夜间时长统计、单次阈值（30 min / 60 min）与日累计阈值（2 h / 4 h）双触发、夜间熬夜玩屏幕提醒（22:00-06:00 ≥ 30 min）、温和友好提醒文本生成、家长日报摘要、温和动作建议（push_eye_break / push_parent_notice / suggest_outdoor_activity / suggest_bedtime / observe_only）\n- 触发条件:\n    1. **默认触发**：当用户提供家庭/自习室/学校固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行青少年沉迷手机/游戏行为识别\n    2. 当用户明确提及孩子沉迷手机、孩子玩游戏太久、低头看屏幕、护眼提醒、青少年熬夜玩游戏、家长干预、用眼健康等关键词，并且上传了视频文件\n    3. 当用户提及以下关键词时，**自动触发历史报告查询功能**\n       ：查看孩子沉迷手机历史报告、青少年屏幕时长报告清单、家长日报清单、查询历史沉迷行为记录、显示所有屏幕沉迷分析报告、显示青少年用眼健康报告，查询沉迷行为预警清单\n- 自动行为：\n    1. 如果用户上传了附件或者视频文件，则自动保存为本地文件\n    2. **⚠️ 强制数据获取规则（次高优先级）**：如果用户触发任何历史报告查询关键词（如\"查看所有青少年屏幕沉迷报告\"、\"\n       显示所有家长日报\"、\"\n       查看历史报告\"等），**必须**：\n        - 直接使用 `python -m scripts.smyx_teen_screen_addiction_detection_analysis --list --open-id` 参数调用 API\n          查询云端的历史报告数据\n        - **严格禁止**：从本地 memory 目录读取历史会话信息、严格禁止手动汇总本地记录中的报告、严格禁止从长期记忆中提取报告\n        - **必须统一**从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果\n\n## 前置准备\n\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 操作步骤\n\n### 🔒 open-id 获取流程控制（强制执行，防止遗漏）\n\n**在执行青少年沉迷手机/游戏行为识别前，必须按以下优先级顺序获取 open-id：**\n\n```\n第 1 步：【最高优先级】检查技能所在目录的配置文件（优先）\n        路径：skills/smyx_common/scripts/config.yaml（相对于技能根目录）\n        完整路径示例：${OPENCLAW_WORKSPACE}/skills/{当前技能目录}/skills/smyx_common/scripts/config.yaml\n        → 如果文件存在且配置了 api-key 字段，则读取 api-key 作为 open-id\n        ↓ (未找到/未配置/api-key 为空)\n第 2 步：检查 workspace 公共目录的配置文件\n        路径：${OPENCLAW_WORKSPACE}/skills/smyx_common/scripts/config.yaml\n        → 如果文件存在且配置了 api-key 字段，则读取 api-key 作为 open-id\n        ↓ (未找到/未配置)\n第 3 步：检查用户是否在消息中明确提供了 open-id\n        ↓ (未提供)\n第 4 步：❗ 必须暂停执行，明确提示用户提供用户名或手机号作为 open-id\n```\n\n**⚠️ 关键约束：**\n\n- **禁止**自行假设,自行推导,自行生成 open-id 值（如 openclaw-control-ui、default、userC113、user123 等）\n- **禁止**跳过 open-id 验证直接调用 API\n- **必须**在获取到有效 open-id 后才能继续执行分析\n- 如果用户拒绝提供 open-id，说明用途（用于保存和查询历史报告记录），并询问是否继续\n\n---\n\n- 标准流程:\n    1. **准备家庭/自习室/学校固定摄像头视频输入**\n        - 提供本地视频路径或网络 URL，建议时长 ≥ 30 分钟以稳定统计单次连续低头\n        - 摄像头建议：家庭书房 / 青少年卧室 / 自习室 / 学校教室固定摄像头，**侧面或斜侧上半身**视角（便于计算头部俯仰角与手臂姿态）\n        - 帧率 ≥ 5 FPS（推荐 10 FPS）、分辨率 ≥ 480p、光照稳定（夜间偷玩场景需红外补光）\n        - 多人场景需按目标跟踪，避免身份串扰\n        - 隐私敏感场景必须启用人体轮廓 + 面部马赛克模式\n        - 可选附带：青少年姓名 / 年龄、阈值覆盖（单次 / 日累计 / 夜间）、写作业时段白名单\n    2. **获取 open-id（强制执行）**\n        - 按上述流程控制获取 open-id\n        - 如无法获取，必须提示用户提供用户名或手机号\n    3. **执行青少年沉迷手机/游戏行为识别**\n        - 调用 `-m scripts.smyx_teen_screen_addiction_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**）\n        - 参数说明:\n            - `--input`: 本地家庭/自习室/学校固定摄像头视频文件路径\n            - `--url`: 网络家庭/自习室/学校固定摄像头视频 URL 地址（API 服务自动下载）\n            - `--pet-type`: 类别标识，青少年健康行为监测场景默认 `other`\n            - `--open-id`: 当前用户的 open-id（必填，按上述流程获取）\n            - `--list`: 显示青少年沉迷手机/游戏行为识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围）\n            - `--api-key`: API 访问密钥（可选）\n            - `--api-url`: API 服务地址（可选，使用默认值）\n            - `--detail`: 输出详细程度（basic/standard/json，默认 json）\n            - `--output`: 结果输出文件路径（可选）\n    4. **查看分析结果**\n        - 接收结构化的青少年沉迷手机/游戏行为识别报告\n        - 包含：时间窗（time_window）、画面中人数（subject_count）、当前姿态（current_posture：looking_at_screen / normal_reading / writing / lifting_head / other）、头部俯仰角（head_pitch_angle_deg）、手部抓握设备（hand_holding_device_detected）、当前连续低头时长（current_continuous_screen_min）、当日累计看屏幕总时长（daily_total_screen_min）、独立看屏幕段次数（session_count_today）、最长单段（longest_session_today_min）、夜间看屏幕时长（night_screen_minutes）、沉迷等级（addiction_level：normal / mild / notable / heavy）、设备类型猜测（dominant_device_guess：phone / tablet / handheld_console / unknown，仅用于提示文案）、提醒类型（alert_type：looking_too_long_session / looking_too_long_critical / addiction_warning / addiction_critical / late_night_warning / normal）、提醒级别（alert_level：info / notice / warning）、友好提醒（friendly_reminder，如\"宝贝，你已经连续看屏幕 45 分钟了，眼睛该休息啦~ 起来走 3 分钟、看看 6 米外的窗外吧\"）、家长日报摘要（parent_summary，如\"今日累计看屏幕 2 小时 35 分（已超 2 小时阈值），最长单段 52 分钟，建议在饭后约定 30 分钟亲子户外散步\"）、建议动作（recommend_action：push_eye_break / push_parent_notice / suggest_outdoor_activity / suggest_bedtime / observe_only）\n        - **重要提示**：仅输出基于视觉的客观姿态与时长统计与温和家庭提醒，**不构成游戏成瘾的精神医学诊断**；任何疑似行为成瘾的判定与干预必须由专业心理医生评估制定\n\n## 资源索引\n\n- 必要脚本：见 [scripts/smyx_teen_screen_addiction_detection_analysis.py](scripts/smyx_teen_screen_addiction_detection_analysis.py)(\n  用途：调用 API 进行青少年沉迷手机/游戏行为识别，本地文件上传，网络 URL 由 API 服务自动下载)\n- 配置文件：见 [scripts/config.py](scripts/config.py)(用途：配置 API 地址、默认参数和场景码)\n- 领域参考：见 [references/api_doc.md](references/api_doc.md)(何时读取：需要了解 API 接口规范、姿态阈值/单次与日累计阈值/写作业排除项与红线约束和错误码时)\n\n## 注意事项\n\n- 仅在需要时读取参考文档，保持上下文简洁\n- 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：侧面/斜侧上半身视角，可观察头部俯仰角与手臂姿态\n- API 密钥可选，如果通过参数传入则必须确保调用鉴权成功，否则忽略鉴权\n- **必须**正确区分写作业 / 看书 / 网课（前方有书本/课本、头部朝下但角度多在 30-45° 之间）与\"低头看屏幕\"，避免将正常学习行为误报为沉迷\n- 短时低头取物、写字时短暂低头等情形不应计入连续低头段；建议连续 ≥ 5 分钟才计为 1 段\n- 红线约束：**禁止**输出\"游戏成瘾症\"等精神医学诊断或量表评分；**禁止**长期存储青少年原始视频；**禁止**未经监护人同意将数据提供给学校或第三方；**禁止**使用强惩罚性语言\n- 涉及未成年人，必须取得**监护人 + 青少年本人**双重知情同意；建议提前与孩子沟通用途与边界，避免成为家庭冲突导火索\n- 友好提醒文案统一使用**温和、尊重、可执行**的措辞（如\"眼睛该休息啦~ 起来走 3 分钟\"），**避免**指责性表达\n- 禁止临时生成脚本，只能用技能本身的脚本\n- 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载\n- 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段 reportImageUrl 作为超链接地址，且自动转化为如下 Markdown\n  表格格式输出，包含\"\n  报告名称\"、\"沉迷等级/累计时长/最长单段\"、\"分析时间\"、\"点击查看\"四列，其中\"报告名称\"列使用`青少年屏幕沉迷报告-{记录id}`形式拼接, \"点击查看\"\n  列使用\n  `[🔗 查看报告](reportImageUrl)`\n  格式的超链接，用户点击即可直接跳转到对应的完整报告页面。\n- 表格输出示例：\n  | 报告名称 | 沉迷等级/累计时长/最长单段 | 分析时间 | 点击查看 |\n  |----------|----------|----------|----------|\n  | 青少年屏幕沉迷报告-20260312172200001 | notable / 日累计 2h35m / 最长 52min | 2026-03-12 17:22:00 | [🔗 查看报告](https://example.com/report?id=xxx) |\n\n## 使用示例\n\n```bash\n# 分析本地青少年使用屏幕视频（以下只是示例，禁止直接使用openclaw-control-ui 作为 open-id）\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input /path/to/study_room.mp4 --open-id your-open-id\n\n# 分析网络青少年使用屏幕视频（以下只是示例，禁止直接使用openclaw-control-ui 作为 open-id）\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --url https://example.com/study_room.mp4 --open-id your-open-id\n\n# 显示历史青少年沉迷手机/游戏报告（自动触发关键词：查看孩子沉迷手机历史报告、家长日报清单等）\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --list --open-id your-open-id\n\n# 输出精简报告\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --open-id your-open-id --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --open-id your-open-id --output result.json\n```\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-teen-screen-addiction-detection-analysis\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1779861638875\n}\n\nFile v1.0.0:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放青少年沉迷手机/游戏行为识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动青少年沉迷手机/游戏行为识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取低头时长统计 + 沉迷等级 + 健康提醒\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史沉迷行为记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_TEEN_SCREEN_ADDICTION_DETECTION_ANALYSIS` - 青少年沉迷手机/游戏行为识别\n\n## 输入约束\n\n- 摄像头：家庭书房 / 青少年卧室 / 自习室 / 学校教室固定摄像头，能拍到**侧面或斜侧上半身**（便于计算头部俯仰角与手臂姿态）\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p；光照稳定（含夜间偷玩场景需红外补光）\n- 视频时长建议 ≥ 30 分钟，过短样本无法统计\"单次连续低头\"\n- 多人场景需按目标跟踪，避免身份串扰（家庭成员/同学）\n- 隐私敏感场景必须启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n### 姿态识别\n- `head_pitch_angle_deg` - 头部俯仰角（向下为正，> 45° 视为\"低头看屏幕\"姿态）\n- `hand_holding_device_detected` - 是否检测到手部抓握设备（手机/平板/掌机）+ 手臂弯曲姿态\n- `device_in_view_box` - 设备在视野中的边界框（参考指标）\n- `posture_state` - 当前姿态状态（looking_at_screen / normal_reading / writing / lifting_head / other）\n\n### 时长统计\n- `current_continuous_screen_min` - 当前连续低头看屏幕时长（分钟）\n- `daily_total_screen_min` - 当日累计看屏幕总时长（分钟）\n- `session_count_today` - 当日累计独立看屏幕段次数（≥ 5 分钟视为 1 段）\n- `longest_session_today_min` - 当日最长单段时长\n- `night_screen_minutes` - 夜间（22:00-06:00）看屏幕时长（参考指标，潜在熬夜）\n\n## 阈值与等级（默认值，可在配置中覆盖）\n\n- 单次连续 ≥ **30 分钟** → 建议起身休息（looking_too_long_session）\n- 单次连续 ≥ **60 分钟** → 强烈建议起身休息（looking_too_long_critical）\n- 日累计 ≥ **2 小时** → 沉迷预警（addiction_warning）\n- 日累计 ≥ **4 小时** → 沉迷重度预警（addiction_critical）\n- 夜间（22:00-06:00）≥ **30 分钟** → 熬夜玩屏幕提醒（late_night_warning）\n- 写作业 / 看书 / 网课（前方有书本 + 头部朝下但角度 < 45°）应识别为 `normal_reading` 或 `writing`，**不计入沉迷时长**\n\n## 输出字段（参考）\n\n- `time_window` / `subject_count`（仅本场景，**禁止跨场景身份关联**）\n- `current_posture` / `head_pitch_angle_deg` / `hand_holding_device_detected`\n- `current_continuous_screen_min` / `daily_total_screen_min` / `session_count_today` / `longest_session_today_min` / `night_screen_minutes`\n- `addiction_level` - 沉迷等级（normal / mild / notable / heavy）\n- `dominant_device_guess` - 设备类型猜测（phone / tablet / handheld_console / unknown，**仅用于提示文案，不做识别留存**）\n- `alert_type` - 提醒类型（looking_too_long_session / looking_too_long_critical / addiction_warning / addiction_critical / late_night_warning / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `friendly_reminder` - 友好提醒文本（如\"宝贝，你已经连续看屏幕 45 分钟了，眼睛该休息啦~ 起来走 3 分钟、看看 6 米外的窗外吧\"）\n- `parent_summary` - 给家长的日报摘要（如\"今日累计看屏幕 2 小时 35 分（已超 2 小时阈值），最长单段 52 分钟，建议在饭后约定 30 分钟亲子户外散步\"）\n- `recommend_action` - 建议动作（push_eye_break / push_parent_notice / suggest_outdoor_activity / suggest_bedtime / observe_only）\n\n## 强制约束与红线\n\n- ❌ **禁止**输出\"游戏成瘾症\"等精神医学诊断或量表评分\n- ❌ **禁止**长期存储青少年原始视频\n- ❌ **禁止**未经监护人同意便将数据提供给学校、机构或第三方\n- ❌ **禁止**使用强惩罚性语言（如\"再玩就没饭吃\"），统一使用**温和、尊重、可执行**的建议\n- ✅ 涉及未成年人，必须取得**监护人 + 青少年本人**双重知情同意；建议提前与孩子沟通用途与边界\n- ✅ 写作业 / 看书 / 网课场景必须正确归类，**不得**将正常学习行为误报为\"沉迷\"\n\n> 仅输出基于视觉的客观姿态与时长统计与温和家庭提醒，**不构成游戏成瘾的精神医学诊断**；任何疑似行为成瘾的判定与干预必须由专业心理医生评估制定。\n\nFile v1.0.0:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口地址\n\n`POST https://your-api-server.com/api/v1/common-analysis`\n\n## 请求头\n\n| 字段           | 必选 | 说明                            |\n|--------------|----|-------------------------------|\n| X-API-Key    | 是  | API访问密钥                       |\n| Content-Type | 是  | 文件上传或 application/json（URL模式） |\n\n## 请求参数\n\n### 1. 文件上传模式\n\n| 字段           | 类型     | 必选 | 说明                                    |\n|--------------|--------|----|---------------------------------------|\n| video        | file   | 是  | MP4视频文件                               |\n| detail_level | string | 否  | 输出详细程度：basic/standard/full，默认standard |\n\n### 2. URL模式\n\n| 字段           | 类型     | 必选 | 说明                                    |\n|--------------|--------|----|---------------------------------------|\n| video_url    | string | 是  | 可公开访问的视频URL                           |\n| detail_level | string | 否  | 输出详细程度：basic/standard/full，默认standard |\n\n## 响应格式\n\n```json\n{\n  \"code\": 200,\n  \"message\": \"success\",\n  \"data\": {\n    \"analysis_time\": \"2026-03-10 15:30:00\",\n    \"face_detection\": {\n      \"status\": \"success\",\n      \"face_count\": 1,\n      \"quality_score\": 95\n    },\n    \"diagnosis\": {\n      \"overall_constitution\": \"平和质\",\n      \"organ_condition\": {\n        \"liver\": \"正常\",\n        \"heart\": \"轻微火旺\",\n        \"spleen\": \"略虚\",\n        \"lung\": \"正常\",\n        \"kidney\": \"正常\"\n      },\n      \"color_analysis\": {\n        \"complexion\": \"微黄\",\n        \"correspondence\": \"脾胃功能略弱\"\n      }\n    },\n    \"health_warnings\": [\n      \"注意休息，避免熬夜\"\n    ],\n    \"suggestions\": [\n      \"饮食清淡，减少辛辣食物摄入\"\n    ]\n  }\n}\n```\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.0:scripts/config.yaml\n\n{}\n\nFile v1.0.0:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.0: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.0: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.0:skills/smyx_common/scripts/config.yaml\n\nenv: prod\n\nApiEnum:\n  api-key:\n  api-secret-key:\n  database-url:\n  base-url-open-api: \"https://open.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitor.lifeemergence.com\"\n  base-url-health: \"https://lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: false\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: \"XIAN_ZHAO_GAN_ZHI\"\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret:\n  default--skill-platform-name: ARK_CLAW\n\nFile v1.0.0:skill-card.md\n\n## Description: <br>\nAnalyzes fixed-camera video to estimate adolescent screen-use posture and duration, classify phone or game screen behavior, and produce structured reminders and reports for guardians. <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>\nExternal users and developers use this skill to analyze home, study-room, or school camera video for teen screen-looking posture, cumulative duration, threshold-based alerts, and guardian-facing daily summaries. The outputs are behavioral observations and reminders, not medical diagnoses. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Sensitive teen-monitoring video, identifiers, account, history, and health-analysis behavior may be sent to a remote service with under-disclosed handling. <br>\nMitigation: Confirm the remote API operator, transmitted data, storage location, retention and deletion process, account behavior, and guardian plus adolescent consent before installation or use. <br>\nRisk: Behavioral outputs could be mistaken for a medical or psychiatric diagnosis. <br>\nMitigation: Use outputs only as visual behavior statistics and family reminders; route suspected behavioral addiction concerns to qualified professionals. <br>\nRisk: The artifact declares an invalid `yaml` dependency that may prevent installation or create dependency confusion. <br>\nMitigation: Replace `yaml` with the intended maintained package before installation. <br>\n\n\n## Reference(s): <br>\n- [API 接口文档](references/api_doc.md) <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/smyx-teen-screen-addiction-detection-analysis) <br>\n- [Publisher profile](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [analysis, markdown, json, shell commands, guidance] <br>\n**Output Format:** [Markdown summaries with structured JSON analysis fields and optional report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include posture classifications, screen-time durations, alert levels, friendly reminders, parent summaries, recommended actions, and history tables.] <br>\n\n## Skill Version(s): <br>\n1.0.0 (source: frontmatter and server release evidence) <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.0:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.0:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3","readmeExcerpt":"Skill: Teen Phone / Game Screen Addiction Detection | 青少年沉迷手机/游戏行为识别 Owner: smyx-sunjinhui Summary: Using fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.smyx_teen_screen_addiction_detection_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地青少年使用屏幕视频\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input /path/to/study_room.mp4\n\n# 分析网络青少年使用屏幕视频\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --url https://example.com/study_room.mp4\n\n# 显示历史青少年沉迷手机/游戏报告（自动触发关键词：查看孩子沉迷手机历史报告、家长日报清单等）\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --output result.json"},{"language":"bash","snippet":"python -m scripts.smyx_teen_screen_addiction_detection_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地青少年使用屏幕视频\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input /path/to/study_room.mp4\n\n# 分析网络青少年使用屏幕视频\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --url https://example.com/study_room.mp4\n\n# 显示历史青少年沉迷手机/游戏报告（自动触发关键词：查看孩子沉迷手机历史报告、家长日报清单等）\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_teen_screen_addiction_detection_analysis --input sr.mp4 --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"smyx-teen-screen-addiction-detection-analysis\"\ndescription: \"Using fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。\"\nversion: \"1.0.16\"\nlicense: \"MIT-0\"\n---\n\n# 📱 Teen Phone / Game Screen Addiction Detection | 青少年沉迷手机/游戏行为识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **青少年沉迷手机/游戏行为识别** |\n| 🎯 核心目标 | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_TEEN_SCREEN_ADDICTION_DETECTION_ANALYSIS` |\n\nUsing fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. When continuous screen-looking exceeds a configured threshold (e.g., single session > 30 minutes, or daily total > 2 hours), a 'phone/game addiction' reminder is generated, suggesting parental guidance and healthy eye-use habits. This helps prevent adolescent myopia, cervical-spine issues and gaming addiction. Application scenarios: family study, adolescent bedroom, study rooms, school classrooms. The system monitors in real time and pushes reminders via mobile APP or links to smart devices to issue voice prompts when over-time use is detected. Skill features: long head-down phone use among adolescents easily causes myopia, cervical-spine disease and social barriers. AI auto-monitoring and reminders help parents objectively understand their child's eye-use habits, enabling timely intervention and protecting vision. Can be integrated into smart-home cameras or family-education APPs as a practical family-health management tool.\n\n通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。该技能有助于预防青少年近视、颈椎问题及游戏成瘾。应用场景：家庭书房、青少年卧室、自习室、学校教室。系统实时监测，当沉迷行为超时时通过手机APP推送提醒或联动智能设备发出语音提示。技能特点：青少年长时间低头看手机，易导致近视、颈椎病、社交障碍等。通过AI自动监测并提醒，可帮助家长客观了解孩子用眼习惯，及时干预，保护视力健康。该技能可集成到智能家居摄像头或家庭教育APP中，成为家庭健康管理的实用工具。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的青少年健康行为监测 AI。你的任务是分析固定摄像头的视频，检测青少年头部姿态（俯仰角）和手持设备姿势，判断是否正在低头看手机或玩游戏。统计单次连续低头时长和每日累计时长，当超过阈值时输出温和、尊重的提醒，并区分写作业 / 看书 / 网课等正常学习行为不计入沉迷时长。不要提供医疗诊断，仅输出基于视觉的行为统计。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭/自习室/学校固定摄像头视频，识别头部俯仰角（> 45° 视为低头看屏幕）+"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-teen-screen-addiction-detection-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1790613453479\n}"},{"path":"references/api_doc.md","content":"# API 接口文档\n\n此处用于存放青少年沉迷手机/游戏行为识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动青少年沉迷手机/游戏行为识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取低头时长统计 + 沉迷等级 + 健康提醒\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史沉迷行为记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_TEEN_SCREEN_ADDICTION_DETECTION_ANALYSIS` - 青少年沉迷手机/游戏行为识别\n\n## 输入约束\n\n- 摄像头：家庭书房 / 青少年卧室 / 自习室 / 学校教室固定摄像头，能拍到**侧面或斜侧上半身**（便于计算头部俯仰角与手臂姿态）\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p；光照稳定（含夜间偷玩场景需红外补光）\n- 视频时长建议 ≥ 30 分钟，过短样本无法统计\"单次连续低头\"\n- 多人场景需按目标跟踪，避免身份串扰（家庭成员/同学）\n- 隐私敏感场景必须启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n### 姿态识别\n- `head_pitch_angle_deg` - 头部俯仰角（向下为正，> 45° 视为\"低头看屏幕\"姿态）\n- `hand_holding_device_detected` - 是否检测到手部抓握设备（手机/平板/掌机）+ 手臂弯曲姿态\n- `device_in_view_box` - 设备在视野中的边界框（参考指标）\n- `posture_state` - 当前姿态状态（looking_at_screen / normal_reading / writing / lifting_head / other）\n\n### 时长统计\n- `current_continuous_screen_min` - 当前连续低头看屏幕时长（分钟）\n- `daily_total_screen_min` - 当日累计看屏幕总时长（分钟）\n- `session_count_today` - 当日累计独立看屏幕段次数（≥ 5 分钟视为 1 段）\n- `longest_session_today_min` - 当日最长单段时长\n- `night_screen_minutes` - 夜间（22:00-06:00）看屏幕时长（参考指标，潜在熬夜）\n\n## 阈值与等级（默认值，可在配置中覆盖）\n\n- 单次连续 ≥ **30 分钟** → 建议起身休息（looking_too_long_session）\n- 单次连续 ≥ **60 分钟** → 强烈建议起身休息（looking_too_long_critical）\n- 日累计 ≥ **2 小时** → 沉迷预警（addiction_warning）\n- 日累计 ≥ **4 小时** → 沉迷重度预警（addiction_critical）\n- 夜间（22:00-06:00）≥ **30 分钟** → 熬夜玩屏幕提醒（late_night_warning）\n- 写作业 / 看书 / 网课（前方有书本 + 头部朝下但角度 < 45°）应识别为 `normal_reading` 或 `writing`，**不计入沉迷时长**\n\n## 输出字段（参考）\n\n- `time_window` / `subject_count`（仅本场景，**禁止跨场景身份关联**）\n- `current_posture` / `head_pitch_angle_deg` / `hand_holding_device_detected`\n- `current_continuous_screen_min` / `daily_total_screen_min` / `session_count_today` / `longest_session_today_min` / `night_screen_minutes`\n- `addiction_level` - 沉迷等级（normal / mild / notable / heavy）\n- `dominant_device_guess` - 设备类型猜测（phone / tablet / handheld_console / unknown，**仅用于提示文案，不做识别留存**）\n- `alert_type` - 提醒类型（looking_too_long_session / looking_too_long_critical / addiction_warning / addiction_critical / late_night_warning / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `friendly_reminder` - 友好提醒文本（如\"宝贝，你已经连续看屏幕 45 分钟了，眼睛该休息啦~ 起来走 3 分钟、看看 6 米外的窗外吧\"）\n- `parent_summary` - 给家长的日报摘要（如\"今日累计看屏幕 2 小时 35 分（已超 2 小时阈值），最长单段 52 分钟，建议在饭后约定 30 分钟亲子户外散步\"）\n- `recommend_action` - 建议动作（push_eye_break / push_parent_notice / suggest_outdoor_activity / suggest_bedtime / observe_only）\n\n## 强制约束与红线\n\n- ❌ **禁止**输出\"游戏成瘾症\"等精神医学诊断或量表评分\n- ❌ **禁止**长期存储青少年原始视频\n- ❌ **禁止**未经监护人同意便将数据提供给学校、机构或第三方\n- ❌ **禁止**使用强惩罚性语言（如\"再玩就没饭吃\"），统一使用**温和、尊重、可执行**的建议\n- ✅ 涉及未成年人，必须取得**监护人 + 青少年本人**双重知情同意；建议提前与孩子沟通用途与边界\n- ✅ 写作业 / 看书 / 网课场景必须正确归类，**不得**将正常学习行为误报为\"沉迷\"\n\n> 仅输出基于视觉的客观姿态与时长统计与温和家庭提醒，**不构成游戏成瘾的精神医学诊断**；任何疑似行为成瘾的判定与干预必须由专业心理医生评估制定。"},{"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":"Using fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角大于45°）以及手持设备的姿态（手部抓握且手臂弯曲），统计每日累计低头看屏幕的时长。当连续低头时长超过设定阈值（如单次超过30分钟，或日累计超过2小时）时，输出'沉迷手机/游戏'提醒，建议家长干预并引导健康用眼习惯。 Skill: Teen Phone / Game Screen Addiction Detection | 青少年沉迷手机/游戏行为识别 Owner: smyx-sunjinhui Summary: Using fixed cameras at home, study rooms or schools, the system analyzes adolescents' posture while using phones or gaming devices: head pitch angle (downward > 45°) and hand-holding-device posture (hand grasp + bent arm). It counts daily cumulative screen-looking time. | 通过家庭、自习室或学校固定摄像头，分析青少年使用手机或游戏设备的姿势，检测头部低垂角度（俯仰角","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1310,"uniquenessScore":46,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T05:56:25.586Z","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-11T05:56:25.586Z","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-11T08:46:29.306Z","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"}]}}}