{"id":"7af22cf5-729e-46b5-a006-0203a28c15fa","entityType":"agent","slug":"clawhub-18072937735-smyx-facial-hrv-trend-monitoring-analysis","name":"Adult Facial HRV Trend Monitoring (rPPG) | 成人心率变异性（HRV）趋势监测（面部）","canonicalUrl":"https://www.xpersona.co/agent/clawhub-18072937735-smyx-facial-hrv-trend-monitoring-analysis","canonicalPath":"/agent/clawhub-18072937735-smyx-facial-hrv-trend-monitoring-analysis","generatedAt":"2026-10-10T07:43:07.717Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T23:29:10.077Z","emptyReason":null},"description":"Using everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval. | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.9K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-facial-hrv-trend-monitoring-analysis","sourceUrl":"https://clawhub.ai/18072937735/smyx-facial-hrv-trend-monitoring-analysis","homepage":"https://clawhub.ai/18072937735/skills/smyx-facial-hrv-trend-monitoring-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/18072937735/smyx-facial-hrv-trend-monitoring-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/18072937735/skills/smyx-facial-hrv-trend-monitoring-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":66,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Adult Facial HRV Trend Monitoring (rPPG) | 成人心率变异性（HRV）趋势监测（面部） technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T23:29:10.077Z","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-09T23:29:10.077Z","emptyReason":null},"stars":null,"forks":null,"downloads":1889,"packageName":null,"latestVersion":"1.0.13","tractionLabel":"1.9K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T23:29:10.077Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T23:29:10.077Z","lastCrawledAt":"2026-10-09T23:29:10.077Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T23:29:10.077Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.13","createdAt":"2026-10-01T11:07:24.635Z","changelog":"- Removed the file: skill-card.md. - No changes to skill logic or features. - Documentation, workflow, and capabilities remain the same.","fileCount":31,"zipByteSize":40593},{"version":"1.0.12","createdAt":"2026-09-27T08:35:26.821Z","changelog":"- Updated version to 1.0.16. - Documentation (SKILL.md) updated for clarity and version consistency. - Removed redundant documentation file: skill-card.md. - Minor changes to internal configuration (config.yaml). - No changes to core functionality or user workflow.","fileCount":31,"zipByteSize":40640},{"version":"1.0.11","createdAt":"2026-09-16T09:34:23.429Z","changelog":"- Updated version to 1.0.15. - SKILL.md updated with new version and metadata. - Obsolete file skill-card.md removed. - No changes to core features or interface.","fileCount":31,"zipByteSize":40849},{"version":"1.0.10","createdAt":"2026-08-24T06:44:33.065Z","changelog":"- Bumped version from 1.0.10 to 1.0.11. - Updated documentation in SKILL.md; no functional or interface changes. - Removed redundant file skill-card.md for simplification and maintainability. - No changes to code or usage—core features and workflow remain the same.","fileCount":31,"zipByteSize":40766},{"version":"1.0.9","createdAt":"2026-08-18T18:47:55.036Z","changelog":"- Removed file: skill-card.md (documentation/metadata only, no functional impact). - No changes to code or features. - No impact on usage or API behavior.","fileCount":31,"zipByteSize":40780},{"version":"1.0.8","createdAt":"2026-08-16T08:38:30.454Z","changelog":"- Updated version number to 1.0.10 - Minor adjustments to documentation and metadata - Removed legacy file: skill-card.md - No changes to functionality or core usage instructions","fileCount":31,"zipByteSize":40865},{"version":"1.0.7","createdAt":"2026-08-09T03:37:34.847Z","changelog":"- Updated version to 1.0.9. - Removed the file: skill-card.md. - SKILL.md updated, including the version number and possibly additional documentation improvements or clarifications. - No functional or code-level changes noted; update is focused on documentation/metadata.","fileCount":31,"zipByteSize":40736},{"version":"1.0.6","createdAt":"2026-07-27T19:17:36.512Z","changelog":"- Updated version to 1.0.7 in SKILL.md. - Removed the skill-card.md file. - No functional or workflow changes; documentation version and file cleanup only.","fileCount":31,"zipByteSize":40852}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-facial-hrv-trend-monitoring-analysis","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-facial-hrv-trend-monitoring-analysis` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/18072937735/smyx-facial-hrv-trend-monitoring-analysis before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-facial-hrv-trend-monitoring-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-facial-hrv-trend-monitoring-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-facial-hrv-trend-monitoring-analysis/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-facial-hrv-trend-monitoring-analysis/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-facial-hrv-trend-monitoring-analysis/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-facial-hrv-trend-monitoring-analysis/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T07:43:07.714Z"}},"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-facial-hrv-trend-monitoring-analysis/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-facial-hrv-trend-monitoring-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-facial-hrv-trend-monitoring-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-facial-hrv-trend-monitoring-analysis/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T23:29:10.077Z","emptyReason":null},"readme":"Skill: Adult Facial HRV Trend Monitoring (rPPG) | 成人心率变异性（HRV）趋势监测（面部）\n\nOwner: 18072937735\n\nSummary: Using everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval. | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。\n\nTags: latest:1.0.13\n\nVersion history:\n\nv1.0.13 | 2026-10-01T11:07:24.635Z | auto\n\n- Removed the file: skill-card.md.\n- No changes to skill logic or features.\n- Documentation, workflow, and capabilities remain the same.\n\nv1.0.12 | 2026-09-27T08:35:26.821Z | auto\n\n- Updated version to 1.0.16.  \n- Documentation (SKILL.md) updated for clarity and version consistency.  \n- Removed redundant documentation file: skill-card.md.\n- Minor changes to internal configuration (config.yaml).  \n- No changes to core functionality or user workflow.\n\nv1.0.11 | 2026-09-16T09:34:23.429Z | auto\n\n- Updated version to 1.0.15.\n- SKILL.md updated with new version and metadata.\n- Obsolete file skill-card.md removed.\n- No changes to core features or interface.\n\nv1.0.10 | 2026-08-24T06:44:33.065Z | auto\n\n- Bumped version from 1.0.10 to 1.0.11.\n- Updated documentation in SKILL.md; no functional or interface changes.\n- Removed redundant file skill-card.md for simplification and maintainability.\n- No changes to code or usage—core features and workflow remain the same.\n\nv1.0.9 | 2026-08-18T18:47:55.036Z | auto\n\n- Removed file: skill-card.md (documentation/metadata only, no functional impact).\n- No changes to code or features.\n- No impact on usage or API behavior.\n\nv1.0.8 | 2026-08-16T08:38:30.454Z | auto\n\n- Updated version number to 1.0.10\n- Minor adjustments to documentation and metadata\n- Removed legacy file: skill-card.md\n- No changes to functionality or core usage instructions\n\nv1.0.7 | 2026-08-09T03:37:34.847Z | auto\n\n- Updated version to 1.0.9.\n- Removed the file: skill-card.md.\n- SKILL.md updated, including the version number and possibly additional documentation improvements or clarifications.\n- No functional or code-level changes noted; update is focused on documentation/metadata.\n\nv1.0.6 | 2026-07-27T19:17:36.512Z | auto\n\n- Updated version to 1.0.7 in SKILL.md.\n- Removed the skill-card.md file.\n- No functional or workflow changes; documentation version and file cleanup only.\n\nv1.0.5 | 2026-07-14T04:45:35.814Z | auto\n\n- Updated version to 1.0.6.\n- Minor updates to SKILL.md content and metadata.\n- Removed obsolete skill-card.md documentation file.\n- No changes to core functionality or usage.\n- Internal and documentation improvements only.\n\nv1.0.4 | 2026-07-06T09:39:25.435Z | auto\n\n- Removed documentation file skill-card.md.\n- No changes to functionality or code.\n- All existing features and usage unchanged.\n\nv1.0.3 | 2026-07-05T14:27:26.684Z | auto\n\n- Updated to version 1.0.4 with documentation and config/script refinements.\n- Improved configuration and utility script organization.\n- Removed obsolete skill-card.md file. \n- Enhanced SKILL.md content for clarity and versioning.\n\nv1.0.2 | 2026-06-25T02:08:29.391Z | auto\n\n- Improved user privacy: the skill now handles all user identity parameters internally, never requests or exposes them in user interactions.\n- Updated documentation to clarify that no user input or display of internal identity (\"open-id\") is required—the system manages it automatically.\n- Streamlined user workflow: end users now only provide the video or report query request, with all backend authentication and cloud report association handled transparently.\n- Historical report queries strictly use cloud API and always present results as Markdown tables with direct report links; no local or manual report fetching is allowed.\n- Obsolete or redundant files removed for a cleaner package structure.\n\nv1.0.1 | 2026-06-19T11:22:28.033Z | auto\n\n- Updated open-id configuration: now prioritizes scripts/config.yaml in the skill root directory before workspace-level config files.\n- Enhanced documentation for open-id retrieval and input requirements, with stricter process enforcement.\n- SKILL.md streamlined for clarity; duplicate or less relevant content shortened or removed.\n- Added usage examples and clarified requirements for history report output formatting.\n- Removed redundant files (e.g., skill-card.md) and updated version/metadata (now 1.0.2, MIT-0 license).\n\nv1.0.0 | 2026-05-26T01:36:01.222Z | auto\n\nInitial release of the smyx-facial-hrv-trend-monitoring-analysis skill.\n\n- Enables contact-free heart-rate variability (HRV) monitoring via everyday cameras using remote photoplethysmography (rPPG).\n- Computes HRV metrics including SDNN and RMSSD from 30–60s facial videos.\n- Tracks daily/weekly HRV trends, with stress and fatigue alerts when HRV drops.\n- Supports use cases such as home health, enterprise wellness, physical exam centers, and smart mirrors.\n- Enforces strict user identity (open-id) flow for secure history tracking and report queries.\n- Provides structured results and history reports in Markdown table format, with direct links to detailed analysis.\n\nArchive index:\n\nArchive v1.0.13: 31 files, 40593 bytes\n\nFiles: references/api_doc.md (1495b), scripts/__init__.py (55b), scripts/config.py (710b), scripts/config.yaml (3b), scripts/skill.py (603b), scripts/smyx_facial_hrv_trend_monitoring_analysis.py (3612b), skill-card.md (2117b), SKILL.md (13067b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (161b)\n\nFile v1.0.13:SKILL.md\n\n---\nname: \"smyx-facial-hrv-trend-monitoring-analysis\"\ndescription: \"Using everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval. | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。\"\nversion: \"1.0.16\"\nlicense: \"MIT-0\"\n---\n\n# 💓 Adult Facial HRV Trend Monitoring (rPPG) | 成人心率变异性（HRV）趋势监测（面部）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人心率变异性（HRV）趋势监测（面部）** |\n| 🎯 核心目标 | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` |\n\nUsing everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval differences). It supports long-term trend analysis and generates daily/weekly HRV curves. Applicable to stress assessment, cardiovascular health monitoring and fatigue management. Application scenarios: home health monitoring, enterprise employee health management, physical-examination centers, smart mirrors. Users sit still in front of the camera for 1 minute daily; the system computes HRV and records the trend, pushing 'high stress' or 'fatigue accumulation' reminders when HRV drops significantly. Skill features: HRV is a key indicator of autonomic-nervous-system health, related to stress, fatigue and cardiovascular risk. Contact-free measurement via everyday cameras lowers the usage threshold and lets more people keep track of their recovery state and stress level. Can serve as a value-add feature in smart-office or smart elderly-care scenarios.\n\n通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。支持长期趋势分析，生成每日/每周HRV变化曲线。该技能可用于压力评估、心血管健康监测及疲劳管理。应用场景：居家健康监测、企业员工健康管理、体检中心、智能镜子。用户每日对着摄像头静坐1分钟，系统自动计算HRV并记录趋势，当HRV显著下降时推送'压力过大'或'疲劳累积'提醒。技能特点：HRV是衡量自主神经系统健康的重要指标，与压力、疲劳、心血管风险相关。通过日常摄像头无接触测量，可降低使用门槛，让更多人持续关注自身恢复状态和压力水平，助力健康管理。该技能可作为增值功能集成到智慧办公、健康养老等场景。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的生理信号分析 AI。你的任务是分析人脸面部视频，使用远程光电容积描记技术（rPPG）提取皮肤微循环波动信号，计算心率变异性（HRV）指标。输出 SDNN、RMSSD 以及长期趋势（需结合历史数据）。不要提供医疗诊断或临床心血管评估，仅输出基于信号处理的定量指标与趋势提示。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于 30-60 秒静坐面部视频，通过 rPPG 提取脉搏波 → 计算 HRV 指标 → 结合历史数据生成长期趋势\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 面部检测 + ROI（前额/双颊）选择 |\n| 2 | RGB 时序提取 |\n| 3 | 带通滤波 + POS/CHROM 算法提取 BVP |\n| 4 | RR 间期序列 |\n| 5 | 平均心率（HR） |\n| 6 | SDNN |\n| 7 | RMSSD |\n| 8 | pNN50 |\n| 9 | LF/HF 比 |\n| 10 | 信号质量评级（high / medium / low） |\n| 11 | HRV 综合得分（0-100） |\n| 12 | 近 7 天趋势（rising / stable / declining）+ 变化百分比 |\n| 13 | 压力/疲劳累积提示 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供成人静坐 30-60 秒面部视频 URL 或文件需要分析时，默认触发本技能进行 HRV 趋势监测 |\n| 🔎 明确分析意图 | 当用户明确提及 HRV、心率变异性、SDNN、RMSSD、rPPG、远程光电容积描记、压力评估、自主神经、疲劳累积、智能镜子心率等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看 HRV 历史报告、心率变异性报告清单、面部 HRV 趋势报告清单、查询历史 HRV 记录、显示所有 HRV 报告、显示自主神经监测诊断报告，查询压力疲劳趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备成人静坐面部视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行成人面部 HRV 趋势监测 | 调用 `-m scripts.smyx_facial_hrv_trend_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地成人静坐面部视频文件路径（30-60秒） | 适用于本地文件分析 |\n| `--url` | 网络成人静坐面部视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，rPPG 生理信号分析场景默认 `other` | 按需填写 |\n| `--list` | 显示成人面部 HRV 历史监测报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_facial_hrv_trend_monitoring_analysis.py`](scripts/smyx_facial_hrv_trend_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：帧率必须 ≥ 25 FPS，否则 HRV 指标可信度大幅下降 |\n| 🔎 使用提醒 | HRV 受运动、咖啡因、情绪、体位等多因素影响，建议每日同时段、同条件测量便于趋势纵向对比 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为个人健康趋势参考，本工具不替代心电图等医疗级心律评估，更不替代医生诊断 |\n| 🔏 隐私合规 | 隐私合规：面部视频涉及生物特征隐私，使用前需取得本人同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input /path/to/sit_30s.mp4\n\n# 分析网络 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --url https://example.com/sit_30s.mp4\n\n# 显示历史 HRV 趋势监测报告（自动触发关键词：查看 HRV 历史报告、心率变异性报告清单等）\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --output result.json\n```\n\nFile v1.0.13:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-facial-hrv-trend-monitoring-analysis\",\n  \"version\": \"1.0.13\",\n  \"publishedAt\": 1790852844635\n}\n\nFile v1.0.13:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放成人心率变异性（HRV）趋势监测（面部）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动 HRV 分析任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果（含 SDNN/RMSSD 等指标）\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整 HRV 趋势报告\n\n## 场景代码\n\n- `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` - 成人心率变异性（HRV）趋势监测（面部）\n\n## HRV 关键指标说明\n\n- `SDNN`（ms）：全部正常窦性心搏间期（NN intervals）的标准差，反映总体 HRV\n- `RMSSD`（ms）：相邻心搏间期差值的均方根，反映副交感神经活性\n- `pNN50`（%）：相邻 NN 间期差值 > 50ms 的占比\n- `LF/HF`：低频/高频功率比，反映自交感与副交感平衡\n- `mean_HR`（bpm）：分析窗口内平均心率\n- `trend`：相对历史基线的变化（rising/stable/declining）\n- `stress_level`：基于 HRV 的压力水平估计（low/medium/high）\n\n## 视频采集建议\n\n- 时长：30 - 60 秒\n- 光照：自然光或柔和稳定光源，避免强阴影\n- 距离：人脸占画面 1/3 以上，正面、保持静止\n- 帧率：≥ 25 fps，分辨率 ≥ 480p\n\nFile v1.0.13:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.13:scripts/config.yaml\n\n{}\n\nFile v1.0.13:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.13:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.13:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.13:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.13:skill-card.md\n\n## Description:\n\nAnalyzes short facial videos for heart-rate-variability trends and provides metrics, reports, and access to report history.\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\nAdults and health-monitoring application developers use short facial videos to review HRV trends, including SDNN and RMSSD, for personal wellness and fatigue awareness. Results are not a substitute for clinical assessment or diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Facial videos or video URLs may be sent to external services for biometric and health-adjacent analysis.\n\nMitigation: Obtain informed consent before use and review the service's data handling before sharing videos.\n\nRisk: Report history is associated with an automatically created or reused identity and stored in the cloud.\n\nMitigation: Confirm that cloud history and identity linkage are acceptable before running analyses or retrieving past reports.\n\nRisk: The skill creates local workspace data and persists service tokens for future history retrieval.\n\nMitigation: Restrict access to the workspace and stored credentials; remove them when no longer needed.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/18072937735/skills/smyx-facial-hrv-trend-monitoring-analysis)\n- [HRV API documentation](artifact/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [Analysis, Guidance, Report links]\n\n**Output Format:** [Text or Markdown reports and tables; optional JSON output]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Includes HRV metrics and links to cloud-hosted reports or report history.]\n\n## Skill Version(s):\n\n1.0.13 (source: server-resolved ClawHub release)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.13:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.13:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.12: 31 files, 40640 bytes\n\nFiles: references/api_doc.md (1495b), scripts/__init__.py (55b), scripts/config.py (710b), scripts/config.yaml (3b), scripts/skill.py (603b), scripts/smyx_facial_hrv_trend_monitoring_analysis.py (3612b), skill-card.md (2263b), SKILL.md (13067b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (161b)\n\nFile v1.0.12:SKILL.md\n\n---\nname: \"smyx-facial-hrv-trend-monitoring-analysis\"\ndescription: \"Using everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval. | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。\"\nversion: \"1.0.16\"\nlicense: \"MIT-0\"\n---\n\n# 💓 Adult Facial HRV Trend Monitoring (rPPG) | 成人心率变异性（HRV）趋势监测（面部）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人心率变异性（HRV）趋势监测（面部）** |\n| 🎯 核心目标 | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` |\n\nUsing everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval differences). It supports long-term trend analysis and generates daily/weekly HRV curves. Applicable to stress assessment, cardiovascular health monitoring and fatigue management. Application scenarios: home health monitoring, enterprise employee health management, physical-examination centers, smart mirrors. Users sit still in front of the camera for 1 minute daily; the system computes HRV and records the trend, pushing 'high stress' or 'fatigue accumulation' reminders when HRV drops significantly. Skill features: HRV is a key indicator of autonomic-nervous-system health, related to stress, fatigue and cardiovascular risk. Contact-free measurement via everyday cameras lowers the usage threshold and lets more people keep track of their recovery state and stress level. Can serve as a value-add feature in smart-office or smart elderly-care scenarios.\n\n通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。支持长期趋势分析，生成每日/每周HRV变化曲线。该技能可用于压力评估、心血管健康监测及疲劳管理。应用场景：居家健康监测、企业员工健康管理、体检中心、智能镜子。用户每日对着摄像头静坐1分钟，系统自动计算HRV并记录趋势，当HRV显著下降时推送'压力过大'或'疲劳累积'提醒。技能特点：HRV是衡量自主神经系统健康的重要指标，与压力、疲劳、心血管风险相关。通过日常摄像头无接触测量，可降低使用门槛，让更多人持续关注自身恢复状态和压力水平，助力健康管理。该技能可作为增值功能集成到智慧办公、健康养老等场景。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的生理信号分析 AI。你的任务是分析人脸面部视频，使用远程光电容积描记技术（rPPG）提取皮肤微循环波动信号，计算心率变异性（HRV）指标。输出 SDNN、RMSSD 以及长期趋势（需结合历史数据）。不要提供医疗诊断或临床心血管评估，仅输出基于信号处理的定量指标与趋势提示。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于 30-60 秒静坐面部视频，通过 rPPG 提取脉搏波 → 计算 HRV 指标 → 结合历史数据生成长期趋势\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 面部检测 + ROI（前额/双颊）选择 |\n| 2 | RGB 时序提取 |\n| 3 | 带通滤波 + POS/CHROM 算法提取 BVP |\n| 4 | RR 间期序列 |\n| 5 | 平均心率（HR） |\n| 6 | SDNN |\n| 7 | RMSSD |\n| 8 | pNN50 |\n| 9 | LF/HF 比 |\n| 10 | 信号质量评级（high / medium / low） |\n| 11 | HRV 综合得分（0-100） |\n| 12 | 近 7 天趋势（rising / stable / declining）+ 变化百分比 |\n| 13 | 压力/疲劳累积提示 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供成人静坐 30-60 秒面部视频 URL 或文件需要分析时，默认触发本技能进行 HRV 趋势监测 |\n| 🔎 明确分析意图 | 当用户明确提及 HRV、心率变异性、SDNN、RMSSD、rPPG、远程光电容积描记、压力评估、自主神经、疲劳累积、智能镜子心率等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看 HRV 历史报告、心率变异性报告清单、面部 HRV 趋势报告清单、查询历史 HRV 记录、显示所有 HRV 报告、显示自主神经监测诊断报告，查询压力疲劳趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备成人静坐面部视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行成人面部 HRV 趋势监测 | 调用 `-m scripts.smyx_facial_hrv_trend_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地成人静坐面部视频文件路径（30-60秒） | 适用于本地文件分析 |\n| `--url` | 网络成人静坐面部视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，rPPG 生理信号分析场景默认 `other` | 按需填写 |\n| `--list` | 显示成人面部 HRV 历史监测报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_facial_hrv_trend_monitoring_analysis.py`](scripts/smyx_facial_hrv_trend_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：帧率必须 ≥ 25 FPS，否则 HRV 指标可信度大幅下降 |\n| 🔎 使用提醒 | HRV 受运动、咖啡因、情绪、体位等多因素影响，建议每日同时段、同条件测量便于趋势纵向对比 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为个人健康趋势参考，本工具不替代心电图等医疗级心律评估，更不替代医生诊断 |\n| 🔏 隐私合规 | 隐私合规：面部视频涉及生物特征隐私，使用前需取得本人同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input /path/to/sit_30s.mp4\n\n# 分析网络 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --url https://example.com/sit_30s.mp4\n\n# 显示历史 HRV 趋势监测报告（自动触发关键词：查看 HRV 历史报告、心率变异性报告清单等）\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --output result.json\n```\n\nFile v1.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-facial-hrv-trend-monitoring-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1790498126821\n}\n\nFile v1.0.12:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放成人心率变异性（HRV）趋势监测（面部）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动 HRV 分析任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果（含 SDNN/RMSSD 等指标）\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整 HRV 趋势报告\n\n## 场景代码\n\n- `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` - 成人心率变异性（HRV）趋势监测（面部）\n\n## HRV 关键指标说明\n\n- `SDNN`（ms）：全部正常窦性心搏间期（NN intervals）的标准差，反映总体 HRV\n- `RMSSD`（ms）：相邻心搏间期差值的均方根，反映副交感神经活性\n- `pNN50`（%）：相邻 NN 间期差值 > 50ms 的占比\n- `LF/HF`：低频/高频功率比，反映自交感与副交感平衡\n- `mean_HR`（bpm）：分析窗口内平均心率\n- `trend`：相对历史基线的变化（rising/stable/declining）\n- `stress_level`：基于 HRV 的压力水平估计（low/medium/high）\n\n## 视频采集建议\n\n- 时长：30 - 60 秒\n- 光照：自然光或柔和稳定光源，避免强阴影\n- 距离：人脸占画面 1/3 以上，正面、保持静止\n- 帧率：≥ 25 fps，分辨率 ≥ 480p\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 short adult facial videos to report contact-free heart-rate-variability (HRV) trends and historical 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\nAdults and health-monitoring teams use short, still facial videos to follow HRV trends, review past reports, and receive stress or fatigue reminders. Results are for personal trend awareness, not medical diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Facial video or video URLs are processed by the publisher's cloud service, exposing sensitive biometric and health-adjacent data.\n\nMitigation: Obtain informed consent and confirm the service's retention, deletion, and access controls before submitting real facial videos.\n\nRisk: An account identity is silently created or reused and report history is linked to that identity.\n\nMitigation: Review the identity and history behavior with users and restrict access to reports.\n\nRisk: Tokens and profile data are stored in the workspace database.\n\nMitigation: Use a protected workspace with scoped permissions and review local data-handling controls before use.\n\nRisk: HRV estimates from facial video can be mistaken for medical-grade rhythm assessment.\n\nMitigation: Use results only for trend awareness and seek qualified medical evaluation for clinical concerns.\n\n## Reference(s):\n\n- [HRV API reference](references/api_doc.md)\n- [ClawHub skill listing](https://clawhub.ai/18072937735/skills/smyx-facial-hrv-trend-monitoring-analysis)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON]\n\n**Output Format:** [Structured report or JSON, with optional saved file and report link]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Includes HRV trend metrics, reminders, and historical report listings.]\n\n## Skill Version(s):\n\n1.0.12 (source: ClawHub release metadata)\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, 40849 bytes\n\nFiles: references/api_doc.md (1495b), scripts/__init__.py (55b), scripts/config.py (710b), scripts/config.yaml (3b), scripts/skill.py (603b), scripts/smyx_facial_hrv_trend_monitoring_analysis.py (3612b), skill-card.md (2760b), SKILL.md (13067b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (472b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (161b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: \"smyx-facial-hrv-trend-monitoring-analysis\"\ndescription: \"Using everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval. | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。\"\nversion: \"1.0.15\"\nlicense: \"MIT-0\"\n---\n\n# 💓 Adult Facial HRV Trend Monitoring (rPPG) | 成人心率变异性（HRV）趋势监测（面部）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人心率变异性（HRV）趋势监测（面部）** |\n| 🎯 核心目标 | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` |\n\nUsing everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval differences). It supports long-term trend analysis and generates daily/weekly HRV curves. Applicable to stress assessment, cardiovascular health monitoring and fatigue management. Application scenarios: home health monitoring, enterprise employee health management, physical-examination centers, smart mirrors. Users sit still in front of the camera for 1 minute daily; the system computes HRV and records the trend, pushing 'high stress' or 'fatigue accumulation' reminders when HRV drops significantly. Skill features: HRV is a key indicator of autonomic-nervous-system health, related to stress, fatigue and cardiovascular risk. Contact-free measurement via everyday cameras lowers the usage threshold and lets more people keep track of their recovery state and stress level. Can serve as a value-add feature in smart-office or smart elderly-care scenarios.\n\n通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。支持长期趋势分析，生成每日/每周HRV变化曲线。该技能可用于压力评估、心血管健康监测及疲劳管理。应用场景：居家健康监测、企业员工健康管理、体检中心、智能镜子。用户每日对着摄像头静坐1分钟，系统自动计算HRV并记录趋势，当HRV显著下降时推送'压力过大'或'疲劳累积'提醒。技能特点：HRV是衡量自主神经系统健康的重要指标，与压力、疲劳、心血管风险相关。通过日常摄像头无接触测量，可降低使用门槛，让更多人持续关注自身恢复状态和压力水平，助力健康管理。该技能可作为增值功能集成到智慧办公、健康养老等场景。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的生理信号分析 AI。你的任务是分析人脸面部视频，使用远程光电容积描记技术（rPPG）提取皮肤微循环波动信号，计算心率变异性（HRV）指标。输出 SDNN、RMSSD 以及长期趋势（需结合历史数据）。不要提供医疗诊断或临床心血管评估，仅输出基于信号处理的定量指标与趋势提示。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于 30-60 秒静坐面部视频，通过 rPPG 提取脉搏波 → 计算 HRV 指标 → 结合历史数据生成长期趋势\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 面部检测 + ROI（前额/双颊）选择 |\n| 2 | RGB 时序提取 |\n| 3 | 带通滤波 + POS/CHROM 算法提取 BVP |\n| 4 | RR 间期序列 |\n| 5 | 平均心率（HR） |\n| 6 | SDNN |\n| 7 | RMSSD |\n| 8 | pNN50 |\n| 9 | LF/HF 比 |\n| 10 | 信号质量评级（high / medium / low） |\n| 11 | HRV 综合得分（0-100） |\n| 12 | 近 7 天趋势（rising / stable / declining）+ 变化百分比 |\n| 13 | 压力/疲劳累积提示 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供成人静坐 30-60 秒面部视频 URL 或文件需要分析时，默认触发本技能进行 HRV 趋势监测 |\n| 🔎 明确分析意图 | 当用户明确提及 HRV、心率变异性、SDNN、RMSSD、rPPG、远程光电容积描记、压力评估、自主神经、疲劳累积、智能镜子心率等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看 HRV 历史报告、心率变异性报告清单、面部 HRV 趋势报告清单、查询历史 HRV 记录、显示所有 HRV 报告、显示自主神经监测诊断报告，查询压力疲劳趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备成人静坐面部视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行成人面部 HRV 趋势监测 | 调用 `-m scripts.smyx_facial_hrv_trend_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地成人静坐面部视频文件路径（30-60秒） | 适用于本地文件分析 |\n| `--url` | 网络成人静坐面部视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，rPPG 生理信号分析场景默认 `other` | 按需填写 |\n| `--list` | 显示成人面部 HRV 历史监测报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_facial_hrv_trend_monitoring_analysis.py`](scripts/smyx_facial_hrv_trend_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：帧率必须 ≥ 25 FPS，否则 HRV 指标可信度大幅下降 |\n| 🔎 使用提醒 | HRV 受运动、咖啡因、情绪、体位等多因素影响，建议每日同时段、同条件测量便于趋势纵向对比 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为个人健康趋势参考，本工具不替代心电图等医疗级心律评估，更不替代医生诊断 |\n| 🔏 隐私合规 | 隐私合规：面部视频涉及生物特征隐私，使用前需取得本人同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input /path/to/sit_30s.mp4\n\n# 分析网络 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --url https://example.com/sit_30s.mp4\n\n# 显示历史 HRV 趋势监测报告（自动触发关键词：查看 HRV 历史报告、心率变异性报告清单等）\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --output result.json\n```\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-facial-hrv-trend-monitoring-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1789551263429\n}\n\nFile v1.0.11:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放成人心率变异性（HRV）趋势监测（面部）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动 HRV 分析任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果（含 SDNN/RMSSD 等指标）\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整 HRV 趋势报告\n\n## 场景代码\n\n- `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` - 成人心率变异性（HRV）趋势监测（面部）\n\n## HRV 关键指标说明\n\n- `SDNN`（ms）：全部正常窦性心搏间期（NN intervals）的标准差，反映总体 HRV\n- `RMSSD`（ms）：相邻心搏间期差值的均方根，反映副交感神经活性\n- `pNN50`（%）：相邻 NN 间期差值 > 50ms 的占比\n- `LF/HF`：低频/高频功率比，反映自交感与副交感平衡\n- `mean_HR`（bpm）：分析窗口内平均心率\n- `trend`：相对历史基线的变化（rising/stable/declining）\n- `stress_level`：基于 HRV 的压力水平估计（low/medium/high）\n\n## 视频采集建议\n\n- 时长：30 - 60 秒\n- 光照：自然光或柔和稳定光源，避免强阴影\n- 距离：人脸占画面 1/3 以上，正面、保持静止\n- 帧率：≥ 25 fps，分辨率 ≥ 480p\n\nFile v1.0.11:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.11:scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.11:skill-card.md\n\n## Description:\n\nAnalyzes 30-60 second adult facial videos with remote photoplethysmography to estimate HRV metrics such as SDNN and RMSSD and report trend-oriented stress or fatigue signals.\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\nHealth, wellness, smart mirror, workplace, or care-setting users can use this skill to turn a still adult facial video into contact-free HRV trend indicators. The outputs are intended for personal health trend monitoring and are not a medical diagnosis or a replacement for clinical cardiac evaluation.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Uploaded face videos and HRV reports are sensitive biometric and health-related data.\n\nMitigation: Require explicit user consent, document remote processing and retention, and protect stored video and report data with appropriate access controls and encryption.\n\nRisk: Plaintext development endpoints may expose sensitive uploads or reports in transit or route production use to non-production services.\n\nMitigation: Remove development HTTP defaults before release and require documented production HTTPS endpoints.\n\nRisk: Cloud history access and under-scoped identity handling can expose reports beyond the intended user context.\n\nMitigation: Require clear user confirmation for cloud history access and use scoped identity checks for report retrieval.\n\nRisk: Local token persistence can leak authentication material from the runtime environment.\n\nMitigation: Store authentication tokens in a proper secret store and avoid writing reusable credentials to local plaintext files.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-facial-hrv-trend-monitoring-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [API documentation](references/api_doc.md)\n- [Smyx analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, guidance]\n\n**Output Format:** [Markdown report text with optional JSON result output and report links.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Reports may include HRV metrics, signal quality, trend direction, stress or fatigue prompts, and historical report links.]\n\n## Skill Version(s):\n\n1.0.11 (source: server release metadata; artifact frontmatter reports 1.0.15)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 40766 bytes\n\nFiles: references/api_doc.md (1495b), scripts/__init__.py (55b), scripts/config.py (710b), scripts/config.yaml (3b), scripts/skill.py (603b), scripts/smyx_facial_hrv_trend_monitoring_analysis.py (3612b), skill-card.md (2588b), SKILL.md (13067b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (472b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (161b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: \"smyx-facial-hrv-trend-monitoring-analysis\"\ndescription: \"Using everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval. | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 💓 Adult Facial HRV Trend Monitoring (rPPG) | 成人心率变异性（HRV）趋势监测（面部）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人心率变异性（HRV）趋势监测（面部）** |\n| 🎯 核心目标 | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` |\n\nUsing everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval differences). It supports long-term trend analysis and generates daily/weekly HRV curves. Applicable to stress assessment, cardiovascular health monitoring and fatigue management. Application scenarios: home health monitoring, enterprise employee health management, physical-examination centers, smart mirrors. Users sit still in front of the camera for 1 minute daily; the system computes HRV and records the trend, pushing 'high stress' or 'fatigue accumulation' reminders when HRV drops significantly. Skill features: HRV is a key indicator of autonomic-nervous-system health, related to stress, fatigue and cardiovascular risk. Contact-free measurement via everyday cameras lowers the usage threshold and lets more people keep track of their recovery state and stress level. Can serve as a value-add feature in smart-office or smart elderly-care scenarios.\n\n通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。支持长期趋势分析，生成每日/每周HRV变化曲线。该技能可用于压力评估、心血管健康监测及疲劳管理。应用场景：居家健康监测、企业员工健康管理、体检中心、智能镜子。用户每日对着摄像头静坐1分钟，系统自动计算HRV并记录趋势，当HRV显著下降时推送'压力过大'或'疲劳累积'提醒。技能特点：HRV是衡量自主神经系统健康的重要指标，与压力、疲劳、心血管风险相关。通过日常摄像头无接触测量，可降低使用门槛，让更多人持续关注自身恢复状态和压力水平，助力健康管理。该技能可作为增值功能集成到智慧办公、健康养老等场景。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的生理信号分析 AI。你的任务是分析人脸面部视频，使用远程光电容积描记技术（rPPG）提取皮肤微循环波动信号，计算心率变异性（HRV）指标。输出 SDNN、RMSSD 以及长期趋势（需结合历史数据）。不要提供医疗诊断或临床心血管评估，仅输出基于信号处理的定量指标与趋势提示。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于 30-60 秒静坐面部视频，通过 rPPG 提取脉搏波 → 计算 HRV 指标 → 结合历史数据生成长期趋势\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 面部检测 + ROI（前额/双颊）选择 |\n| 2 | RGB 时序提取 |\n| 3 | 带通滤波 + POS/CHROM 算法提取 BVP |\n| 4 | RR 间期序列 |\n| 5 | 平均心率（HR） |\n| 6 | SDNN |\n| 7 | RMSSD |\n| 8 | pNN50 |\n| 9 | LF/HF 比 |\n| 10 | 信号质量评级（high / medium / low） |\n| 11 | HRV 综合得分（0-100） |\n| 12 | 近 7 天趋势（rising / stable / declining）+ 变化百分比 |\n| 13 | 压力/疲劳累积提示 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供成人静坐 30-60 秒面部视频 URL 或文件需要分析时，默认触发本技能进行 HRV 趋势监测 |\n| 🔎 明确分析意图 | 当用户明确提及 HRV、心率变异性、SDNN、RMSSD、rPPG、远程光电容积描记、压力评估、自主神经、疲劳累积、智能镜子心率等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看 HRV 历史报告、心率变异性报告清单、面部 HRV 趋势报告清单、查询历史 HRV 记录、显示所有 HRV 报告、显示自主神经监测诊断报告，查询压力疲劳趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备成人静坐面部视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行成人面部 HRV 趋势监测 | 调用 `-m scripts.smyx_facial_hrv_trend_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地成人静坐面部视频文件路径（30-60秒） | 适用于本地文件分析 |\n| `--url` | 网络成人静坐面部视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，rPPG 生理信号分析场景默认 `other` | 按需填写 |\n| `--list` | 显示成人面部 HRV 历史监测报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_facial_hrv_trend_monitoring_analysis.py`](scripts/smyx_facial_hrv_trend_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：帧率必须 ≥ 25 FPS，否则 HRV 指标可信度大幅下降 |\n| 🔎 使用提醒 | HRV 受运动、咖啡因、情绪、体位等多因素影响，建议每日同时段、同条件测量便于趋势纵向对比 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为个人健康趋势参考，本工具不替代心电图等医疗级心律评估，更不替代医生诊断 |\n| 🔏 隐私合规 | 隐私合规：面部视频涉及生物特征隐私，使用前需取得本人同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input /path/to/sit_30s.mp4\n\n# 分析网络 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --url https://example.com/sit_30s.mp4\n\n# 显示历史 HRV 趋势监测报告（自动触发关键词：查看 HRV 历史报告、心率变异性报告清单等）\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-facial-hrv-trend-monitoring-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1787553873065\n}\n\nFile v1.0.10:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放成人心率变异性（HRV）趋势监测（面部）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动 HRV 分析任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果（含 SDNN/RMSSD 等指标）\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整 HRV 趋势报告\n\n## 场景代码\n\n- `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` - 成人心率变异性（HRV）趋势监测（面部）\n\n## HRV 关键指标说明\n\n- `SDNN`（ms）：全部正常窦性心搏间期（NN intervals）的标准差，反映总体 HRV\n- `RMSSD`（ms）：相邻心搏间期差值的均方根，反映副交感神经活性\n- `pNN50`（%）：相邻 NN 间期差值 > 50ms 的占比\n- `LF/HF`：低频/高频功率比，反映自交感与副交感平衡\n- `mean_HR`（bpm）：分析窗口内平均心率\n- `trend`：相对历史基线的变化（rising/stable/declining）\n- `stress_level`：基于 HRV 的压力水平估计（low/medium/high）\n\n## 视频采集建议\n\n- 时长：30 - 60 秒\n- 光照：自然光或柔和稳定光源，避免强阴影\n- 距离：人脸占画面 1/3 以上，正面、保持静止\n- 帧率：≥ 25 fps，分辨率 ≥ 480p\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\nThis skill analyzes 30-60 seconds of adult facial video with remote photoplethysmography to produce HRV trend metrics such as SDNN, RMSSD, pNN50, LF/HF, signal quality, stress or fatigue indicators, and report links.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to submit adult seated face videos or video URLs for cloud-backed rPPG HRV trend analysis and historical report lookup. Results are for wellness trend monitoring and should not be used for diagnosis, treatment, or regulated clinical decisions.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill processes adult facial video and HRV history, which are sensitive biometric and health-related data.\n\nMitigation: Use only with explicit consent from the person in the video, document where videos and reports are sent and retained, and avoid regulated or clinical decision-making.\n\nRisk: Security evidence reports unclear user control over identity binding and historical report access.\n\nMitigation: Require consent-gated identity and history access before report lookup or analysis, and avoid exposing internal identity values in user-facing outputs.\n\nRisk: Security evidence reports insecure release defaults and plaintext shared workspace token storage.\n\nMitigation: Switch release defaults to HTTPS production endpoints and store reusable tokens in a protected secret store rather than plaintext shared workspace files.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-facial-hrv-trend-monitoring-analysis)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n- [HRV API Documentation](references/api_doc.md)\n- [Analysis API Documentation](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, guidance]\n\n**Output Format:** [Markdown and JSON-like structured text]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include HRV metrics, trend summaries, historical report lists, and report export links.]\n\n## Skill Version(s):\n\n1.0.10 (source: server release metadata; artifact frontmatter reports 1.0.11)\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, 40780 bytes\n\nFiles: references/api_doc.md (1495b), scripts/__init__.py (55b), scripts/config.py (710b), scripts/config.yaml (3b), scripts/skill.py (603b), scripts/smyx_facial_hrv_trend_monitoring_analysis.py (3612b), skill-card.md (2648b), SKILL.md (13067b), 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 (160b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: \"smyx-facial-hrv-trend-monitoring-analysis\"\ndescription: \"Using everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval. | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 💓 Adult Facial HRV Trend Monitoring (rPPG) | 成人心率变异性（HRV）趋势监测（面部）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人心率变异性（HRV）趋势监测（面部）** |\n| 🎯 核心目标 | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` |\n\nUsing everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval differences). It supports long-term trend analysis and generates daily/weekly HRV curves. Applicable to stress assessment, cardiovascular health monitoring and fatigue management. Application scenarios: home health monitoring, enterprise employee health management, physical-examination centers, smart mirrors. Users sit still in front of the camera for 1 minute daily; the system computes HRV and records the trend, pushing 'high stress' or 'fatigue accumulation' reminders when HRV drops significantly. Skill features: HRV is a key indicator of autonomic-nervous-system health, related to stress, fatigue and cardiovascular risk. Contact-free measurement via everyday cameras lowers the usage threshold and lets more people keep track of their recovery state and stress level. Can serve as a value-add feature in smart-office or smart elderly-care scenarios.\n\n通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。支持长期趋势分析，生成每日/每周HRV变化曲线。该技能可用于压力评估、心血管健康监测及疲劳管理。应用场景：居家健康监测、企业员工健康管理、体检中心、智能镜子。用户每日对着摄像头静坐1分钟，系统自动计算HRV并记录趋势，当HRV显著下降时推送'压力过大'或'疲劳累积'提醒。技能特点：HRV是衡量自主神经系统健康的重要指标，与压力、疲劳、心血管风险相关。通过日常摄像头无接触测量，可降低使用门槛，让更多人持续关注自身恢复状态和压力水平，助力健康管理。该技能可作为增值功能集成到智慧办公、健康养老等场景。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的生理信号分析 AI。你的任务是分析人脸面部视频，使用远程光电容积描记技术（rPPG）提取皮肤微循环波动信号，计算心率变异性（HRV）指标。输出 SDNN、RMSSD 以及长期趋势（需结合历史数据）。不要提供医疗诊断或临床心血管评估，仅输出基于信号处理的定量指标与趋势提示。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于 30-60 秒静坐面部视频，通过 rPPG 提取脉搏波 → 计算 HRV 指标 → 结合历史数据生成长期趋势\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 面部检测 + ROI（前额/双颊）选择 |\n| 2 | RGB 时序提取 |\n| 3 | 带通滤波 + POS/CHROM 算法提取 BVP |\n| 4 | RR 间期序列 |\n| 5 | 平均心率（HR） |\n| 6 | SDNN |\n| 7 | RMSSD |\n| 8 | pNN50 |\n| 9 | LF/HF 比 |\n| 10 | 信号质量评级（high / medium / low） |\n| 11 | HRV 综合得分（0-100） |\n| 12 | 近 7 天趋势（rising / stable / declining）+ 变化百分比 |\n| 13 | 压力/疲劳累积提示 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供成人静坐 30-60 秒面部视频 URL 或文件需要分析时，默认触发本技能进行 HRV 趋势监测 |\n| 🔎 明确分析意图 | 当用户明确提及 HRV、心率变异性、SDNN、RMSSD、rPPG、远程光电容积描记、压力评估、自主神经、疲劳累积、智能镜子心率等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看 HRV 历史报告、心率变异性报告清单、面部 HRV 趋势报告清单、查询历史 HRV 记录、显示所有 HRV 报告、显示自主神经监测诊断报告，查询压力疲劳趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备成人静坐面部视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行成人面部 HRV 趋势监测 | 调用 `-m scripts.smyx_facial_hrv_trend_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地成人静坐面部视频文件路径（30-60秒） | 适用于本地文件分析 |\n| `--url` | 网络成人静坐面部视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，rPPG 生理信号分析场景默认 `other` | 按需填写 |\n| `--list` | 显示成人面部 HRV 历史监测报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_facial_hrv_trend_monitoring_analysis.py`](scripts/smyx_facial_hrv_trend_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：帧率必须 ≥ 25 FPS，否则 HRV 指标可信度大幅下降 |\n| 🔎 使用提醒 | HRV 受运动、咖啡因、情绪、体位等多因素影响，建议每日同时段、同条件测量便于趋势纵向对比 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为个人健康趋势参考，本工具不替代心电图等医疗级心律评估，更不替代医生诊断 |\n| 🔏 隐私合规 | 隐私合规：面部视频涉及生物特征隐私，使用前需取得本人同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input /path/to/sit_30s.mp4\n\n# 分析网络 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --url https://example.com/sit_30s.mp4\n\n# 显示历史 HRV 趋势监测报告（自动触发关键词：查看 HRV 历史报告、心率变异性报告清单等）\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-facial-hrv-trend-monitoring-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1787078875036\n}\n\nFile v1.0.9:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放成人心率变异性（HRV）趋势监测（面部）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动 HRV 分析任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果（含 SDNN/RMSSD 等指标）\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整 HRV 趋势报告\n\n## 场景代码\n\n- `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` - 成人心率变异性（HRV）趋势监测（面部）\n\n## HRV 关键指标说明\n\n- `SDNN`（ms）：全部正常窦性心搏间期（NN intervals）的标准差，反映总体 HRV\n- `RMSSD`（ms）：相邻心搏间期差值的均方根，反映副交感神经活性\n- `pNN50`（%）：相邻 NN 间期差值 > 50ms 的占比\n- `LF/HF`：低频/高频功率比，反映自交感与副交感平衡\n- `mean_HR`（bpm）：分析窗口内平均心率\n- `trend`：相对历史基线的变化（rising/stable/declining）\n- `stress_level`：基于 HRV 的压力水平估计（low/medium/high）\n\n## 视频采集建议\n\n- 时长：30 - 60 秒\n- 光照：自然光或柔和稳定光源，避免强阴影\n- 距离：人脸占画面 1/3 以上，正面、保持静止\n- 帧率：≥ 25 fps，分辨率 ≥ 480p\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 30-60 second adult facial videos with rPPG to estimate HRV metrics such as SDNN and RMSSD, summarize trends, and provide stress or fatigue prompts for personal wellness monitoring.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to submit an adult still-seated facial video or video URL for HRV trend analysis, structured metrics, report links, and historical report summaries. The results are wellness trend references and are not a substitute for medical diagnosis or clinical cardiovascular assessment.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Facial video and HRV-related results are sent to a configured backend for analysis.\n\nMitigation: Use only with informed consent and an approved production HTTPS backend for sensitive biometric and wellness data.\n\nRisk: Report history is tied to an automatically managed identity.\n\nMitigation: Review account creation, retention, deletion, and history-query behavior before installing or deploying the skill.\n\nRisk: Local SQLite records may include service tokens.\n\nMitigation: Run the skill in a controlled environment, restrict filesystem access, and remove local records when they are no longer needed.\n\nRisk: The security evidence reports private development backend endpoints for sensitive face-video analysis.\n\nMitigation: Switch to documented production HTTPS endpoints before commercial use.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-facial-hrv-trend-monitoring-analysis)\n- [Adult facial HRV API documentation](references/api_doc.md)\n- [SMYX 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, Files, Guidance]\n\n**Output Format:** [Markdown and JSON analysis reports with optional saved output files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include HRV metrics, signal-quality assessment, trend summaries, stress or fatigue prompts, historical report tables, and report links.]\n\n## Skill Version(s):\n\n1.0.9 (source: server release metadata; artifact frontmatter lists 1.0.10)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.9:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.9:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.8: 31 files, 40865 bytes\n\nFiles: references/api_doc.md (1495b), scripts/__init__.py (55b), scripts/config.py (710b), scripts/config.yaml (3b), scripts/skill.py (603b), scripts/smyx_facial_hrv_trend_monitoring_analysis.py (3612b), skill-card.md (2784b), SKILL.md (13067b), 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 (160b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"smyx-facial-hrv-trend-monitoring-analysis\"\ndescription: \"Using everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval. | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 💓 Adult Facial HRV Trend Monitoring (rPPG) | 成人心率变异性（HRV）趋势监测（面部）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人心率变异性（HRV）趋势监测（面部）** |\n| 🎯 核心目标 | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` |\n\nUsing everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval differences). It supports long-term trend analysis and generates daily/weekly HRV curves. Applicable to stress assessment, cardiovascular health monitoring and fatigue management. Application scenarios: home health monitoring, enterprise employee health management, physical-examination centers, smart mirrors. Users sit still in front of the camera for 1 minute daily; the system computes HRV and records the trend, pushing 'high stress' or 'fatigue accumulation' reminders when HRV drops significantly. Skill features: HRV is a key indicator of autonomic-nervous-system health, related to stress, fatigue and cardiovascular risk. Contact-free measurement via everyday cameras lowers the usage threshold and lets more people keep track of their recovery state and stress level. Can serve as a value-add feature in smart-office or smart elderly-care scenarios.\n\n通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。支持长期趋势分析，生成每日/每周HRV变化曲线。该技能可用于压力评估、心血管健康监测及疲劳管理。应用场景：居家健康监测、企业员工健康管理、体检中心、智能镜子。用户每日对着摄像头静坐1分钟，系统自动计算HRV并记录趋势，当HRV显著下降时推送'压力过大'或'疲劳累积'提醒。技能特点：HRV是衡量自主神经系统健康的重要指标，与压力、疲劳、心血管风险相关。通过日常摄像头无接触测量，可降低使用门槛，让更多人持续关注自身恢复状态和压力水平，助力健康管理。该技能可作为增值功能集成到智慧办公、健康养老等场景。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的生理信号分析 AI。你的任务是分析人脸面部视频，使用远程光电容积描记技术（rPPG）提取皮肤微循环波动信号，计算心率变异性（HRV）指标。输出 SDNN、RMSSD 以及长期趋势（需结合历史数据）。不要提供医疗诊断或临床心血管评估，仅输出基于信号处理的定量指标与趋势提示。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于 30-60 秒静坐面部视频，通过 rPPG 提取脉搏波 → 计算 HRV 指标 → 结合历史数据生成长期趋势\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 面部检测 + ROI（前额/双颊）选择 |\n| 2 | RGB 时序提取 |\n| 3 | 带通滤波 + POS/CHROM 算法提取 BVP |\n| 4 | RR 间期序列 |\n| 5 | 平均心率（HR） |\n| 6 | SDNN |\n| 7 | RMSSD |\n| 8 | pNN50 |\n| 9 | LF/HF 比 |\n| 10 | 信号质量评级（high / medium / low） |\n| 11 | HRV 综合得分（0-100） |\n| 12 | 近 7 天趋势（rising / stable / declining）+ 变化百分比 |\n| 13 | 压力/疲劳累积提示 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供成人静坐 30-60 秒面部视频 URL 或文件需要分析时，默认触发本技能进行 HRV 趋势监测 |\n| 🔎 明确分析意图 | 当用户明确提及 HRV、心率变异性、SDNN、RMSSD、rPPG、远程光电容积描记、压力评估、自主神经、疲劳累积、智能镜子心率等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看 HRV 历史报告、心率变异性报告清单、面部 HRV 趋势报告清单、查询历史 HRV 记录、显示所有 HRV 报告、显示自主神经监测诊断报告，查询压力疲劳趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备成人静坐面部视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行成人面部 HRV 趋势监测 | 调用 `-m scripts.smyx_facial_hrv_trend_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地成人静坐面部视频文件路径（30-60秒） | 适用于本地文件分析 |\n| `--url` | 网络成人静坐面部视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，rPPG 生理信号分析场景默认 `other` | 按需填写 |\n| `--list` | 显示成人面部 HRV 历史监测报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_facial_hrv_trend_monitoring_analysis.py`](scripts/smyx_facial_hrv_trend_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：帧率必须 ≥ 25 FPS，否则 HRV 指标可信度大幅下降 |\n| 🔎 使用提醒 | HRV 受运动、咖啡因、情绪、体位等多因素影响，建议每日同时段、同条件测量便于趋势纵向对比 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为个人健康趋势参考，本工具不替代心电图等医疗级心律评估，更不替代医生诊断 |\n| 🔏 隐私合规 | 隐私合规：面部视频涉及生物特征隐私，使用前需取得本人同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input /path/to/sit_30s.mp4\n\n# 分析网络 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --url https://example.com/sit_30s.mp4\n\n# 显示历史 HRV 趋势监测报告（自动触发关键词：查看 HRV 历史报告、心率变异性报告清单等）\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-facial-hrv-trend-monitoring-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1786869510454\n}\n\nFile v1.0.8:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放成人心率变异性（HRV）趋势监测（面部）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动 HRV 分析任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果（含 SDNN/RMSSD 等指标）\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整 HRV 趋势报告\n\n## 场景代码\n\n- `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` - 成人心率变异性（HRV）趋势监测（面部）\n\n## HRV 关键指标说明\n\n- `SDNN`（ms）：全部正常窦性心搏间期（NN intervals）的标准差，反映总体 HRV\n- `RMSSD`（ms）：相邻心搏间期差值的均方根，反映副交感神经活性\n- `pNN50`（%）：相邻 NN 间期差值 > 50ms 的占比\n- `LF/HF`：低频/高频功率比，反映自交感与副交感平衡\n- `mean_HR`（bpm）：分析窗口内平均心率\n- `trend`：相对历史基线的变化（rising/stable/declining）\n- `stress_level`：基于 HRV 的压力水平估计（low/medium/high）\n\n## 视频采集建议\n\n- 时长：30 - 60 秒\n- 光照：自然光或柔和稳定光源，避免强阴影\n- 距离：人脸占画面 1/3 以上，正面、保持静止\n- 帧率：≥ 25 fps，分辨率 ≥ 480p\n\nFile v1.0.8:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.8:scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.8:skill-card.md\n\n## Description:\n\nAnalyzes 30-60 seconds of adult facial video with rPPG to estimate HRV metrics such as SDNN and RMSSD and produce trend-oriented health monitoring reports.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users, developers, and health-operations teams use this skill to submit adult still-face video or video URLs for contact-free HRV trend monitoring, report generation, and history lookup. The outputs are health trend references and are not medical diagnoses or clinical cardiovascular assessments.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Facial video and HRV outputs are sensitive biometric and health-related data sent to the provider backend or linked to report history.\n\nMitigation: Use only with informed consent, approved data handling, and the minimum necessary video or URL input; treat generated reports as sensitive health trend records.\n\nRisk: Silent identity creation, local token persistence, and history lookup can associate reports with a locally persisted identity.\n\nMitigation: Avoid shared machines unless the local SQLite database and tokens are protected, removable, or managed under an approved retention process.\n\nRisk: The default configuration may point to non-production or HTTP endpoints.\n\nMitigation: Review endpoint configuration before use and switch to approved HTTPS production endpoints where required.\n\nRisk: HRV estimates from rPPG can be affected by video quality, movement, lighting, caffeine, emotion, posture, and other conditions.\n\nMitigation: Use consistent capture conditions, require adequate frame rate and image quality, and present results as trend references rather than medical diagnoses.\n\n## Reference(s):\n\n- [Adult Facial HRV 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):** [Analysis, Markdown, JSON, Files, Shell commands, Guidance]\n\n**Output Format:** [Markdown or JSON report text with optional saved output file]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include HRV metrics, signal quality, trend status, stress or fatigue prompts, recommendations, and report links.]\n\n## Skill Version(s):\n\n1.0.8 (source: server release metadata; artifact frontmatter lists 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, 40736 bytes\n\nFiles: references/api_doc.md (1495b), scripts/__init__.py (55b), scripts/config.py (710b), scripts/config.yaml (3b), scripts/skill.py (603b), scripts/smyx_facial_hrv_trend_monitoring_analysis.py (3612b), skill-card.md (2440b), SKILL.md (13066b), 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 (160b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"smyx-facial-hrv-trend-monitoring-analysis\"\ndescription: \"Using everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval. | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 💓 Adult Facial HRV Trend Monitoring (rPPG) | 成人心率变异性（HRV）趋势监测（面部）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人心率变异性（HRV）趋势监测（面部）** |\n| 🎯 核心目标 | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` |\n\nUsing everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval differences). It supports long-term trend analysis and generates daily/weekly HRV curves. Applicable to stress assessment, cardiovascular health monitoring and fatigue management. Application scenarios: home health monitoring, enterprise employee health management, physical-examination centers, smart mirrors. Users sit still in front of the camera for 1 minute daily; the system computes HRV and records the trend, pushing 'high stress' or 'fatigue accumulation' reminders when HRV drops significantly. Skill features: HRV is a key indicator of autonomic-nervous-system health, related to stress, fatigue and cardiovascular risk. Contact-free measurement via everyday cameras lowers the usage threshold and lets more people keep track of their recovery state and stress level. Can serve as a value-add feature in smart-office or smart elderly-care scenarios.\n\n通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。支持长期趋势分析，生成每日/每周HRV变化曲线。该技能可用于压力评估、心血管健康监测及疲劳管理。应用场景：居家健康监测、企业员工健康管理、体检中心、智能镜子。用户每日对着摄像头静坐1分钟，系统自动计算HRV并记录趋势，当HRV显著下降时推送'压力过大'或'疲劳累积'提醒。技能特点：HRV是衡量自主神经系统健康的重要指标，与压力、疲劳、心血管风险相关。通过日常摄像头无接触测量，可降低使用门槛，让更多人持续关注自身恢复状态和压力水平，助力健康管理。该技能可作为增值功能集成到智慧办公、健康养老等场景。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的生理信号分析 AI。你的任务是分析人脸面部视频，使用远程光电容积描记技术（rPPG）提取皮肤微循环波动信号，计算心率变异性（HRV）指标。输出 SDNN、RMSSD 以及长期趋势（需结合历史数据）。不要提供医疗诊断或临床心血管评估，仅输出基于信号处理的定量指标与趋势提示。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于 30-60 秒静坐面部视频，通过 rPPG 提取脉搏波 → 计算 HRV 指标 → 结合历史数据生成长期趋势\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 面部检测 + ROI（前额/双颊）选择 |\n| 2 | RGB 时序提取 |\n| 3 | 带通滤波 + POS/CHROM 算法提取 BVP |\n| 4 | RR 间期序列 |\n| 5 | 平均心率（HR） |\n| 6 | SDNN |\n| 7 | RMSSD |\n| 8 | pNN50 |\n| 9 | LF/HF 比 |\n| 10 | 信号质量评级（high / medium / low） |\n| 11 | HRV 综合得分（0-100） |\n| 12 | 近 7 天趋势（rising / stable / declining）+ 变化百分比 |\n| 13 | 压力/疲劳累积提示 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供成人静坐 30-60 秒面部视频 URL 或文件需要分析时，默认触发本技能进行 HRV 趋势监测 |\n| 🔎 明确分析意图 | 当用户明确提及 HRV、心率变异性、SDNN、RMSSD、rPPG、远程光电容积描记、压力评估、自主神经、疲劳累积、智能镜子心率等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看 HRV 历史报告、心率变异性报告清单、面部 HRV 趋势报告清单、查询历史 HRV 记录、显示所有 HRV 报告、显示自主神经监测诊断报告，查询压力疲劳趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备成人静坐面部视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行成人面部 HRV 趋势监测 | 调用 `-m scripts.smyx_facial_hrv_trend_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地成人静坐面部视频文件路径（30-60秒） | 适用于本地文件分析 |\n| `--url` | 网络成人静坐面部视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，rPPG 生理信号分析场景默认 `other` | 按需填写 |\n| `--list` | 显示成人面部 HRV 历史监测报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_facial_hrv_trend_monitoring_analysis.py`](scripts/smyx_facial_hrv_trend_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：帧率必须 ≥ 25 FPS，否则 HRV 指标可信度大幅下降 |\n| 🔎 使用提醒 | HRV 受运动、咖啡因、情绪、体位等多因素影响，建议每日同时段、同条件测量便于趋势纵向对比 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为个人健康趋势参考，本工具不替代心电图等医疗级心律评估，更不替代医生诊断 |\n| 🔏 隐私合规 | 隐私合规：面部视频涉及生物特征隐私，使用前需取得本人同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input /path/to/sit_30s.mp4\n\n# 分析网络 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --url https://example.com/sit_30s.mp4\n\n# 显示历史 HRV 趋势监测报告（自动触发关键词：查看 HRV 历史报告、心率变异性报告清单等）\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-facial-hrv-trend-monitoring-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1786246654847\n}\n\nFile v1.0.7:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放成人心率变异性（HRV）趋势监测（面部）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动 HRV 分析任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果（含 SDNN/RMSSD 等指标）\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整 HRV 趋势报告\n\n## 场景代码\n\n- `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` - 成人心率变异性（HRV）趋势监测（面部）\n\n## HRV 关键指标说明\n\n- `SDNN`（ms）：全部正常窦性心搏间期（NN intervals）的标准差，反映总体 HRV\n- `RMSSD`（ms）：相邻心搏间期差值的均方根，反映副交感神经活性\n- `pNN50`（%）：相邻 NN 间期差值 > 50ms 的占比\n- `LF/HF`：低频/高频功率比，反映自交感与副交感平衡\n- `mean_HR`（bpm）：分析窗口内平均心率\n- `trend`：相对历史基线的变化（rising/stable/declining）\n- `stress_level`：基于 HRV 的压力水平估计（low/medium/high）\n\n## 视频采集建议\n\n- 时长：30 - 60 秒\n- 光照：自然光或柔和稳定光源，避免强阴影\n- 距离：人脸占画面 1/3 以上，正面、保持静止\n- 帧率：≥ 25 fps，分辨率 ≥ 480p\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 adult still-face video from everyday cameras with rPPG to estimate HRV metrics such as SDNN and RMSSD, summarize trends, and return structured reports.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users, developers, and health-program operators use this skill to submit adult 30-60 second still-face video or a video URL for rPPG-based HRV trend monitoring. It returns HRV metrics, trend status, suggestions, and report links for personal wellness, fatigue, stress, and long-term trend review.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Facial video or video URLs may be sent to a remote Life Emergence service for biometric HRV processing.\n\nMitigation: Use the skill only with the subject's consent and only for videos intended for HRV trend analysis.\n\nRisk: The skill may create or reuse an account-linked identity, store local tokens in the workspace data directory, and retrieve cloud-stored report history.\n\nMitigation: Install only in workspaces where account-linked report history and local token storage are acceptable, and review workspace data handling before shared use.\n\nRisk: HRV trend output may be mistaken for medical diagnosis or clinical cardiovascular assessment.\n\nMitigation: Treat results as wellness trend indicators and seek qualified clinical review for medical concerns.\n\n## Reference(s):\n\n- [API documentation](references/api_doc.md)\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-facial-hrv-trend-monitoring-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Shell commands, Guidance]\n\n**Output Format:** [Markdown or JSON structured report with report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include HRV metrics, signal-quality rating, trend status, stress or fatigue prompts, and cloud report export links.]\n\n## Skill Version(s):\n\n1.0.7 (source: server release metadata; SKILL.md frontmatter states 1.0.9)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 40852 bytes\n\nFiles: references/api_doc.md (1495b), scripts/__init__.py (55b), scripts/config.py (710b), scripts/config.yaml (3b), scripts/skill.py (603b), scripts/smyx_facial_hrv_trend_monitoring_analysis.py (3612b), skill-card.md (2837b), SKILL.md (13066b), 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 (160b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"smyx-facial-hrv-trend-monitoring-analysis\"\ndescription: \"Using everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval. | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。\"\nversion: \"1.0.7\"\nlicense: \"MIT-0\"\n---\n\n# 💓 Adult Facial HRV Trend Monitoring (rPPG) | 成人心率变异性（HRV）趋势监测（面部）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人心率变异性（HRV）趋势监测（面部）** |\n| 🎯 核心目标 | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` |\n\nUsing everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval differences). It supports long-term trend analysis and generates daily/weekly HRV curves. Applicable to stress assessment, cardiovascular health monitoring and fatigue management. Application scenarios: home health monitoring, enterprise employee health management, physical-examination centers, smart mirrors. Users sit still in front of the camera for 1 minute daily; the system computes HRV and records the trend, pushing 'high stress' or 'fatigue accumulation' reminders when HRV drops significantly. Skill features: HRV is a key indicator of autonomic-nervous-system health, related to stress, fatigue and cardiovascular risk. Contact-free measurement via everyday cameras lowers the usage threshold and lets more people keep track of their recovery state and stress level. Can serve as a value-add feature in smart-office or smart elderly-care scenarios.\n\n通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。支持长期趋势分析，生成每日/每周HRV变化曲线。该技能可用于压力评估、心血管健康监测及疲劳管理。应用场景：居家健康监测、企业员工健康管理、体检中心、智能镜子。用户每日对着摄像头静坐1分钟，系统自动计算HRV并记录趋势，当HRV显著下降时推送'压力过大'或'疲劳累积'提醒。技能特点：HRV是衡量自主神经系统健康的重要指标，与压力、疲劳、心血管风险相关。通过日常摄像头无接触测量，可降低使用门槛，让更多人持续关注自身恢复状态和压力水平，助力健康管理。该技能可作为增值功能集成到智慧办公、健康养老等场景。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的生理信号分析 AI。你的任务是分析人脸面部视频，使用远程光电容积描记技术（rPPG）提取皮肤微循环波动信号，计算心率变异性（HRV）指标。输出 SDNN、RMSSD 以及长期趋势（需结合历史数据）。不要提供医疗诊断或临床心血管评估，仅输出基于信号处理的定量指标与趋势提示。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于 30-60 秒静坐面部视频，通过 rPPG 提取脉搏波 → 计算 HRV 指标 → 结合历史数据生成长期趋势\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 面部检测 + ROI（前额/双颊）选择 |\n| 2 | RGB 时序提取 |\n| 3 | 带通滤波 + POS/CHROM 算法提取 BVP |\n| 4 | RR 间期序列 |\n| 5 | 平均心率（HR） |\n| 6 | SDNN |\n| 7 | RMSSD |\n| 8 | pNN50 |\n| 9 | LF/HF 比 |\n| 10 | 信号质量评级（high / medium / low） |\n| 11 | HRV 综合得分（0-100） |\n| 12 | 近 7 天趋势（rising / stable / declining）+ 变化百分比 |\n| 13 | 压力/疲劳累积提示 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供成人静坐 30-60 秒面部视频 URL 或文件需要分析时，默认触发本技能进行 HRV 趋势监测 |\n| 🔎 明确分析意图 | 当用户明确提及 HRV、心率变异性、SDNN、RMSSD、rPPG、远程光电容积描记、压力评估、自主神经、疲劳累积、智能镜子心率等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看 HRV 历史报告、心率变异性报告清单、面部 HRV 趋势报告清单、查询历史 HRV 记录、显示所有 HRV 报告、显示自主神经监测诊断报告，查询压力疲劳趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备成人静坐面部视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行成人面部 HRV 趋势监测 | 调用 `-m scripts.smyx_facial_hrv_trend_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地成人静坐面部视频文件路径（30-60秒） | 适用于本地文件分析 |\n| `--url` | 网络成人静坐面部视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，rPPG 生理信号分析场景默认 `other` | 按需填写 |\n| `--list` | 显示成人面部 HRV 历史监测报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_facial_hrv_trend_monitoring_analysis.py`](scripts/smyx_facial_hrv_trend_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：帧率必须 ≥ 25 FPS，否则 HRV 指标可信度大幅下降 |\n| 🔎 使用提醒 | HRV 受运动、咖啡因、情绪、体位等多因素影响，建议每日同时段、同条件测量便于趋势纵向对比 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为个人健康趋势参考，本工具不替代心电图等医疗级心律评估，更不替代医生诊断 |\n| 🔏 隐私合规 | 隐私合规：面部视频涉及生物特征隐私，使用前需取得本人同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input /path/to/sit_30s.mp4\n\n# 分析网络 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --url https://example.com/sit_30s.mp4\n\n# 显示历史 HRV 趋势监测报告（自动触发关键词：查看 HRV 历史报告、心率变异性报告清单等）\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-facial-hrv-trend-monitoring-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1785179856512\n}\n\nFile v1.0.6:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放成人心率变异性（HRV）趋势监测（面部）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动 HRV 分析任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果（含 SDNN/RMSSD 等指标）\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整 HRV 趋势报告\n\n## 场景代码\n\n- `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` - 成人心率变异性（HRV）趋势监测（面部）\n\n## HRV 关键指标说明\n\n- `SDNN`（ms）：全部正常窦性心搏间期（NN intervals）的标准差，反映总体 HRV\n- `RMSSD`（ms）：相邻心搏间期差值的均方根，反映副交感神经活性\n- `pNN50`（%）：相邻 NN 间期差值 > 50ms 的占比\n- `LF/HF`：低频/高频功率比，反映自交感与副交感平衡\n- `mean_HR`（bpm）：分析窗口内平均心率\n- `trend`：相对历史基线的变化（rising/stable/declining）\n- `stress_level`：基于 HRV 的压力水平估计（low/medium/high）\n\n## 视频采集建议\n\n- 时长：30 - 60 秒\n- 光照：自然光或柔和稳定光源，避免强阴影\n- 距离：人脸占画面 1/3 以上，正面、保持静止\n- 帧率：≥ 25 fps，分辨率 ≥ 480p\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 30-60 seconds of adult facial video with remote photoplethysmography (rPPG) to produce HRV metrics and trend-oriented stress, fatigue, and cardiovascular wellness signals. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[18072937735](https://clawhub.ai/user/18072937735) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users, developers, and health-management teams use this skill to analyze adult seated facial video or a video URL for HRV metrics, signal quality, historical trends, and report links. It is intended for personal wellness and operational trend monitoring, not medical diagnosis. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Face video and HRV-derived data are processed by a configured cloud service. <br>\nMitigation: Use the skill only with explicit consent from the person in the video and avoid third-party or non-consensual video URLs. <br>\nRisk: Report history is tied to an automatically managed local identity. <br>\nMitigation: Treat historical report retrieval as sensitive and review automatic list triggers before enabling the skill in shared environments. <br>\nRisk: Local workspace data can contain account tokens and report linkage state. <br>\nMitigation: Restrict access to the workspace data directory and avoid committing or sharing generated local data files. <br>\nRisk: HRV outputs can be mistaken for medical conclusions. <br>\nMitigation: Present results as wellness trend indicators only and do not use them as a substitute for ECG, clinical evaluation, or medical diagnosis. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-facial-hrv-trend-monitoring-analysis) <br>\n- [Adult Facial HRV API Documentation](references/api_doc.md) <br>\n- [Analysis API Error Codes](skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill Demo](https://lifeemergence.com/sample.html) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Analysis, Markdown, JSON, Files, Shell commands, Guidance] <br>\n**Output Format:** [Markdown or JSON structured analysis report with HRV metrics, trend fields, status messages, and optional saved output file] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include report export links and historical report lists retrieved from the configured cloud service.] <br>\n\n## Skill Version(s): <br>\n1.0.6 (source: server release metadata; artifact frontmatter reports 1.0.7) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.6:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.6:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.5: 31 files, 40817 bytes\n\nFiles: references/api_doc.md (1495b), scripts/__init__.py (55b), scripts/config.py (710b), scripts/config.yaml (3b), scripts/skill.py (603b), scripts/smyx_facial_hrv_trend_monitoring_analysis.py (3612b), skill-card.md (2717b), SKILL.md (13066b), 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 (160b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: \"smyx-facial-hrv-trend-monitoring-analysis\"\ndescription: \"Using everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval. | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。\"\nversion: \"1.0.6\"\nlicense: \"MIT-0\"\n---\n\n# 💓 Adult Facial HRV Trend Monitoring (rPPG) | 成人心率变异性（HRV）趋势监测（面部）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人心率变异性（HRV）趋势监测（面部）** |\n| 🎯 核心目标 | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` |\n\nUsing everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval differences). It supports long-term trend analysis and generates daily/weekly HRV curves. Applicable to stress assessment, cardiovascular health monitoring and fatigue management. Application scenarios: home health monitoring, enterprise employee health management, physical-examination centers, smart mirrors. Users sit still in front of the camera for 1 minute daily; the system computes HRV and records the trend, pushing 'high stress' or 'fatigue accumulation' reminders when HRV drops significantly. Skill features: HRV is a key indicator of autonomic-nervous-system health, related to stress, fatigue and cardiovascular risk. Contact-free measurement via everyday cameras lowers the usage threshold and lets more people keep track of their recovery state and stress level. Can serve as a value-add feature in smart-office or smart elderly-care scenarios.\n\n通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。支持长期趋势分析，生成每日/每周HRV变化曲线。该技能可用于压力评估、心血管健康监测及疲劳管理。应用场景：居家健康监测、企业员工健康管理、体检中心、智能镜子。用户每日对着摄像头静坐1分钟，系统自动计算HRV并记录趋势，当HRV显著下降时推送'压力过大'或'疲劳累积'提醒。技能特点：HRV是衡量自主神经系统健康的重要指标，与压力、疲劳、心血管风险相关。通过日常摄像头无接触测量，可降低使用门槛，让更多人持续关注自身恢复状态和压力水平，助力健康管理。该技能可作为增值功能集成到智慧办公、健康养老等场景。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的生理信号分析 AI。你的任务是分析人脸面部视频，使用远程光电容积描记技术（rPPG）提取皮肤微循环波动信号，计算心率变异性（HRV）指标。输出 SDNN、RMSSD 以及长期趋势（需结合历史数据）。不要提供医疗诊断或临床心血管评估，仅输出基于信号处理的定量指标与趋势提示。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于 30-60 秒静坐面部视频，通过 rPPG 提取脉搏波 → 计算 HRV 指标 → 结合历史数据生成长期趋势\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 面部检测 + ROI（前额/双颊）选择 |\n| 2 | RGB 时序提取 |\n| 3 | 带通滤波 + POS/CHROM 算法提取 BVP |\n| 4 | RR 间期序列 |\n| 5 | 平均心率（HR） |\n| 6 | SDNN |\n| 7 | RMSSD |\n| 8 | pNN50 |\n| 9 | LF/HF 比 |\n| 10 | 信号质量评级（high / medium / low） |\n| 11 | HRV 综合得分（0-100） |\n| 12 | 近 7 天趋势（rising / stable / declining）+ 变化百分比 |\n| 13 | 压力/疲劳累积提示 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供成人静坐 30-60 秒面部视频 URL 或文件需要分析时，默认触发本技能进行 HRV 趋势监测 |\n| 🔎 明确分析意图 | 当用户明确提及 HRV、心率变异性、SDNN、RMSSD、rPPG、远程光电容积描记、压力评估、自主神经、疲劳累积、智能镜子心率等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看 HRV 历史报告、心率变异性报告清单、面部 HRV 趋势报告清单、查询历史 HRV 记录、显示所有 HRV 报告、显示自主神经监测诊断报告，查询压力疲劳趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备成人静坐面部视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行成人面部 HRV 趋势监测 | 调用 `-m scripts.smyx_facial_hrv_trend_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地成人静坐面部视频文件路径（30-60秒） | 适用于本地文件分析 |\n| `--url` | 网络成人静坐面部视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，rPPG 生理信号分析场景默认 `other` | 按需填写 |\n| `--list` | 显示成人面部 HRV 历史监测报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_facial_hrv_trend_monitoring_analysis.py`](scripts/smyx_facial_hrv_trend_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：帧率必须 ≥ 25 FPS，否则 HRV 指标可信度大幅下降 |\n| 🔎 使用提醒 | HRV 受运动、咖啡因、情绪、体位等多因素影响，建议每日同时段、同条件测量便于趋势纵向对比 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为个人健康趋势参考，本工具不替代心电图等医疗级心律评估，更不替代医生诊断 |\n| 🔏 隐私合规 | 隐私合规：面部视频涉及生物特征隐私，使用前需取得本人同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input /path/to/sit_30s.mp4\n\n# 分析网络 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --url https://example.com/sit_30s.mp4\n\n# 显示历史 HRV 趋势监测报告（自动触发关键词：查看 HRV 历史报告、心率变异性报告清单等）\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --output result.json\n```\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-facial-hrv-trend-monitoring-analysis\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1784004335814\n}\n\nFile v1.0.5:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放成人心率变异性（HRV）趋势监测（面部）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动 HRV 分析任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果（含 SDNN/RMSSD 等指标）\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整 HRV 趋势报告\n\n## 场景代码\n\n- `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` - 成人心率变异性（HRV）趋势监测（面部）\n\n## HRV 关键指标说明\n\n- `SDNN`（ms）：全部正常窦性心搏间期（NN intervals）的标准差，反映总体 HRV\n- `RMSSD`（ms）：相邻心搏间期差值的均方根，反映副交感神经活性\n- `pNN50`（%）：相邻 NN 间期差值 > 50ms 的占比\n- `LF/HF`：低频/高频功率比，反映自交感与副交感平衡\n- `mean_HR`（bpm）：分析窗口内平均心率\n- `trend`：相对历史基线的变化（rising/stable/declining）\n- `stress_level`：基于 HRV 的压力水平估计（low/medium/high）\n\n## 视频采集建议\n\n- 时长：30 - 60 秒\n- 光照：自然光或柔和稳定光源，避免强阴影\n- 距离：人脸占画面 1/3 以上，正面、保持静止\n- 帧率：≥ 25 fps，分辨率 ≥ 480p\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 30-60 seconds of adult facial video with remote photoplethysmography (rPPG) to produce HRV metrics, trend signals, and health-adjacent monitoring reports. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[18072937735](https://clawhub.ai/user/18072937735) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users, developers, and health-management teams use this skill to analyze adult still-face video or video URLs for HRV indicators such as SDNN, RMSSD, pNN50, LF/HF ratio, signal quality, and recent trend direction. It supports personal wellness trend monitoring, fatigue or stress prompts, and historical report lookup, but the artifact states that results are not medical diagnoses. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill processes sensitive facial video and health-adjacent HRV data through a publisher cloud service. <br>\nMitigation: Use it only with informed consent, avoid third-party faces without permission, and review the publisher's data handling before using it for sensitive wellness monitoring. <br>\nRisk: The security evidence notes automatic identity creation, report history access, and local token persistence. <br>\nMitigation: Confirm how reports, tokens, local workspace data, and account-linked history can be reviewed and deleted before deployment. <br>\nRisk: The artifact frames HRV output as trend guidance rather than clinical assessment. <br>\nMitigation: Present outputs as wellness or signal-processing trends and do not use them as a substitute for ECG-based assessment or clinician diagnosis. <br>\n\n\n## Reference(s): <br>\n- [HRV API interface documentation](references/api_doc.md) <br>\n- [Shared analysis API documentation](skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Analysis, Text, Markdown, JSON, Files] <br>\n**Output Format:** [Markdown report or JSON, with optional saved output file] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Includes HRV metrics, trend indicators, signal quality, stress or fatigue prompts, report export links, and historical report listings when requested.] <br>\n\n## Skill Version(s): <br>\n1.0.5 (source: server release metadata; artifact frontmatter reports 1.0.6) <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, 40727 bytes\n\nFiles: references/api_doc.md (1495b), scripts/__init__.py (55b), scripts/config.py (710b), scripts/config.yaml (3b), scripts/skill.py (603b), scripts/smyx_facial_hrv_trend_monitoring_analysis.py (3612b), skill-card.md (2757b), SKILL.md (13066b), 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 (160b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: \"smyx-facial-hrv-trend-monitoring-analysis\"\ndescription: \"Using everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval. | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。\"\nversion: \"1.0.4\"\nlicense: \"MIT-0\"\n---\n\n# 💓 Adult Facial HRV Trend Monitoring (rPPG) | 成人心率变异性（HRV）趋势监测（面部）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人心率变异性（HRV）趋势监测（面部）** |\n| 🎯 核心目标 | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` |\n\nUsing everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval differences). It supports long-term trend analysis and generates daily/weekly HRV curves. Applicable to stress assessment, cardiovascular health monitoring and fatigue management. Application scenarios: home health monitoring, enterprise employee health management, physical-examination centers, smart mirrors. Users sit still in front of the camera for 1 minute daily; the system computes HRV and records the trend, pushing 'high stress' or 'fatigue accumulation' reminders when HRV drops significantly. Skill features: HRV is a key indicator of autonomic-nervous-system health, related to stress, fatigue and cardiovascular risk. Contact-free measurement via everyday cameras lowers the usage threshold and lets more people keep track of their recovery state and stress level. Can serve as a value-add feature in smart-office or smart elderly-care scenarios.\n\n通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。支持长期趋势分析，生成每日/每周HRV变化曲线。该技能可用于压力评估、心血管健康监测及疲劳管理。应用场景：居家健康监测、企业员工健康管理、体检中心、智能镜子。用户每日对着摄像头静坐1分钟，系统自动计算HRV并记录趋势，当HRV显著下降时推送'压力过大'或'疲劳累积'提醒。技能特点：HRV是衡量自主神经系统健康的重要指标，与压力、疲劳、心血管风险相关。通过日常摄像头无接触测量，可降低使用门槛，让更多人持续关注自身恢复状态和压力水平，助力健康管理。该技能可作为增值功能集成到智慧办公、健康养老等场景。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的生理信号分析 AI。你的任务是分析人脸面部视频，使用远程光电容积描记技术（rPPG）提取皮肤微循环波动信号，计算心率变异性（HRV）指标。输出 SDNN、RMSSD 以及长期趋势（需结合历史数据）。不要提供医疗诊断或临床心血管评估，仅输出基于信号处理的定量指标与趋势提示。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于 30-60 秒静坐面部视频，通过 rPPG 提取脉搏波 → 计算 HRV 指标 → 结合历史数据生成长期趋势\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 面部检测 + ROI（前额/双颊）选择 |\n| 2 | RGB 时序提取 |\n| 3 | 带通滤波 + POS/CHROM 算法提取 BVP |\n| 4 | RR 间期序列 |\n| 5 | 平均心率（HR） |\n| 6 | SDNN |\n| 7 | RMSSD |\n| 8 | pNN50 |\n| 9 | LF/HF 比 |\n| 10 | 信号质量评级（high / medium / low） |\n| 11 | HRV 综合得分（0-100） |\n| 12 | 近 7 天趋势（rising / stable / declining）+ 变化百分比 |\n| 13 | 压力/疲劳累积提示 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供成人静坐 30-60 秒面部视频 URL 或文件需要分析时，默认触发本技能进行 HRV 趋势监测 |\n| 🔎 明确分析意图 | 当用户明确提及 HRV、心率变异性、SDNN、RMSSD、rPPG、远程光电容积描记、压力评估、自主神经、疲劳累积、智能镜子心率等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看 HRV 历史报告、心率变异性报告清单、面部 HRV 趋势报告清单、查询历史 HRV 记录、显示所有 HRV 报告、显示自主神经监测诊断报告，查询压力疲劳趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备成人静坐面部视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行成人面部 HRV 趋势监测 | 调用 `-m scripts.smyx_facial_hrv_trend_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地成人静坐面部视频文件路径（30-60秒） | 适用于本地文件分析 |\n| `--url` | 网络成人静坐面部视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，rPPG 生理信号分析场景默认 `other` | 按需填写 |\n| `--list` | 显示成人面部 HRV 历史监测报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_facial_hrv_trend_monitoring_analysis.py`](scripts/smyx_facial_hrv_trend_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：帧率必须 ≥ 25 FPS，否则 HRV 指标可信度大幅下降 |\n| 🔎 使用提醒 | HRV 受运动、咖啡因、情绪、体位等多因素影响，建议每日同时段、同条件测量便于趋势纵向对比 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为个人健康趋势参考，本工具不替代心电图等医疗级心律评估，更不替代医生诊断 |\n| 🔏 隐私合规 | 隐私合规：面部视频涉及生物特征隐私，使用前需取得本人同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input /path/to/sit_30s.mp4\n\n# 分析网络 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --url https://example.com/sit_30s.mp4\n\n# 显示历史 HRV 趋势监测报告（自动触发关键词：查看 HRV 历史报告、心率变异性报告清单等）\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --output result.json\n```\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-facial-hrv-trend-monitoring-analysis\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1783330765435\n}\n\nFile v1.0.4:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放成人心率变异性（HRV）趋势监测（面部）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动 HRV 分析任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果（含 SDNN/RMSSD 等指标）\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整 HRV 趋势报告\n\n## 场景代码\n\n- `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` - 成人心率变异性（HRV）趋势监测（面部）\n\n## HRV 关键指标说明\n\n- `SDNN`（ms）：全部正常窦性心搏间期（NN intervals）的标准差，反映总体 HRV\n- `RMSSD`（ms）：相邻心搏间期差值的均方根，反映副交感神经活性\n- `pNN50`（%）：相邻 NN 间期差值 > 50ms 的占比\n- `LF/HF`：低频/高频功率比，反映自交感与副交感平衡\n- `mean_HR`（bpm）：分析窗口内平均心率\n- `trend`：相对历史基线的变化（rising/stable/declining）\n- `stress_level`：基于 HRV 的压力水平估计（low/medium/high）\n\n## 视频采集建议\n\n- 时长：30 - 60 秒\n- 光照：自然光或柔和稳定光源，避免强阴影\n- 距离：人脸占画面 1/3 以上，正面、保持静止\n- 帧率：≥ 25 fps，分辨率 ≥ 480p\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>\nThis skill analyzes 30-60 seconds of adult facial video with remote photoplethysmography to estimate HRV metrics such as SDNN and RMSSD, produce trend-oriented health signals, and query historical reports. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[18072937735](https://clawhub.ai/user/18072937735) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and developers use this skill to process adult seated facial videos or URLs for HRV trend monitoring, structured results, and historical report lookup. The outputs are wellness trend references and should not be treated as medical diagnosis or clinical cardiovascular assessment. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Facial video and HRV-related data may be sent to the Life Emergence cloud service. <br>\nMitigation: Use the skill only with informed consent, avoid unnecessary sensitive media, and confirm the service's retention, deletion, and privacy practices before deployment. <br>\nRisk: Reports may be tied to an internal identity, and local identity or token records may be stored in the workspace data directory. <br>\nMitigation: Restrict workspace access, avoid sharing local data directories, and manage or remove stored tokens according to the service's operational procedures. <br>\nRisk: HRV trend outputs can be mistaken for clinical assessment. <br>\nMitigation: Present results as wellness trend references only and route medical concerns to qualified clinicians or validated medical devices. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-facial-hrv-trend-monitoring-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, configuration, guidance] <br>\n**Output Format:** [Markdown and JSON structured analysis with report links and optional command examples] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Includes HRV metrics, signal-quality notes, trend indicators, stress or fatigue prompts, and historical report listings when requested.] <br>\n\n## Skill Version(s): <br>\n1.0.4 (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.4:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.4:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3","readmeExcerpt":"Skill: Adult Facial HRV Trend Monitoring (rPPG) | 成人心率变异性（HRV）趋势监测（面部） Owner: 18072937735 Summary: Using everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (st","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input /path/to/sit_30s.mp4\n\n# 分析网络 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --url https://example.com/sit_30s.mp4\n\n# 显示历史 HRV 趋势监测报告（自动触发关键词：查看 HRV 历史报告、心率变异性报告清单等）\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --output result.json"},{"language":"bash","snippet":"python -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input /path/to/sit_30s.mp4\n\n# 分析网络 30-60 秒静坐面部视频\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --url https://example.com/sit_30s.mp4\n\n# 显示历史 HRV 趋势监测报告（自动触发关键词：查看 HRV 历史报告、心率变异性报告清单等）\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_facial_hrv_trend_monitoring_analysis --input sit.mp4 --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"smyx-facial-hrv-trend-monitoring-analysis\"\ndescription: \"Using everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval. | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。\"\nversion: \"1.0.16\"\nlicense: \"MIT-0\"\n---\n\n# 💓 Adult Facial HRV Trend Monitoring (rPPG) | 成人心率变异性（HRV）趋势监测（面部）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **成人心率变异性（HRV）趋势监测（面部）** |\n| 🎯 核心目标 | 通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。该技能可用于压力评估、心血管健康监测及疲劳管理。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` |\n\nUsing everyday cameras (laptop camera, smartphone front camera, smart mirror), the system records 30-60 seconds of facial video and uses remote photoplethysmography (rPPG) to extract subtle color variations from facial skin micro-circulation, from which it computes heart-rate-variability (HRV) metrics including SDNN (standard deviation of all normal sinus RR intervals) and RMSSD (root mean square of successive RR-interval differences). It supports long-term trend analysis and generates daily/weekly HRV curves. Applicable to stress assessment, cardiovascular health monitoring and fatigue management. Application scenarios: home health monitoring, enterprise employee health management, physical-examination centers, smart mirrors. Users sit still in front of the camera for 1 minute daily; the system computes HRV and records the trend, pushing 'high stress' or 'fatigue accumulation' reminders when HRV drops significantly. Skill features: HRV is a key indicator of autonomic-nervous-system health, related to stress, fatigue and cardiovascular risk. Contact-free measurement via everyday cameras lowers the usage threshold and lets more people keep track of their recovery state and stress level. Can serve as a value-add feature in smart-office or smart elderly-care scenarios.\n\n通过日常摄像头（如电脑摄像头、手机前置摄像头）拍摄面部视频（30-60秒），利用光电容积描记技术（远程光电容积描记术，rPPG）提取面部皮肤微循环的微弱色度变化，从中计算心率变异性（HRV）指标，包括SDNN（全部正常窦性心搏间期的标准差）、RMSSD（相邻心搏间期差值的均方根）等。支持长期趋势分析，生成每日/每周HRV变化曲线。该技能可用于压力评估、心血管健康监测及疲劳管理。应用场景：居家健康监测、企业员工健康管理、体检中心、智能镜子。用户每日对着摄像头静坐1分钟，系统自动计算HRV并记录趋势，当HRV显著下降时推送'压力过大'或'疲劳累积'提醒。技能特点：HRV是衡量自主神经系统健康的重要指标，与压力、疲劳、心血管风险相关。通过日常摄像头无接触测量，可降低使用门槛，让更多人持续关注自身恢复状态和压力水平，助力健康管理。该技能可作为增值功能集成到智慧办公、健康养老等场景。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的生理信号分析 AI。你的任务是分析人脸面部视频，使用远程光电容积描"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-facial-hrv-trend-monitoring-analysis\",\n  \"version\": \"1.0.13\",\n  \"publishedAt\": 1790852844635\n}"},{"path":"references/api_doc.md","content":"# API 接口文档\n\n此处用于存放成人心率变异性（HRV）趋势监测（面部）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动 HRV 分析任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果（含 SDNN/RMSSD 等指标）\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整 HRV 趋势报告\n\n## 场景代码\n\n- `SMYX_FACIAL_HRV_TREND_MONITORING_ANALYSIS` - 成人心率变异性（HRV）趋势监测（面部）\n\n## HRV 关键指标说明\n\n- `SDNN`（ms）：全部正常窦性心搏间期（NN intervals）的标准差，反映总体 HRV\n- `RMSSD`（ms）：相邻心搏间期差值的均方根，反映副交感神经活性\n- `pNN50`（%）：相邻 NN 间期差值 > 50ms 的占比\n- `LF/HF`：低频/高频功率比，反映自交感与副交感平衡\n- `mean_HR`（bpm）：分析窗口内平均心率\n- `trend`：相对历史基线的变化（rising/stable/declining）\n- `stress_level`：基于 HRV 的压力水平估计（low/medium/high）\n\n## 视频采集建议\n\n- 时长：30 - 60 秒\n- 光照：自然光或柔和稳定光源，避免强阴影\n- 距离：人脸占画面 1/3 以上，正面、保持静止\n- 帧率：≥ 25 fps，分辨率 ≥ 480p"},{"path":"skills/smyx_analysis/references/api_doc.md","content":"# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |"},{"path":"scripts/config.yaml","content":"{}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1127,"uniquenessScore":42,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T23:29:10.077Z","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-09T23:29:10.077Z","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-10T07:43:07.717Z","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"}]}}}