{"id":"ec0c8eff-e17c-4e21-b5e3-145233aea4c0","entityType":"agent","slug":"clawhub-18072937735-smyx-child-poor-posture-detection-analysis","name":"Child Poor Posture (Hunchback / Head Tilt) Real-Time Reminder | 儿童坐姿不良（驼背/歪头）实时提醒","canonicalUrl":"https://www.xpersona.co/agent/clawhub-18072937735-smyx-child-poor-posture-detection-analysis","canonicalPath":"/agent/clawhub-18072937735-smyx-child-poor-posture-detection-analysis","generatedAt":"2026-10-10T04:58:01.152Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T22:49:22.159Z","emptyReason":null},"description":"Using the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.9K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-child-poor-posture-detection-analysis","sourceUrl":"https://clawhub.ai/18072937735/smyx-child-poor-posture-detection-analysis","homepage":"https://clawhub.ai/18072937735/skills/smyx-child-poor-posture-detection-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/18072937735/smyx-child-poor-posture-detection-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/18072937735/skills/smyx-child-poor-posture-detection-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":66,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Child Poor Posture (Hunchback / Head Tilt) Real-Time Reminder | 儿童坐姿不良（驼背/歪头）实时提醒 technical dossier on Xpersona with agent coverage, OPENCLEW support, and live "},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T22:49:22.159Z","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-09T22:49:22.159Z","emptyReason":null},"stars":null,"forks":null,"downloads":1931,"packageName":null,"latestVersion":"1.0.13","tractionLabel":"1.9K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T22:49:22.159Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T22:49:22.159Z","lastCrawledAt":"2026-10-09T22:49:22.159Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T22:49:22.159Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.13","createdAt":"2026-10-03T14:35:25.973Z","changelog":"- Updated version to 1.0.15 in skill metadata. - SKILL.md updated; no changes to functional description, instructions, or workflow detected. - Removed skill-card.md file.","fileCount":31,"zipByteSize":40421},{"version":"1.0.12","createdAt":"2026-09-22T08:08:26.636Z","changelog":"- Updated version to 1.0.13. - Removed the outdated skill-card.md file. - Made minor updates in configuration and documentation (SKILL.md) for clarity and maintenance.","fileCount":31,"zipByteSize":40564},{"version":"1.0.11","createdAt":"2026-09-07T21:32:28.412Z","changelog":"- Version bumped from 1.0.10 to 1.0.12 in SKILL.md. - Minor documentation updates; no functional or feature changes indicated. - Removed redundant file: skill-card.md.","fileCount":31,"zipByteSize":40645},{"version":"1.0.10","createdAt":"2026-08-26T22:33:30.329Z","changelog":"- Removed the file skill-card.md from the skill package. - No changes to core functionality or user-facing features. - Documentation and script structure remain unchanged.","fileCount":31,"zipByteSize":40495},{"version":"1.0.9","createdAt":"2026-08-19T07:34:29.800Z","changelog":"- Updated skill version to 1.0.10. - Modified configuration and documentation files. - Removed deprecated file: skill-card.md. - No changes to core functionality or interfaces.","fileCount":31,"zipByteSize":40562},{"version":"1.0.8","createdAt":"2026-08-13T04:13:33.516Z","changelog":"- Version updated to 1.0.9. - Documentation updated in SKILL.md, reflecting the new version and possibly minor content adjustments. - Obsolete or unnecessary documentation file skill-card.md has been removed. - No changes to code or functionality—this release is documentation and metadata only.","fileCount":31,"zipByteSize":40518},{"version":"1.0.7","createdAt":"2026-08-03T19:13:35.544Z","changelog":"- Removed the file: skill-card.md - No changes to logic, features, or documentation content in this version. - Package structure slightly simplified by eliminating redundant documentation.","fileCount":31,"zipByteSize":40517},{"version":"1.0.6","createdAt":"2026-08-01T18:39:39.810Z","changelog":"- Updated SKILL.md to increment the version to 1.0.7 and reflect the latest documentation. - Removed the file skill-card.md. - No changes to core logic or APIs; documentation and versioning updates only.","fileCount":31,"zipByteSize":40639}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-child-poor-posture-detection-analysis","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-child-poor-posture-detection-analysis` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/18072937735/smyx-child-poor-posture-detection-analysis before using production credentials."],"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-18072937735-smyx-child-poor-posture-detection-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-poor-posture-detection-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-poor-posture-detection-analysis/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-poor-posture-detection-analysis/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-poor-posture-detection-analysis/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-poor-posture-detection-analysis/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T04:58:01.149Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-poor-posture-detection-analysis/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-poor-posture-detection-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-poor-posture-detection-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-poor-posture-detection-analysis/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T22:49:22.159Z","emptyReason":null},"readme":"Skill: Child Poor Posture (Hunchback / Head Tilt) Real-Time Reminder | 儿童坐姿不良（驼背/歪头）实时提醒\n\nOwner: 18072937735\n\nSummary: Using the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。\n\nTags: latest:1.0.13\n\nVersion history:\n\nv1.0.13 | 2026-10-03T14:35:25.973Z | auto\n\n- Updated version to 1.0.15 in skill metadata.\n- SKILL.md updated; no changes to functional description, instructions, or workflow detected.\n- Removed skill-card.md file.\n\nv1.0.12 | 2026-09-22T08:08:26.636Z | auto\n\n- Updated version to 1.0.13.\n- Removed the outdated skill-card.md file.\n- Made minor updates in configuration and documentation (SKILL.md) for clarity and maintenance.\n\nv1.0.11 | 2026-09-07T21:32:28.412Z | auto\n\n- Version bumped from 1.0.10 to 1.0.12 in SKILL.md.\n- Minor documentation updates; no functional or feature changes indicated.\n- Removed redundant file: skill-card.md.\n\nv1.0.10 | 2026-08-26T22:33:30.329Z | auto\n\n- Removed the file skill-card.md from the skill package.\n- No changes to core functionality or user-facing features.\n- Documentation and script structure remain unchanged.\n\nv1.0.9 | 2026-08-19T07:34:29.800Z | auto\n\n- Updated skill version to 1.0.10.\n- Modified configuration and documentation files.\n- Removed deprecated file: skill-card.md.\n- No changes to core functionality or interfaces.\n\nv1.0.8 | 2026-08-13T04:13:33.516Z | auto\n\n- Version updated to 1.0.9.\n- Documentation updated in SKILL.md, reflecting the new version and possibly minor content adjustments.\n- Obsolete or unnecessary documentation file skill-card.md has been removed.\n- No changes to code or functionality—this release is documentation and metadata only.\n\nv1.0.7 | 2026-08-03T19:13:35.544Z | auto\n\n- Removed the file: skill-card.md\n- No changes to logic, features, or documentation content in this version.\n- Package structure slightly simplified by eliminating redundant documentation.\n\nv1.0.6 | 2026-08-01T18:39:39.810Z | auto\n\n- Updated SKILL.md to increment the version to 1.0.7 and reflect the latest documentation.\n- Removed the file skill-card.md.\n- No changes to core logic or APIs; documentation and versioning updates only.\n\nv1.0.5 | 2026-07-15T03:07:29.841Z | auto\n\n- Removed the file: skill-card.md.\n- No changes to skill functionality or documentation content.\n- Maintenance update to remove redundant or unnecessary files from the repository.\n\nv1.0.4 | 2026-07-10T17:09:34.752Z | auto\n\n- Updated version to 1.0.4 in SKILL.md with no changes to features or interface.\n- Removed the outdated file: skill-card.md.\n- General maintenance update; no new features added.\n\nv1.0.3 | 2026-07-01T21:07:32.775Z | auto\n\n- Updated internal scripts: `dao.py` and `util.py` in the `skills/smyx_common/scripts` directory.\n- Removed the file: `skill-card.md`.\n- No changes to user-facing functionality or documentation.\n\nv1.0.2 | 2026-06-27T22:44:39.922Z | auto\n\n- Improved user privacy: user identity handling is now fully automatic and internal; users are never asked for or shown any identity parameters.\n- Streamlined SKILL.md documentation: clarified workflow, strengths, system constraints, and expected outputs for both users and developers.\n- Enforced that all historical report queries use only the cloud API; local report aggregation and user-supplied IDs are no longer permitted.\n- Updated script and configuration references to align with new privacy and workflow requirements.\n- Removed outdated files and redundant parameters from user workflows.\n\nv1.0.1 | 2026-06-18T08:10:35.123Z | auto\n\n- Updated open-id retrieval logic to prioritize scripts/config.yaml in the skill root directory.\n- Simplified config file lookup: first check `scripts/config.yaml` (skill directory), then the workspace common directory.\n- Added MIT-0 license field.\n- Removed obsolete skill-card.md file.\n- No changes to detection logic or API parameters.\n\nv1.0.0 | 2026-05-25T14:17:07.640Z | auto\n\nInitial release.\n\n- Real-time analysis of children's sitting posture using camera input, including estimation of spinal curvature (Cobb angle) and head tilt angle.\n- Triggers voice prompts when hunchback (Cobb >10°) or head tilt (>15°) persists beyond a defined threshold.\n- Generates structured posture reports with visual metrics and summary, sent to parents.\n- Includes strict open-id acquisition and validation process before any analysis or historical report queries.\n- Provides historical posture report listing via API, with results shown as Markdown tables containing report links.\n- Supports both local and network video inputs; can be integrated with smart desk lamps or study desks.\n\nArchive index:\n\nArchive v1.0.13: 31 files, 40421 bytes\n\nFiles: references/api_doc.md (2327b), scripts/__init__.py (56b), scripts/config.py (706b), scripts/config.yaml (3b), scripts/skill.py (598b), scripts/smyx_child_poor_posture_detection_analysis.py (3636b), skill-card.md (2190b), SKILL.md (12000b), 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 (162b)\n\nFile v1.0.13:SKILL.md\n\n---\nname: \"smyx-child-poor-posture-detection-analysis\"\ndescription: \"Using the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。\"\nversion: \"1.0.15\"\nlicense: \"MIT-0\"\n---\n\n# 🪑 Child Poor Posture (Hunchback / Head Tilt) Real-Time Reminder | 儿童坐姿不良（驼背/歪头）实时提醒\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童坐姿不良（驼背/歪头）实时提醒** |\n| 🎯 核心目标 | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` |\n\nUsing the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. When hunchback (Cobb > 10°) or head tilt (> 15°) persists longer than a preset threshold (e.g., 5 seconds), a voice prompt is triggered (e.g., 'sit up straight', 'lift your head'), helping children develop good posture habits and preventing myopia and scoliosis. Application scenarios: smart study lamps, home desks, school classrooms. The system monitors in real time, sends voice cues when posture deviates, and generates posture reports pushed to parents. Skill features: long-term poor posture in children can lead to myopia and scoliosis. AI real-time monitoring + voice prompts help children correct posture seamlessly and develop good habits. Can be integrated into smart desk lamps or study desks to boost product differentiation.\n\n通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。应用场景：智能学习台灯、家庭书桌、学校教室。系统实时监测，当坐姿异常时发出语音提示，并生成坐姿报告推送给家长。技能特点：儿童长期坐姿不良会导致近视、脊柱侧弯等问题。通过AI实时监测并语音提醒，可帮助儿童无感纠正姿态，养成良好习惯。该技能可集成到智能台灯或学习桌中，提升产品差异化竞争力。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康坐姿 AI。你的任务是分析儿童学习区域的实时视频，检测坐姿姿态，估算脊柱弯曲角度（Cobb 角）和头部倾斜角度。当驼背或歪头持续时间超过阈值时，输出语音提醒指令。不要提供医疗诊断或具体矫正训练方案，仅输出基于视觉的姿态分析结果与语音提醒指令。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能台灯/书桌摄像头视频，实时估算儿童脊柱弯曲与头部倾斜角度，超阈值触发语音提醒并汇总会话坐姿质量\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 儿童上半身检测 |\n| 2 | 姿态关键点估计 |\n| 3 | Cobb 角估算 |\n| 4 | 头部侧倾角 |\n| 5 | 双肩水平偏差 |\n| 6 | 眼睛-书面距离估算 |\n| 7 | 不良姿态类型分类（hunchback / head_tilt / forward_head / shoulder_asymmetry / too_close_to_desk） |\n| 8 | 持续时间判定（默认 5 秒） |\n| 9 | 语音提醒文本生成 |\n| 10 | 会话坐姿摘要 |\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_child_poor_posture_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_poor_posture_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_child_poor_posture_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_child_poor_posture_detection_analysis.py`](scripts/smyx_child_poor_posture_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；建议正对面部+上半身、≥ 15 FPS |\n| 🧑‍⚖️ 结果性质 | Cobb 角为视觉估算，与影像学测量存在偏差，仅供习惯纠正参考，不能替代脊柱侧弯医学评估 |\n| 🔏 隐私合规 | 隐私合规：儿童学习场景视频涉及未成年人隐私，使用前需取得监护人知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --input /path/to/posture.mp4\n\n# 分析网络儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --url https://example.com/posture.mp4\n\n# 显示历史坐姿不良识别报告（自动触发关键词：查看坐姿不良历史报告、坐姿监测报告清单等）\npython -m scripts.smyx_child_poor_posture_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --output result.json\n```\n\nFile v1.0.13:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-poor-posture-detection-analysis\",\n  \"version\": \"1.0.13\",\n  \"publishedAt\": 1791038125973\n}\n\nFile v1.0.13: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_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` - 儿童坐姿不良（驼背/歪头）实时提醒\n\n## 输入约束\n\n- 摄像头建议为智能台灯内置摄像头或书桌上方摄像头\n- 视野需覆盖儿童上半身（肩部至头部）\n- 视频帧率建议 ≥ 15 FPS；光照均匀，避免逆光\n\n## 关键观测指标\n\n- `cobb_angle_deg` - 脊柱弯曲角度估算（Cobb 角，°）\n- `head_tilt_deg` - 头部侧倾角度（°）\n- `shoulder_horizontal_offset_deg` - 双肩水平偏差（°）\n- `eye_to_desk_distance_cm` - 眼睛与书面距离（估算，cm）\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 驼背：Cobb 角 > 10°\n- 歪头：头部侧倾角 > 15°\n- 持续时长触发阈值：5 秒（hold_duration_threshold_sec）\n- 用眼距离过近：< 25 cm（建议触发\"距离过近\"提醒）\n\n## 不良姿态类型\n\n- `hunchback` - 驼背\n- `head_tilt` - 歪头\n- `forward_head` - 头部前伸\n- `shoulder_asymmetry` - 双肩不平\n- `too_close_to_desk` - 离书面过近\n\n## 输出字段（参考）\n\n- `child_detected` - 是否检测到儿童\n- `posture_metrics` - 姿态参数（cobb_angle_deg / head_tilt_deg / shoulder_horizontal_offset_deg / eye_to_desk_distance_cm）\n- `poor_posture_type` - 当前不良姿态类型\n- `hold_duration_sec` - 不良姿态持续秒数\n- `voice_prompt` - 语音提醒指令文本（如\"请坐直\"、\"头抬正\"、\"眼睛离书本远一点\"）\n- `event_time` - 事件时间戳\n- `snapshot_url` - 现场快照 URL\n- `summary` - 当次会话不良姿态统计（每类型次数/总持续时长）\n\n> 仅输出基于视觉的姿态分析结果与语音提醒指令，不提供医疗诊断或具体矫正训练方案。\n\nFile v1.0.13:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.13:scripts/config.yaml\n\n{}\n\nFile v1.0.13:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.13:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.13:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.13:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.13:skill-card.md\n\n## Description:\n\nAnalyzes children's seated posture in camera footage and provides estimated posture measurements, reminders, and report links.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nParents, guardians, and developers of study-area monitoring tools can analyze a child's posture video, receive reminder text, and view current or historical posture reports. Results are visual estimates, not medical diagnoses.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Children's posture media and report history are processed through Life Emergence cloud services.\n\nMitigation: Obtain guardian consent and confirm retention, deletion, and access controls for reports and snapshot links before use.\n\nRisk: The skill silently creates or reuses persistent user identities and stores tokens locally.\n\nMitigation: Review whether local token storage in the workspace database is acceptable and restrict access to that storage.\n\nRisk: Camera-derived spinal-angle estimates may be mistaken for clinical measurements.\n\nMitigation: Use results for posture reminders only, not diagnosis or treatment decisions.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/18072937735/skills/smyx-child-poor-posture-detection-analysis)\n- [Posture analysis API documentation](artifact/references/api_doc.md)\n- [Skill demonstration](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Analysis, Guidance, Report links]\n\n**Output Format:** [Text or Markdown containing structured results and links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Can save results to a file and present historical reports as a Markdown table.]\n\n## Skill Version(s):\n\n1.0.13 (source: ClawHub release metadata; bundled frontmatter states 1.0.15)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.13:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.13:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.12: 31 files, 40564 bytes\n\nFiles: references/api_doc.md (2327b), scripts/__init__.py (56b), scripts/config.py (706b), scripts/config.yaml (3b), scripts/skill.py (598b), scripts/smyx_child_poor_posture_detection_analysis.py (3636b), skill-card.md (2516b), SKILL.md (12000b), 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 (162b)\n\nFile v1.0.12:SKILL.md\n\n---\nname: \"smyx-child-poor-posture-detection-analysis\"\ndescription: \"Using the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。\"\nversion: \"1.0.13\"\nlicense: \"MIT-0\"\n---\n\n# 🪑 Child Poor Posture (Hunchback / Head Tilt) Real-Time Reminder | 儿童坐姿不良（驼背/歪头）实时提醒\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童坐姿不良（驼背/歪头）实时提醒** |\n| 🎯 核心目标 | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` |\n\nUsing the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. When hunchback (Cobb > 10°) or head tilt (> 15°) persists longer than a preset threshold (e.g., 5 seconds), a voice prompt is triggered (e.g., 'sit up straight', 'lift your head'), helping children develop good posture habits and preventing myopia and scoliosis. Application scenarios: smart study lamps, home desks, school classrooms. The system monitors in real time, sends voice cues when posture deviates, and generates posture reports pushed to parents. Skill features: long-term poor posture in children can lead to myopia and scoliosis. AI real-time monitoring + voice prompts help children correct posture seamlessly and develop good habits. Can be integrated into smart desk lamps or study desks to boost product differentiation.\n\n通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。应用场景：智能学习台灯、家庭书桌、学校教室。系统实时监测，当坐姿异常时发出语音提示，并生成坐姿报告推送给家长。技能特点：儿童长期坐姿不良会导致近视、脊柱侧弯等问题。通过AI实时监测并语音提醒，可帮助儿童无感纠正姿态，养成良好习惯。该技能可集成到智能台灯或学习桌中，提升产品差异化竞争力。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康坐姿 AI。你的任务是分析儿童学习区域的实时视频，检测坐姿姿态，估算脊柱弯曲角度（Cobb 角）和头部倾斜角度。当驼背或歪头持续时间超过阈值时，输出语音提醒指令。不要提供医疗诊断或具体矫正训练方案，仅输出基于视觉的姿态分析结果与语音提醒指令。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能台灯/书桌摄像头视频，实时估算儿童脊柱弯曲与头部倾斜角度，超阈值触发语音提醒并汇总会话坐姿质量\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 儿童上半身检测 |\n| 2 | 姿态关键点估计 |\n| 3 | Cobb 角估算 |\n| 4 | 头部侧倾角 |\n| 5 | 双肩水平偏差 |\n| 6 | 眼睛-书面距离估算 |\n| 7 | 不良姿态类型分类（hunchback / head_tilt / forward_head / shoulder_asymmetry / too_close_to_desk） |\n| 8 | 持续时间判定（默认 5 秒） |\n| 9 | 语音提醒文本生成 |\n| 10 | 会话坐姿摘要 |\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_child_poor_posture_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_poor_posture_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_child_poor_posture_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_child_poor_posture_detection_analysis.py`](scripts/smyx_child_poor_posture_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；建议正对面部+上半身、≥ 15 FPS |\n| 🧑‍⚖️ 结果性质 | Cobb 角为视觉估算，与影像学测量存在偏差，仅供习惯纠正参考，不能替代脊柱侧弯医学评估 |\n| 🔏 隐私合规 | 隐私合规：儿童学习场景视频涉及未成年人隐私，使用前需取得监护人知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --input /path/to/posture.mp4\n\n# 分析网络儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --url https://example.com/posture.mp4\n\n# 显示历史坐姿不良识别报告（自动触发关键词：查看坐姿不良历史报告、坐姿监测报告清单等）\npython -m scripts.smyx_child_poor_posture_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --output result.json\n```\n\nFile v1.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-poor-posture-detection-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1790064506636\n}\n\nFile v1.0.12: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_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` - 儿童坐姿不良（驼背/歪头）实时提醒\n\n## 输入约束\n\n- 摄像头建议为智能台灯内置摄像头或书桌上方摄像头\n- 视野需覆盖儿童上半身（肩部至头部）\n- 视频帧率建议 ≥ 15 FPS；光照均匀，避免逆光\n\n## 关键观测指标\n\n- `cobb_angle_deg` - 脊柱弯曲角度估算（Cobb 角，°）\n- `head_tilt_deg` - 头部侧倾角度（°）\n- `shoulder_horizontal_offset_deg` - 双肩水平偏差（°）\n- `eye_to_desk_distance_cm` - 眼睛与书面距离（估算，cm）\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 驼背：Cobb 角 > 10°\n- 歪头：头部侧倾角 > 15°\n- 持续时长触发阈值：5 秒（hold_duration_threshold_sec）\n- 用眼距离过近：< 25 cm（建议触发\"距离过近\"提醒）\n\n## 不良姿态类型\n\n- `hunchback` - 驼背\n- `head_tilt` - 歪头\n- `forward_head` - 头部前伸\n- `shoulder_asymmetry` - 双肩不平\n- `too_close_to_desk` - 离书面过近\n\n## 输出字段（参考）\n\n- `child_detected` - 是否检测到儿童\n- `posture_metrics` - 姿态参数（cobb_angle_deg / head_tilt_deg / shoulder_horizontal_offset_deg / eye_to_desk_distance_cm）\n- `poor_posture_type` - 当前不良姿态类型\n- `hold_duration_sec` - 不良姿态持续秒数\n- `voice_prompt` - 语音提醒指令文本（如\"请坐直\"、\"头抬正\"、\"眼睛离书本远一点\"）\n- `event_time` - 事件时间戳\n- `snapshot_url` - 现场快照 URL\n- `summary` - 当次会话不良姿态统计（每类型次数/总持续时长）\n\n> 仅输出基于视觉的姿态分析结果与语音提醒指令，不提供医疗诊断或具体矫正训练方案。\n\nFile v1.0.12:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.12:scripts/config.yaml\n\n{}\n\nFile v1.0.12:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.12:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.12:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.12:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.12:skill-card.md\n\n## Description:\n\nAnalyzes child study-area video from a desk lamp or mounted camera to estimate posture metrics, detect hunchback or head tilt, generate reminder text, and return structured reports.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal developers and product teams use this skill to analyze child posture videos for smart desk lamps, home study desks, or classroom monitoring workflows. It returns posture metrics, poor-posture classifications, reminder text, session summaries, and report links for review.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive child video and report data is sent to cloud APIs.\n\nMitigation: Use only with guardian consent and clear controls for where video is processed, who can access report links, how long reports are retained, and how deletion is handled.\n\nRisk: The skill silently creates or reuses persistent user identities and tokens.\n\nMitigation: Review identity/account binding and token storage before deployment, isolate access by user or installation, and remove or rotate credentials when access changes.\n\nRisk: Visual posture estimates may be mistaken for medical assessment.\n\nMitigation: Present Cobb angle and head-tilt results as habit-correction guidance only, and direct users to qualified medical professionals for diagnosis or treatment decisions.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-child-poor-posture-detection-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [API interface documentation](artifact/references/api_doc.md)\n- [Analysis API error documentation](artifact/skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Files, Guidance]\n\n**Output Format:** [Markdown text with structured JSON report content, reminder text, and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Can save analysis output to a local file when an output path is provided.]\n\n## Skill Version(s):\n\n1.0.12 (source: server release evidence; artifact frontmatter shows 1.0.13)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.12:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.12:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.11: 31 files, 40645 bytes\n\nFiles: references/api_doc.md (2327b), scripts/__init__.py (56b), scripts/config.py (706b), scripts/config.yaml (3b), scripts/skill.py (598b), scripts/smyx_child_poor_posture_detection_analysis.py (3636b), skill-card.md (2804b), SKILL.md (12000b), 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 (162b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: \"smyx-child-poor-posture-detection-analysis\"\ndescription: \"Using the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。\"\nversion: \"1.0.12\"\nlicense: \"MIT-0\"\n---\n\n# 🪑 Child Poor Posture (Hunchback / Head Tilt) Real-Time Reminder | 儿童坐姿不良（驼背/歪头）实时提醒\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童坐姿不良（驼背/歪头）实时提醒** |\n| 🎯 核心目标 | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` |\n\nUsing the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. When hunchback (Cobb > 10°) or head tilt (> 15°) persists longer than a preset threshold (e.g., 5 seconds), a voice prompt is triggered (e.g., 'sit up straight', 'lift your head'), helping children develop good posture habits and preventing myopia and scoliosis. Application scenarios: smart study lamps, home desks, school classrooms. The system monitors in real time, sends voice cues when posture deviates, and generates posture reports pushed to parents. Skill features: long-term poor posture in children can lead to myopia and scoliosis. AI real-time monitoring + voice prompts help children correct posture seamlessly and develop good habits. Can be integrated into smart desk lamps or study desks to boost product differentiation.\n\n通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。应用场景：智能学习台灯、家庭书桌、学校教室。系统实时监测，当坐姿异常时发出语音提示，并生成坐姿报告推送给家长。技能特点：儿童长期坐姿不良会导致近视、脊柱侧弯等问题。通过AI实时监测并语音提醒，可帮助儿童无感纠正姿态，养成良好习惯。该技能可集成到智能台灯或学习桌中，提升产品差异化竞争力。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康坐姿 AI。你的任务是分析儿童学习区域的实时视频，检测坐姿姿态，估算脊柱弯曲角度（Cobb 角）和头部倾斜角度。当驼背或歪头持续时间超过阈值时，输出语音提醒指令。不要提供医疗诊断或具体矫正训练方案，仅输出基于视觉的姿态分析结果与语音提醒指令。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能台灯/书桌摄像头视频，实时估算儿童脊柱弯曲与头部倾斜角度，超阈值触发语音提醒并汇总会话坐姿质量\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 儿童上半身检测 |\n| 2 | 姿态关键点估计 |\n| 3 | Cobb 角估算 |\n| 4 | 头部侧倾角 |\n| 5 | 双肩水平偏差 |\n| 6 | 眼睛-书面距离估算 |\n| 7 | 不良姿态类型分类（hunchback / head_tilt / forward_head / shoulder_asymmetry / too_close_to_desk） |\n| 8 | 持续时间判定（默认 5 秒） |\n| 9 | 语音提醒文本生成 |\n| 10 | 会话坐姿摘要 |\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_child_poor_posture_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_poor_posture_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_child_poor_posture_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_child_poor_posture_detection_analysis.py`](scripts/smyx_child_poor_posture_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；建议正对面部+上半身、≥ 15 FPS |\n| 🧑‍⚖️ 结果性质 | Cobb 角为视觉估算，与影像学测量存在偏差，仅供习惯纠正参考，不能替代脊柱侧弯医学评估 |\n| 🔏 隐私合规 | 隐私合规：儿童学习场景视频涉及未成年人隐私，使用前需取得监护人知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --input /path/to/posture.mp4\n\n# 分析网络儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --url https://example.com/posture.mp4\n\n# 显示历史坐姿不良识别报告（自动触发关键词：查看坐姿不良历史报告、坐姿监测报告清单等）\npython -m scripts.smyx_child_poor_posture_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --output result.json\n```\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-poor-posture-detection-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1788816748412\n}\n\nFile v1.0.11: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_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` - 儿童坐姿不良（驼背/歪头）实时提醒\n\n## 输入约束\n\n- 摄像头建议为智能台灯内置摄像头或书桌上方摄像头\n- 视野需覆盖儿童上半身（肩部至头部）\n- 视频帧率建议 ≥ 15 FPS；光照均匀，避免逆光\n\n## 关键观测指标\n\n- `cobb_angle_deg` - 脊柱弯曲角度估算（Cobb 角，°）\n- `head_tilt_deg` - 头部侧倾角度（°）\n- `shoulder_horizontal_offset_deg` - 双肩水平偏差（°）\n- `eye_to_desk_distance_cm` - 眼睛与书面距离（估算，cm）\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 驼背：Cobb 角 > 10°\n- 歪头：头部侧倾角 > 15°\n- 持续时长触发阈值：5 秒（hold_duration_threshold_sec）\n- 用眼距离过近：< 25 cm（建议触发\"距离过近\"提醒）\n\n## 不良姿态类型\n\n- `hunchback` - 驼背\n- `head_tilt` - 歪头\n- `forward_head` - 头部前伸\n- `shoulder_asymmetry` - 双肩不平\n- `too_close_to_desk` - 离书面过近\n\n## 输出字段（参考）\n\n- `child_detected` - 是否检测到儿童\n- `posture_metrics` - 姿态参数（cobb_angle_deg / head_tilt_deg / shoulder_horizontal_offset_deg / eye_to_desk_distance_cm）\n- `poor_posture_type` - 当前不良姿态类型\n- `hold_duration_sec` - 不良姿态持续秒数\n- `voice_prompt` - 语音提醒指令文本（如\"请坐直\"、\"头抬正\"、\"眼睛离书本远一点\"）\n- `event_time` - 事件时间戳\n- `snapshot_url` - 现场快照 URL\n- `summary` - 当次会话不良姿态统计（每类型次数/总持续时长）\n\n> 仅输出基于视觉的姿态分析结果与语音提醒指令，不提供医疗诊断或具体矫正训练方案。\n\nFile v1.0.11:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.11:scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.11:skill-card.md\n\n## Description:\n\nAnalyzes child study-area posture video from a desk-lamp or mounted camera to estimate Cobb-angle and head-tilt indicators, trigger posture reminders, and produce structured reports.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and product teams use this skill to run child posture monitoring workflows for smart study lamps, home desks, or classroom camera setups. It accepts local or URL-based child study-area media, calls a health-analysis service, and returns posture metrics, reminder text, session summaries, report links, or historical report lists.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill uploads child study-area media for posture analysis.\n\nMitigation: Require guardian consent before use, document media data flow and retention, and protect uploaded videos or images with appropriate access controls.\n\nRisk: Evidence security guidance flags insecure development-style service settings.\n\nMitigation: Use HTTPS-only production endpoints and validate deployment configuration before enabling the skill.\n\nRisk: The skill silently manages account tokens and user association for report access.\n\nMitigation: Store tokens securely, avoid exposing internal identity values in user-facing output, and review account-linking behavior before deployment.\n\nRisk: Posture metrics such as Cobb angle are visual estimates and may be clinically inaccurate.\n\nMitigation: Present outputs as non-diagnostic posture reminders and report summaries, not medical assessment or treatment advice.\n\nRisk: Evidence security guidance calls for a corrected dependency list.\n\nMitigation: Fix and verify dependency declarations before installation in production environments.\n\n## Reference(s):\n\n- [Child Posture API Documentation](references/api_doc.md)\n- [Shared Analysis API Documentation](skills/smyx_analysis/references/api_doc.md)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Shell commands, Guidance]\n\n**Output Format:** [Markdown and structured JSON-style analysis text with report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include estimated posture metrics, voice reminder text, session summaries, and historical report tables.]\n\n## Skill Version(s):\n\n1.0.11 (source: server release metadata; artifact frontmatter reports 1.0.12)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.11:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.11:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.10: 31 files, 40495 bytes\n\nFiles: references/api_doc.md (2327b), scripts/__init__.py (56b), scripts/config.py (706b), scripts/config.yaml (3b), scripts/skill.py (598b), scripts/smyx_child_poor_posture_detection_analysis.py (3636b), skill-card.md (2424b), SKILL.md (12000b), 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 (162b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: \"smyx-child-poor-posture-detection-analysis\"\ndescription: \"Using the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 🪑 Child Poor Posture (Hunchback / Head Tilt) Real-Time Reminder | 儿童坐姿不良（驼背/歪头）实时提醒\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童坐姿不良（驼背/歪头）实时提醒** |\n| 🎯 核心目标 | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` |\n\nUsing the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. When hunchback (Cobb > 10°) or head tilt (> 15°) persists longer than a preset threshold (e.g., 5 seconds), a voice prompt is triggered (e.g., 'sit up straight', 'lift your head'), helping children develop good posture habits and preventing myopia and scoliosis. Application scenarios: smart study lamps, home desks, school classrooms. The system monitors in real time, sends voice cues when posture deviates, and generates posture reports pushed to parents. Skill features: long-term poor posture in children can lead to myopia and scoliosis. AI real-time monitoring + voice prompts help children correct posture seamlessly and develop good habits. Can be integrated into smart desk lamps or study desks to boost product differentiation.\n\n通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。应用场景：智能学习台灯、家庭书桌、学校教室。系统实时监测，当坐姿异常时发出语音提示，并生成坐姿报告推送给家长。技能特点：儿童长期坐姿不良会导致近视、脊柱侧弯等问题。通过AI实时监测并语音提醒，可帮助儿童无感纠正姿态，养成良好习惯。该技能可集成到智能台灯或学习桌中，提升产品差异化竞争力。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康坐姿 AI。你的任务是分析儿童学习区域的实时视频，检测坐姿姿态，估算脊柱弯曲角度（Cobb 角）和头部倾斜角度。当驼背或歪头持续时间超过阈值时，输出语音提醒指令。不要提供医疗诊断或具体矫正训练方案，仅输出基于视觉的姿态分析结果与语音提醒指令。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能台灯/书桌摄像头视频，实时估算儿童脊柱弯曲与头部倾斜角度，超阈值触发语音提醒并汇总会话坐姿质量\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 儿童上半身检测 |\n| 2 | 姿态关键点估计 |\n| 3 | Cobb 角估算 |\n| 4 | 头部侧倾角 |\n| 5 | 双肩水平偏差 |\n| 6 | 眼睛-书面距离估算 |\n| 7 | 不良姿态类型分类（hunchback / head_tilt / forward_head / shoulder_asymmetry / too_close_to_desk） |\n| 8 | 持续时间判定（默认 5 秒） |\n| 9 | 语音提醒文本生成 |\n| 10 | 会话坐姿摘要 |\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_child_poor_posture_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_poor_posture_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_child_poor_posture_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_child_poor_posture_detection_analysis.py`](scripts/smyx_child_poor_posture_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；建议正对面部+上半身、≥ 15 FPS |\n| 🧑‍⚖️ 结果性质 | Cobb 角为视觉估算，与影像学测量存在偏差，仅供习惯纠正参考，不能替代脊柱侧弯医学评估 |\n| 🔏 隐私合规 | 隐私合规：儿童学习场景视频涉及未成年人隐私，使用前需取得监护人知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --input /path/to/posture.mp4\n\n# 分析网络儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --url https://example.com/posture.mp4\n\n# 显示历史坐姿不良识别报告（自动触发关键词：查看坐姿不良历史报告、坐姿监测报告清单等）\npython -m scripts.smyx_child_poor_posture_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-poor-posture-detection-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1787783610329\n}\n\nFile v1.0.10: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_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` - 儿童坐姿不良（驼背/歪头）实时提醒\n\n## 输入约束\n\n- 摄像头建议为智能台灯内置摄像头或书桌上方摄像头\n- 视野需覆盖儿童上半身（肩部至头部）\n- 视频帧率建议 ≥ 15 FPS；光照均匀，避免逆光\n\n## 关键观测指标\n\n- `cobb_angle_deg` - 脊柱弯曲角度估算（Cobb 角，°）\n- `head_tilt_deg` - 头部侧倾角度（°）\n- `shoulder_horizontal_offset_deg` - 双肩水平偏差（°）\n- `eye_to_desk_distance_cm` - 眼睛与书面距离（估算，cm）\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 驼背：Cobb 角 > 10°\n- 歪头：头部侧倾角 > 15°\n- 持续时长触发阈值：5 秒（hold_duration_threshold_sec）\n- 用眼距离过近：< 25 cm（建议触发\"距离过近\"提醒）\n\n## 不良姿态类型\n\n- `hunchback` - 驼背\n- `head_tilt` - 歪头\n- `forward_head` - 头部前伸\n- `shoulder_asymmetry` - 双肩不平\n- `too_close_to_desk` - 离书面过近\n\n## 输出字段（参考）\n\n- `child_detected` - 是否检测到儿童\n- `posture_metrics` - 姿态参数（cobb_angle_deg / head_tilt_deg / shoulder_horizontal_offset_deg / eye_to_desk_distance_cm）\n- `poor_posture_type` - 当前不良姿态类型\n- `hold_duration_sec` - 不良姿态持续秒数\n- `voice_prompt` - 语音提醒指令文本（如\"请坐直\"、\"头抬正\"、\"眼睛离书本远一点\"）\n- `event_time` - 事件时间戳\n- `snapshot_url` - 现场快照 URL\n- `summary` - 当次会话不良姿态统计（每类型次数/总持续时长）\n\n> 仅输出基于视觉的姿态分析结果与语音提醒指令，不提供医疗诊断或具体矫正训练方案。\n\nFile v1.0.10:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.10:scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.10:skill-card.md\n\n## Description:\n\nAnalyzes child study-area images or videos through a configured service to estimate poor-posture indicators, produce structured results, and return reminder text and report links.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to analyze child study-area posture media, estimate visual posture metrics such as head tilt and Cobb-angle approximation, and retrieve structured reports or reminder text. It is intended for habit-support workflows, not medical diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Children's posture videos or URLs may be sent to a configured remote service.\n\nMitigation: Use only with guardian consent and an explicit plan for retention, deletion, access control, and report sharing.\n\nRisk: The skill silently creates and reuses a local identity and may persist tokens for service access.\n\nMitigation: Review the workspace identity file and local token database before deployment; clear or rotate persisted credentials when changing users or environments.\n\nRisk: Configuration may include development or non-production service endpoints.\n\nMitigation: Review and replace service configuration before commercial use, especially any HTTP or development endpoints.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-child-poor-posture-detection-analysis)\n- [API Documentation](references/api_doc.md)\n- [Shared API Documentation](skills/smyx_analysis/references/api_doc.md)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Shell commands, Guidance]\n\n**Output Format:** [Markdown text with structured JSON report content and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Can analyze a local video file or URL, and can list historical report records returned by the configured service.]\n\n## Skill Version(s):\n\n1.0.10 (source: frontmatter and server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.10:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.10:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.9: 31 files, 40562 bytes\n\nFiles: references/api_doc.md (2327b), scripts/__init__.py (56b), scripts/config.py (706b), scripts/config.yaml (3b), scripts/skill.py (598b), scripts/smyx_child_poor_posture_detection_analysis.py (3636b), skill-card.md (2498b), SKILL.md (12000b), 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 (161b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: \"smyx-child-poor-posture-detection-analysis\"\ndescription: \"Using the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 🪑 Child Poor Posture (Hunchback / Head Tilt) Real-Time Reminder | 儿童坐姿不良（驼背/歪头）实时提醒\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童坐姿不良（驼背/歪头）实时提醒** |\n| 🎯 核心目标 | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` |\n\nUsing the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. When hunchback (Cobb > 10°) or head tilt (> 15°) persists longer than a preset threshold (e.g., 5 seconds), a voice prompt is triggered (e.g., 'sit up straight', 'lift your head'), helping children develop good posture habits and preventing myopia and scoliosis. Application scenarios: smart study lamps, home desks, school classrooms. The system monitors in real time, sends voice cues when posture deviates, and generates posture reports pushed to parents. Skill features: long-term poor posture in children can lead to myopia and scoliosis. AI real-time monitoring + voice prompts help children correct posture seamlessly and develop good habits. Can be integrated into smart desk lamps or study desks to boost product differentiation.\n\n通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。应用场景：智能学习台灯、家庭书桌、学校教室。系统实时监测，当坐姿异常时发出语音提示，并生成坐姿报告推送给家长。技能特点：儿童长期坐姿不良会导致近视、脊柱侧弯等问题。通过AI实时监测并语音提醒，可帮助儿童无感纠正姿态，养成良好习惯。该技能可集成到智能台灯或学习桌中，提升产品差异化竞争力。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康坐姿 AI。你的任务是分析儿童学习区域的实时视频，检测坐姿姿态，估算脊柱弯曲角度（Cobb 角）和头部倾斜角度。当驼背或歪头持续时间超过阈值时，输出语音提醒指令。不要提供医疗诊断或具体矫正训练方案，仅输出基于视觉的姿态分析结果与语音提醒指令。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能台灯/书桌摄像头视频，实时估算儿童脊柱弯曲与头部倾斜角度，超阈值触发语音提醒并汇总会话坐姿质量\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 儿童上半身检测 |\n| 2 | 姿态关键点估计 |\n| 3 | Cobb 角估算 |\n| 4 | 头部侧倾角 |\n| 5 | 双肩水平偏差 |\n| 6 | 眼睛-书面距离估算 |\n| 7 | 不良姿态类型分类（hunchback / head_tilt / forward_head / shoulder_asymmetry / too_close_to_desk） |\n| 8 | 持续时间判定（默认 5 秒） |\n| 9 | 语音提醒文本生成 |\n| 10 | 会话坐姿摘要 |\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_child_poor_posture_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_poor_posture_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_child_poor_posture_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_child_poor_posture_detection_analysis.py`](scripts/smyx_child_poor_posture_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；建议正对面部+上半身、≥ 15 FPS |\n| 🧑‍⚖️ 结果性质 | Cobb 角为视觉估算，与影像学测量存在偏差，仅供习惯纠正参考，不能替代脊柱侧弯医学评估 |\n| 🔏 隐私合规 | 隐私合规：儿童学习场景视频涉及未成年人隐私，使用前需取得监护人知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --input /path/to/posture.mp4\n\n# 分析网络儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --url https://example.com/posture.mp4\n\n# 显示历史坐姿不良识别报告（自动触发关键词：查看坐姿不良历史报告、坐姿监测报告清单等）\npython -m scripts.smyx_child_poor_posture_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-poor-posture-detection-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1787124869800\n}\n\nFile v1.0.9: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_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` - 儿童坐姿不良（驼背/歪头）实时提醒\n\n## 输入约束\n\n- 摄像头建议为智能台灯内置摄像头或书桌上方摄像头\n- 视野需覆盖儿童上半身（肩部至头部）\n- 视频帧率建议 ≥ 15 FPS；光照均匀，避免逆光\n\n## 关键观测指标\n\n- `cobb_angle_deg` - 脊柱弯曲角度估算（Cobb 角，°）\n- `head_tilt_deg` - 头部侧倾角度（°）\n- `shoulder_horizontal_offset_deg` - 双肩水平偏差（°）\n- `eye_to_desk_distance_cm` - 眼睛与书面距离（估算，cm）\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 驼背：Cobb 角 > 10°\n- 歪头：头部侧倾角 > 15°\n- 持续时长触发阈值：5 秒（hold_duration_threshold_sec）\n- 用眼距离过近：< 25 cm（建议触发\"距离过近\"提醒）\n\n## 不良姿态类型\n\n- `hunchback` - 驼背\n- `head_tilt` - 歪头\n- `forward_head` - 头部前伸\n- `shoulder_asymmetry` - 双肩不平\n- `too_close_to_desk` - 离书面过近\n\n## 输出字段（参考）\n\n- `child_detected` - 是否检测到儿童\n- `posture_metrics` - 姿态参数（cobb_angle_deg / head_tilt_deg / shoulder_horizontal_offset_deg / eye_to_desk_distance_cm）\n- `poor_posture_type` - 当前不良姿态类型\n- `hold_duration_sec` - 不良姿态持续秒数\n- `voice_prompt` - 语音提醒指令文本（如\"请坐直\"、\"头抬正\"、\"眼睛离书本远一点\"）\n- `event_time` - 事件时间戳\n- `snapshot_url` - 现场快照 URL\n- `summary` - 当次会话不良姿态统计（每类型次数/总持续时长）\n\n> 仅输出基于视觉的姿态分析结果与语音提醒指令，不提供医疗诊断或具体矫正训练方案。\n\nFile v1.0.9:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.9:scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.9:skill-card.md\n\n## Description:\n\nAnalyzes child study-area posture video from a smart desk lamp or desk-mounted camera to estimate spinal curvature and head tilt, generate posture findings, and return reminder text when poor posture persists.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and product teams use this skill to add child posture monitoring to smart lamps, home desks, or classroom study environments. It accepts local or URL-based posture video, calls the analysis workflow, and returns structured posture metrics, reminder text, report links, or historical report listings.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Child video, video URLs, posture reports, and report history may be sent to or retrieved from cloud services.\n\nMitigation: Use only with guardian consent, trusted video sources, clear retention/deletion controls, and restricted access to stored reports.\n\nRisk: The skill may create or reuse local identity and token records without asking the end user for an identifier.\n\nMitigation: Deploy with explicit account separation, token protection, and review of identity storage before use with children or multiple households.\n\nRisk: Cobb angle and posture findings are visual estimates and are not a medical diagnosis.\n\nMitigation: Present results as habit-correction reminders and advise clinical review for medical scoliosis or vision concerns.\n\n## Reference(s):\n\n- [API Documentation](references/api_doc.md)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-child-poor-posture-detection-analysis)\n\n## Skill Output:\n\n**Output Type(s):** [Markdown, JSON, Shell commands, Guidance]\n\n**Output Format:** [Markdown or JSON report content with posture metrics, reminder text, recommendations, and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May query cloud-hosted historical reports and may save report output to a file when requested.]\n\n## Skill Version(s):\n\n1.0.9 (source: server release metadata; artifact frontmatter says 1.0.10)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.9:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.9:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.8: 31 files, 40518 bytes\n\nFiles: references/api_doc.md (2327b), scripts/__init__.py (56b), scripts/config.py (706b), scripts/config.yaml (3b), scripts/skill.py (598b), scripts/smyx_child_poor_posture_detection_analysis.py (3636b), skill-card.md (2501b), SKILL.md (11999b), 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 (161b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"smyx-child-poor-posture-detection-analysis\"\ndescription: \"Using the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 🪑 Child Poor Posture (Hunchback / Head Tilt) Real-Time Reminder | 儿童坐姿不良（驼背/歪头）实时提醒\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童坐姿不良（驼背/歪头）实时提醒** |\n| 🎯 核心目标 | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` |\n\nUsing the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. When hunchback (Cobb > 10°) or head tilt (> 15°) persists longer than a preset threshold (e.g., 5 seconds), a voice prompt is triggered (e.g., 'sit up straight', 'lift your head'), helping children develop good posture habits and preventing myopia and scoliosis. Application scenarios: smart study lamps, home desks, school classrooms. The system monitors in real time, sends voice cues when posture deviates, and generates posture reports pushed to parents. Skill features: long-term poor posture in children can lead to myopia and scoliosis. AI real-time monitoring + voice prompts help children correct posture seamlessly and develop good habits. Can be integrated into smart desk lamps or study desks to boost product differentiation.\n\n通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。应用场景：智能学习台灯、家庭书桌、学校教室。系统实时监测，当坐姿异常时发出语音提示，并生成坐姿报告推送给家长。技能特点：儿童长期坐姿不良会导致近视、脊柱侧弯等问题。通过AI实时监测并语音提醒，可帮助儿童无感纠正姿态，养成良好习惯。该技能可集成到智能台灯或学习桌中，提升产品差异化竞争力。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康坐姿 AI。你的任务是分析儿童学习区域的实时视频，检测坐姿姿态，估算脊柱弯曲角度（Cobb 角）和头部倾斜角度。当驼背或歪头持续时间超过阈值时，输出语音提醒指令。不要提供医疗诊断或具体矫正训练方案，仅输出基于视觉的姿态分析结果与语音提醒指令。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能台灯/书桌摄像头视频，实时估算儿童脊柱弯曲与头部倾斜角度，超阈值触发语音提醒并汇总会话坐姿质量\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 儿童上半身检测 |\n| 2 | 姿态关键点估计 |\n| 3 | Cobb 角估算 |\n| 4 | 头部侧倾角 |\n| 5 | 双肩水平偏差 |\n| 6 | 眼睛-书面距离估算 |\n| 7 | 不良姿态类型分类（hunchback / head_tilt / forward_head / shoulder_asymmetry / too_close_to_desk） |\n| 8 | 持续时间判定（默认 5 秒） |\n| 9 | 语音提醒文本生成 |\n| 10 | 会话坐姿摘要 |\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_child_poor_posture_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_poor_posture_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_child_poor_posture_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_child_poor_posture_detection_analysis.py`](scripts/smyx_child_poor_posture_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；建议正对面部+上半身、≥ 15 FPS |\n| 🧑‍⚖️ 结果性质 | Cobb 角为视觉估算，与影像学测量存在偏差，仅供习惯纠正参考，不能替代脊柱侧弯医学评估 |\n| 🔏 隐私合规 | 隐私合规：儿童学习场景视频涉及未成年人隐私，使用前需取得监护人知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --input /path/to/posture.mp4\n\n# 分析网络儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --url https://example.com/posture.mp4\n\n# 显示历史坐姿不良识别报告（自动触发关键词：查看坐姿不良历史报告、坐姿监测报告清单等）\npython -m scripts.smyx_child_poor_posture_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-poor-posture-detection-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1786594413516\n}\n\nFile v1.0.8: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_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` - 儿童坐姿不良（驼背/歪头）实时提醒\n\n## 输入约束\n\n- 摄像头建议为智能台灯内置摄像头或书桌上方摄像头\n- 视野需覆盖儿童上半身（肩部至头部）\n- 视频帧率建议 ≥ 15 FPS；光照均匀，避免逆光\n\n## 关键观测指标\n\n- `cobb_angle_deg` - 脊柱弯曲角度估算（Cobb 角，°）\n- `head_tilt_deg` - 头部侧倾角度（°）\n- `shoulder_horizontal_offset_deg` - 双肩水平偏差（°）\n- `eye_to_desk_distance_cm` - 眼睛与书面距离（估算，cm）\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 驼背：Cobb 角 > 10°\n- 歪头：头部侧倾角 > 15°\n- 持续时长触发阈值：5 秒（hold_duration_threshold_sec）\n- 用眼距离过近：< 25 cm（建议触发\"距离过近\"提醒）\n\n## 不良姿态类型\n\n- `hunchback` - 驼背\n- `head_tilt` - 歪头\n- `forward_head` - 头部前伸\n- `shoulder_asymmetry` - 双肩不平\n- `too_close_to_desk` - 离书面过近\n\n## 输出字段（参考）\n\n- `child_detected` - 是否检测到儿童\n- `posture_metrics` - 姿态参数（cobb_angle_deg / head_tilt_deg / shoulder_horizontal_offset_deg / eye_to_desk_distance_cm）\n- `poor_posture_type` - 当前不良姿态类型\n- `hold_duration_sec` - 不良姿态持续秒数\n- `voice_prompt` - 语音提醒指令文本（如\"请坐直\"、\"头抬正\"、\"眼睛离书本远一点\"）\n- `event_time` - 事件时间戳\n- `snapshot_url` - 现场快照 URL\n- `summary` - 当次会话不良姿态统计（每类型次数/总持续时长）\n\n> 仅输出基于视觉的姿态分析结果与语音提醒指令，不提供医疗诊断或具体矫正训练方案。\n\nFile v1.0.8:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.8:scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.8:skill-card.md\n\n## Description:\n\nThis skill analyzes child study-area images or video to estimate posture metrics, identify hunchback or head-tilt patterns, and return reminders plus a structured posture report.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to connect child study-area camera inputs to cloud posture analysis, voice-reminder text, and historical posture reports. It is intended for habit feedback and reporting, not medical diagnosis or treatment planning.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Child posture videos, video URLs, and generated reports may contain sensitive minor data and are processed by a cloud service.\n\nMitigation: Use only with guardian consent, confirm data retention and deletion practices, and avoid submitting unnecessary identifying content.\n\nRisk: Results may be tied to a persistent local or remote identity and authentication tokens may be stored.\n\nMitigation: Review identity handling, token storage, and access controls before deployment, especially for shared devices or school environments.\n\nRisk: Visual posture metrics, including Cobb-angle estimates, may be inaccurate and are not medical diagnosis.\n\nMitigation: Present outputs as posture habit feedback only and direct medical concerns to qualified clinicians.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-child-poor-posture-detection-analysis)\n- [API documentation](references/api_doc.md)\n- [Shared analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance]\n\n**Output Format:** [Markdown or JSON posture analysis results with reminder text, report links, and optional history tables.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include visual posture estimates, poor-posture categories, reminder text, snapshots, session summaries, and cloud report URLs.]\n\n## Skill Version(s):\n\n1.0.8 (source: server release metadata; artifact frontmatter reports 1.0.9)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.8:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.8:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.7: 31 files, 40517 bytes\n\nFiles: references/api_doc.md (2327b), scripts/__init__.py (56b), scripts/config.py (706b), scripts/config.yaml (3b), scripts/skill.py (598b), scripts/smyx_child_poor_posture_detection_analysis.py (3636b), skill-card.md (2598b), SKILL.md (11999b), 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 (161b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"smyx-child-poor-posture-detection-analysis\"\ndescription: \"Using the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。\"\nversion: \"1.0.7\"\nlicense: \"MIT-0\"\n---\n\n# 🪑 Child Poor Posture (Hunchback / Head Tilt) Real-Time Reminder | 儿童坐姿不良（驼背/歪头）实时提醒\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童坐姿不良（驼背/歪头）实时提醒** |\n| 🎯 核心目标 | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` |\n\nUsing the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. When hunchback (Cobb > 10°) or head tilt (> 15°) persists longer than a preset threshold (e.g., 5 seconds), a voice prompt is triggered (e.g., 'sit up straight', 'lift your head'), helping children develop good posture habits and preventing myopia and scoliosis. Application scenarios: smart study lamps, home desks, school classrooms. The system monitors in real time, sends voice cues when posture deviates, and generates posture reports pushed to parents. Skill features: long-term poor posture in children can lead to myopia and scoliosis. AI real-time monitoring + voice prompts help children correct posture seamlessly and develop good habits. Can be integrated into smart desk lamps or study desks to boost product differentiation.\n\n通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。应用场景：智能学习台灯、家庭书桌、学校教室。系统实时监测，当坐姿异常时发出语音提示，并生成坐姿报告推送给家长。技能特点：儿童长期坐姿不良会导致近视、脊柱侧弯等问题。通过AI实时监测并语音提醒，可帮助儿童无感纠正姿态，养成良好习惯。该技能可集成到智能台灯或学习桌中，提升产品差异化竞争力。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康坐姿 AI。你的任务是分析儿童学习区域的实时视频，检测坐姿姿态，估算脊柱弯曲角度（Cobb 角）和头部倾斜角度。当驼背或歪头持续时间超过阈值时，输出语音提醒指令。不要提供医疗诊断或具体矫正训练方案，仅输出基于视觉的姿态分析结果与语音提醒指令。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能台灯/书桌摄像头视频，实时估算儿童脊柱弯曲与头部倾斜角度，超阈值触发语音提醒并汇总会话坐姿质量\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 儿童上半身检测 |\n| 2 | 姿态关键点估计 |\n| 3 | Cobb 角估算 |\n| 4 | 头部侧倾角 |\n| 5 | 双肩水平偏差 |\n| 6 | 眼睛-书面距离估算 |\n| 7 | 不良姿态类型分类（hunchback / head_tilt / forward_head / shoulder_asymmetry / too_close_to_desk） |\n| 8 | 持续时间判定（默认 5 秒） |\n| 9 | 语音提醒文本生成 |\n| 10 | 会话坐姿摘要 |\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_child_poor_posture_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_poor_posture_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_child_poor_posture_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_child_poor_posture_detection_analysis.py`](scripts/smyx_child_poor_posture_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；建议正对面部+上半身、≥ 15 FPS |\n| 🧑‍⚖️ 结果性质 | Cobb 角为视觉估算，与影像学测量存在偏差，仅供习惯纠正参考，不能替代脊柱侧弯医学评估 |\n| 🔏 隐私合规 | 隐私合规：儿童学习场景视频涉及未成年人隐私，使用前需取得监护人知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --input /path/to/posture.mp4\n\n# 分析网络儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --url https://example.com/posture.mp4\n\n# 显示历史坐姿不良识别报告（自动触发关键词：查看坐姿不良历史报告、坐姿监测报告清单等）\npython -m scripts.smyx_child_poor_posture_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-poor-posture-detection-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1785784415544\n}\n\nFile v1.0.7: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_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` - 儿童坐姿不良（驼背/歪头）实时提醒\n\n## 输入约束\n\n- 摄像头建议为智能台灯内置摄像头或书桌上方摄像头\n- 视野需覆盖儿童上半身（肩部至头部）\n- 视频帧率建议 ≥ 15 FPS；光照均匀，避免逆光\n\n## 关键观测指标\n\n- `cobb_angle_deg` - 脊柱弯曲角度估算（Cobb 角，°）\n- `head_tilt_deg` - 头部侧倾角度（°）\n- `shoulder_horizontal_offset_deg` - 双肩水平偏差（°）\n- `eye_to_desk_distance_cm` - 眼睛与书面距离（估算，cm）\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 驼背：Cobb 角 > 10°\n- 歪头：头部侧倾角 > 15°\n- 持续时长触发阈值：5 秒（hold_duration_threshold_sec）\n- 用眼距离过近：< 25 cm（建议触发\"距离过近\"提醒）\n\n## 不良姿态类型\n\n- `hunchback` - 驼背\n- `head_tilt` - 歪头\n- `forward_head` - 头部前伸\n- `shoulder_asymmetry` - 双肩不平\n- `too_close_to_desk` - 离书面过近\n\n## 输出字段（参考）\n\n- `child_detected` - 是否检测到儿童\n- `posture_metrics` - 姿态参数（cobb_angle_deg / head_tilt_deg / shoulder_horizontal_offset_deg / eye_to_desk_distance_cm）\n- `poor_posture_type` - 当前不良姿态类型\n- `hold_duration_sec` - 不良姿态持续秒数\n- `voice_prompt` - 语音提醒指令文本（如\"请坐直\"、\"头抬正\"、\"眼睛离书本远一点\"）\n- `event_time` - 事件时间戳\n- `snapshot_url` - 现场快照 URL\n- `summary` - 当次会话不良姿态统计（每类型次数/总持续时长）\n\n> 仅输出基于视觉的姿态分析结果与语音提醒指令，不提供医疗诊断或具体矫正训练方案。\n\nFile v1.0.7:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.7:scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.7:skill-card.md\n\n## Description: <br>\nAnalyzes child study-area video to estimate posture angles, detect hunching or head tilt, generate reminder text, and return structured posture reports. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[18072937735](https://clawhub.ai/user/18072937735) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal developers and product teams can use this skill to analyze local or URL-based study-area videos for child posture monitoring workflows. It returns posture metrics, poor-posture classifications, voice-reminder text, session summaries, and report links for guardian-facing review. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Child study-area videos, generated reports, and report history may be processed by configured cloud services. <br>\nMitigation: Confirm guardian consent, retention and deletion handling, and report-link access controls before use. <br>\nRisk: The skill silently creates or reuses a persistent identity and stores related tokens locally. <br>\nMitigation: Use an appropriate workspace or account boundary, review local token storage, and rotate or delete stored credentials when access should end. <br>\nRisk: Visual posture estimates can be inaccurate and are not a medical assessment. <br>\nMitigation: Present outputs as posture habit reminders only and route health concerns to qualified medical professionals. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-child-poor-posture-detection-analysis) <br>\n- [Primary API documentation](references/api_doc.md) <br>\n- [Analysis API documentation](skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, json, guidance] <br>\n**Output Format:** [Markdown text with structured JSON-style analysis content and report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include posture metrics, poor-posture type, duration, voice reminder text, event timestamps, snapshots, session summaries, and historical report records.] <br>\n\n## Skill Version(s): <br>\n1.0.7 (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.7:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.7:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.6: 31 files, 40639 bytes\n\nFiles: references/api_doc.md (2327b), scripts/__init__.py (56b), scripts/config.py (706b), scripts/config.yaml (3b), scripts/skill.py (598b), scripts/smyx_child_poor_posture_detection_analysis.py (3636b), skill-card.md (2876b), SKILL.md (11999b), 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 (161b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"smyx-child-poor-posture-detection-analysis\"\ndescription: \"Using the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。\"\nversion: \"1.0.7\"\nlicense: \"MIT-0\"\n---\n\n# 🪑 Child Poor Posture (Hunchback / Head Tilt) Real-Time Reminder | 儿童坐姿不良（驼背/歪头）实时提醒\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童坐姿不良（驼背/歪头）实时提醒** |\n| 🎯 核心目标 | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` |\n\nUsing the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. When hunchback (Cobb > 10°) or head tilt (> 15°) persists longer than a preset threshold (e.g., 5 seconds), a voice prompt is triggered (e.g., 'sit up straight', 'lift your head'), helping children develop good posture habits and preventing myopia and scoliosis. Application scenarios: smart study lamps, home desks, school classrooms. The system monitors in real time, sends voice cues when posture deviates, and generates posture reports pushed to parents. Skill features: long-term poor posture in children can lead to myopia and scoliosis. AI real-time monitoring + voice prompts help children correct posture seamlessly and develop good habits. Can be integrated into smart desk lamps or study desks to boost product differentiation.\n\n通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。应用场景：智能学习台灯、家庭书桌、学校教室。系统实时监测，当坐姿异常时发出语音提示，并生成坐姿报告推送给家长。技能特点：儿童长期坐姿不良会导致近视、脊柱侧弯等问题。通过AI实时监测并语音提醒，可帮助儿童无感纠正姿态，养成良好习惯。该技能可集成到智能台灯或学习桌中，提升产品差异化竞争力。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康坐姿 AI。你的任务是分析儿童学习区域的实时视频，检测坐姿姿态，估算脊柱弯曲角度（Cobb 角）和头部倾斜角度。当驼背或歪头持续时间超过阈值时，输出语音提醒指令。不要提供医疗诊断或具体矫正训练方案，仅输出基于视觉的姿态分析结果与语音提醒指令。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能台灯/书桌摄像头视频，实时估算儿童脊柱弯曲与头部倾斜角度，超阈值触发语音提醒并汇总会话坐姿质量\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 儿童上半身检测 |\n| 2 | 姿态关键点估计 |\n| 3 | Cobb 角估算 |\n| 4 | 头部侧倾角 |\n| 5 | 双肩水平偏差 |\n| 6 | 眼睛-书面距离估算 |\n| 7 | 不良姿态类型分类（hunchback / head_tilt / forward_head / shoulder_asymmetry / too_close_to_desk） |\n| 8 | 持续时间判定（默认 5 秒） |\n| 9 | 语音提醒文本生成 |\n| 10 | 会话坐姿摘要 |\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_child_poor_posture_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_poor_posture_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_child_poor_posture_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_child_poor_posture_detection_analysis.py`](scripts/smyx_child_poor_posture_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；建议正对面部+上半身、≥ 15 FPS |\n| 🧑‍⚖️ 结果性质 | Cobb 角为视觉估算，与影像学测量存在偏差，仅供习惯纠正参考，不能替代脊柱侧弯医学评估 |\n| 🔏 隐私合规 | 隐私合规：儿童学习场景视频涉及未成年人隐私，使用前需取得监护人知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --input /path/to/posture.mp4\n\n# 分析网络儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --url https://example.com/posture.mp4\n\n# 显示历史坐姿不良识别报告（自动触发关键词：查看坐姿不良历史报告、坐姿监测报告清单等）\npython -m scripts.smyx_child_poor_posture_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-poor-posture-detection-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1785609579810\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_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` - 儿童坐姿不良（驼背/歪头）实时提醒\n\n## 输入约束\n\n- 摄像头建议为智能台灯内置摄像头或书桌上方摄像头\n- 视野需覆盖儿童上半身（肩部至头部）\n- 视频帧率建议 ≥ 15 FPS；光照均匀，避免逆光\n\n## 关键观测指标\n\n- `cobb_angle_deg` - 脊柱弯曲角度估算（Cobb 角，°）\n- `head_tilt_deg` - 头部侧倾角度（°）\n- `shoulder_horizontal_offset_deg` - 双肩水平偏差（°）\n- `eye_to_desk_distance_cm` - 眼睛与书面距离（估算，cm）\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 驼背：Cobb 角 > 10°\n- 歪头：头部侧倾角 > 15°\n- 持续时长触发阈值：5 秒（hold_duration_threshold_sec）\n- 用眼距离过近：< 25 cm（建议触发\"距离过近\"提醒）\n\n## 不良姿态类型\n\n- `hunchback` - 驼背\n- `head_tilt` - 歪头\n- `forward_head` - 头部前伸\n- `shoulder_asymmetry` - 双肩不平\n- `too_close_to_desk` - 离书面过近\n\n## 输出字段（参考）\n\n- `child_detected` - 是否检测到儿童\n- `posture_metrics` - 姿态参数（cobb_angle_deg / head_tilt_deg / shoulder_horizontal_offset_deg / eye_to_desk_distance_cm）\n- `poor_posture_type` - 当前不良姿态类型\n- `hold_duration_sec` - 不良姿态持续秒数\n- `voice_prompt` - 语音提醒指令文本（如\"请坐直\"、\"头抬正\"、\"眼睛离书本远一点\"）\n- `event_time` - 事件时间戳\n- `snapshot_url` - 现场快照 URL\n- `summary` - 当次会话不良姿态统计（每类型次数/总持续时长）\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: <br>\nAnalyzes child study-area images or video to estimate posture metrics such as Cobb angle and head tilt, produce structured posture results, and generate reminder text when poor posture persists. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[18072937735](https://clawhub.ai/user/18072937735) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal developers and product teams can use this skill to add child posture monitoring, reminder generation, and history-report lookup workflows to smart desk lamps, study desks, or classroom monitoring products. Results are visual posture estimates for habit reminders, not medical diagnosis. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill sends sensitive child posture video or image data to cloud services for analysis. <br>\nMitigation: Install and use only after confirming guardian consent, cloud upload terms, retention and deletion controls, and appropriate handling of child video data. <br>\nRisk: History queries and report links may expose child posture reports or account-bound records. <br>\nMitigation: Confirm report-link access controls and account authorization before using history lookup or sharing generated report links. <br>\nRisk: The skill silently manages persistent user or account state. <br>\nMitigation: Verify where identifiers, tokens, and posture reports are stored before deployment, and avoid real child videos until privacy and authorization controls are clear. <br>\nRisk: Posture angles are visual estimates and may be wrong or incomplete. <br>\nMitigation: Use outputs for posture habit reminders only, and do not treat them as medical diagnosis or scoliosis assessment. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-child-poor-posture-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 text with structured JSON-style analysis, voice reminder text, history-report lists, and report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include cloud report export links and posture metrics such as estimated Cobb angle, head tilt, shoulder offset, and eye-to-desk distance.] <br>\n\n## Skill Version(s): <br>\n1.0.6 (source: server release metadata; artifact frontmatter says 1.0.7) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.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.4: 31 files, 40602 bytes\n\nFiles: references/api_doc.md (2327b), scripts/__init__.py (56b), scripts/config.py (706b), scripts/config.yaml (3b), scripts/skill.py (598b), scripts/smyx_child_poor_posture_detection_analysis.py (3636b), skill-card.md (2741b), SKILL.md (11999b), 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 (161b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: \"smyx-child-poor-posture-detection-analysis\"\ndescription: \"Using the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。\"\nversion: \"1.0.4\"\nlicense: \"MIT-0\"\n---\n\n# 🪑 Child Poor Posture (Hunchback / Head Tilt) Real-Time Reminder | 儿童坐姿不良（驼背/歪头）实时提醒\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童坐姿不良（驼背/歪头）实时提醒** |\n| 🎯 核心目标 | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` |\n\nUsing the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. When hunchback (Cobb > 10°) or head tilt (> 15°) persists longer than a preset threshold (e.g., 5 seconds), a voice prompt is triggered (e.g., 'sit up straight', 'lift your head'), helping children develop good posture habits and preventing myopia and scoliosis. Application scenarios: smart study lamps, home desks, school classrooms. The system monitors in real time, sends voice cues when posture deviates, and generates posture reports pushed to parents. Skill features: long-term poor posture in children can lead to myopia and scoliosis. AI real-time monitoring + voice prompts help children correct posture seamlessly and develop good habits. Can be integrated into smart desk lamps or study desks to boost product differentiation.\n\n通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。应用场景：智能学习台灯、家庭书桌、学校教室。系统实时监测，当坐姿异常时发出语音提示，并生成坐姿报告推送给家长。技能特点：儿童长期坐姿不良会导致近视、脊柱侧弯等问题。通过AI实时监测并语音提醒，可帮助儿童无感纠正姿态，养成良好习惯。该技能可集成到智能台灯或学习桌中，提升产品差异化竞争力。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康坐姿 AI。你的任务是分析儿童学习区域的实时视频，检测坐姿姿态，估算脊柱弯曲角度（Cobb 角）和头部倾斜角度。当驼背或歪头持续时间超过阈值时，输出语音提醒指令。不要提供医疗诊断或具体矫正训练方案，仅输出基于视觉的姿态分析结果与语音提醒指令。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能台灯/书桌摄像头视频，实时估算儿童脊柱弯曲与头部倾斜角度，超阈值触发语音提醒并汇总会话坐姿质量\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 儿童上半身检测 |\n| 2 | 姿态关键点估计 |\n| 3 | Cobb 角估算 |\n| 4 | 头部侧倾角 |\n| 5 | 双肩水平偏差 |\n| 6 | 眼睛-书面距离估算 |\n| 7 | 不良姿态类型分类（hunchback / head_tilt / forward_head / shoulder_asymmetry / too_close_to_desk） |\n| 8 | 持续时间判定（默认 5 秒） |\n| 9 | 语音提醒文本生成 |\n| 10 | 会话坐姿摘要 |\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_child_poor_posture_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_poor_posture_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_child_poor_posture_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_child_poor_posture_detection_analysis.py`](scripts/smyx_child_poor_posture_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；建议正对面部+上半身、≥ 15 FPS |\n| 🧑‍⚖️ 结果性质 | Cobb 角为视觉估算，与影像学测量存在偏差，仅供习惯纠正参考，不能替代脊柱侧弯医学评估 |\n| 🔏 隐私合规 | 隐私合规：儿童学习场景视频涉及未成年人隐私，使用前需取得监护人知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --input /path/to/posture.mp4\n\n# 分析网络儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --url https://example.com/posture.mp4\n\n# 显示历史坐姿不良识别报告（自动触发关键词：查看坐姿不良历史报告、坐姿监测报告清单等）\npython -m scripts.smyx_child_poor_posture_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --output result.json\n```\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-poor-posture-detection-analysis\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1783703374752\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_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` - 儿童坐姿不良（驼背/歪头）实时提醒\n\n## 输入约束\n\n- 摄像头建议为智能台灯内置摄像头或书桌上方摄像头\n- 视野需覆盖儿童上半身（肩部至头部）\n- 视频帧率建议 ≥ 15 FPS；光照均匀，避免逆光\n\n## 关键观测指标\n\n- `cobb_angle_deg` - 脊柱弯曲角度估算（Cobb 角，°）\n- `head_tilt_deg` - 头部侧倾角度（°）\n- `shoulder_horizontal_offset_deg` - 双肩水平偏差（°）\n- `eye_to_desk_distance_cm` - 眼睛与书面距离（估算，cm）\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 驼背：Cobb 角 > 10°\n- 歪头：头部侧倾角 > 15°\n- 持续时长触发阈值：5 秒（hold_duration_threshold_sec）\n- 用眼距离过近：< 25 cm（建议触发\"距离过近\"提醒）\n\n## 不良姿态类型\n\n- `hunchback` - 驼背\n- `head_tilt` - 歪头\n- `forward_head` - 头部前伸\n- `shoulder_asymmetry` - 双肩不平\n- `too_close_to_desk` - 离书面过近\n\n## 输出字段（参考）\n\n- `child_detected` - 是否检测到儿童\n- `posture_metrics` - 姿态参数（cobb_angle_deg / head_tilt_deg / shoulder_horizontal_offset_deg / eye_to_desk_distance_cm）\n- `poor_posture_type` - 当前不良姿态类型\n- `hold_duration_sec` - 不良姿态持续秒数\n- `voice_prompt` - 语音提醒指令文本（如\"请坐直\"、\"头抬正\"、\"眼睛离书本远一点\"）\n- `event_time` - 事件时间戳\n- `snapshot_url` - 现场快照 URL\n- `summary` - 当次会话不良姿态统计（每类型次数/总持续时长）\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: prod\n\nFile v1.0.4:skill-card.md\n\n## Description: <br>\nAnalyzes child study-area video to estimate posture metrics such as Cobb angle and head tilt, generate posture reminder text, and return structured posture reports. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[18072937735](https://clawhub.ai/user/18072937735) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users, developers, and product teams can use this skill to analyze child study-area posture videos, identify hunchback or head-tilt events, generate reminder text, and retrieve posture report records. It is intended for habit-correction support and report generation, not medical diagnosis. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Identifiable child posture videos are processed through the publisher's cloud service. <br>\nMitigation: Use only with guardian consent and authorization; confirm retention, deletion, report-access, and token-storage policies before uploading sensitive or third-party videos. <br>\nRisk: The skill may silently create or reuse a local account identity for report access. <br>\nMitigation: Review local account and token storage before use, prefer isolated workspaces or accounts, and clear local credentials and report access data when they are no longer needed. <br>\nRisk: Visual posture metrics such as estimated Cobb angle can be inaccurate or misread as medical assessment. <br>\nMitigation: Use the output only for posture-reminder and habit-support workflows; seek qualified medical evaluation for scoliosis or other health concerns. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-child-poor-posture-detection-analysis) <br>\n- [Child Posture API Documentation](references/api_doc.md) <br>\n- [Analysis API Error Codes](skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill Demo](https://lifeemergence.com/sample.html) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, JSON, Files] <br>\n**Output Format:** [Markdown text with structured JSON report content, voice reminder text, report links, and optional saved output files] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include cloud report history records and report export links when the list workflow is used.] <br>\n\n## Skill Version(s): <br>\n1.0.4 (source: SKILL.md frontmatter and server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.4:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.4:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3","readmeExcerpt":"Skill: Child Poor Posture (Hunchback / Head Tilt) Real-Time Reminder | 儿童坐姿不良（驼背/歪头）实时提醒 Owner: 18072937735 Summary: Using the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.smyx_child_poor_posture_detection_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --input /path/to/posture.mp4\n\n# 分析网络儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --url https://example.com/posture.mp4\n\n# 显示历史坐姿不良识别报告（自动触发关键词：查看坐姿不良历史报告、坐姿监测报告清单等）\npython -m scripts.smyx_child_poor_posture_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --output result.json"},{"language":"bash","snippet":"python -m scripts.smyx_child_poor_posture_detection_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --input /path/to/posture.mp4\n\n# 分析网络儿童坐姿视频\npython -m scripts.smyx_child_poor_posture_detection_analysis --url https://example.com/posture.mp4\n\n# 显示历史坐姿不良识别报告（自动触发关键词：查看坐姿不良历史报告、坐姿监测报告清单等）\npython -m scripts.smyx_child_poor_posture_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_poor_posture_detection_analysis --input posture.mp4 --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"smyx-child-poor-posture-detection-analysis\"\ndescription: \"Using the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。\"\nversion: \"1.0.15\"\nlicense: \"MIT-0\"\n---\n\n# 🪑 Child Poor Posture (Hunchback / Head Tilt) Real-Time Reminder | 儿童坐姿不良（驼背/歪头）实时提醒\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童坐姿不良（驼背/歪头）实时提醒** |\n| 🎯 核心目标 | 通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` |\n\nUsing the camera built into a smart desk lamp or mounted above the desk, the system analyzes the child's sitting-posture video in real time, detecting spinal curvature angle (estimated Cobb angle) and head tilt angle. When hunchback (Cobb > 10°) or head tilt (> 15°) persists longer than a preset threshold (e.g., 5 seconds), a voice prompt is triggered (e.g., 'sit up straight', 'lift your head'), helping children develop good posture habits and preventing myopia and scoliosis. Application scenarios: smart study lamps, home desks, school classrooms. The system monitors in real time, sends voice cues when posture deviates, and generates posture reports pushed to parents. Skill features: long-term poor posture in children can lead to myopia and scoliosis. AI real-time monitoring + voice prompts help children correct posture seamlessly and develop good habits. Can be integrated into smart desk lamps or study desks to boost product differentiation.\n\n通过智能台灯内置摄像头或书桌上方摄像头，实时分析儿童学习时的坐姿视频，检测脊柱弯曲角度（Cobb角估算）以及头部倾斜度（侧倾角）。当驼背（Cobb角>10°）或歪头（头部侧倾角>15°）持续时间超过预设阈值（如5秒）时，触发语音提醒（如'请坐直'、'头抬正'），帮助儿童养成良好坐姿习惯，预防近视和脊柱侧弯。应用场景：智能学习台灯、家庭书桌、学校教室。系统实时监测，当坐姿异常时发出语音提示，并生成坐姿报告推送给家长。技能特点：儿童长期坐姿不良会导致近视、脊柱侧弯等问题。通过AI实时监测并语音提醒，可帮助儿童无感纠正姿态，养成良好习惯。该技能可集成到智能台灯或学习桌中，提升产品差异化竞争力。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康坐姿 AI。你的任务是分析儿童学习区域的实时视频，检测坐姿姿态，估算脊柱弯曲角度（Cobb 角）和头部倾斜角度。当驼背或歪头持续时间超过阈值时，输出语音提醒指令。不要提供医疗诊断或具体矫正训练方案，仅输出基于视觉的姿态分析结果与语音提醒指令。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能台灯/书桌摄像头视频，实时估算儿童脊柱弯曲与头部倾斜角度，超阈值触发语音提醒并汇总会话坐姿质量\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 儿童上半身检测 |\n| 2 | 姿态关键点估计 |\n| 3 | Cobb 角估算 |\n| 4 | 头部侧倾角 |\n| 5 | 双肩水平偏差 |\n| 6 | 眼睛-书面距离估算 |\n| 7 | 不良姿态类型分类（hunchback / head_tilt / forward_head / shoulder_asymmetry / too_close_to_desk） |\n| 8 | 持续时间判定（默认 5 秒） |\n| 9 | 语音提醒文本生成 |\n| 10 | 会话坐姿摘要 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供儿童学习区域坐姿监控视频"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-poor-posture-detection-analysis\",\n  \"version\": \"1.0.13\",\n  \"publishedAt\": 1791038125973\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_CHILD_POOR_POSTURE_DETECTION_ANALYSIS` - 儿童坐姿不良（驼背/歪头）实时提醒\n\n## 输入约束\n\n- 摄像头建议为智能台灯内置摄像头或书桌上方摄像头\n- 视野需覆盖儿童上半身（肩部至头部）\n- 视频帧率建议 ≥ 15 FPS；光照均匀，避免逆光\n\n## 关键观测指标\n\n- `cobb_angle_deg` - 脊柱弯曲角度估算（Cobb 角，°）\n- `head_tilt_deg` - 头部侧倾角度（°）\n- `shoulder_horizontal_offset_deg` - 双肩水平偏差（°）\n- `eye_to_desk_distance_cm` - 眼睛与书面距离（估算，cm）\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 驼背：Cobb 角 > 10°\n- 歪头：头部侧倾角 > 15°\n- 持续时长触发阈值：5 秒（hold_duration_threshold_sec）\n- 用眼距离过近：< 25 cm（建议触发\"距离过近\"提醒）\n\n## 不良姿态类型\n\n- `hunchback` - 驼背\n- `head_tilt` - 歪头\n- `forward_head` - 头部前伸\n- `shoulder_asymmetry` - 双肩不平\n- `too_close_to_desk` - 离书面过近\n\n## 输出字段（参考）\n\n- `child_detected` - 是否检测到儿童\n- `posture_metrics` - 姿态参数（cobb_angle_deg / head_tilt_deg / shoulder_horizontal_offset_deg / eye_to_desk_distance_cm）\n- `poor_posture_type` - 当前不良姿态类型\n- `hold_duration_sec` - 不良姿态持续秒数\n- `voice_prompt` - 语音提醒指令文本（如\"请坐直\"、\"头抬正\"、\"眼睛离书本远一点\"）\n- `event_time` - 事件时间戳\n- `snapshot_url` - 现场快照 URL\n- `summary` - 当次会话不良姿态统计（每类型次数/总持续时长）\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":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1078,"uniquenessScore":42,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T22:49:22.159Z","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-09T22:49:22.159Z","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-10T04:58:01.152Z","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"}]}}}