{"id":"196877fa-9afc-4ceb-a0a0-7ea1e3837525","entityType":"agent","slug":"clawhub-18072937735-smyx-office-worker-posture-warning-analysis","name":"Office Prolonged Sitting & Posture Warning | 成人久坐/姿态预警（办公室）","canonicalUrl":"https://www.xpersona.co/agent/clawhub-18072937735-smyx-office-worker-posture-warning-analysis","canonicalPath":"/agent/clawhub-18072937735-smyx-office-worker-posture-warning-analysis","generatedAt":"2026-10-10T02:05:02.605Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-09T18:14:44.179Z","emptyReason":null},"description":"Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。 Skill: Office Prolonged Sitting & Posture Warning | 成人久坐/姿态预警（办公室） Owner: 18072937735 Summary: Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2.1K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-office-worker-posture-warning-analysis","sourceUrl":"https://clawhub.ai/18072937735/smyx-office-worker-posture-warning-analysis","homepage":"https://clawhub.ai/18072937735/skills/smyx-office-worker-posture-warning-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/18072937735/smyx-office-worker-posture-warning-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/18072937735/skills/smyx-office-worker-posture-warning-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":67,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitt"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T18:14:44.179Z","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-09T18:14:44.179Z","emptyReason":null},"stars":null,"forks":null,"downloads":2148,"packageName":null,"latestVersion":"1.0.12","tractionLabel":"2.1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T18:14:44.179Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T18:14:44.179Z","lastCrawledAt":"2026-10-09T18:14:44.179Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T18:14:44.179Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.12","createdAt":"2026-10-04T08:47:25.207Z","changelog":"- Updated documentation in SKILL.md with refined instructions, flow, and parameter explanations. - Bumped version number to 1.0.16. - Removed the skill-card.md file. - No logic or code changes; updates are limited to files for documentation and metadata.","fileCount":31,"zipByteSize":40640},{"version":"1.0.11","createdAt":"2026-09-22T11:09:27.859Z","changelog":"- Updated version number and metadata in SKILL.md - Removed the file skill-card.md - Minor documentation and configuration updates - No changes to user-facing features or core functionality","fileCount":31,"zipByteSize":40859},{"version":"1.0.10","createdAt":"2026-08-30T05:13:30.407Z","changelog":"- Updated SKILL.md to version 1.0.12 with minor documentation adjustments. - Removed the deprecated skill-card.md file. - No changes to core functionality or APIs; documentation is more concise and up to date.","fileCount":31,"zipByteSize":40925},{"version":"1.0.9","createdAt":"2026-08-19T14:40:37.393Z","changelog":"smyx-office-worker-posture-warning-analysis 1.0.9 - Updated configuration in skills/smyx_common/scripts/config.yaml. - Removed the skill-card.md file.","fileCount":31,"zipByteSize":40927},{"version":"1.0.8","createdAt":"2026-08-11T09:07:34.338Z","changelog":"- Version updated to 1.0.10. - Documentation (SKILL.md) refined and likely updated for clarity and detail. - Removed the file: skill-card.md. - No changes to core features or code are indicated.","fileCount":31,"zipByteSize":40975},{"version":"1.0.7","createdAt":"2026-08-06T04:15:33.666Z","changelog":"- Removed the file `skill-card.md` from the project. - No functional changes to the skill logic or documentation. - This update is primarily a cleanup to remove redundant documentation files.","fileCount":31,"zipByteSize":41010},{"version":"1.0.6","createdAt":"2026-07-31T15:13:46.114Z","changelog":"- Version updated to 1.0.8 in SKILL.md. - Documentation updated in SKILL.md; details and instructions revised or expanded. - Obsolete or redundant file skill-card.md removed.","fileCount":31,"zipByteSize":40871},{"version":"1.0.5","createdAt":"2026-07-14T16:38:47.596Z","changelog":"- Updated utility functions in `skills/smyx_common/scripts/util.py`. - Removed the `skill-card.md` file. - No changes to skill logic or user-facing features. - Documentation and usage remain unchanged.","fileCount":31,"zipByteSize":40974}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-office-worker-posture-warning-analysis","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-office-worker-posture-warning-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-office-worker-posture-warning-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-office-worker-posture-warning-analysis/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-office-worker-posture-warning-analysis/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-office-worker-posture-warning-analysis/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-office-worker-posture-warning-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-10T02:05:02.602Z"}},"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-office-worker-posture-warning-analysis/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-office-worker-posture-warning-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-office-worker-posture-warning-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-office-worker-posture-warning-analysis/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-09T18:14:44.179Z","emptyReason":null},"readme":"Skill: Office Prolonged Sitting & Posture Warning | 成人久坐/姿态预警（办公室）\n\nOwner: 18072937735\n\nSummary: Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。\n\nTags: latest:1.0.12\n\nVersion history:\n\nv1.0.12 | 2026-10-04T08:47:25.207Z | auto\n\n- Updated documentation in SKILL.md with refined instructions, flow, and parameter explanations.\n- Bumped version number to 1.0.16.\n- Removed the skill-card.md file.\n- No logic or code changes; updates are limited to files for documentation and metadata.\n\nv1.0.11 | 2026-09-22T11:09:27.859Z | auto\n\n- Updated version number and metadata in SKILL.md\n- Removed the file skill-card.md\n- Minor documentation and configuration updates\n- No changes to user-facing features or core functionality\n\nv1.0.10 | 2026-08-30T05:13:30.407Z | auto\n\n- Updated SKILL.md to version 1.0.12 with minor documentation adjustments.\n- Removed the deprecated skill-card.md file.\n- No changes to core functionality or APIs; documentation is more concise and up to date.\n\nv1.0.9 | 2026-08-19T14:40:37.393Z | auto\n\nsmyx-office-worker-posture-warning-analysis 1.0.9\n\n- Updated configuration in skills/smyx_common/scripts/config.yaml.\n- Removed the skill-card.md file.\n\nv1.0.8 | 2026-08-11T09:07:34.338Z | auto\n\n- Version updated to 1.0.10.\n- Documentation (SKILL.md) refined and likely updated for clarity and detail.\n- Removed the file: skill-card.md.\n- No changes to core features or code are indicated.\n\nv1.0.7 | 2026-08-06T04:15:33.666Z | auto\n\n- Removed the file `skill-card.md` from the project.\n- No functional changes to the skill logic or documentation.\n- This update is primarily a cleanup to remove redundant documentation files.\n\nv1.0.6 | 2026-07-31T15:13:46.114Z | auto\n\n- Version updated to 1.0.8 in SKILL.md.\n- Documentation updated in SKILL.md; details and instructions revised or expanded.\n- Obsolete or redundant file skill-card.md removed.\n\nv1.0.5 | 2026-07-14T16:38:47.596Z | auto\n\n- Updated utility functions in `skills/smyx_common/scripts/util.py`.\n- Removed the `skill-card.md` file.\n- No changes to skill logic or user-facing features.\n- Documentation and usage remain unchanged.\n\nv1.0.4 | 2026-07-09T04:52:29.697Z | auto\n\nVersion 1.0.4\n\n- Updated skill documentation in SKILL.md, including version metadata.\n- Modified scripts/smyx_common/scripts/config.py.\n- Removed redundant or outdated skill-card.md documentation file.\n\nv1.0.3 | 2026-06-30T09:02:25.474Z | auto\n\n- Updated SKILL.md with enhanced formatting, clearer workflow, and structured tables for improved usability and readability.\n- Added new sections for skill overview, goals, resource index, and examples, including both Chinese and English explanations.\n- Reinforced rules on cloud-based historical report retrieval and clarified script parameter usage.\n- Removed outdated file (skill-card.md) for consistency.\n- No core algorithm or interface changes; improvements focus on documentation clarity and user guidance.\n\nv1.0.2 | 2026-06-24T09:59:29.252Z | auto\n\n- User identity handling is now fully automated; users are no longer prompted for usernames or phone numbers.\n- Internal identity parameters are managed by the system and never exposed or required in user interactions or output.\n- Historical report queries are triggered by user intent only, with identity associated internally and results presented without showing internal details.\n- Documentation, usage steps, and warnings updated to reflect these privacy and usability improvements.\n- Removed redundant open-id and api-key manual acquisition logic from both user flow and technical description.\n- Sample file and script references updated for clarity and scope.\n\nv1.0.1 | 2026-06-21T10:33:25.154Z | auto\n\n- Updated the skill version to 1.0.2.\n- Added license information (MIT-0) to SKILL.md.\n- Shortened and clarified the description field in SKILL.md for improved readability.\n- Updated file and directory references in configuration instructions (e.g., config.yaml path).\n- Removed the redundant skill-card.md file.\n\nv1.0.0 | 2026-05-25T16:53:14.502Z | auto\n\nInitial release of smyx-office-worker-posture-warning-analysis:\n\n- Real-time analysis of office workers’ sitting posture using fixed workstation cameras.\n- Detects continuous sitting duration, neck forward angle, back curvature, shoulder asymmetry, and eye-to-screen distance.\n- Provides alerts for prolonged sitting, poor posture, shoulder imbalance, and excessive screen proximity through PC popup, smart speaker, or mobile app.\n- Strict open-id acquisition and privacy guidelines enforced for data query and report access.\n- Supports historical report lookup and outputs results in structured Markdown tables with direct report links.\n- Designed for integration into enterprise security cameras or health SaaS platforms to promote workplace health.\n\nArchive index:\n\nArchive v1.0.12: 31 files, 40640 bytes\n\nFiles: references/api_doc.md (2597b), scripts/__init__.py (57b), scripts/config.py (698b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_office_worker_posture_warning_analysis.py (3594b), skill-card.md (1953b), SKILL.md (12579b), 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 (163b)\n\nFile v1.0.12:SKILL.md\n\n---\nname: \"smyx-office-worker-posture-warning-analysis\"\ndescription: \"Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。\"\nversion: \"1.0.16\"\nlicense: \"MIT-0\"\n---\n\n# 💻 Office Prolonged Sitting & Posture Warning | 成人久坐/姿态预警（办公室）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人久坐/姿态预警（办公室）** |\n| 🎯 核心目标 | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` |\n\nUsing a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). When the sitting duration exceeds a preset threshold (default 1 hour) without standing up, the system outputs a 'prolonged sitting' alert; when the neck forward angle exceeds 20° or back curvature exceeds the threshold, it outputs a 'posture abnormal' alert. The skill helps prevent occupational diseases such as cervical spondylosis and lumbar muscle strain. Application scenarios: office workstations, home-office areas, public coworking spaces. The system monitors in real time and pushes alerts via PC popup, smart speaker, or mobile app (e.g., 'sitting for 1 hour, please stand up' or 'straighten your back'). Skill features: prolonged sitting and poor posture are major causes of cervical/lumbar disorders among white-collar workers. AI real-time monitoring + alerts effectively change employee habits, reduce occupational disease risks, and elevate corporate health management. Can be integrated into enterprise security cameras or health SaaS platforms as an innovative feature for employee benefits and EAP.\n\n通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。该技能有助于预防颈椎病、腰肌劳损等办公室职业病。应用场景：办公室工位、居家办公区、公共办公空间。系统实时监测，通过PC弹窗、智能音箱或手机APP推送提醒（如'已坐1小时，请起身活动'或'请直起腰背'）。技能特点：久坐和不良坐姿是白领阶层颈椎、腰椎病高发的主要原因。通过AI自动监测并实时提醒，可有效改变员工行为习惯，降低职业病风险，提升企业健康管理水平。该技能可集成到企业安防摄像头或健康SaaS平台中，成为员工福利和EAP（员工援助计划）的创新功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的职场健康管理 AI。你的任务是分析办公人员坐姿的实时视频，检测连续坐姿时长、颈部前倾角以及背部弯曲度。当久坐时间超过阈值或姿态异常时，输出健康提醒。不要提供医疗诊断或具体康复方案，仅输出基于视觉的坐姿和活动监测结果与方向性提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于办公工位摄像头视频，实时监测办公人员连续坐姿时长 + 颈部前倾角 + 背部弯曲度 + 双肩偏差 + 眼-屏距离，按阈值输出久坐/姿态异常提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 办公人员检测 |\n| 2 | 上半身姿态关键点估计 |\n| 3 | 连续坐姿时长统计 |\n| 4 | 起身次数统计 |\n| 5 | 颈部前倾角估算 |\n| 6 | 背部弯曲度（驼背）估算 |\n| 7 | 双肩高度差 |\n| 8 | 眼-屏距离估算 |\n| 9 | 预警类型分类（prolonged_sitting / forward_head_posture / hunchback_posture / shoulder_asymmetry / too_close_to_screen） |\n| 10 | PC 弹窗 / 智能音箱 / APP 提醒文本生成 |\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_office_worker_posture_warning_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_office_worker_posture_warning_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_office_worker_posture_warning_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_office_worker_posture_warning_analysis.py`](scripts/smyx_office_worker_posture_warning_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议对准工位侧前方、覆盖上半身 |\n| 🧑‍⚖️ 结果性质 | 预警结果仅作为职场健康行为引导，本工具不替代专业康复/骨科诊断；已有颈腰椎不适请就医 |\n| 🔏 隐私合规 | 隐私合规：办公场景视频涉及个人隐私，使用前需取得员工知情同意，企业部署应遵循当地隐私法规并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --input /path/to/desk.mp4\n\n# 分析网络办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --url https://example.com/desk.mp4\n\n# 显示历史久坐/姿态预警报告（自动触发关键词：查看办公人员久坐历史报告、坐姿提醒报告清单等）\npython -m scripts.smyx_office_worker_posture_warning_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --output result.json\n```\n\nFile v1.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-office-worker-posture-warning-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1791103645207\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_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` - 成人久坐/姿态预警（办公室）\n\n## 输入约束\n\n- 摄像头建议对准工位（侧前方），覆盖头部、颈部、肩部及背部\n- 帧率建议 ≥ 10 FPS；光照均匀\n- 适用于办公室、居家办公区、公共办公空间\n\n## 关键观测指标\n\n- `continuous_sit_duration_min` - 当次连续坐姿时长（分钟）\n- `neck_forward_angle_deg` - 颈部前倾角度（°，头部相对肩部偏移）\n- `back_curvature_deg` - 背部弯曲度（°，驼背程度）\n- `shoulder_drop_diff_deg` - 双肩高度差（°）\n- `eye_to_screen_distance_cm` - 眼-屏幕距离（估算，cm）\n- `stand_up_count_per_hour` - 每小时起身次数\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 久坐时长阈值：60 分钟（continuous_sit_threshold_min）\n- 颈部前倾角阈值：> 20°（neck_forward_threshold_deg）\n- 背部弯曲阈值：> 阈值（back_curvature_threshold_deg）\n- 眼-屏距离过近：< 40 cm\n\n## 预警类型\n\n- `prolonged_sitting` - 久坐提醒（建议起身活动）\n- `forward_head_posture` - 颈部前倾提醒（建议直颈）\n- `hunchback_posture` - 驼背提醒（建议直背）\n- `shoulder_asymmetry` - 双肩不平提醒\n- `too_close_to_screen` - 离屏幕过近提醒\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到办公人员\n- `posture_metrics` - 姿态参数（neck_forward_angle_deg / back_curvature_deg / shoulder_drop_diff_deg / eye_to_screen_distance_cm）\n- `continuous_sit_duration_min` - 当次连续坐姿时长\n- `stand_up_count_per_hour` - 每小时起身次数\n- `warning_type` - 触发的预警类型\n- `warning_message` - 预警提示文本（如\"已连续坐 65 分钟，请起身活动 5 分钟\"、\"颈部前倾 25°，请直颈调整屏幕高度\"）\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 office workstation video for prolonged sitting and posture changes, returning alerts and 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\nEmployees and workplace health teams use workstation video to identify prolonged sitting and posture concerns, receive behavioral reminders, and review past reports. Results are wellness guidance, not a medical diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Workplace camera footage and posture reports expose sensitive employee data.\n\nMitigation: Obtain employee consent and restrict access to footage and reports before deployment.\n\nRisk: Automatic identity creation, locally stored account tokens, and cloud history queries may expose reports to unintended users.\n\nMitigation: Confirm the cloud service and identity model, limit history-query access, avoid arbitrary identity values, and review token storage and removal.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/18072937735/skills/smyx-office-worker-posture-warning-analysis)\n- [API documentation](references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Guidance]\n\n**Output Format:** [Structured analysis reports and Markdown history tables, with optional JSON or saved text output]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Includes posture alerts, suggestions, and report links when available.]\n\n## Skill Version(s):\n\n1.0.12 (source: ClawHub release metadata; artifact frontmatter lists 1.0.16)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 40859 bytes\n\nFiles: references/api_doc.md (2597b), scripts/__init__.py (57b), scripts/config.py (698b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_office_worker_posture_warning_analysis.py (3594b), skill-card.md (2467b), SKILL.md (12579b), 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 (163b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: \"smyx-office-worker-posture-warning-analysis\"\ndescription: \"Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。\"\nversion: \"1.0.14\"\nlicense: \"MIT-0\"\n---\n\n# 💻 Office Prolonged Sitting & Posture Warning | 成人久坐/姿态预警（办公室）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人久坐/姿态预警（办公室）** |\n| 🎯 核心目标 | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` |\n\nUsing a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). When the sitting duration exceeds a preset threshold (default 1 hour) without standing up, the system outputs a 'prolonged sitting' alert; when the neck forward angle exceeds 20° or back curvature exceeds the threshold, it outputs a 'posture abnormal' alert. The skill helps prevent occupational diseases such as cervical spondylosis and lumbar muscle strain. Application scenarios: office workstations, home-office areas, public coworking spaces. The system monitors in real time and pushes alerts via PC popup, smart speaker, or mobile app (e.g., 'sitting for 1 hour, please stand up' or 'straighten your back'). Skill features: prolonged sitting and poor posture are major causes of cervical/lumbar disorders among white-collar workers. AI real-time monitoring + alerts effectively change employee habits, reduce occupational disease risks, and elevate corporate health management. Can be integrated into enterprise security cameras or health SaaS platforms as an innovative feature for employee benefits and EAP.\n\n通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。该技能有助于预防颈椎病、腰肌劳损等办公室职业病。应用场景：办公室工位、居家办公区、公共办公空间。系统实时监测，通过PC弹窗、智能音箱或手机APP推送提醒（如'已坐1小时，请起身活动'或'请直起腰背'）。技能特点：久坐和不良坐姿是白领阶层颈椎、腰椎病高发的主要原因。通过AI自动监测并实时提醒，可有效改变员工行为习惯，降低职业病风险，提升企业健康管理水平。该技能可集成到企业安防摄像头或健康SaaS平台中，成为员工福利和EAP（员工援助计划）的创新功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的职场健康管理 AI。你的任务是分析办公人员坐姿的实时视频，检测连续坐姿时长、颈部前倾角以及背部弯曲度。当久坐时间超过阈值或姿态异常时，输出健康提醒。不要提供医疗诊断或具体康复方案，仅输出基于视觉的坐姿和活动监测结果与方向性提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于办公工位摄像头视频，实时监测办公人员连续坐姿时长 + 颈部前倾角 + 背部弯曲度 + 双肩偏差 + 眼-屏距离，按阈值输出久坐/姿态异常提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 办公人员检测 |\n| 2 | 上半身姿态关键点估计 |\n| 3 | 连续坐姿时长统计 |\n| 4 | 起身次数统计 |\n| 5 | 颈部前倾角估算 |\n| 6 | 背部弯曲度（驼背）估算 |\n| 7 | 双肩高度差 |\n| 8 | 眼-屏距离估算 |\n| 9 | 预警类型分类（prolonged_sitting / forward_head_posture / hunchback_posture / shoulder_asymmetry / too_close_to_screen） |\n| 10 | PC 弹窗 / 智能音箱 / APP 提醒文本生成 |\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_office_worker_posture_warning_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_office_worker_posture_warning_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_office_worker_posture_warning_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_office_worker_posture_warning_analysis.py`](scripts/smyx_office_worker_posture_warning_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议对准工位侧前方、覆盖上半身 |\n| 🧑‍⚖️ 结果性质 | 预警结果仅作为职场健康行为引导，本工具不替代专业康复/骨科诊断；已有颈腰椎不适请就医 |\n| 🔏 隐私合规 | 隐私合规：办公场景视频涉及个人隐私，使用前需取得员工知情同意，企业部署应遵循当地隐私法规并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --input /path/to/desk.mp4\n\n# 分析网络办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --url https://example.com/desk.mp4\n\n# 显示历史久坐/姿态预警报告（自动触发关键词：查看办公人员久坐历史报告、坐姿提醒报告清单等）\npython -m scripts.smyx_office_worker_posture_warning_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --output result.json\n```\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-office-worker-posture-warning-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1790075367859\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_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` - 成人久坐/姿态预警（办公室）\n\n## 输入约束\n\n- 摄像头建议对准工位（侧前方），覆盖头部、颈部、肩部及背部\n- 帧率建议 ≥ 10 FPS；光照均匀\n- 适用于办公室、居家办公区、公共办公空间\n\n## 关键观测指标\n\n- `continuous_sit_duration_min` - 当次连续坐姿时长（分钟）\n- `neck_forward_angle_deg` - 颈部前倾角度（°，头部相对肩部偏移）\n- `back_curvature_deg` - 背部弯曲度（°，驼背程度）\n- `shoulder_drop_diff_deg` - 双肩高度差（°）\n- `eye_to_screen_distance_cm` - 眼-屏幕距离（估算，cm）\n- `stand_up_count_per_hour` - 每小时起身次数\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 久坐时长阈值：60 分钟（continuous_sit_threshold_min）\n- 颈部前倾角阈值：> 20°（neck_forward_threshold_deg）\n- 背部弯曲阈值：> 阈值（back_curvature_threshold_deg）\n- 眼-屏距离过近：< 40 cm\n\n## 预警类型\n\n- `prolonged_sitting` - 久坐提醒（建议起身活动）\n- `forward_head_posture` - 颈部前倾提醒（建议直颈）\n- `hunchback_posture` - 驼背提醒（建议直背）\n- `shoulder_asymmetry` - 双肩不平提醒\n- `too_close_to_screen` - 离屏幕过近提醒\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到办公人员\n- `posture_metrics` - 姿态参数（neck_forward_angle_deg / back_curvature_deg / shoulder_drop_diff_deg / eye_to_screen_distance_cm）\n- `continuous_sit_duration_min` - 当次连续坐姿时长\n- `stand_up_count_per_hour` - 每小时起身次数\n- `warning_type` - 触发的预警类型\n- `warning_message` - 预警提示文本（如\"已连续坐 65 分钟，请起身活动 5 分钟\"、\"颈部前倾 25°，请直颈调整屏幕高度\"）\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: prod\n\nFile v1.0.11:skill-card.md\n\n## Description:\n\nAnalyzes office workstation video or image input to report prolonged sitting and posture warnings such as forward head posture, hunching, shoulder asymmetry, and close screen distance.\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\nWorkplace health, facilities, or enterprise wellness teams can use this skill to analyze office-camera footage or submitted workstation media for posture and prolonged-sitting alerts. The output is behavioral guidance and structured reporting, not medical diagnosis or rehabilitation advice.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Office-camera footage and posture reports may contain sensitive employee personal data and are uploaded to cloud services.\n\nMitigation: Use only with employee notice and consent, approved cloud upload, and clear retention controls for reports and videos.\n\nRisk: The skill silently creates or reuses persistent local identity and token records for analysis and report history.\n\nMitigation: Review identity and token storage before deployment and require explicit confirmation before analysis or history retrieval.\n\nRisk: Posture warnings could be mistaken for medical diagnosis or treatment guidance.\n\nMitigation: Present outputs as workplace behavior prompts only and direct users with health concerns to qualified medical professionals.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-office-worker-posture-warning-analysis)\n- [API interface reference](artifact/references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Analysis, Markdown, JSON, Shell commands, Guidance]\n\n**Output Format:** [Markdown or JSON structured posture analysis report with warnings, metrics, recommendations, and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May query cloud history and return report-list tables or export links.]\n\n## Skill Version(s):\n\n1.0.11 (source: server release metadata; artifact SKILL.md frontmatter says 1.0.14)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 40925 bytes\n\nFiles: references/api_doc.md (2597b), scripts/__init__.py (57b), scripts/config.py (698b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_office_worker_posture_warning_analysis.py (3594b), skill-card.md (2670b), SKILL.md (12579b), 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 (163b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: \"smyx-office-worker-posture-warning-analysis\"\ndescription: \"Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。\"\nversion: \"1.0.12\"\nlicense: \"MIT-0\"\n---\n\n# 💻 Office Prolonged Sitting & Posture Warning | 成人久坐/姿态预警（办公室）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人久坐/姿态预警（办公室）** |\n| 🎯 核心目标 | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` |\n\nUsing a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). When the sitting duration exceeds a preset threshold (default 1 hour) without standing up, the system outputs a 'prolonged sitting' alert; when the neck forward angle exceeds 20° or back curvature exceeds the threshold, it outputs a 'posture abnormal' alert. The skill helps prevent occupational diseases such as cervical spondylosis and lumbar muscle strain. Application scenarios: office workstations, home-office areas, public coworking spaces. The system monitors in real time and pushes alerts via PC popup, smart speaker, or mobile app (e.g., 'sitting for 1 hour, please stand up' or 'straighten your back'). Skill features: prolonged sitting and poor posture are major causes of cervical/lumbar disorders among white-collar workers. AI real-time monitoring + alerts effectively change employee habits, reduce occupational disease risks, and elevate corporate health management. Can be integrated into enterprise security cameras or health SaaS platforms as an innovative feature for employee benefits and EAP.\n\n通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。该技能有助于预防颈椎病、腰肌劳损等办公室职业病。应用场景：办公室工位、居家办公区、公共办公空间。系统实时监测，通过PC弹窗、智能音箱或手机APP推送提醒（如'已坐1小时，请起身活动'或'请直起腰背'）。技能特点：久坐和不良坐姿是白领阶层颈椎、腰椎病高发的主要原因。通过AI自动监测并实时提醒，可有效改变员工行为习惯，降低职业病风险，提升企业健康管理水平。该技能可集成到企业安防摄像头或健康SaaS平台中，成为员工福利和EAP（员工援助计划）的创新功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的职场健康管理 AI。你的任务是分析办公人员坐姿的实时视频，检测连续坐姿时长、颈部前倾角以及背部弯曲度。当久坐时间超过阈值或姿态异常时，输出健康提醒。不要提供医疗诊断或具体康复方案，仅输出基于视觉的坐姿和活动监测结果与方向性提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于办公工位摄像头视频，实时监测办公人员连续坐姿时长 + 颈部前倾角 + 背部弯曲度 + 双肩偏差 + 眼-屏距离，按阈值输出久坐/姿态异常提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 办公人员检测 |\n| 2 | 上半身姿态关键点估计 |\n| 3 | 连续坐姿时长统计 |\n| 4 | 起身次数统计 |\n| 5 | 颈部前倾角估算 |\n| 6 | 背部弯曲度（驼背）估算 |\n| 7 | 双肩高度差 |\n| 8 | 眼-屏距离估算 |\n| 9 | 预警类型分类（prolonged_sitting / forward_head_posture / hunchback_posture / shoulder_asymmetry / too_close_to_screen） |\n| 10 | PC 弹窗 / 智能音箱 / APP 提醒文本生成 |\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_office_worker_posture_warning_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_office_worker_posture_warning_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_office_worker_posture_warning_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_office_worker_posture_warning_analysis.py`](scripts/smyx_office_worker_posture_warning_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议对准工位侧前方、覆盖上半身 |\n| 🧑‍⚖️ 结果性质 | 预警结果仅作为职场健康行为引导，本工具不替代专业康复/骨科诊断；已有颈腰椎不适请就医 |\n| 🔏 隐私合规 | 隐私合规：办公场景视频涉及个人隐私，使用前需取得员工知情同意，企业部署应遵循当地隐私法规并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --input /path/to/desk.mp4\n\n# 分析网络办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --url https://example.com/desk.mp4\n\n# 显示历史久坐/姿态预警报告（自动触发关键词：查看办公人员久坐历史报告、坐姿提醒报告清单等）\npython -m scripts.smyx_office_worker_posture_warning_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-office-worker-posture-warning-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1788066810407\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_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` - 成人久坐/姿态预警（办公室）\n\n## 输入约束\n\n- 摄像头建议对准工位（侧前方），覆盖头部、颈部、肩部及背部\n- 帧率建议 ≥ 10 FPS；光照均匀\n- 适用于办公室、居家办公区、公共办公空间\n\n## 关键观测指标\n\n- `continuous_sit_duration_min` - 当次连续坐姿时长（分钟）\n- `neck_forward_angle_deg` - 颈部前倾角度（°，头部相对肩部偏移）\n- `back_curvature_deg` - 背部弯曲度（°，驼背程度）\n- `shoulder_drop_diff_deg` - 双肩高度差（°）\n- `eye_to_screen_distance_cm` - 眼-屏幕距离（估算，cm）\n- `stand_up_count_per_hour` - 每小时起身次数\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 久坐时长阈值：60 分钟（continuous_sit_threshold_min）\n- 颈部前倾角阈值：> 20°（neck_forward_threshold_deg）\n- 背部弯曲阈值：> 阈值（back_curvature_threshold_deg）\n- 眼-屏距离过近：< 40 cm\n\n## 预警类型\n\n- `prolonged_sitting` - 久坐提醒（建议起身活动）\n- `forward_head_posture` - 颈部前倾提醒（建议直颈）\n- `hunchback_posture` - 驼背提醒（建议直背）\n- `shoulder_asymmetry` - 双肩不平提醒\n- `too_close_to_screen` - 离屏幕过近提醒\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到办公人员\n- `posture_metrics` - 姿态参数（neck_forward_angle_deg / back_curvature_deg / shoulder_drop_diff_deg / eye_to_screen_distance_cm）\n- `continuous_sit_duration_min` - 当次连续坐姿时长\n- `stand_up_count_per_hour` - 每小时起身次数\n- `warning_type` - 触发的预警类型\n- `warning_message` - 预警提示文本（如\"已连续坐 65 分钟，请起身活动 5 分钟\"、\"颈部前倾 25°，请直颈调整屏幕高度\"）\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\nUsing a fixed camera aimed at an office workstation, this skill analyzes sitting-posture images or video to report prolonged sitting, forward neck posture, back curvature, shoulder asymmetry, and screen-distance warnings.\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, enterprise health teams, and workplace automation agents use this skill to analyze office workstation video or image inputs and produce structured posture and prolonged-sitting alerts. The output is intended for workplace wellness guidance, not medical diagnosis or rehabilitation planning.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill handles sensitive workplace video and uploads analysis inputs to cloud services.\n\nMitigation: Use only after employee notice and consent are reviewed, and confirm privacy-law obligations, retention rules, and access controls before deployment.\n\nRisk: Security evidence reports plaintext token storage and active plaintext HTTP endpoints.\n\nMitigation: Deploy only with HTTPS-only endpoints, reviewed credential storage, and restricted report access; do not use distributed development configuration for real workplace video.\n\nRisk: Posture and sitting alerts can be mistaken for clinical findings.\n\nMitigation: Present results as workplace wellness guidance and direct users with pain or medical concerns to qualified professionals.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-office-worker-posture-warning-analysis)\n- [API documentation](artifact/references/api_doc.md)\n- [Shared analysis API documentation](artifact/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, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown or JSON-like structured analysis text with warning labels, posture metrics, recommendations, and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include prolonged-sitting alerts, posture-abnormality alerts, historical report tables, and links to exported cloud reports.]\n\n## Skill Version(s):\n\n1.0.10 (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.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, 40927 bytes\n\nFiles: references/api_doc.md (2597b), scripts/__init__.py (57b), scripts/config.py (698b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_office_worker_posture_warning_analysis.py (3594b), skill-card.md (2609b), SKILL.md (12579b), 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.9:SKILL.md\n\n---\nname: \"smyx-office-worker-posture-warning-analysis\"\ndescription: \"Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 💻 Office Prolonged Sitting & Posture Warning | 成人久坐/姿态预警（办公室）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人久坐/姿态预警（办公室）** |\n| 🎯 核心目标 | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` |\n\nUsing a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). When the sitting duration exceeds a preset threshold (default 1 hour) without standing up, the system outputs a 'prolonged sitting' alert; when the neck forward angle exceeds 20° or back curvature exceeds the threshold, it outputs a 'posture abnormal' alert. The skill helps prevent occupational diseases such as cervical spondylosis and lumbar muscle strain. Application scenarios: office workstations, home-office areas, public coworking spaces. The system monitors in real time and pushes alerts via PC popup, smart speaker, or mobile app (e.g., 'sitting for 1 hour, please stand up' or 'straighten your back'). Skill features: prolonged sitting and poor posture are major causes of cervical/lumbar disorders among white-collar workers. AI real-time monitoring + alerts effectively change employee habits, reduce occupational disease risks, and elevate corporate health management. Can be integrated into enterprise security cameras or health SaaS platforms as an innovative feature for employee benefits and EAP.\n\n通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。该技能有助于预防颈椎病、腰肌劳损等办公室职业病。应用场景：办公室工位、居家办公区、公共办公空间。系统实时监测，通过PC弹窗、智能音箱或手机APP推送提醒（如'已坐1小时，请起身活动'或'请直起腰背'）。技能特点：久坐和不良坐姿是白领阶层颈椎、腰椎病高发的主要原因。通过AI自动监测并实时提醒，可有效改变员工行为习惯，降低职业病风险，提升企业健康管理水平。该技能可集成到企业安防摄像头或健康SaaS平台中，成为员工福利和EAP（员工援助计划）的创新功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的职场健康管理 AI。你的任务是分析办公人员坐姿的实时视频，检测连续坐姿时长、颈部前倾角以及背部弯曲度。当久坐时间超过阈值或姿态异常时，输出健康提醒。不要提供医疗诊断或具体康复方案，仅输出基于视觉的坐姿和活动监测结果与方向性提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于办公工位摄像头视频，实时监测办公人员连续坐姿时长 + 颈部前倾角 + 背部弯曲度 + 双肩偏差 + 眼-屏距离，按阈值输出久坐/姿态异常提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 办公人员检测 |\n| 2 | 上半身姿态关键点估计 |\n| 3 | 连续坐姿时长统计 |\n| 4 | 起身次数统计 |\n| 5 | 颈部前倾角估算 |\n| 6 | 背部弯曲度（驼背）估算 |\n| 7 | 双肩高度差 |\n| 8 | 眼-屏距离估算 |\n| 9 | 预警类型分类（prolonged_sitting / forward_head_posture / hunchback_posture / shoulder_asymmetry / too_close_to_screen） |\n| 10 | PC 弹窗 / 智能音箱 / APP 提醒文本生成 |\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_office_worker_posture_warning_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_office_worker_posture_warning_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_office_worker_posture_warning_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_office_worker_posture_warning_analysis.py`](scripts/smyx_office_worker_posture_warning_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议对准工位侧前方、覆盖上半身 |\n| 🧑‍⚖️ 结果性质 | 预警结果仅作为职场健康行为引导，本工具不替代专业康复/骨科诊断；已有颈腰椎不适请就医 |\n| 🔏 隐私合规 | 隐私合规：办公场景视频涉及个人隐私，使用前需取得员工知情同意，企业部署应遵循当地隐私法规并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --input /path/to/desk.mp4\n\n# 分析网络办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --url https://example.com/desk.mp4\n\n# 显示历史久坐/姿态预警报告（自动触发关键词：查看办公人员久坐历史报告、坐姿提醒报告清单等）\npython -m scripts.smyx_office_worker_posture_warning_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-office-worker-posture-warning-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1787150437393\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_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` - 成人久坐/姿态预警（办公室）\n\n## 输入约束\n\n- 摄像头建议对准工位（侧前方），覆盖头部、颈部、肩部及背部\n- 帧率建议 ≥ 10 FPS；光照均匀\n- 适用于办公室、居家办公区、公共办公空间\n\n## 关键观测指标\n\n- `continuous_sit_duration_min` - 当次连续坐姿时长（分钟）\n- `neck_forward_angle_deg` - 颈部前倾角度（°，头部相对肩部偏移）\n- `back_curvature_deg` - 背部弯曲度（°，驼背程度）\n- `shoulder_drop_diff_deg` - 双肩高度差（°）\n- `eye_to_screen_distance_cm` - 眼-屏幕距离（估算，cm）\n- `stand_up_count_per_hour` - 每小时起身次数\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 久坐时长阈值：60 分钟（continuous_sit_threshold_min）\n- 颈部前倾角阈值：> 20°（neck_forward_threshold_deg）\n- 背部弯曲阈值：> 阈值（back_curvature_threshold_deg）\n- 眼-屏距离过近：< 40 cm\n\n## 预警类型\n\n- `prolonged_sitting` - 久坐提醒（建议起身活动）\n- `forward_head_posture` - 颈部前倾提醒（建议直颈）\n- `hunchback_posture` - 驼背提醒（建议直背）\n- `shoulder_asymmetry` - 双肩不平提醒\n- `too_close_to_screen` - 离屏幕过近提醒\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到办公人员\n- `posture_metrics` - 姿态参数（neck_forward_angle_deg / back_curvature_deg / shoulder_drop_diff_deg / eye_to_screen_distance_cm）\n- `continuous_sit_duration_min` - 当次连续坐姿时长\n- `stand_up_count_per_hour` - 每小时起身次数\n- `warning_type` - 触发的预警类型\n- `warning_message` - 预警提示文本（如\"已连续坐 65 分钟，请起身活动 5 分钟\"、\"颈部前倾 25°，请直颈调整屏幕高度\"）\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 office workstation video to identify prolonged sitting and posture-warning signals such as forward head angle, back curvature, shoulder asymmetry, and close screen distance.\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\nEmployees, workplace health teams, and developers use this skill to analyze office workstation video or report history for prolonged sitting and posture warning signals. It is intended for behavior guidance and workplace-health reminders, not diagnosis or rehabilitation planning.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Workplace video, report metadata, generated user IDs, and tokens may be sent to configured LifeEmergence cloud services.\n\nMitigation: Use only with clear notice and consent from recorded employees or subjects, approved video sources, and an accepted cloud data-sharing path.\n\nRisk: The skill may silently create or reuse local identities and store token-related state locally.\n\nMitigation: Prefer explicit authenticated identity handling and document how operators can inspect or delete data/smyx-common-claw.db and data/smyx-api-key.txt.\n\nRisk: Posture and prolonged-sitting results could be mistaken for medical diagnosis or rehabilitation advice.\n\nMitigation: Present outputs as visual workplace-health reminders only, and direct users with existing neck or back discomfort to qualified professionals.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-office-worker-posture-warning-analysis)\n- [API Interface 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, guidance]\n\n**Output Format:** [Markdown report text with JSON-structured analysis content and report links; optional file output when --output is supplied.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Accepts mp4, avi, and mov local video files up to 10 MB or video URLs; can query historical reports from the configured cloud API.]\n\n## Skill Version(s):\n\n1.0.9 (source: 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.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, 40975 bytes\n\nFiles: references/api_doc.md (2597b), scripts/__init__.py (57b), scripts/config.py (698b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_office_worker_posture_warning_analysis.py (3594b), skill-card.md (2804b), SKILL.md (12579b), 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.8:SKILL.md\n\n---\nname: \"smyx-office-worker-posture-warning-analysis\"\ndescription: \"Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 💻 Office Prolonged Sitting & Posture Warning | 成人久坐/姿态预警（办公室）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人久坐/姿态预警（办公室）** |\n| 🎯 核心目标 | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` |\n\nUsing a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). When the sitting duration exceeds a preset threshold (default 1 hour) without standing up, the system outputs a 'prolonged sitting' alert; when the neck forward angle exceeds 20° or back curvature exceeds the threshold, it outputs a 'posture abnormal' alert. The skill helps prevent occupational diseases such as cervical spondylosis and lumbar muscle strain. Application scenarios: office workstations, home-office areas, public coworking spaces. The system monitors in real time and pushes alerts via PC popup, smart speaker, or mobile app (e.g., 'sitting for 1 hour, please stand up' or 'straighten your back'). Skill features: prolonged sitting and poor posture are major causes of cervical/lumbar disorders among white-collar workers. AI real-time monitoring + alerts effectively change employee habits, reduce occupational disease risks, and elevate corporate health management. Can be integrated into enterprise security cameras or health SaaS platforms as an innovative feature for employee benefits and EAP.\n\n通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。该技能有助于预防颈椎病、腰肌劳损等办公室职业病。应用场景：办公室工位、居家办公区、公共办公空间。系统实时监测，通过PC弹窗、智能音箱或手机APP推送提醒（如'已坐1小时，请起身活动'或'请直起腰背'）。技能特点：久坐和不良坐姿是白领阶层颈椎、腰椎病高发的主要原因。通过AI自动监测并实时提醒，可有效改变员工行为习惯，降低职业病风险，提升企业健康管理水平。该技能可集成到企业安防摄像头或健康SaaS平台中，成为员工福利和EAP（员工援助计划）的创新功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的职场健康管理 AI。你的任务是分析办公人员坐姿的实时视频，检测连续坐姿时长、颈部前倾角以及背部弯曲度。当久坐时间超过阈值或姿态异常时，输出健康提醒。不要提供医疗诊断或具体康复方案，仅输出基于视觉的坐姿和活动监测结果与方向性提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于办公工位摄像头视频，实时监测办公人员连续坐姿时长 + 颈部前倾角 + 背部弯曲度 + 双肩偏差 + 眼-屏距离，按阈值输出久坐/姿态异常提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 办公人员检测 |\n| 2 | 上半身姿态关键点估计 |\n| 3 | 连续坐姿时长统计 |\n| 4 | 起身次数统计 |\n| 5 | 颈部前倾角估算 |\n| 6 | 背部弯曲度（驼背）估算 |\n| 7 | 双肩高度差 |\n| 8 | 眼-屏距离估算 |\n| 9 | 预警类型分类（prolonged_sitting / forward_head_posture / hunchback_posture / shoulder_asymmetry / too_close_to_screen） |\n| 10 | PC 弹窗 / 智能音箱 / APP 提醒文本生成 |\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_office_worker_posture_warning_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_office_worker_posture_warning_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_office_worker_posture_warning_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_office_worker_posture_warning_analysis.py`](scripts/smyx_office_worker_posture_warning_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议对准工位侧前方、覆盖上半身 |\n| 🧑‍⚖️ 结果性质 | 预警结果仅作为职场健康行为引导，本工具不替代专业康复/骨科诊断；已有颈腰椎不适请就医 |\n| 🔏 隐私合规 | 隐私合规：办公场景视频涉及个人隐私，使用前需取得员工知情同意，企业部署应遵循当地隐私法规并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --input /path/to/desk.mp4\n\n# 分析网络办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --url https://example.com/desk.mp4\n\n# 显示历史久坐/姿态预警报告（自动触发关键词：查看办公人员久坐历史报告、坐姿提醒报告清单等）\npython -m scripts.smyx_office_worker_posture_warning_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-office-worker-posture-warning-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1786439254338\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_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` - 成人久坐/姿态预警（办公室）\n\n## 输入约束\n\n- 摄像头建议对准工位（侧前方），覆盖头部、颈部、肩部及背部\n- 帧率建议 ≥ 10 FPS；光照均匀\n- 适用于办公室、居家办公区、公共办公空间\n\n## 关键观测指标\n\n- `continuous_sit_duration_min` - 当次连续坐姿时长（分钟）\n- `neck_forward_angle_deg` - 颈部前倾角度（°，头部相对肩部偏移）\n- `back_curvature_deg` - 背部弯曲度（°，驼背程度）\n- `shoulder_drop_diff_deg` - 双肩高度差（°）\n- `eye_to_screen_distance_cm` - 眼-屏幕距离（估算，cm）\n- `stand_up_count_per_hour` - 每小时起身次数\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 久坐时长阈值：60 分钟（continuous_sit_threshold_min）\n- 颈部前倾角阈值：> 20°（neck_forward_threshold_deg）\n- 背部弯曲阈值：> 阈值（back_curvature_threshold_deg）\n- 眼-屏距离过近：< 40 cm\n\n## 预警类型\n\n- `prolonged_sitting` - 久坐提醒（建议起身活动）\n- `forward_head_posture` - 颈部前倾提醒（建议直颈）\n- `hunchback_posture` - 驼背提醒（建议直背）\n- `shoulder_asymmetry` - 双肩不平提醒\n- `too_close_to_screen` - 离屏幕过近提醒\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到办公人员\n- `posture_metrics` - 姿态参数（neck_forward_angle_deg / back_curvature_deg / shoulder_drop_diff_deg / eye_to_screen_distance_cm）\n- `continuous_sit_duration_min` - 当次连续坐姿时长\n- `stand_up_count_per_hour` - 每小时起身次数\n- `warning_type` - 触发的预警类型\n- `warning_message` - 预警提示文本（如\"已连续坐 65 分钟，请起身活动 5 分钟\"、\"颈部前倾 25°，请直颈调整屏幕高度\"）\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\nAnalyzes office workstation video to estimate sitting duration and posture indicators, then returns prolonged-sitting and posture-warning reports without providing medical diagnosis.\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\nWorkplace health, facilities, or developer teams use this skill to analyze office workstation videos or video URLs for prolonged sitting, forward-head posture, hunching, shoulder asymmetry, and screen-distance warnings. The output is intended for behavioral reminders and reporting, not medical diagnosis or treatment planning.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Office workstation video or video URLs may contain employee posture, activity, and workplace privacy data that is sent to an external service.\n\nMitigation: Require employee notice and consent before deployment, use approved video sources only, and review the service's retention, access control, and export policies.\n\nRisk: The skill can silently create or reuse a user identity and store tokens locally for report access.\n\nMitigation: Protect the local data directory and token store, restrict who can run historical report queries, and rotate or delete tokens when access is no longer needed.\n\nRisk: Historical reports and export links can expose workplace health-monitoring records.\n\nMitigation: Limit report-listing and export-link access to authorized users, audit access where possible, and avoid sharing report links outside approved channels.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-office-worker-posture-warning-analysis)\n- [Publisher Profile](https://clawhub.ai/user/18072937735)\n- [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, shell commands, guidance]\n\n**Output Format:** [Markdown and JSON text with posture metrics, warning messages, historical report lists, and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May write the rendered analysis text to a user-specified output file; historical report queries return structured report records from the configured cloud API.]\n\n## Skill Version(s):\n\n1.0.8 (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.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, 41010 bytes\n\nFiles: references/api_doc.md (2597b), scripts/__init__.py (57b), scripts/config.py (698b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_office_worker_posture_warning_analysis.py (3594b), skill-card.md (2825b), SKILL.md (12578b), 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.7:SKILL.md\n\n---\nname: \"smyx-office-worker-posture-warning-analysis\"\ndescription: \"Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。\"\nversion: \"1.0.8\"\nlicense: \"MIT-0\"\n---\n\n# 💻 Office Prolonged Sitting & Posture Warning | 成人久坐/姿态预警（办公室）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人久坐/姿态预警（办公室）** |\n| 🎯 核心目标 | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` |\n\nUsing a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). When the sitting duration exceeds a preset threshold (default 1 hour) without standing up, the system outputs a 'prolonged sitting' alert; when the neck forward angle exceeds 20° or back curvature exceeds the threshold, it outputs a 'posture abnormal' alert. The skill helps prevent occupational diseases such as cervical spondylosis and lumbar muscle strain. Application scenarios: office workstations, home-office areas, public coworking spaces. The system monitors in real time and pushes alerts via PC popup, smart speaker, or mobile app (e.g., 'sitting for 1 hour, please stand up' or 'straighten your back'). Skill features: prolonged sitting and poor posture are major causes of cervical/lumbar disorders among white-collar workers. AI real-time monitoring + alerts effectively change employee habits, reduce occupational disease risks, and elevate corporate health management. Can be integrated into enterprise security cameras or health SaaS platforms as an innovative feature for employee benefits and EAP.\n\n通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。该技能有助于预防颈椎病、腰肌劳损等办公室职业病。应用场景：办公室工位、居家办公区、公共办公空间。系统实时监测，通过PC弹窗、智能音箱或手机APP推送提醒（如'已坐1小时，请起身活动'或'请直起腰背'）。技能特点：久坐和不良坐姿是白领阶层颈椎、腰椎病高发的主要原因。通过AI自动监测并实时提醒，可有效改变员工行为习惯，降低职业病风险，提升企业健康管理水平。该技能可集成到企业安防摄像头或健康SaaS平台中，成为员工福利和EAP（员工援助计划）的创新功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的职场健康管理 AI。你的任务是分析办公人员坐姿的实时视频，检测连续坐姿时长、颈部前倾角以及背部弯曲度。当久坐时间超过阈值或姿态异常时，输出健康提醒。不要提供医疗诊断或具体康复方案，仅输出基于视觉的坐姿和活动监测结果与方向性提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于办公工位摄像头视频，实时监测办公人员连续坐姿时长 + 颈部前倾角 + 背部弯曲度 + 双肩偏差 + 眼-屏距离，按阈值输出久坐/姿态异常提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 办公人员检测 |\n| 2 | 上半身姿态关键点估计 |\n| 3 | 连续坐姿时长统计 |\n| 4 | 起身次数统计 |\n| 5 | 颈部前倾角估算 |\n| 6 | 背部弯曲度（驼背）估算 |\n| 7 | 双肩高度差 |\n| 8 | 眼-屏距离估算 |\n| 9 | 预警类型分类（prolonged_sitting / forward_head_posture / hunchback_posture / shoulder_asymmetry / too_close_to_screen） |\n| 10 | PC 弹窗 / 智能音箱 / APP 提醒文本生成 |\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_office_worker_posture_warning_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_office_worker_posture_warning_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_office_worker_posture_warning_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_office_worker_posture_warning_analysis.py`](scripts/smyx_office_worker_posture_warning_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议对准工位侧前方、覆盖上半身 |\n| 🧑‍⚖️ 结果性质 | 预警结果仅作为职场健康行为引导，本工具不替代专业康复/骨科诊断；已有颈腰椎不适请就医 |\n| 🔏 隐私合规 | 隐私合规：办公场景视频涉及个人隐私，使用前需取得员工知情同意，企业部署应遵循当地隐私法规并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --input /path/to/desk.mp4\n\n# 分析网络办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --url https://example.com/desk.mp4\n\n# 显示历史久坐/姿态预警报告（自动触发关键词：查看办公人员久坐历史报告、坐姿提醒报告清单等）\npython -m scripts.smyx_office_worker_posture_warning_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-office-worker-posture-warning-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1785989733666\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_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` - 成人久坐/姿态预警（办公室）\n\n## 输入约束\n\n- 摄像头建议对准工位（侧前方），覆盖头部、颈部、肩部及背部\n- 帧率建议 ≥ 10 FPS；光照均匀\n- 适用于办公室、居家办公区、公共办公空间\n\n## 关键观测指标\n\n- `continuous_sit_duration_min` - 当次连续坐姿时长（分钟）\n- `neck_forward_angle_deg` - 颈部前倾角度（°，头部相对肩部偏移）\n- `back_curvature_deg` - 背部弯曲度（°，驼背程度）\n- `shoulder_drop_diff_deg` - 双肩高度差（°）\n- `eye_to_screen_distance_cm` - 眼-屏幕距离（估算，cm）\n- `stand_up_count_per_hour` - 每小时起身次数\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 久坐时长阈值：60 分钟（continuous_sit_threshold_min）\n- 颈部前倾角阈值：> 20°（neck_forward_threshold_deg）\n- 背部弯曲阈值：> 阈值（back_curvature_threshold_deg）\n- 眼-屏距离过近：< 40 cm\n\n## 预警类型\n\n- `prolonged_sitting` - 久坐提醒（建议起身活动）\n- `forward_head_posture` - 颈部前倾提醒（建议直颈）\n- `hunchback_posture` - 驼背提醒（建议直背）\n- `shoulder_asymmetry` - 双肩不平提醒\n- `too_close_to_screen` - 离屏幕过近提醒\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到办公人员\n- `posture_metrics` - 姿态参数（neck_forward_angle_deg / back_curvature_deg / shoulder_drop_diff_deg / eye_to_screen_distance_cm）\n- `continuous_sit_duration_min` - 当次连续坐姿时长\n- `stand_up_count_per_hour` - 每小时起身次数\n- `warning_type` - 触发的预警类型\n- `warning_message` - 预警提示文本（如\"已连续坐 65 分钟，请起身活动 5 分钟\"、\"颈部前倾 25°，请直颈调整屏幕高度\"）\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:\n\nAnalyzes office workstation images or videos to estimate continuous sitting duration, forward head posture, back curvature, shoulder asymmetry, and screen distance, then produces sitting and posture warnings.\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\nEmployees, workplace health teams, and developers use this skill to analyze office workstation media and generate posture or prolonged-sitting alerts. It supports ergonomic behavior reminders and historical workplace health report lookup, but does not provide medical diagnosis or rehabilitation guidance.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Workplace posture videos, video URLs, report queries, and account-linked identifiers may be sent to external services.\n\nMitigation: Deploy only with employee notice and consent, confirm provider retention and deletion terms, and restrict media submissions to approved workplace health workflows.\n\nRisk: The skill silently creates or reuses identities and stores tokens locally.\n\nMitigation: Limit access to the runtime environment, rotate or revoke tokens when needed, and verify local token storage protections before enterprise use.\n\nRisk: Historical report lookup may expose account-linked workplace health records.\n\nMitigation: Restrict who can query historical reports and verify access-control, encryption, and audit requirements with the provider.\n\nRisk: Posture warnings may be mistaken for medical advice.\n\nMitigation: Present outputs as visual posture and activity reminders only and direct users with neck or back symptoms to qualified medical professionals.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-office-worker-posture-warning-analysis)\n- [Office Posture Warning 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 reports and tables with optional JSON detail from API-backed analysis]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Outputs can include posture metrics, warning classifications, reminder text, summary statistics, and report links.]\n\n## Skill Version(s):\n\n1.0.7 (source: server release evidence; artifact frontmatter says 1.0.8)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.7:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.7:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.6: 31 files, 40871 bytes\n\nFiles: references/api_doc.md (2597b), scripts/__init__.py (57b), scripts/config.py (698b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_office_worker_posture_warning_analysis.py (3594b), skill-card.md (2678b), SKILL.md (12578b), 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.6:SKILL.md\n\n---\nname: \"smyx-office-worker-posture-warning-analysis\"\ndescription: \"Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。\"\nversion: \"1.0.8\"\nlicense: \"MIT-0\"\n---\n\n# 💻 Office Prolonged Sitting & Posture Warning | 成人久坐/姿态预警（办公室）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人久坐/姿态预警（办公室）** |\n| 🎯 核心目标 | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` |\n\nUsing a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). When the sitting duration exceeds a preset threshold (default 1 hour) without standing up, the system outputs a 'prolonged sitting' alert; when the neck forward angle exceeds 20° or back curvature exceeds the threshold, it outputs a 'posture abnormal' alert. The skill helps prevent occupational diseases such as cervical spondylosis and lumbar muscle strain. Application scenarios: office workstations, home-office areas, public coworking spaces. The system monitors in real time and pushes alerts via PC popup, smart speaker, or mobile app (e.g., 'sitting for 1 hour, please stand up' or 'straighten your back'). Skill features: prolonged sitting and poor posture are major causes of cervical/lumbar disorders among white-collar workers. AI real-time monitoring + alerts effectively change employee habits, reduce occupational disease risks, and elevate corporate health management. Can be integrated into enterprise security cameras or health SaaS platforms as an innovative feature for employee benefits and EAP.\n\n通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。该技能有助于预防颈椎病、腰肌劳损等办公室职业病。应用场景：办公室工位、居家办公区、公共办公空间。系统实时监测，通过PC弹窗、智能音箱或手机APP推送提醒（如'已坐1小时，请起身活动'或'请直起腰背'）。技能特点：久坐和不良坐姿是白领阶层颈椎、腰椎病高发的主要原因。通过AI自动监测并实时提醒，可有效改变员工行为习惯，降低职业病风险，提升企业健康管理水平。该技能可集成到企业安防摄像头或健康SaaS平台中，成为员工福利和EAP（员工援助计划）的创新功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的职场健康管理 AI。你的任务是分析办公人员坐姿的实时视频，检测连续坐姿时长、颈部前倾角以及背部弯曲度。当久坐时间超过阈值或姿态异常时，输出健康提醒。不要提供医疗诊断或具体康复方案，仅输出基于视觉的坐姿和活动监测结果与方向性提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于办公工位摄像头视频，实时监测办公人员连续坐姿时长 + 颈部前倾角 + 背部弯曲度 + 双肩偏差 + 眼-屏距离，按阈值输出久坐/姿态异常提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 办公人员检测 |\n| 2 | 上半身姿态关键点估计 |\n| 3 | 连续坐姿时长统计 |\n| 4 | 起身次数统计 |\n| 5 | 颈部前倾角估算 |\n| 6 | 背部弯曲度（驼背）估算 |\n| 7 | 双肩高度差 |\n| 8 | 眼-屏距离估算 |\n| 9 | 预警类型分类（prolonged_sitting / forward_head_posture / hunchback_posture / shoulder_asymmetry / too_close_to_screen） |\n| 10 | PC 弹窗 / 智能音箱 / APP 提醒文本生成 |\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_office_worker_posture_warning_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_office_worker_posture_warning_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_office_worker_posture_warning_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_office_worker_posture_warning_analysis.py`](scripts/smyx_office_worker_posture_warning_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议对准工位侧前方、覆盖上半身 |\n| 🧑‍⚖️ 结果性质 | 预警结果仅作为职场健康行为引导，本工具不替代专业康复/骨科诊断；已有颈腰椎不适请就医 |\n| 🔏 隐私合规 | 隐私合规：办公场景视频涉及个人隐私，使用前需取得员工知情同意，企业部署应遵循当地隐私法规并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --input /path/to/desk.mp4\n\n# 分析网络办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --url https://example.com/desk.mp4\n\n# 显示历史久坐/姿态预警报告（自动触发关键词：查看办公人员久坐历史报告、坐姿提醒报告清单等）\npython -m scripts.smyx_office_worker_posture_warning_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-office-worker-posture-warning-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1785510826114\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_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` - 成人久坐/姿态预警（办公室）\n\n## 输入约束\n\n- 摄像头建议对准工位（侧前方），覆盖头部、颈部、肩部及背部\n- 帧率建议 ≥ 10 FPS；光照均匀\n- 适用于办公室、居家办公区、公共办公空间\n\n## 关键观测指标\n\n- `continuous_sit_duration_min` - 当次连续坐姿时长（分钟）\n- `neck_forward_angle_deg` - 颈部前倾角度（°，头部相对肩部偏移）\n- `back_curvature_deg` - 背部弯曲度（°，驼背程度）\n- `shoulder_drop_diff_deg` - 双肩高度差（°）\n- `eye_to_screen_distance_cm` - 眼-屏幕距离（估算，cm）\n- `stand_up_count_per_hour` - 每小时起身次数\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 久坐时长阈值：60 分钟（continuous_sit_threshold_min）\n- 颈部前倾角阈值：> 20°（neck_forward_threshold_deg）\n- 背部弯曲阈值：> 阈值（back_curvature_threshold_deg）\n- 眼-屏距离过近：< 40 cm\n\n## 预警类型\n\n- `prolonged_sitting` - 久坐提醒（建议起身活动）\n- `forward_head_posture` - 颈部前倾提醒（建议直颈）\n- `hunchback_posture` - 驼背提醒（建议直背）\n- `shoulder_asymmetry` - 双肩不平提醒\n- `too_close_to_screen` - 离屏幕过近提醒\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到办公人员\n- `posture_metrics` - 姿态参数（neck_forward_angle_deg / back_curvature_deg / shoulder_drop_diff_deg / eye_to_screen_distance_cm）\n- `continuous_sit_duration_min` - 当次连续坐姿时长\n- `stand_up_count_per_hour` - 每小时起身次数\n- `warning_type` - 触发的预警类型\n- `warning_message` - 预警提示文本（如\"已连续坐 65 分钟，请起身活动 5 分钟\"、\"颈部前倾 25°，请直颈调整屏幕高度\"）\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 office workstation video to detect prolonged sitting and posture issues such as forward head angle and back curvature, then returns structured alerts and report links. <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>\nEmployees, workplace health teams, and developers use this skill to submit office workstation videos or URLs for posture and prolonged-sitting analysis, review structured warning messages, and query historical workplace health reports. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Employee or workspace video may be sent to the LifeEmergence backend and historical reports may be queryable. <br>\nMitigation: Use only with clear employee notice and consent, privacy review, retention controls, and access controls for report history. <br>\nRisk: The skill creates or reuses persistent local identities and stores tokens for workplace monitoring data. <br>\nMitigation: Run with tenant and user isolation, restrict workspace data access, and clear local identity or token storage when no longer required. <br>\nRisk: Posture alerts and health guidance may be mistaken for medical diagnosis or treatment advice. <br>\nMitigation: Present results as visual posture and activity monitoring only, and direct users with neck or back symptoms to qualified medical professionals. <br>\n\n\n## Reference(s): <br>\n- [API interface documentation](references/api_doc.md) <br>\n- [Shared analysis API documentation](skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill usage demo](https://lifeemergence.com/sample.html) <br>\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-office-worker-posture-warning-analysis) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, JSON, files, guidance] <br>\n**Output Format:** [Markdown text with structured JSON-like analysis, warning messages, and report links; optional saved output file] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May upload local video files or submit video URLs to a cloud analysis service and query historical reports.] <br>\n\n## Skill Version(s): <br>\n1.0.6 (source: server release metadata; artifact frontmatter reports 1.0.8) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.6:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.6:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.5: 31 files, 40974 bytes\n\nFiles: references/api_doc.md (2597b), scripts/__init__.py (57b), scripts/config.py (698b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_office_worker_posture_warning_analysis.py (3594b), skill-card.md (2901b), SKILL.md (12578b), 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.5:SKILL.md\n\n---\nname: \"smyx-office-worker-posture-warning-analysis\"\ndescription: \"Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。\"\nversion: \"1.0.5\"\nlicense: \"MIT-0\"\n---\n\n# 💻 Office Prolonged Sitting & Posture Warning | 成人久坐/姿态预警（办公室）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人久坐/姿态预警（办公室）** |\n| 🎯 核心目标 | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` |\n\nUsing a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). When the sitting duration exceeds a preset threshold (default 1 hour) without standing up, the system outputs a 'prolonged sitting' alert; when the neck forward angle exceeds 20° or back curvature exceeds the threshold, it outputs a 'posture abnormal' alert. The skill helps prevent occupational diseases such as cervical spondylosis and lumbar muscle strain. Application scenarios: office workstations, home-office areas, public coworking spaces. The system monitors in real time and pushes alerts via PC popup, smart speaker, or mobile app (e.g., 'sitting for 1 hour, please stand up' or 'straighten your back'). Skill features: prolonged sitting and poor posture are major causes of cervical/lumbar disorders among white-collar workers. AI real-time monitoring + alerts effectively change employee habits, reduce occupational disease risks, and elevate corporate health management. Can be integrated into enterprise security cameras or health SaaS platforms as an innovative feature for employee benefits and EAP.\n\n通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。该技能有助于预防颈椎病、腰肌劳损等办公室职业病。应用场景：办公室工位、居家办公区、公共办公空间。系统实时监测，通过PC弹窗、智能音箱或手机APP推送提醒（如'已坐1小时，请起身活动'或'请直起腰背'）。技能特点：久坐和不良坐姿是白领阶层颈椎、腰椎病高发的主要原因。通过AI自动监测并实时提醒，可有效改变员工行为习惯，降低职业病风险，提升企业健康管理水平。该技能可集成到企业安防摄像头或健康SaaS平台中，成为员工福利和EAP（员工援助计划）的创新功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的职场健康管理 AI。你的任务是分析办公人员坐姿的实时视频，检测连续坐姿时长、颈部前倾角以及背部弯曲度。当久坐时间超过阈值或姿态异常时，输出健康提醒。不要提供医疗诊断或具体康复方案，仅输出基于视觉的坐姿和活动监测结果与方向性提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于办公工位摄像头视频，实时监测办公人员连续坐姿时长 + 颈部前倾角 + 背部弯曲度 + 双肩偏差 + 眼-屏距离，按阈值输出久坐/姿态异常提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 办公人员检测 |\n| 2 | 上半身姿态关键点估计 |\n| 3 | 连续坐姿时长统计 |\n| 4 | 起身次数统计 |\n| 5 | 颈部前倾角估算 |\n| 6 | 背部弯曲度（驼背）估算 |\n| 7 | 双肩高度差 |\n| 8 | 眼-屏距离估算 |\n| 9 | 预警类型分类（prolonged_sitting / forward_head_posture / hunchback_posture / shoulder_asymmetry / too_close_to_screen） |\n| 10 | PC 弹窗 / 智能音箱 / APP 提醒文本生成 |\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_office_worker_posture_warning_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_office_worker_posture_warning_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_office_worker_posture_warning_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_office_worker_posture_warning_analysis.py`](scripts/smyx_office_worker_posture_warning_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议对准工位侧前方、覆盖上半身 |\n| 🧑‍⚖️ 结果性质 | 预警结果仅作为职场健康行为引导，本工具不替代专业康复/骨科诊断；已有颈腰椎不适请就医 |\n| 🔏 隐私合规 | 隐私合规：办公场景视频涉及个人隐私，使用前需取得员工知情同意，企业部署应遵循当地隐私法规并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --input /path/to/desk.mp4\n\n# 分析网络办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --url https://example.com/desk.mp4\n\n# 显示历史久坐/姿态预警报告（自动触发关键词：查看办公人员久坐历史报告、坐姿提醒报告清单等）\npython -m scripts.smyx_office_worker_posture_warning_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --output result.json\n```\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-office-worker-posture-warning-analysis\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1784047127596\n}\n\nFile v1.0.5:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放成人久坐/姿态预警（办公室）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动成人久坐/姿态预警任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果（坐姿/久坐预警）\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史职场健康记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` - 成人久坐/姿态预警（办公室）\n\n## 输入约束\n\n- 摄像头建议对准工位（侧前方），覆盖头部、颈部、肩部及背部\n- 帧率建议 ≥ 10 FPS；光照均匀\n- 适用于办公室、居家办公区、公共办公空间\n\n## 关键观测指标\n\n- `continuous_sit_duration_min` - 当次连续坐姿时长（分钟）\n- `neck_forward_angle_deg` - 颈部前倾角度（°，头部相对肩部偏移）\n- `back_curvature_deg` - 背部弯曲度（°，驼背程度）\n- `shoulder_drop_diff_deg` - 双肩高度差（°）\n- `eye_to_screen_distance_cm` - 眼-屏幕距离（估算，cm）\n- `stand_up_count_per_hour` - 每小时起身次数\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 久坐时长阈值：60 分钟（continuous_sit_threshold_min）\n- 颈部前倾角阈值：> 20°（neck_forward_threshold_deg）\n- 背部弯曲阈值：> 阈值（back_curvature_threshold_deg）\n- 眼-屏距离过近：< 40 cm\n\n## 预警类型\n\n- `prolonged_sitting` - 久坐提醒（建议起身活动）\n- `forward_head_posture` - 颈部前倾提醒（建议直颈）\n- `hunchback_posture` - 驼背提醒（建议直背）\n- `shoulder_asymmetry` - 双肩不平提醒\n- `too_close_to_screen` - 离屏幕过近提醒\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到办公人员\n- `posture_metrics` - 姿态参数（neck_forward_angle_deg / back_curvature_deg / shoulder_drop_diff_deg / eye_to_screen_distance_cm）\n- `continuous_sit_duration_min` - 当次连续坐姿时长\n- `stand_up_count_per_hour` - 每小时起身次数\n- `warning_type` - 触发的预警类型\n- `warning_message` - 预警提示文本（如\"已连续坐 65 分钟，请起身活动 5 分钟\"、\"颈部前倾 25°，请直颈调整屏幕高度\"）\n- `summary` - 当次会话久坐+姿态统计摘要\n\n> 仅输出基于视觉的坐姿与活动监测结果，不提供医学诊断或具体康复方案。\n\nFile v1.0.5:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.5:scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.5:skill-card.md\n\n## Description: <br>\nAnalyzes office workstation images or video to estimate sitting duration and posture metrics, then produces prolonged-sitting and posture warning 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>\nEmployees, workplace health teams, and developers use this skill to analyze office workstation footage for prolonged sitting, forward-head posture, back curvature, shoulder asymmetry, and screen-distance warnings. It returns visual posture and activity monitoring results with directional health reminders, not medical diagnosis. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill uploads sensitive workplace video to a cloud service. <br>\nMitigation: Use only where employees have been notified and consented, and where organizational policy allows the named cloud service, retention, and access controls. <br>\nRisk: The skill silently manages persistent identity, tokens, and cloud report history access. <br>\nMitigation: Review identity and token storage before installation, limit access to approved operators, and avoid exposing internal identifiers in user-facing output. <br>\nRisk: Network video URLs can send third-party or sensitive footage to the analysis service. <br>\nMitigation: Use trusted video sources that the organization controls and avoid arbitrary third-party URLs unless source ownership and retention rules are clear. <br>\nRisk: Posture warnings could be mistaken for medical advice. <br>\nMitigation: Present results as visual posture and activity reminders only, and direct users with pain or medical concerns to qualified professionals. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-office-worker-posture-warning-analysis) <br>\n- [Skill Demo](https://lifeemergence.com/sample.html) <br>\n- [API Documentation](references/api_doc.md) <br>\n- [Shared Analysis API Documentation](skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, JSON, Shell commands, Guidance] <br>\n**Output Format:** [Markdown or JSON text containing structured posture metrics, warning labels, reminders, history lists, and report links.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include exported report image links and cloud history query results.] <br>\n\n## Skill Version(s): <br>\n1.0.5 (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.5:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.5:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.4: 31 files, 40885 bytes\n\nFiles: references/api_doc.md (2597b), scripts/__init__.py (57b), scripts/config.py (698b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_office_worker_posture_warning_analysis.py (3594b), skill-card.md (2816b), SKILL.md (12578b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28605b), _meta.json (162b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: \"smyx-office-worker-posture-warning-analysis\"\ndescription: \"Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。\"\nversion: \"1.0.5\"\nlicense: \"MIT-0\"\n---\n\n# 💻 Office Prolonged Sitting & Posture Warning | 成人久坐/姿态预警（办公室）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人久坐/姿态预警（办公室）** |\n| 🎯 核心目标 | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` |\n\nUsing a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). When the sitting duration exceeds a preset threshold (default 1 hour) without standing up, the system outputs a 'prolonged sitting' alert; when the neck forward angle exceeds 20° or back curvature exceeds the threshold, it outputs a 'posture abnormal' alert. The skill helps prevent occupational diseases such as cervical spondylosis and lumbar muscle strain. Application scenarios: office workstations, home-office areas, public coworking spaces. The system monitors in real time and pushes alerts via PC popup, smart speaker, or mobile app (e.g., 'sitting for 1 hour, please stand up' or 'straighten your back'). Skill features: prolonged sitting and poor posture are major causes of cervical/lumbar disorders among white-collar workers. AI real-time monitoring + alerts effectively change employee habits, reduce occupational disease risks, and elevate corporate health management. Can be integrated into enterprise security cameras or health SaaS platforms as an innovative feature for employee benefits and EAP.\n\n通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。该技能有助于预防颈椎病、腰肌劳损等办公室职业病。应用场景：办公室工位、居家办公区、公共办公空间。系统实时监测，通过PC弹窗、智能音箱或手机APP推送提醒（如'已坐1小时，请起身活动'或'请直起腰背'）。技能特点：久坐和不良坐姿是白领阶层颈椎、腰椎病高发的主要原因。通过AI自动监测并实时提醒，可有效改变员工行为习惯，降低职业病风险，提升企业健康管理水平。该技能可集成到企业安防摄像头或健康SaaS平台中，成为员工福利和EAP（员工援助计划）的创新功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的职场健康管理 AI。你的任务是分析办公人员坐姿的实时视频，检测连续坐姿时长、颈部前倾角以及背部弯曲度。当久坐时间超过阈值或姿态异常时，输出健康提醒。不要提供医疗诊断或具体康复方案，仅输出基于视觉的坐姿和活动监测结果与方向性提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于办公工位摄像头视频，实时监测办公人员连续坐姿时长 + 颈部前倾角 + 背部弯曲度 + 双肩偏差 + 眼-屏距离，按阈值输出久坐/姿态异常提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 办公人员检测 |\n| 2 | 上半身姿态关键点估计 |\n| 3 | 连续坐姿时长统计 |\n| 4 | 起身次数统计 |\n| 5 | 颈部前倾角估算 |\n| 6 | 背部弯曲度（驼背）估算 |\n| 7 | 双肩高度差 |\n| 8 | 眼-屏距离估算 |\n| 9 | 预警类型分类（prolonged_sitting / forward_head_posture / hunchback_posture / shoulder_asymmetry / too_close_to_screen） |\n| 10 | PC 弹窗 / 智能音箱 / APP 提醒文本生成 |\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_office_worker_posture_warning_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_office_worker_posture_warning_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_office_worker_posture_warning_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_office_worker_posture_warning_analysis.py`](scripts/smyx_office_worker_posture_warning_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议对准工位侧前方、覆盖上半身 |\n| 🧑‍⚖️ 结果性质 | 预警结果仅作为职场健康行为引导，本工具不替代专业康复/骨科诊断；已有颈腰椎不适请就医 |\n| 🔏 隐私合规 | 隐私合规：办公场景视频涉及个人隐私，使用前需取得员工知情同意，企业部署应遵循当地隐私法规并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --input /path/to/desk.mp4\n\n# 分析网络办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --url https://example.com/desk.mp4\n\n# 显示历史久坐/姿态预警报告（自动触发关键词：查看办公人员久坐历史报告、坐姿提醒报告清单等）\npython -m scripts.smyx_office_worker_posture_warning_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --output result.json\n```\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-office-worker-posture-warning-analysis\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1783572749697\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_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` - 成人久坐/姿态预警（办公室）\n\n## 输入约束\n\n- 摄像头建议对准工位（侧前方），覆盖头部、颈部、肩部及背部\n- 帧率建议 ≥ 10 FPS；光照均匀\n- 适用于办公室、居家办公区、公共办公空间\n\n## 关键观测指标\n\n- `continuous_sit_duration_min` - 当次连续坐姿时长（分钟）\n- `neck_forward_angle_deg` - 颈部前倾角度（°，头部相对肩部偏移）\n- `back_curvature_deg` - 背部弯曲度（°，驼背程度）\n- `shoulder_drop_diff_deg` - 双肩高度差（°）\n- `eye_to_screen_distance_cm` - 眼-屏幕距离（估算，cm）\n- `stand_up_count_per_hour` - 每小时起身次数\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 久坐时长阈值：60 分钟（continuous_sit_threshold_min）\n- 颈部前倾角阈值：> 20°（neck_forward_threshold_deg）\n- 背部弯曲阈值：> 阈值（back_curvature_threshold_deg）\n- 眼-屏距离过近：< 40 cm\n\n## 预警类型\n\n- `prolonged_sitting` - 久坐提醒（建议起身活动）\n- `forward_head_posture` - 颈部前倾提醒（建议直颈）\n- `hunchback_posture` - 驼背提醒（建议直背）\n- `shoulder_asymmetry` - 双肩不平提醒\n- `too_close_to_screen` - 离屏幕过近提醒\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到办公人员\n- `posture_metrics` - 姿态参数（neck_forward_angle_deg / back_curvature_deg / shoulder_drop_diff_deg / eye_to_screen_distance_cm）\n- `continuous_sit_duration_min` - 当次连续坐姿时长\n- `stand_up_count_per_hour` - 每小时起身次数\n- `warning_type` - 触发的预警类型\n- `warning_message` - 预警提示文本（如\"已连续坐 65 分钟，请起身活动 5 分钟\"、\"颈部前倾 25°，请直颈调整屏幕高度\"）\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 office workstation video or image inputs to estimate prolonged sitting, forward-head posture, back curvature, shoulder asymmetry, and screen-distance warnings, then returns structured workplace-health reminders without providing medical diagnosis. <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>\nEmployees, workplace health teams, and developers use this skill to analyze office posture media, generate sitting/posture alerts, and retrieve cloud-hosted historical reports. It is intended for behavior guidance only and should be used with clear employee notice and consent. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill uploads office-worker video or video URLs to a cloud service, which can expose sensitive workplace footage. <br>\nMitigation: Use only with clear employee notice and consent, avoid sensitive footage, and confirm the publisher's retention and access-control practices before deployment. <br>\nRisk: Reports are linked to an automatically managed identity with service tokens stored in the workspace data directory. <br>\nMitigation: Restrict workspace access, protect stored tokens, and review whether account identity and report-history behavior matches organizational privacy requirements. <br>\nRisk: Posture warnings may be mistaken for medical advice. <br>\nMitigation: Present results as visual workplace-health guidance only and direct users with pain or medical concerns to qualified professionals. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-office-worker-posture-warning-analysis) <br>\n- [API interface reference](references/api_doc.md) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance] <br>\n**Output Format:** [Markdown or JSON analysis reports with warning messages, posture metrics, report links, and optional Markdown tables for history queries.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May call a cloud API with uploaded office-worker media or media URLs; local file inputs are limited by the skill documentation to common video formats up to 10 MB.] <br>\n\n## Skill Version(s): <br>\n1.0.4 (source: server release evidence; artifact frontmatter lists 1.0.5) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.4:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.4:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.3: 31 files, 40591 bytes\n\nFiles: references/api_doc.md (2597b), scripts/__init__.py (57b), scripts/config.py (698b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_office_worker_posture_warning_analysis.py (3594b), skill-card.md (2660b), SKILL.md (12578b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (22801b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28605b), _meta.json (162b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: \"smyx-office-worker-posture-warning-analysis\"\ndescription: \"Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。\"\nversion: \"1.0.3\"\nlicense: \"MIT-0\"\n---\n\n# 💻 Office Prolonged Sitting & Posture Warning | 成人久坐/姿态预警（办公室）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人久坐/姿态预警（办公室）** |\n| 🎯 核心目标 | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` |\n\nUsing a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). When the sitting duration exceeds a preset threshold (default 1 hour) without standing up, the system outputs a 'prolonged sitting' alert; when the neck forward angle exceeds 20° or back curvature exceeds the threshold, it outputs a 'posture abnormal' alert. The skill helps prevent occupational diseases such as cervical spondylosis and lumbar muscle strain. Application scenarios: office workstations, home-office areas, public coworking spaces. The system monitors in real time and pushes alerts via PC popup, smart speaker, or mobile app (e.g., 'sitting for 1 hour, please stand up' or 'straighten your back'). Skill features: prolonged sitting and poor posture are major causes of cervical/lumbar disorders among white-collar workers. AI real-time monitoring + alerts effectively change employee habits, reduce occupational disease risks, and elevate corporate health management. Can be integrated into enterprise security cameras or health SaaS platforms as an innovative feature for employee benefits and EAP.\n\n通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。该技能有助于预防颈椎病、腰肌劳损等办公室职业病。应用场景：办公室工位、居家办公区、公共办公空间。系统实时监测，通过PC弹窗、智能音箱或手机APP推送提醒（如'已坐1小时，请起身活动'或'请直起腰背'）。技能特点：久坐和不良坐姿是白领阶层颈椎、腰椎病高发的主要原因。通过AI自动监测并实时提醒，可有效改变员工行为习惯，降低职业病风险，提升企业健康管理水平。该技能可集成到企业安防摄像头或健康SaaS平台中，成为员工福利和EAP（员工援助计划）的创新功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的职场健康管理 AI。你的任务是分析办公人员坐姿的实时视频，检测连续坐姿时长、颈部前倾角以及背部弯曲度。当久坐时间超过阈值或姿态异常时，输出健康提醒。不要提供医疗诊断或具体康复方案，仅输出基于视觉的坐姿和活动监测结果与方向性提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于办公工位摄像头视频，实时监测办公人员连续坐姿时长 + 颈部前倾角 + 背部弯曲度 + 双肩偏差 + 眼-屏距离，按阈值输出久坐/姿态异常提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 办公人员检测 |\n| 2 | 上半身姿态关键点估计 |\n| 3 | 连续坐姿时长统计 |\n| 4 | 起身次数统计 |\n| 5 | 颈部前倾角估算 |\n| 6 | 背部弯曲度（驼背）估算 |\n| 7 | 双肩高度差 |\n| 8 | 眼-屏距离估算 |\n| 9 | 预警类型分类（prolonged_sitting / forward_head_posture / hunchback_posture / shoulder_asymmetry / too_close_to_screen） |\n| 10 | PC 弹窗 / 智能音箱 / APP 提醒文本生成 |\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_office_worker_posture_warning_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_office_worker_posture_warning_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_office_worker_posture_warning_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_office_worker_posture_warning_analysis.py`](scripts/smyx_office_worker_posture_warning_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议对准工位侧前方、覆盖上半身 |\n| 🧑‍⚖️ 结果性质 | 预警结果仅作为职场健康行为引导，本工具不替代专业康复/骨科诊断；已有颈腰椎不适请就医 |\n| 🔏 隐私合规 | 隐私合规：办公场景视频涉及个人隐私，使用前需取得员工知情同意，企业部署应遵循当地隐私法规并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --input /path/to/desk.mp4\n\n# 分析网络办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --url https://example.com/desk.mp4\n\n# 显示历史久坐/姿态预警报告（自动触发关键词：查看办公人员久坐历史报告、坐姿提醒报告清单等）\npython -m scripts.smyx_office_worker_posture_warning_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --output result.json\n```\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-office-worker-posture-warning-analysis\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1782810145474\n}\n\nFile v1.0.3:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放成人久坐/姿态预警（办公室）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动成人久坐/姿态预警任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果（坐姿/久坐预警）\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史职场健康记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` - 成人久坐/姿态预警（办公室）\n\n## 输入约束\n\n- 摄像头建议对准工位（侧前方），覆盖头部、颈部、肩部及背部\n- 帧率建议 ≥ 10 FPS；光照均匀\n- 适用于办公室、居家办公区、公共办公空间\n\n## 关键观测指标\n\n- `continuous_sit_duration_min` - 当次连续坐姿时长（分钟）\n- `neck_forward_angle_deg` - 颈部前倾角度（°，头部相对肩部偏移）\n- `back_curvature_deg` - 背部弯曲度（°，驼背程度）\n- `shoulder_drop_diff_deg` - 双肩高度差（°）\n- `eye_to_screen_distance_cm` - 眼-屏幕距离（估算，cm）\n- `stand_up_count_per_hour` - 每小时起身次数\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 久坐时长阈值：60 分钟（continuous_sit_threshold_min）\n- 颈部前倾角阈值：> 20°（neck_forward_threshold_deg）\n- 背部弯曲阈值：> 阈值（back_curvature_threshold_deg）\n- 眼-屏距离过近：< 40 cm\n\n## 预警类型\n\n- `prolonged_sitting` - 久坐提醒（建议起身活动）\n- `forward_head_posture` - 颈部前倾提醒（建议直颈）\n- `hunchback_posture` - 驼背提醒（建议直背）\n- `shoulder_asymmetry` - 双肩不平提醒\n- `too_close_to_screen` - 离屏幕过近提醒\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到办公人员\n- `posture_metrics` - 姿态参数（neck_forward_angle_deg / back_curvature_deg / shoulder_drop_diff_deg / eye_to_screen_distance_cm）\n- `continuous_sit_duration_min` - 当次连续坐姿时长\n- `stand_up_count_per_hour` - 每小时起身次数\n- `warning_type` - 触发的预警类型\n- `warning_message` - 预警提示文本（如\"已连续坐 65 分钟，请起身活动 5 分钟\"、\"颈部前倾 25°，请直颈调整屏幕高度\"）\n- `summary` - 当次会话久坐+姿态统计摘要\n\n> 仅输出基于视觉的坐姿与活动监测结果，不提供医学诊断或具体康复方案。\n\nFile v1.0.3:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.3:scripts/config.yaml\n\n{}\n\nFile v1.0.3:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.3:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.3:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.3:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.3:skill-card.md\n\n## Description: <br>\nUsing a fixed office camera, this skill analyzes worker posture video to detect continuous sitting duration, forward-head angle, and back curvature, then returns prolonged-sitting or posture-abnormality alerts. <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>\nEmployees, workplace health teams, and developers use this skill to review office workstation videos or URLs for prolonged sitting and posture warning signals. It produces behavior-oriented reminders and historical report listings, not medical diagnosis or rehabilitation plans. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Workplace video or video URLs are sent to the Life Emergence cloud service for analysis. <br>\nMitigation: Use the skill only with employee consent, approved retention practices, and appropriate handling of workplace video. <br>\nRisk: The skill can create or reuse a local/cloud identity for report history and stores tokens locally. <br>\nMitigation: Review the workspace data directory for stored tokens when removing the skill and restrict use to approved environments. <br>\nRisk: Posture warnings could be mistaken for medical advice. <br>\nMitigation: Present results as visual posture and activity reminders only, and direct users with neck or back discomfort to professional medical care. <br>\n\n\n## Reference(s): <br>\n- [API Interface Documentation](artifact/references/api_doc.md) <br>\n- [Analysis API Error Codes](artifact/skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill Demo](https://lifeemergence.com/sample.html) <br>\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-office-worker-posture-warning-analysis) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown text with optional JSON detail output, posture metrics, warning messages, history tables, and report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Outputs are based on uploaded workplace video files or video URLs and may include cloud report links.] <br>\n\n## Skill Version(s): <br>\n1.0.3 (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.3:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.3:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3","readmeExcerpt":"Skill: Office Prolonged Sitting & Posture Warning | 成人久坐/姿态预警（办公室） Owner: 18072937735 Summary: Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.smyx_office_worker_posture_warning_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --input /path/to/desk.mp4\n\n# 分析网络办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --url https://example.com/desk.mp4\n\n# 显示历史久坐/姿态预警报告（自动触发关键词：查看办公人员久坐历史报告、坐姿提醒报告清单等）\npython -m scripts.smyx_office_worker_posture_warning_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --output result.json"},{"language":"bash","snippet":"python -m scripts.smyx_office_worker_posture_warning_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --input /path/to/desk.mp4\n\n# 分析网络办公工位视频\npython -m scripts.smyx_office_worker_posture_warning_analysis --url https://example.com/desk.mp4\n\n# 显示历史久坐/姿态预警报告（自动触发关键词：查看办公人员久坐历史报告、坐姿提醒报告清单等）\npython -m scripts.smyx_office_worker_posture_warning_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_office_worker_posture_warning_analysis --input desk.mp4 --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"smyx-office-worker-posture-warning-analysis\"\ndescription: \"Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。\"\nversion: \"1.0.16\"\nlicense: \"MIT-0\"\n---\n\n# 💻 Office Prolonged Sitting & Posture Warning | 成人久坐/姿态预警（办公室）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人久坐/姿态预警（办公室）** |\n| 🎯 核心目标 | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` |\n\nUsing a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). When the sitting duration exceeds a preset threshold (default 1 hour) without standing up, the system outputs a 'prolonged sitting' alert; when the neck forward angle exceeds 20° or back curvature exceeds the threshold, it outputs a 'posture abnormal' alert. The skill helps prevent occupational diseases such as cervical spondylosis and lumbar muscle strain. Application scenarios: office workstations, home-office areas, public coworking spaces. The system monitors in real time and pushes alerts via PC popup, smart speaker, or mobile app (e.g., 'sitting for 1 hour, please stand up' or 'straighten your back'). Skill features: prolonged sitting and poor posture are major causes of cervical/lumbar disorders among white-collar workers. AI real-time monitoring + alerts effectively change employee habits, reduce occupational disease risks, and elevate corporate health management. Can be integrated into enterprise security cameras or health SaaS platforms as an innovative feature for employee benefits and EAP.\n\n通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。该技能有助于预防颈椎病、腰肌劳损等办公室职业病。应用场景：办公室工位、居家办公区、公共办公空间。系统实时监测，通过PC弹窗、智能音箱或手机APP推送提醒（如'已坐1小时，请起身活动'或'请直起腰背'）。技能特点：久坐和不良坐姿是白领阶层颈椎、腰椎病高发的主要原因。通过AI自动监测并实时提醒，可有效改变员工行为习惯，降低职业病风险，提升企业健康管理水平。该技能可集成到企业安防摄像头或健康SaaS平台中，成为员工福利和EAP（员工援助计划）的创新功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的职场健康管理 AI。你的任务是分析办公人员坐姿的实时视频，检测连续坐姿时长、颈部前倾角以及背部弯曲度。当久坐时间超过阈值或姿态异常时，输出健康提醒。不要提供医疗诊断或具体康复方案，仅输出基于视觉的坐姿和活动监测结果与方向性提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于办公工位摄像头视频，实时监测办公人员连续坐姿时长 + 颈部前倾角 + 背部弯曲度 +"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-office-worker-posture-warning-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1791103645207\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_OFFICE_WORKER_POSTURE_WARNING_ANALYSIS` - 成人久坐/姿态预警（办公室）\n\n## 输入约束\n\n- 摄像头建议对准工位（侧前方），覆盖头部、颈部、肩部及背部\n- 帧率建议 ≥ 10 FPS；光照均匀\n- 适用于办公室、居家办公区、公共办公空间\n\n## 关键观测指标\n\n- `continuous_sit_duration_min` - 当次连续坐姿时长（分钟）\n- `neck_forward_angle_deg` - 颈部前倾角度（°，头部相对肩部偏移）\n- `back_curvature_deg` - 背部弯曲度（°，驼背程度）\n- `shoulder_drop_diff_deg` - 双肩高度差（°）\n- `eye_to_screen_distance_cm` - 眼-屏幕距离（估算，cm）\n- `stand_up_count_per_hour` - 每小时起身次数\n\n## 默认告警阈值（可由调用方覆盖）\n\n- 久坐时长阈值：60 分钟（continuous_sit_threshold_min）\n- 颈部前倾角阈值：> 20°（neck_forward_threshold_deg）\n- 背部弯曲阈值：> 阈值（back_curvature_threshold_deg）\n- 眼-屏距离过近：< 40 cm\n\n## 预警类型\n\n- `prolonged_sitting` - 久坐提醒（建议起身活动）\n- `forward_head_posture` - 颈部前倾提醒（建议直颈）\n- `hunchback_posture` - 驼背提醒（建议直背）\n- `shoulder_asymmetry` - 双肩不平提醒\n- `too_close_to_screen` - 离屏幕过近提醒\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到办公人员\n- `posture_metrics` - 姿态参数（neck_forward_angle_deg / back_curvature_deg / shoulder_drop_diff_deg / eye_to_screen_distance_cm）\n- `continuous_sit_duration_min` - 当次连续坐姿时长\n- `stand_up_count_per_hour` - 每小时起身次数\n- `warning_type` - 触发的预警类型\n- `warning_message` - 预警提示文本（如\"已连续坐 65 分钟，请起身活动 5 分钟\"、\"颈部前倾 25°，请直颈调整屏幕高度\"）\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":"Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的偏移）、背部弯曲度（驼背程度）。当久坐时间超过预设阈值（默认1小时）且未起身活动时，输出'久坐提醒'；当颈部前倾角>20°或背部弯曲超过阈值时，输出'姿态异常提醒'。 Skill: Office Prolonged Sitting & Posture Warning | 成人久坐/姿态预警（办公室） Owner: 18072937735 Summary: Using a fixed camera in the office (aimed at the workstation), the system analyzes office workers' sitting-posture video in real time, detecting continuous sitting duration, neck forward angle (head offset relative to shoulders), and back curvature (hunchback degree). | 通过办公区固定摄像头（对准工位）实时分析办公人员的坐姿视频，检测连续坐姿时间、颈部前倾角度（头部相对于肩部的","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1084,"uniquenessScore":45,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T18:14:44.179Z","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-09T18:14:44.179Z","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-10T02:05:02.605Z","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"}]}}}