{"id":"9a94c382-fdd4-425d-afb9-5c009d21099b","entityType":"agent","slug":"clawhub-smyx-sunjinhui-new-smyx-risk-analysis","name":"High-Risk Behavior Identification & Analysis Tool | 高风险行为识别分析工具","canonicalUrl":"https://www.xpersona.co/agent/clawhub-smyx-sunjinhui-new-smyx-risk-analysis","canonicalPath":"/agent/clawhub-smyx-sunjinhui-new-smyx-risk-analysis","generatedAt":"2026-10-10T07:29:00.496Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-09T23:13:10.409Z","emptyReason":null},"description":"Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示 Skill: High-Risk Behavior Identification & Analysis Tool | 高风险行为识别分析工具 Owner: smyx-sunjinhui Summary: Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示 Tags: latest:999.999.1005 Version history: v999.999.1","descriptionLabel":"Technical summary","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 s17cfv2h26b7hq5w47tgfy23xx83z9x6:new-smyx-risk-analysis","sourceUrl":"https://clawhub.ai/smyx-sunjinhui/new-smyx-risk-analysis","homepage":"https://clawhub.ai/smyx-sunjinhui/skills/new-smyx-risk-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/smyx-sunjinhui/new-smyx-risk-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/smyx-sunjinhui/skills/new-smyx-risk-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":66,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal b"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T23:13:10.409Z","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:13:10.409Z","emptyReason":null},"stars":null,"forks":null,"downloads":1903,"packageName":null,"latestVersion":"999.999.1005","tractionLabel":"1.9K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T23:13:10.409Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T23:13:10.409Z","lastCrawledAt":"2026-10-09T23:13:10.409Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T23:13:10.409Z","lastVerifiedAt":null,"highlights":[{"version":"999.999.1005","createdAt":"2026-08-25T02:23:30.399Z","changelog":"- Updated SKILL.md version from 1.0.12 to 1.0.13 with minor content or metadata changes. - Removed the deprecated skill-card.md file from the project.","fileCount":33,"zipByteSize":40751},{"version":"999.999.1004","createdAt":"2026-08-18T00:23:30.982Z","changelog":"- Removed the file: skill-card.md. - No changes to code or primary skill documentation aside from file deletion. - All skill functionality, usage, and documentation remain the same.","fileCount":33,"zipByteSize":40651},{"version":"999.999.1003","createdAt":"2026-08-15T03:24:29.005Z","changelog":"- Updated skill version to 1.0.12. - Made minor documentation or configuration changes. - Removed the file skill-card.md.","fileCount":33,"zipByteSize":40923},{"version":"999.999.1002","createdAt":"2026-08-07T07:14:38.947Z","changelog":"- Removed the file skill-card.md from the skill package. - No changes were made to core features, documentation, or capabilities. - The skill continues to support risk analysis via video and image, with all core documentation unchanged.","fileCount":33,"zipByteSize":40791},{"version":"999.999.1001","createdAt":"2026-08-02T05:57:32.219Z","changelog":"- Updated skill version from 1.0.7 to 1.0.10. - Removed the file: skill-card.md. - SKILL.md updated with minor version increment; otherwise content remains unchanged. - No functional or documentation changes detected; likely a maintenance or cleanup update.","fileCount":33,"zipByteSize":40677},{"version":"999.999.1000","createdAt":"2026-07-12T22:58:26.334Z","changelog":"- Updated version to 1.0.7 in SKILL.md. - SKILL.md updated with minor wording changes; core content and functionality unchanged. - skill-card.md file removed.","fileCount":33,"zipByteSize":40522},{"version":"999.999.999","createdAt":"2026-07-07T19:06:12.611Z","changelog":"No file changes detected in this version. - No updates or modifications were made to the skill in this release. - All features and documentation remain unchanged from the previous version.","fileCount":33,"zipByteSize":40590},{"version":"1.0.7","createdAt":"2026-07-06T06:58:35.766Z","changelog":"- Updated version number in SKILL.md from 1.0.5 to 1.0.6. - Removed obsolete file: skill-card.md. - Made minor content or configuration changes in SKILL.md and skills/smyx_common/scripts/config.py.","fileCount":33,"zipByteSize":40531}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:new-smyx-risk-analysis","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-new-smyx-risk-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-new-smyx-risk-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-new-smyx-risk-analysis/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-new-smyx-risk-analysis/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-new-smyx-risk-analysis/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-new-smyx-risk-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:29:00.491Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-new-smyx-risk-analysis/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-new-smyx-risk-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-new-smyx-risk-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-new-smyx-risk-analysis/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-09T23:13:10.409Z","emptyReason":null},"readme":"Skill: High-Risk Behavior Identification & Analysis Tool | 高风险行为识别分析工具\n\nOwner: smyx-sunjinhui\n\nSummary: Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示\n\nTags: latest:999.999.1005\n\nVersion history:\n\nv999.999.1005 | 2026-08-25T02:23:30.399Z | auto\n\n- Updated SKILL.md version from 1.0.12 to 1.0.13 with minor content or metadata changes.\n- Removed the deprecated skill-card.md file from the project.\n\nv999.999.1004 | 2026-08-18T00:23:30.982Z | auto\n\n- Removed the file: skill-card.md.\n- No changes to code or primary skill documentation aside from file deletion.\n- All skill functionality, usage, and documentation remain the same.\n\nv999.999.1003 | 2026-08-15T03:24:29.005Z | auto\n\n- Updated skill version to 1.0.12.\n- Made minor documentation or configuration changes.\n- Removed the file skill-card.md.\n\nv999.999.1002 | 2026-08-07T07:14:38.947Z | auto\n\n- Removed the file skill-card.md from the skill package.\n- No changes were made to core features, documentation, or capabilities.\n- The skill continues to support risk analysis via video and image, with all core documentation unchanged.\n\nv999.999.1001 | 2026-08-02T05:57:32.219Z | auto\n\n- Updated skill version from 1.0.7 to 1.0.10.\n- Removed the file: skill-card.md.\n- SKILL.md updated with minor version increment; otherwise content remains unchanged.\n- No functional or documentation changes detected; likely a maintenance or cleanup update.\n\nv999.999.1000 | 2026-07-12T22:58:26.334Z | auto\n\n- Updated version to 1.0.7 in SKILL.md.\n- SKILL.md updated with minor wording changes; core content and functionality unchanged.\n- skill-card.md file removed.\n\nv999.999.999 | 2026-07-07T19:06:12.611Z | auto\n\nNo file changes detected in this version.\n\n- No updates or modifications were made to the skill in this release.\n- All features and documentation remain unchanged from the previous version.\n\nv1.0.7 | 2026-07-06T06:58:35.766Z | auto\n\n- Updated version number in SKILL.md from 1.0.5 to 1.0.6.\n- Removed obsolete file: skill-card.md.\n- Made minor content or configuration changes in SKILL.md and skills/smyx_common/scripts/config.py.\n\nv1.0.6 | 2026-07-01T02:40:26.160Z | auto\n\n- Internal code updates in dao.py and util.py for common scripts.\n- Removed the skill-card.md file.\n- No user-facing feature or workflow changes.\n\nv1.0.5 | 2026-06-25T08:58:25.560Z | auto\n\n### v1.0.5 – Major usability and privacy update\n\n- User identity (open-id) handling is now fully automated and transparent, with no need to prompt, display, or request user identifiers.\n- All historical report queries now strictly use cloud API; reading local history or manual aggregation is strictly prohibited.\n- Documentation and usage examples updated for greater clarity, automation, and to prevent identity exposure.\n- Improved table-based explanations for parameters, workflows, and restrictions.\n- New licensing and resource index sections added for completeness.\n- Under-the-hood scripts and configuration streamlined to support these new requirements.\n\nv1.0.4 | 2026-05-24T18:18:41.046Z | auto\n\n- Refactored code structure: new module skills/smyx_analysis added for risk analysis capability.\n- Removed the face_analysis module and related files.\n- Updated requirements and configuration for compatibility with the new codebase.\n- Improved modularization and separation of shared/common logic in smyx_common.\n- Updated scripts and entrypoints to support the new module structure.\n\nv1.0.3 | 2026-05-21T01:15:37.866Z | auto\n\n- Updated dependency versions in requirements.txt and related files.\n- Modified configuration handling in config.py and updated YAML configuration files.\n- Adjusted scripts (skill.py, util.py) for improved stability and compatibility.\n- No changes to SKILL.md or user-facing documentation.\n\nv1.0.2 | 2026-05-12T12:02:51.803Z | auto\n\n- No changes detected in this version; content and functionality remain the same.\n\nv1.0.1 | 2026-05-12T12:00:38.064Z | auto\n\n- Added version field to SKILL.md and updated formatting for consistency.\n- Minor documentation and config updates to configuration and script files.\n- No changes to core logic or functionality.\n\nv1.0.0 | 2026-04-15T17:14:38.882Z | auto\n\nInitial release of the risk-analysis skill.\n\n- Identifies high-risk behaviors and health risks (e.g., elderly falls, heart attack/stroke precursors, abnormal behaviors) from video/images.\n- Provides real-time alerts and multi-channel notifications to caregivers and family.\n- Requires open-id verification before analysis; enforces strict retrieval priority and proper user prompting.\n- Supports various input formats: local/online video and images, real-time streams.\n- Offers risk type selection, threshold customization, alert toggles, and historical report listing per user.\n- Analysis results include risk type, confidence, time, location, level, and suggestions.\n\nArchive index:\n\nArchive v999.999.1005: 33 files, 40751 bytes\n\nFiles: __init__.py (0b), references/risk_categories.md (2211b), requirements.txt (45b), scripts/__init__.py (31b), scripts/config.py (617b), scripts/config.yaml (3b), scripts/risk_analysis.py (3178b), scripts/skill.py (570b), skill-card.md (2965b), SKILL.md (11225b), 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 (148b)\n\nFile v999.999.1005:SKILL.md\n\n---\nname: \"risk-analysis\"\ndescription: \"Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示\"\nversion: \"1.0.13\"\nlicense: \"MIT-0\"\n---\n\n# ⚠️ High-Risk Behavior Identification & Analysis Tool | 高风险行为识别分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **高风险行为识别分析工具** |\n| 🎯 核心目标 | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `OPEN_PERSON_RISK_ANALYSIS` |\n\nDeeply integrating Computer Vision, Pose Estimation, and Multimodal Health Risk Recognition algorithms, this feature\nconstructs an intelligent early warning system designed for high-risk behaviors and sudden health events. The system\nanalyzes individual behavior patterns and physiological manifestations in real-time from video or images. It precisely\ncaptures high-risk behaviors such as sudden posture changes during falls or prolonged stillness indicating abnormal\nretention. Simultaneously, by analyzing visual cues like facial microcirculation changes, abnormal skin color, and\ndecreased limb coordination, it assists in identifying precursors to sudden diseases such as heart attacks and\nstrokes.  \nLeveraging temporal behavior modeling and risk assessment models, the system effectively distinguishes between daily\nactivities and potential dangers. Once an anomaly is detected, it immediately triggers a multi-level warning mechanism,\nnotifying family members and caregivers via APP push, SMS, and voice broadcasts. It synchronously transmits anomaly\nfootage, risk type, and location information. This provides 24/7, unobtrusive, and precise safety protection for\nhigh-risk groups like the elderly living alone and chronic disease patients, realizing a closed-loop health management\nsystem that shifts from passive response to active prevention.\n\n本功能深度融合计算机视觉、姿态估计与多模态健康风险识别算法，构建了一套面向高危行为与突发健康事件的智能预警系统。系统可实时解析视频或图片中的个体行为模式与生理表征，精准捕捉老人跌倒时的姿态骤变、异常滞留时的长时间静止等高危行为，同时通过面部微循环变化、肤色异常、肢体协调性下降等视觉线索，辅助识别心梗、脑梗等突发疾病的前兆特征。借助时序行为建模与风险等级评估模型，系统能够有效区分日常活动与潜在危险，一旦检测到异常，立即触发分级预警机制，通过APP推送、短信、语音播报等多渠道通知家属及护理人员，并同步发送异常画面、风险类型与位置信息，为独居老人、慢性病患者等高风险群体提供7×24小时无感化、精准化的安全守护，实现从被动应对到主动预防的健康管理闭环\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频或图片分析识别高风险行为和健康风险，及时发出预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跌倒识别 |\n| 2 | 异常行为检测 |\n| 3 | 心梗脑梗前兆识别 |\n| 4 | 健康风险评估 |\n| 5 | 实时预警 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **仅当用户明确提及\"风险分析\"、\"跌倒\"、\"跌倒检测\"、\"行为识别\"、\"安全监测\"、\"老人看护\"、\"风险识别\"、\"高危风险识别\" |\n| 🖼️ 支持输入 | 本地视频/图片文件、网络视频/图片URL、实时流地址 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.risk_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.risk_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明：scripts脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  opencv-python>=4.5.5\n  numpy>=1.21.0\n  pillow>=9.0.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备输入源 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行风险分析 | 调用 `-m scripts.risk_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 获取分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地文件路径（与--url二选一） | 适用于本地文件分析 |\n| `--url` | 网络URL或实时流地址（与--input二选一） | API 服务自动下载网络资源 |\n| `--list` | 列出该 open-id 的历史风险分析报告（与--input/--url互斥） | 用于云端历史报告查询 |\n| `--page-num` | 分页页码，配合--list使用（默认 1） | 按需填写 |\n| `--page-size` | 分页大小，配合--list使用（默认 30） | 按需填写 |\n| `--api-url` | API服务地址（可选，使用默认值） | 按需填写 |\n| `--mode` | 分析模式（all/fall/health/behavior，默认all） | 按需填写 |\n| `--threshold` | 预警阈值（0.1-1.0，默认0.8） | 按需填写 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n| `--alert` | 是否开启自动预警（true/false，默认false） | 按需填写 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/risk_analysis.py`](scripts/risk_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/risk_categories.md`](references/risk_categories.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov/jpg/png/rtsp/http/https |\n| 📁 格式支持 | 最大支持视频大小：200MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供参考，不能替代专业安防和医疗诊断 |\n| 🔎 使用提醒 | 高风险事件会自动记录到日志目录 |\n| 📁 格式支持 | 实时流分析支持持续监测，检测到风险立即触发预警 |\n| 🚫 脚本限制 | **禁止临时生成脚本**：执行检测或历史报告查询时，只能使用本技能自带脚本，不得临时生成替代脚本 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地视频文件\npython -m scripts.risk_analysis --input /path/to/video.mp4\n\n# 分析网络视频URL\npython -m scripts.risk_analysis --url https://example.com/video.mp4\n\n# 跌倒识别模式（只检测跌倒事件）\npython -m scripts.risk_analysis --input video.mp4 --mode fall\n\n# 实时流监测（RTSP摄像头）\npython -m scripts.risk_analysis --url rtsp://camera_ip:554/stream --alert true\n\n# 自定义预警阈值\npython -m scripts.risk_analysis --input video.mp4 --threshold 0.7\n\n# 保存结果到文件\npython -m scripts.risk_analysis --input video.mp4 --output result.json\n\n# 📋 列出指定用户的历史风险分析报告\npython -m scripts.risk_analysis --list\n\n# 列出指定用户的历史报告，自定义分页\npython -m scripts.risk_analysis --list --page-num 2 --page-size 20\n```\n\n## ⚠️ 风险类型说明 | Risk Type Description\n| 维度/类型 | 说明 |\n|---|---|\n| 跌倒风险（fall） | 识别人员跌倒事件，置信度>0.8触发高等级预警 |\n| 健康风险（health） | 识别心梗/脑梗前兆、突发疾病症状等 |\n| 异常行为（behavior） | 识别剧烈运动、长时间静止、闯入等异常行为 |\n| 综合模式（all） | 同时检测所有类型风险 |\n\n## 🚦 预警等级 | Alert Levels\n| 等级/类型 | 说明 |\n|---|---|\n| **高风险（红色）** | 置信度>0.9，立即触发报警 |\n| **中风险（黄色）** | 置信度0.7-0.9，记录并关注 |\n| **低风险（蓝色）** | 置信度0.5-0.7，仅记录日志 |\n\nFile v999.999.1005:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"new-smyx-risk-analysis\",\n  \"version\": \"999.999.1005\",\n  \"publishedAt\": 1787624610399\n}\n\nFile v999.999.1005:references/risk_categories.md\n\n# 风险分类标准与预警等级说明\n\n## 一、风险类型分类\n\n### 1. 跌倒风险（fall）\n**识别场景**：\n- 人员突然倒地且长时间未起身\n- 身体倾斜角度超过阈值\n- 运动轨迹突然变化\n\n**风险等级判定**：\n- 高风险（≥0.9）：明确倒地且无动作\n- 中风险（0.7-0.9）：疑似跌倒，姿态异常\n- 低风险（<0.7）：短暂弯腰或坐下\n\n### 2. 健康风险（health）\n#### 2.1 心梗前兆\n- 表情痛苦，手捂胸口\n- 出汗过多，面色苍白\n- 突然站立不稳\n\n#### 2.2 脑梗前兆\n- 口角歪斜，流口水\n- 单侧肢体无力\n- 言语不清，表情僵硬\n\n#### 2.3 突发疾病\n- 突然倒地抽搐\n- 长时间静止不动\n- 异常痛苦表情\n\n### 3. 异常行为（behavior）\n- **剧烈运动**：快速奔跑、打斗等\n- **长时间静止**：同一姿势保持超过30分钟\n- **区域闯入**：进入禁止区域\n- **物品遗留**：异常物品出现在监测区域\n- **人员聚集**：超过5人聚集超过10分钟\n\n## 二、预警等级标准\n\n| 等级 | 颜色 | 置信度范围 | 处理策略 |\n|------|------|-----------|---------|\n| 高风险 | 红色 | ≥0.9 | 立即触发多渠道报警，通知相关人员 |\n| 中风险 | 黄色 | 0.7-0.9 | 记录事件，自动抓拍图片，通知管理员关注 |\n| 低风险 | 蓝色 | 0.5-0.7 | 仅记录日志，不主动通知 |\n\n## 三、预警内容模板\n```\n🚨 高风险事件预警\n⏰ 时间: 2024-01-01 12:00:00\n⚠️ 类型: 跌倒风险\n📊 置信度: 0.95\n📝 描述: 检测到人员倒地，已超过10秒未起身\n💡 建议: 立即查看现场情况，必要时拨打急救电话\n📍 位置: 客厅摄像头\n```\n\n## 四、处理建议库\n\n### 跌倒事件\n1. 立即查看现场，确认人员意识状态\n2. 如有受伤，不要随意移动，拨打120\n3. 检查周边环境，消除安全隐患\n4. 必要时联系家属\n\n### 心梗/脑梗前兆\n1. 立即拨打120急救电话\n2. 让患者保持平躺，不要移动\n3. 如有病史，服用对应急救药物\n4. 密切观察生命体征\n\n### 异常闯入\n1. 查看监控确认人员身份\n2. 必要时启动安防报警\n3. 通知安保人员前往处理\n4. 保存监控录像作为证据\n\nFile v999.999.1005: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 v999.999.1005:scripts/config.yaml\n\n{}\n\nFile v999.999.1005:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v999.999.1005: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 v999.999.1005: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 v999.999.1005: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 v999.999.1005:skill-card.md\n\n## Description:\n\nAnalyzes videos or images to identify high-risk behaviors and health-related warning signs, including falls, abnormal behavior, and possible heart attack or stroke precursors, and returns warning-oriented analysis.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users, developers, and operators use this skill to submit video, image, file, stream, or URL inputs for high-risk behavior and health-warning analysis, then receive structured findings, alerts, recommendations, and report links.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive camera, video, image, and health-related data may be sent to a third-party cloud service for analysis.\n\nMitigation: Install only if the publisher and service are trusted for this data, and confirm consent, privacy, and operational requirements before submitting media.\n\nRisk: The release includes unsafe default service configuration for sensitive media workflows.\n\nMitigation: Change configuration to approved HTTPS endpoints before installation and review all environment-specific endpoint settings.\n\nRisk: Identity and token handling requires review before use, especially in shared workspaces.\n\nMitigation: Review token storage behavior, avoid shared workspaces for credentials, and rotate or remove credentials after testing.\n\nRisk: Error guidance may prompt installation of a separate payment-related skill.\n\nMitigation: Do not follow payment-skill installation prompts unless that separate skill has been independently reviewed and approved.\n\nRisk: Risk-analysis results may be mistaken for professional medical, emergency, or security decisions.\n\nMitigation: Treat outputs as decision support only and keep human review and appropriate emergency or care workflows in place.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/new-smyx-risk-analysis)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n- [Risk Categories and Alert Levels](references/risk_categories.md)\n- [API Interface Documentation](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Shell commands, Guidance]\n\n**Output Format:** [Markdown text with JSON-formatted analysis results, warning summaries, recommendations, and report links.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Outputs may include cloud-hosted report links and historical report lists.]\n\n## Skill Version(s):\n\n999.999.1005 (source: server release metadata; SKILL.md frontmatter version 1.0.13)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v999.999.1005:requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v999.999.1005:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nArchive v999.999.1004: 33 files, 40651 bytes\n\nFiles: __init__.py (0b), references/risk_categories.md (2211b), requirements.txt (45b), scripts/__init__.py (31b), scripts/config.py (617b), scripts/config.yaml (3b), scripts/risk_analysis.py (3178b), scripts/skill.py (570b), skill-card.md (2712b), SKILL.md (11225b), 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 (148b)\n\nFile v999.999.1004:SKILL.md\n\n---\nname: \"risk-analysis\"\ndescription: \"Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示\"\nversion: \"1.0.12\"\nlicense: \"MIT-0\"\n---\n\n# ⚠️ High-Risk Behavior Identification & Analysis Tool | 高风险行为识别分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **高风险行为识别分析工具** |\n| 🎯 核心目标 | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `OPEN_PERSON_RISK_ANALYSIS` |\n\nDeeply integrating Computer Vision, Pose Estimation, and Multimodal Health Risk Recognition algorithms, this feature\nconstructs an intelligent early warning system designed for high-risk behaviors and sudden health events. The system\nanalyzes individual behavior patterns and physiological manifestations in real-time from video or images. It precisely\ncaptures high-risk behaviors such as sudden posture changes during falls or prolonged stillness indicating abnormal\nretention. Simultaneously, by analyzing visual cues like facial microcirculation changes, abnormal skin color, and\ndecreased limb coordination, it assists in identifying precursors to sudden diseases such as heart attacks and\nstrokes.  \nLeveraging temporal behavior modeling and risk assessment models, the system effectively distinguishes between daily\nactivities and potential dangers. Once an anomaly is detected, it immediately triggers a multi-level warning mechanism,\nnotifying family members and caregivers via APP push, SMS, and voice broadcasts. It synchronously transmits anomaly\nfootage, risk type, and location information. This provides 24/7, unobtrusive, and precise safety protection for\nhigh-risk groups like the elderly living alone and chronic disease patients, realizing a closed-loop health management\nsystem that shifts from passive response to active prevention.\n\n本功能深度融合计算机视觉、姿态估计与多模态健康风险识别算法，构建了一套面向高危行为与突发健康事件的智能预警系统。系统可实时解析视频或图片中的个体行为模式与生理表征，精准捕捉老人跌倒时的姿态骤变、异常滞留时的长时间静止等高危行为，同时通过面部微循环变化、肤色异常、肢体协调性下降等视觉线索，辅助识别心梗、脑梗等突发疾病的前兆特征。借助时序行为建模与风险等级评估模型，系统能够有效区分日常活动与潜在危险，一旦检测到异常，立即触发分级预警机制，通过APP推送、短信、语音播报等多渠道通知家属及护理人员，并同步发送异常画面、风险类型与位置信息，为独居老人、慢性病患者等高风险群体提供7×24小时无感化、精准化的安全守护，实现从被动应对到主动预防的健康管理闭环\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频或图片分析识别高风险行为和健康风险，及时发出预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跌倒识别 |\n| 2 | 异常行为检测 |\n| 3 | 心梗脑梗前兆识别 |\n| 4 | 健康风险评估 |\n| 5 | 实时预警 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **仅当用户明确提及\"风险分析\"、\"跌倒\"、\"跌倒检测\"、\"行为识别\"、\"安全监测\"、\"老人看护\"、\"风险识别\"、\"高危风险识别\" |\n| 🖼️ 支持输入 | 本地视频/图片文件、网络视频/图片URL、实时流地址 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.risk_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.risk_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明：scripts脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  opencv-python>=4.5.5\n  numpy>=1.21.0\n  pillow>=9.0.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备输入源 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行风险分析 | 调用 `-m scripts.risk_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 获取分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地文件路径（与--url二选一） | 适用于本地文件分析 |\n| `--url` | 网络URL或实时流地址（与--input二选一） | API 服务自动下载网络资源 |\n| `--list` | 列出该 open-id 的历史风险分析报告（与--input/--url互斥） | 用于云端历史报告查询 |\n| `--page-num` | 分页页码，配合--list使用（默认 1） | 按需填写 |\n| `--page-size` | 分页大小，配合--list使用（默认 30） | 按需填写 |\n| `--api-url` | API服务地址（可选，使用默认值） | 按需填写 |\n| `--mode` | 分析模式（all/fall/health/behavior，默认all） | 按需填写 |\n| `--threshold` | 预警阈值（0.1-1.0，默认0.8） | 按需填写 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n| `--alert` | 是否开启自动预警（true/false，默认false） | 按需填写 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/risk_analysis.py`](scripts/risk_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/risk_categories.md`](references/risk_categories.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov/jpg/png/rtsp/http/https |\n| 📁 格式支持 | 最大支持视频大小：200MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供参考，不能替代专业安防和医疗诊断 |\n| 🔎 使用提醒 | 高风险事件会自动记录到日志目录 |\n| 📁 格式支持 | 实时流分析支持持续监测，检测到风险立即触发预警 |\n| 🚫 脚本限制 | **禁止临时生成脚本**：执行检测或历史报告查询时，只能使用本技能自带脚本，不得临时生成替代脚本 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地视频文件\npython -m scripts.risk_analysis --input /path/to/video.mp4\n\n# 分析网络视频URL\npython -m scripts.risk_analysis --url https://example.com/video.mp4\n\n# 跌倒识别模式（只检测跌倒事件）\npython -m scripts.risk_analysis --input video.mp4 --mode fall\n\n# 实时流监测（RTSP摄像头）\npython -m scripts.risk_analysis --url rtsp://camera_ip:554/stream --alert true\n\n# 自定义预警阈值\npython -m scripts.risk_analysis --input video.mp4 --threshold 0.7\n\n# 保存结果到文件\npython -m scripts.risk_analysis --input video.mp4 --output result.json\n\n# 📋 列出指定用户的历史风险分析报告\npython -m scripts.risk_analysis --list\n\n# 列出指定用户的历史报告，自定义分页\npython -m scripts.risk_analysis --list --page-num 2 --page-size 20\n```\n\n## ⚠️ 风险类型说明 | Risk Type Description\n| 维度/类型 | 说明 |\n|---|---|\n| 跌倒风险（fall） | 识别人员跌倒事件，置信度>0.8触发高等级预警 |\n| 健康风险（health） | 识别心梗/脑梗前兆、突发疾病症状等 |\n| 异常行为（behavior） | 识别剧烈运动、长时间静止、闯入等异常行为 |\n| 综合模式（all） | 同时检测所有类型风险 |\n\n## 🚦 预警等级 | Alert Levels\n| 等级/类型 | 说明 |\n|---|---|\n| **高风险（红色）** | 置信度>0.9，立即触发报警 |\n| **中风险（黄色）** | 置信度0.7-0.9，记录并关注 |\n| **低风险（蓝色）** | 置信度0.5-0.7，仅记录日志 |\n\nFile v999.999.1004:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"new-smyx-risk-analysis\",\n  \"version\": \"999.999.1004\",\n  \"publishedAt\": 1787012610982\n}\n\nFile v999.999.1004:references/risk_categories.md\n\n# 风险分类标准与预警等级说明\n\n## 一、风险类型分类\n\n### 1. 跌倒风险（fall）\n**识别场景**：\n- 人员突然倒地且长时间未起身\n- 身体倾斜角度超过阈值\n- 运动轨迹突然变化\n\n**风险等级判定**：\n- 高风险（≥0.9）：明确倒地且无动作\n- 中风险（0.7-0.9）：疑似跌倒，姿态异常\n- 低风险（<0.7）：短暂弯腰或坐下\n\n### 2. 健康风险（health）\n#### 2.1 心梗前兆\n- 表情痛苦，手捂胸口\n- 出汗过多，面色苍白\n- 突然站立不稳\n\n#### 2.2 脑梗前兆\n- 口角歪斜，流口水\n- 单侧肢体无力\n- 言语不清，表情僵硬\n\n#### 2.3 突发疾病\n- 突然倒地抽搐\n- 长时间静止不动\n- 异常痛苦表情\n\n### 3. 异常行为（behavior）\n- **剧烈运动**：快速奔跑、打斗等\n- **长时间静止**：同一姿势保持超过30分钟\n- **区域闯入**：进入禁止区域\n- **物品遗留**：异常物品出现在监测区域\n- **人员聚集**：超过5人聚集超过10分钟\n\n## 二、预警等级标准\n\n| 等级 | 颜色 | 置信度范围 | 处理策略 |\n|------|------|-----------|---------|\n| 高风险 | 红色 | ≥0.9 | 立即触发多渠道报警，通知相关人员 |\n| 中风险 | 黄色 | 0.7-0.9 | 记录事件，自动抓拍图片，通知管理员关注 |\n| 低风险 | 蓝色 | 0.5-0.7 | 仅记录日志，不主动通知 |\n\n## 三、预警内容模板\n```\n🚨 高风险事件预警\n⏰ 时间: 2024-01-01 12:00:00\n⚠️ 类型: 跌倒风险\n📊 置信度: 0.95\n📝 描述: 检测到人员倒地，已超过10秒未起身\n💡 建议: 立即查看现场情况，必要时拨打急救电话\n📍 位置: 客厅摄像头\n```\n\n## 四、处理建议库\n\n### 跌倒事件\n1. 立即查看现场，确认人员意识状态\n2. 如有受伤，不要随意移动，拨打120\n3. 检查周边环境，消除安全隐患\n4. 必要时联系家属\n\n### 心梗/脑梗前兆\n1. 立即拨打120急救电话\n2. 让患者保持平躺，不要移动\n3. 如有病史，服用对应急救药物\n4. 密切观察生命体征\n\n### 异常闯入\n1. 查看监控确认人员身份\n2. 必要时启动安防报警\n3. 通知安保人员前往处理\n4. 保存监控录像作为证据\n\nFile v999.999.1004: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 v999.999.1004:scripts/config.yaml\n\n{}\n\nFile v999.999.1004:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v999.999.1004: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 v999.999.1004: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 v999.999.1004: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 v999.999.1004:skill-card.md\n\n## Description:\n\nSupports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to submit videos, images, URLs, or streams for remote high-risk behavior and health-risk analysis, including fall detection, abnormal behavior detection, and visual warning reports. It can also retrieve cloud-hosted report history associated with the skill's local identity.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Submitted videos, images, URLs, and streams may be uploaded to Life Emergence/Smyx cloud services for analysis.\n\nMitigation: Use only media that is intended for that remote processing, and avoid private camera streams, signed URLs, or sensitive medical and safety footage unless the sharing is approved.\n\nRisk: The skill can automatically create or reuse a local identity and store cloud authentication tokens for report history.\n\nMitigation: Run it in an isolated workspace, review and protect the workspace data directory, and remove stored identity or token data when access should be reset.\n\nRisk: Risk-analysis results are advisory and may affect safety or health decisions if treated as authoritative.\n\nMitigation: Use outputs as decision support only, and require human review or professional emergency, medical, or security procedures for high-risk findings.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/new-smyx-risk-analysis)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n- [Risk Categories and Alert Levels](artifact/references/risk_categories.md)\n- [API Documentation](artifact/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 text with structured JSON analysis results, report summaries, recommendations, and report links.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include cloud report history and export links returned by the remote service.]\n\n## Skill Version(s):\n\n999.999.1004 (source: ClawHub release metadata; source skill frontmatter reports 1.0.12)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v999.999.1004:requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v999.999.1004:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nArchive v999.999.1003: 33 files, 40923 bytes\n\nFiles: __init__.py (0b), references/risk_categories.md (2211b), requirements.txt (45b), scripts/__init__.py (31b), scripts/config.py (617b), scripts/config.yaml (3b), scripts/risk_analysis.py (3178b), scripts/skill.py (570b), skill-card.md (2990b), SKILL.md (11225b), 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 (148b)\n\nFile v999.999.1003:SKILL.md\n\n---\nname: \"risk-analysis\"\ndescription: \"Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示\"\nversion: \"1.0.12\"\nlicense: \"MIT-0\"\n---\n\n# ⚠️ High-Risk Behavior Identification & Analysis Tool | 高风险行为识别分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **高风险行为识别分析工具** |\n| 🎯 核心目标 | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `OPEN_PERSON_RISK_ANALYSIS` |\n\nDeeply integrating Computer Vision, Pose Estimation, and Multimodal Health Risk Recognition algorithms, this feature\nconstructs an intelligent early warning system designed for high-risk behaviors and sudden health events. The system\nanalyzes individual behavior patterns and physiological manifestations in real-time from video or images. It precisely\ncaptures high-risk behaviors such as sudden posture changes during falls or prolonged stillness indicating abnormal\nretention. Simultaneously, by analyzing visual cues like facial microcirculation changes, abnormal skin color, and\ndecreased limb coordination, it assists in identifying precursors to sudden diseases such as heart attacks and\nstrokes.  \nLeveraging temporal behavior modeling and risk assessment models, the system effectively distinguishes between daily\nactivities and potential dangers. Once an anomaly is detected, it immediately triggers a multi-level warning mechanism,\nnotifying family members and caregivers via APP push, SMS, and voice broadcasts. It synchronously transmits anomaly\nfootage, risk type, and location information. This provides 24/7, unobtrusive, and precise safety protection for\nhigh-risk groups like the elderly living alone and chronic disease patients, realizing a closed-loop health management\nsystem that shifts from passive response to active prevention.\n\n本功能深度融合计算机视觉、姿态估计与多模态健康风险识别算法，构建了一套面向高危行为与突发健康事件的智能预警系统。系统可实时解析视频或图片中的个体行为模式与生理表征，精准捕捉老人跌倒时的姿态骤变、异常滞留时的长时间静止等高危行为，同时通过面部微循环变化、肤色异常、肢体协调性下降等视觉线索，辅助识别心梗、脑梗等突发疾病的前兆特征。借助时序行为建模与风险等级评估模型，系统能够有效区分日常活动与潜在危险，一旦检测到异常，立即触发分级预警机制，通过APP推送、短信、语音播报等多渠道通知家属及护理人员，并同步发送异常画面、风险类型与位置信息，为独居老人、慢性病患者等高风险群体提供7×24小时无感化、精准化的安全守护，实现从被动应对到主动预防的健康管理闭环\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频或图片分析识别高风险行为和健康风险，及时发出预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跌倒识别 |\n| 2 | 异常行为检测 |\n| 3 | 心梗脑梗前兆识别 |\n| 4 | 健康风险评估 |\n| 5 | 实时预警 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **仅当用户明确提及\"风险分析\"、\"跌倒\"、\"跌倒检测\"、\"行为识别\"、\"安全监测\"、\"老人看护\"、\"风险识别\"、\"高危风险识别\" |\n| 🖼️ 支持输入 | 本地视频/图片文件、网络视频/图片URL、实时流地址 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.risk_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.risk_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明：scripts脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  opencv-python>=4.5.5\n  numpy>=1.21.0\n  pillow>=9.0.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备输入源 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行风险分析 | 调用 `-m scripts.risk_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 获取分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地文件路径（与--url二选一） | 适用于本地文件分析 |\n| `--url` | 网络URL或实时流地址（与--input二选一） | API 服务自动下载网络资源 |\n| `--list` | 列出该 open-id 的历史风险分析报告（与--input/--url互斥） | 用于云端历史报告查询 |\n| `--page-num` | 分页页码，配合--list使用（默认 1） | 按需填写 |\n| `--page-size` | 分页大小，配合--list使用（默认 30） | 按需填写 |\n| `--api-url` | API服务地址（可选，使用默认值） | 按需填写 |\n| `--mode` | 分析模式（all/fall/health/behavior，默认all） | 按需填写 |\n| `--threshold` | 预警阈值（0.1-1.0，默认0.8） | 按需填写 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n| `--alert` | 是否开启自动预警（true/false，默认false） | 按需填写 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/risk_analysis.py`](scripts/risk_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/risk_categories.md`](references/risk_categories.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov/jpg/png/rtsp/http/https |\n| 📁 格式支持 | 最大支持视频大小：200MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供参考，不能替代专业安防和医疗诊断 |\n| 🔎 使用提醒 | 高风险事件会自动记录到日志目录 |\n| 📁 格式支持 | 实时流分析支持持续监测，检测到风险立即触发预警 |\n| 🚫 脚本限制 | **禁止临时生成脚本**：执行检测或历史报告查询时，只能使用本技能自带脚本，不得临时生成替代脚本 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地视频文件\npython -m scripts.risk_analysis --input /path/to/video.mp4\n\n# 分析网络视频URL\npython -m scripts.risk_analysis --url https://example.com/video.mp4\n\n# 跌倒识别模式（只检测跌倒事件）\npython -m scripts.risk_analysis --input video.mp4 --mode fall\n\n# 实时流监测（RTSP摄像头）\npython -m scripts.risk_analysis --url rtsp://camera_ip:554/stream --alert true\n\n# 自定义预警阈值\npython -m scripts.risk_analysis --input video.mp4 --threshold 0.7\n\n# 保存结果到文件\npython -m scripts.risk_analysis --input video.mp4 --output result.json\n\n# 📋 列出指定用户的历史风险分析报告\npython -m scripts.risk_analysis --list\n\n# 列出指定用户的历史报告，自定义分页\npython -m scripts.risk_analysis --list --page-num 2 --page-size 20\n```\n\n## ⚠️ 风险类型说明 | Risk Type Description\n| 维度/类型 | 说明 |\n|---|---|\n| 跌倒风险（fall） | 识别人员跌倒事件，置信度>0.8触发高等级预警 |\n| 健康风险（health） | 识别心梗/脑梗前兆、突发疾病症状等 |\n| 异常行为（behavior） | 识别剧烈运动、长时间静止、闯入等异常行为 |\n| 综合模式（all） | 同时检测所有类型风险 |\n\n## 🚦 预警等级 | Alert Levels\n| 等级/类型 | 说明 |\n|---|---|\n| **高风险（红色）** | 置信度>0.9，立即触发报警 |\n| **中风险（黄色）** | 置信度0.7-0.9，记录并关注 |\n| **低风险（蓝色）** | 置信度0.5-0.7，仅记录日志 |\n\nFile v999.999.1003:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"new-smyx-risk-analysis\",\n  \"version\": \"999.999.1003\",\n  \"publishedAt\": 1786764269005\n}\n\nFile v999.999.1003:references/risk_categories.md\n\n# 风险分类标准与预警等级说明\n\n## 一、风险类型分类\n\n### 1. 跌倒风险（fall）\n**识别场景**：\n- 人员突然倒地且长时间未起身\n- 身体倾斜角度超过阈值\n- 运动轨迹突然变化\n\n**风险等级判定**：\n- 高风险（≥0.9）：明确倒地且无动作\n- 中风险（0.7-0.9）：疑似跌倒，姿态异常\n- 低风险（<0.7）：短暂弯腰或坐下\n\n### 2. 健康风险（health）\n#### 2.1 心梗前兆\n- 表情痛苦，手捂胸口\n- 出汗过多，面色苍白\n- 突然站立不稳\n\n#### 2.2 脑梗前兆\n- 口角歪斜，流口水\n- 单侧肢体无力\n- 言语不清，表情僵硬\n\n#### 2.3 突发疾病\n- 突然倒地抽搐\n- 长时间静止不动\n- 异常痛苦表情\n\n### 3. 异常行为（behavior）\n- **剧烈运动**：快速奔跑、打斗等\n- **长时间静止**：同一姿势保持超过30分钟\n- **区域闯入**：进入禁止区域\n- **物品遗留**：异常物品出现在监测区域\n- **人员聚集**：超过5人聚集超过10分钟\n\n## 二、预警等级标准\n\n| 等级 | 颜色 | 置信度范围 | 处理策略 |\n|------|------|-----------|---------|\n| 高风险 | 红色 | ≥0.9 | 立即触发多渠道报警，通知相关人员 |\n| 中风险 | 黄色 | 0.7-0.9 | 记录事件，自动抓拍图片，通知管理员关注 |\n| 低风险 | 蓝色 | 0.5-0.7 | 仅记录日志，不主动通知 |\n\n## 三、预警内容模板\n```\n🚨 高风险事件预警\n⏰ 时间: 2024-01-01 12:00:00\n⚠️ 类型: 跌倒风险\n📊 置信度: 0.95\n📝 描述: 检测到人员倒地，已超过10秒未起身\n💡 建议: 立即查看现场情况，必要时拨打急救电话\n📍 位置: 客厅摄像头\n```\n\n## 四、处理建议库\n\n### 跌倒事件\n1. 立即查看现场，确认人员意识状态\n2. 如有受伤，不要随意移动，拨打120\n3. 检查周边环境，消除安全隐患\n4. 必要时联系家属\n\n### 心梗/脑梗前兆\n1. 立即拨打120急救电话\n2. 让患者保持平躺，不要移动\n3. 如有病史，服用对应急救药物\n4. 密切观察生命体征\n\n### 异常闯入\n1. 查看监控确认人员身份\n2. 必要时启动安防报警\n3. 通知安保人员前往处理\n4. 保存监控录像作为证据\n\nFile v999.999.1003: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 v999.999.1003:scripts/config.yaml\n\n{}\n\nFile v999.999.1003:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v999.999.1003: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 v999.999.1003: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 v999.999.1003: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 v999.999.1003:skill-card.md\n\n## Description:\n\nSupports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and agent operators use this skill to submit image, video, URL, or stream inputs for high-risk behavior and health-risk analysis, including fall detection, abnormal behavior detection, health-risk assessment, alert-oriented summaries, and historical report lookup.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive image or video content, health-risk inferences, history queries, and identity-linked account data may be sent to configured external services.\n\nMitigation: Use only with appropriate consent and authorization, confirm the intended production endpoints before deployment, and avoid submitting sensitive or third-party footage unless policy permits it.\n\nRisk: The skill silently creates or reuses local user identity records and stores tokens for service access.\n\nMitigation: Review the workspace data directory and local identity/token records before and after use, and clear persisted data when the deployment does not require reuse.\n\nRisk: Health and safety detections may be incomplete or incorrect and are not a substitute for professional medical, emergency, or security review.\n\nMitigation: Treat outputs as decision-support signals, require human review for high-impact actions, and document escalation procedures for emergency or safety-sensitive workflows.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/new-smyx-risk-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [Risk category and alert-level reference](references/risk_categories.md)\n- [API interface reference](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown or JSON-like structured text with report links and optional saved output files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include risk categories, confidence levels, suggestions, historical report records, and report export URLs.]\n\n## Skill Version(s):\n\n999.999.1003 (source: server release metadata; artifact frontmatter version 1.0.12)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v999.999.1003:requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v999.999.1003:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nArchive v999.999.1002: 33 files, 40791 bytes\n\nFiles: __init__.py (0b), references/risk_categories.md (2211b), requirements.txt (45b), scripts/__init__.py (31b), scripts/config.py (617b), scripts/config.yaml (3b), scripts/risk_analysis.py (3178b), scripts/skill.py (570b), skill-card.md (2966b), SKILL.md (11225b), 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 (148b)\n\nFile v999.999.1002:SKILL.md\n\n---\nname: \"risk-analysis\"\ndescription: \"Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# ⚠️ High-Risk Behavior Identification & Analysis Tool | 高风险行为识别分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **高风险行为识别分析工具** |\n| 🎯 核心目标 | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `OPEN_PERSON_RISK_ANALYSIS` |\n\nDeeply integrating Computer Vision, Pose Estimation, and Multimodal Health Risk Recognition algorithms, this feature\nconstructs an intelligent early warning system designed for high-risk behaviors and sudden health events. The system\nanalyzes individual behavior patterns and physiological manifestations in real-time from video or images. It precisely\ncaptures high-risk behaviors such as sudden posture changes during falls or prolonged stillness indicating abnormal\nretention. Simultaneously, by analyzing visual cues like facial microcirculation changes, abnormal skin color, and\ndecreased limb coordination, it assists in identifying precursors to sudden diseases such as heart attacks and\nstrokes.  \nLeveraging temporal behavior modeling and risk assessment models, the system effectively distinguishes between daily\nactivities and potential dangers. Once an anomaly is detected, it immediately triggers a multi-level warning mechanism,\nnotifying family members and caregivers via APP push, SMS, and voice broadcasts. It synchronously transmits anomaly\nfootage, risk type, and location information. This provides 24/7, unobtrusive, and precise safety protection for\nhigh-risk groups like the elderly living alone and chronic disease patients, realizing a closed-loop health management\nsystem that shifts from passive response to active prevention.\n\n本功能深度融合计算机视觉、姿态估计与多模态健康风险识别算法，构建了一套面向高危行为与突发健康事件的智能预警系统。系统可实时解析视频或图片中的个体行为模式与生理表征，精准捕捉老人跌倒时的姿态骤变、异常滞留时的长时间静止等高危行为，同时通过面部微循环变化、肤色异常、肢体协调性下降等视觉线索，辅助识别心梗、脑梗等突发疾病的前兆特征。借助时序行为建模与风险等级评估模型，系统能够有效区分日常活动与潜在危险，一旦检测到异常，立即触发分级预警机制，通过APP推送、短信、语音播报等多渠道通知家属及护理人员，并同步发送异常画面、风险类型与位置信息，为独居老人、慢性病患者等高风险群体提供7×24小时无感化、精准化的安全守护，实现从被动应对到主动预防的健康管理闭环\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频或图片分析识别高风险行为和健康风险，及时发出预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跌倒识别 |\n| 2 | 异常行为检测 |\n| 3 | 心梗脑梗前兆识别 |\n| 4 | 健康风险评估 |\n| 5 | 实时预警 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **仅当用户明确提及\"风险分析\"、\"跌倒\"、\"跌倒检测\"、\"行为识别\"、\"安全监测\"、\"老人看护\"、\"风险识别\"、\"高危风险识别\" |\n| 🖼️ 支持输入 | 本地视频/图片文件、网络视频/图片URL、实时流地址 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.risk_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.risk_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明：scripts脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  opencv-python>=4.5.5\n  numpy>=1.21.0\n  pillow>=9.0.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备输入源 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行风险分析 | 调用 `-m scripts.risk_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 获取分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地文件路径（与--url二选一） | 适用于本地文件分析 |\n| `--url` | 网络URL或实时流地址（与--input二选一） | API 服务自动下载网络资源 |\n| `--list` | 列出该 open-id 的历史风险分析报告（与--input/--url互斥） | 用于云端历史报告查询 |\n| `--page-num` | 分页页码，配合--list使用（默认 1） | 按需填写 |\n| `--page-size` | 分页大小，配合--list使用（默认 30） | 按需填写 |\n| `--api-url` | API服务地址（可选，使用默认值） | 按需填写 |\n| `--mode` | 分析模式（all/fall/health/behavior，默认all） | 按需填写 |\n| `--threshold` | 预警阈值（0.1-1.0，默认0.8） | 按需填写 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n| `--alert` | 是否开启自动预警（true/false，默认false） | 按需填写 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/risk_analysis.py`](scripts/risk_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/risk_categories.md`](references/risk_categories.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov/jpg/png/rtsp/http/https |\n| 📁 格式支持 | 最大支持视频大小：200MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供参考，不能替代专业安防和医疗诊断 |\n| 🔎 使用提醒 | 高风险事件会自动记录到日志目录 |\n| 📁 格式支持 | 实时流分析支持持续监测，检测到风险立即触发预警 |\n| 🚫 脚本限制 | **禁止临时生成脚本**：执行检测或历史报告查询时，只能使用本技能自带脚本，不得临时生成替代脚本 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地视频文件\npython -m scripts.risk_analysis --input /path/to/video.mp4\n\n# 分析网络视频URL\npython -m scripts.risk_analysis --url https://example.com/video.mp4\n\n# 跌倒识别模式（只检测跌倒事件）\npython -m scripts.risk_analysis --input video.mp4 --mode fall\n\n# 实时流监测（RTSP摄像头）\npython -m scripts.risk_analysis --url rtsp://camera_ip:554/stream --alert true\n\n# 自定义预警阈值\npython -m scripts.risk_analysis --input video.mp4 --threshold 0.7\n\n# 保存结果到文件\npython -m scripts.risk_analysis --input video.mp4 --output result.json\n\n# 📋 列出指定用户的历史风险分析报告\npython -m scripts.risk_analysis --list\n\n# 列出指定用户的历史报告，自定义分页\npython -m scripts.risk_analysis --list --page-num 2 --page-size 20\n```\n\n## ⚠️ 风险类型说明 | Risk Type Description\n| 维度/类型 | 说明 |\n|---|---|\n| 跌倒风险（fall） | 识别人员跌倒事件，置信度>0.8触发高等级预警 |\n| 健康风险（health） | 识别心梗/脑梗前兆、突发疾病症状等 |\n| 异常行为（behavior） | 识别剧烈运动、长时间静止、闯入等异常行为 |\n| 综合模式（all） | 同时检测所有类型风险 |\n\n## 🚦 预警等级 | Alert Levels\n| 等级/类型 | 说明 |\n|---|---|\n| **高风险（红色）** | 置信度>0.9，立即触发报警 |\n| **中风险（黄色）** | 置信度0.7-0.9，记录并关注 |\n| **低风险（蓝色）** | 置信度0.5-0.7，仅记录日志 |\n\nFile v999.999.1002:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"new-smyx-risk-analysis\",\n  \"version\": \"999.999.1002\",\n  \"publishedAt\": 1786086878947\n}\n\nFile v999.999.1002:references/risk_categories.md\n\n# 风险分类标准与预警等级说明\n\n## 一、风险类型分类\n\n### 1. 跌倒风险（fall）\n**识别场景**：\n- 人员突然倒地且长时间未起身\n- 身体倾斜角度超过阈值\n- 运动轨迹突然变化\n\n**风险等级判定**：\n- 高风险（≥0.9）：明确倒地且无动作\n- 中风险（0.7-0.9）：疑似跌倒，姿态异常\n- 低风险（<0.7）：短暂弯腰或坐下\n\n### 2. 健康风险（health）\n#### 2.1 心梗前兆\n- 表情痛苦，手捂胸口\n- 出汗过多，面色苍白\n- 突然站立不稳\n\n#### 2.2 脑梗前兆\n- 口角歪斜，流口水\n- 单侧肢体无力\n- 言语不清，表情僵硬\n\n#### 2.3 突发疾病\n- 突然倒地抽搐\n- 长时间静止不动\n- 异常痛苦表情\n\n### 3. 异常行为（behavior）\n- **剧烈运动**：快速奔跑、打斗等\n- **长时间静止**：同一姿势保持超过30分钟\n- **区域闯入**：进入禁止区域\n- **物品遗留**：异常物品出现在监测区域\n- **人员聚集**：超过5人聚集超过10分钟\n\n## 二、预警等级标准\n\n| 等级 | 颜色 | 置信度范围 | 处理策略 |\n|------|------|-----------|---------|\n| 高风险 | 红色 | ≥0.9 | 立即触发多渠道报警，通知相关人员 |\n| 中风险 | 黄色 | 0.7-0.9 | 记录事件，自动抓拍图片，通知管理员关注 |\n| 低风险 | 蓝色 | 0.5-0.7 | 仅记录日志，不主动通知 |\n\n## 三、预警内容模板\n```\n🚨 高风险事件预警\n⏰ 时间: 2024-01-01 12:00:00\n⚠️ 类型: 跌倒风险\n📊 置信度: 0.95\n📝 描述: 检测到人员倒地，已超过10秒未起身\n💡 建议: 立即查看现场情况，必要时拨打急救电话\n📍 位置: 客厅摄像头\n```\n\n## 四、处理建议库\n\n### 跌倒事件\n1. 立即查看现场，确认人员意识状态\n2. 如有受伤，不要随意移动，拨打120\n3. 检查周边环境，消除安全隐患\n4. 必要时联系家属\n\n### 心梗/脑梗前兆\n1. 立即拨打120急救电话\n2. 让患者保持平躺，不要移动\n3. 如有病史，服用对应急救药物\n4. 密切观察生命体征\n\n### 异常闯入\n1. 查看监控确认人员身份\n2. 必要时启动安防报警\n3. 通知安保人员前往处理\n4. 保存监控录像作为证据\n\nFile v999.999.1002: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 v999.999.1002:scripts/config.yaml\n\n{}\n\nFile v999.999.1002:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v999.999.1002: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 v999.999.1002: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 v999.999.1002: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 v999.999.1002:skill-card.md\n\n## Description:\n\nSupports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to analyze images, video files, network media URLs, or real-time streams for fall events, abnormal behavior, and visible health-risk signals, then receive structured risk reports, alerts, recommendations, and report links.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive images, videos, health-risk inferences, and identity-linked report data may be sent to the provider's cloud service.\n\nMitigation: Use only media that the operator is authorized to share, confirm provider retention and deletion terms before use, and avoid regulated or highly sensitive footage unless an appropriate data-processing agreement is in place.\n\nRisk: The skill can create or reuse a local user identity and persist authentication tokens and identity state.\n\nMitigation: Run in a controlled workspace, restrict access to local data and SQLite storage, and clear or rotate retained identity and token state after evaluation or when changing operators.\n\nRisk: Alert workflows may share footage, location, risk type, or report links with configured recipients.\n\nMitigation: Verify alert recipients, location-sharing settings, and reporting channels before enabling alert or real-time monitoring modes.\n\nRisk: Visual risk analysis may produce incorrect or incomplete safety and health conclusions.\n\nMitigation: Treat outputs as advisory, review high-risk findings with a qualified human, and do not use the skill as a substitute for professional medical diagnosis or emergency response procedures.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/new-smyx-risk-analysis)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n- [Risk Categories and Alert Levels](artifact/references/risk_categories.md)\n- [API Interface Documentation](artifact/skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, json, shell commands, guidance]\n\n**Output Format:** [Markdown and JSON text, with optional shell commands and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May save analysis output to a local file when requested.]\n\n## Skill Version(s):\n\n999.999.1002 (source: server release metadata; artifact frontmatter version 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 v999.999.1002:requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v999.999.1002:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nArchive v999.999.1001: 33 files, 40677 bytes\n\nFiles: __init__.py (0b), references/risk_categories.md (2211b), requirements.txt (45b), scripts/__init__.py (31b), scripts/config.py (617b), scripts/config.yaml (3b), scripts/risk_analysis.py (3178b), scripts/skill.py (570b), skill-card.md (2806b), SKILL.md (11225b), 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 (148b)\n\nFile v999.999.1001:SKILL.md\n\n---\nname: \"risk-analysis\"\ndescription: \"Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# ⚠️ High-Risk Behavior Identification & Analysis Tool | 高风险行为识别分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **高风险行为识别分析工具** |\n| 🎯 核心目标 | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `OPEN_PERSON_RISK_ANALYSIS` |\n\nDeeply integrating Computer Vision, Pose Estimation, and Multimodal Health Risk Recognition algorithms, this feature\nconstructs an intelligent early warning system designed for high-risk behaviors and sudden health events. The system\nanalyzes individual behavior patterns and physiological manifestations in real-time from video or images. It precisely\ncaptures high-risk behaviors such as sudden posture changes during falls or prolonged stillness indicating abnormal\nretention. Simultaneously, by analyzing visual cues like facial microcirculation changes, abnormal skin color, and\ndecreased limb coordination, it assists in identifying precursors to sudden diseases such as heart attacks and\nstrokes.  \nLeveraging temporal behavior modeling and risk assessment models, the system effectively distinguishes between daily\nactivities and potential dangers. Once an anomaly is detected, it immediately triggers a multi-level warning mechanism,\nnotifying family members and caregivers via APP push, SMS, and voice broadcasts. It synchronously transmits anomaly\nfootage, risk type, and location information. This provides 24/7, unobtrusive, and precise safety protection for\nhigh-risk groups like the elderly living alone and chronic disease patients, realizing a closed-loop health management\nsystem that shifts from passive response to active prevention.\n\n本功能深度融合计算机视觉、姿态估计与多模态健康风险识别算法，构建了一套面向高危行为与突发健康事件的智能预警系统。系统可实时解析视频或图片中的个体行为模式与生理表征，精准捕捉老人跌倒时的姿态骤变、异常滞留时的长时间静止等高危行为，同时通过面部微循环变化、肤色异常、肢体协调性下降等视觉线索，辅助识别心梗、脑梗等突发疾病的前兆特征。借助时序行为建模与风险等级评估模型，系统能够有效区分日常活动与潜在危险，一旦检测到异常，立即触发分级预警机制，通过APP推送、短信、语音播报等多渠道通知家属及护理人员，并同步发送异常画面、风险类型与位置信息，为独居老人、慢性病患者等高风险群体提供7×24小时无感化、精准化的安全守护，实现从被动应对到主动预防的健康管理闭环\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频或图片分析识别高风险行为和健康风险，及时发出预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跌倒识别 |\n| 2 | 异常行为检测 |\n| 3 | 心梗脑梗前兆识别 |\n| 4 | 健康风险评估 |\n| 5 | 实时预警 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **仅当用户明确提及\"风险分析\"、\"跌倒\"、\"跌倒检测\"、\"行为识别\"、\"安全监测\"、\"老人看护\"、\"风险识别\"、\"高危风险识别\" |\n| 🖼️ 支持输入 | 本地视频/图片文件、网络视频/图片URL、实时流地址 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.risk_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.risk_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明：scripts脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  opencv-python>=4.5.5\n  numpy>=1.21.0\n  pillow>=9.0.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备输入源 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行风险分析 | 调用 `-m scripts.risk_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 获取分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地文件路径（与--url二选一） | 适用于本地文件分析 |\n| `--url` | 网络URL或实时流地址（与--input二选一） | API 服务自动下载网络资源 |\n| `--list` | 列出该 open-id 的历史风险分析报告（与--input/--url互斥） | 用于云端历史报告查询 |\n| `--page-num` | 分页页码，配合--list使用（默认 1） | 按需填写 |\n| `--page-size` | 分页大小，配合--list使用（默认 30） | 按需填写 |\n| `--api-url` | API服务地址（可选，使用默认值） | 按需填写 |\n| `--mode` | 分析模式（all/fall/health/behavior，默认all） | 按需填写 |\n| `--threshold` | 预警阈值（0.1-1.0，默认0.8） | 按需填写 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n| `--alert` | 是否开启自动预警（true/false，默认false） | 按需填写 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/risk_analysis.py`](scripts/risk_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/risk_categories.md`](references/risk_categories.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov/jpg/png/rtsp/http/https |\n| 📁 格式支持 | 最大支持视频大小：200MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供参考，不能替代专业安防和医疗诊断 |\n| 🔎 使用提醒 | 高风险事件会自动记录到日志目录 |\n| 📁 格式支持 | 实时流分析支持持续监测，检测到风险立即触发预警 |\n| 🚫 脚本限制 | **禁止临时生成脚本**：执行检测或历史报告查询时，只能使用本技能自带脚本，不得临时生成替代脚本 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地视频文件\npython -m scripts.risk_analysis --input /path/to/video.mp4\n\n# 分析网络视频URL\npython -m scripts.risk_analysis --url https://example.com/video.mp4\n\n# 跌倒识别模式（只检测跌倒事件）\npython -m scripts.risk_analysis --input video.mp4 --mode fall\n\n# 实时流监测（RTSP摄像头）\npython -m scripts.risk_analysis --url rtsp://camera_ip:554/stream --alert true\n\n# 自定义预警阈值\npython -m scripts.risk_analysis --input video.mp4 --threshold 0.7\n\n# 保存结果到文件\npython -m scripts.risk_analysis --input video.mp4 --output result.json\n\n# 📋 列出指定用户的历史风险分析报告\npython -m scripts.risk_analysis --list\n\n# 列出指定用户的历史报告，自定义分页\npython -m scripts.risk_analysis --list --page-num 2 --page-size 20\n```\n\n## ⚠️ 风险类型说明 | Risk Type Description\n| 维度/类型 | 说明 |\n|---|---|\n| 跌倒风险（fall） | 识别人员跌倒事件，置信度>0.8触发高等级预警 |\n| 健康风险（health） | 识别心梗/脑梗前兆、突发疾病症状等 |\n| 异常行为（behavior） | 识别剧烈运动、长时间静止、闯入等异常行为 |\n| 综合模式（all） | 同时检测所有类型风险 |\n\n## 🚦 预警等级 | Alert Levels\n| 等级/类型 | 说明 |\n|---|---|\n| **高风险（红色）** | 置信度>0.9，立即触发报警 |\n| **中风险（黄色）** | 置信度0.7-0.9，记录并关注 |\n| **低风险（蓝色）** | 置信度0.5-0.7，仅记录日志 |\n\nFile v999.999.1001:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"new-smyx-risk-analysis\",\n  \"version\": \"999.999.1001\",\n  \"publishedAt\": 1785650252219\n}\n\nFile v999.999.1001:references/risk_categories.md\n\n# 风险分类标准与预警等级说明\n\n## 一、风险类型分类\n\n### 1. 跌倒风险（fall）\n**识别场景**：\n- 人员突然倒地且长时间未起身\n- 身体倾斜角度超过阈值\n- 运动轨迹突然变化\n\n**风险等级判定**：\n- 高风险（≥0.9）：明确倒地且无动作\n- 中风险（0.7-0.9）：疑似跌倒，姿态异常\n- 低风险（<0.7）：短暂弯腰或坐下\n\n### 2. 健康风险（health）\n#### 2.1 心梗前兆\n- 表情痛苦，手捂胸口\n- 出汗过多，面色苍白\n- 突然站立不稳\n\n#### 2.2 脑梗前兆\n- 口角歪斜，流口水\n- 单侧肢体无力\n- 言语不清，表情僵硬\n\n#### 2.3 突发疾病\n- 突然倒地抽搐\n- 长时间静止不动\n- 异常痛苦表情\n\n### 3. 异常行为（behavior）\n- **剧烈运动**：快速奔跑、打斗等\n- **长时间静止**：同一姿势保持超过30分钟\n- **区域闯入**：进入禁止区域\n- **物品遗留**：异常物品出现在监测区域\n- **人员聚集**：超过5人聚集超过10分钟\n\n## 二、预警等级标准\n\n| 等级 | 颜色 | 置信度范围 | 处理策略 |\n|------|------|-----------|---------|\n| 高风险 | 红色 | ≥0.9 | 立即触发多渠道报警，通知相关人员 |\n| 中风险 | 黄色 | 0.7-0.9 | 记录事件，自动抓拍图片，通知管理员关注 |\n| 低风险 | 蓝色 | 0.5-0.7 | 仅记录日志，不主动通知 |\n\n## 三、预警内容模板\n```\n🚨 高风险事件预警\n⏰ 时间: 2024-01-01 12:00:00\n⚠️ 类型: 跌倒风险\n📊 置信度: 0.95\n📝 描述: 检测到人员倒地，已超过10秒未起身\n💡 建议: 立即查看现场情况，必要时拨打急救电话\n📍 位置: 客厅摄像头\n```\n\n## 四、处理建议库\n\n### 跌倒事件\n1. 立即查看现场，确认人员意识状态\n2. 如有受伤，不要随意移动，拨打120\n3. 检查周边环境，消除安全隐患\n4. 必要时联系家属\n\n### 心梗/脑梗前兆\n1. 立即拨打120急救电话\n2. 让患者保持平躺，不要移动\n3. 如有病史，服用对应急救药物\n4. 密切观察生命体征\n\n### 异常闯入\n1. 查看监控确认人员身份\n2. 必要时启动安防报警\n3. 通知安保人员前往处理\n4. 保存监控录像作为证据\n\nFile v999.999.1001: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 v999.999.1001:scripts/config.yaml\n\n{}\n\nFile v999.999.1001:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v999.999.1001: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 v999.999.1001: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 v999.999.1001: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 v999.999.1001:skill-card.md\n\n## Description: <br>\nSupports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users, caregivers, safety teams, and developers use this skill to analyze video or image inputs for falls, abnormal behavior, and visual health-risk indicators, then receive structured risk results, recommendations, and report links. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Uploaded videos/images and derived health-risk results are sent to LifeEmergence remote services. <br>\nMitigation: Use only approved media, confirm consent from affected people, and review the service's data handling and retention expectations before installation. <br>\nRisk: The skill stores identity/account metadata and tokens in a local SQLite database. <br>\nMitigation: Run it in a controlled workspace, restrict access to workspace data, and clear or rotate stored credentials when the skill is no longer needed. <br>\nRisk: Health and safety detections may be incomplete or incorrect and should not replace professional medical, emergency, or security judgment. <br>\nMitigation: Treat outputs as decision support, require human review for alerts, and escalate urgent events through appropriate professional channels. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill listing](https://clawhub.ai/smyx-sunjinhui/skills/new-smyx-risk-analysis) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [Risk category reference](artifact/references/risk_categories.md) <br>\n- [API interface reference](artifact/skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, JSON, Files, Guidance] <br>\n**Output Format:** [Markdown-formatted text with structured JSON content, risk recommendations, report links, and optional saved output files] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Analysis results may include derived health-risk and behavior-risk findings, history report records, and report export URLs returned by remote services.] <br>\n\n## Skill Version(s): <br>\n999.999.1001 (source: ClawHub release metadata; artifact frontmatter reports 1.0.10) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v999.999.1001:requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v999.999.1001:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nArchive v999.999.1000: 33 files, 40522 bytes\n\nFiles: __init__.py (0b), references/risk_categories.md (2211b), requirements.txt (45b), scripts/__init__.py (31b), scripts/config.py (617b), scripts/config.yaml (3b), scripts/risk_analysis.py (3178b), scripts/skill.py (570b), skill-card.md (2461b), SKILL.md (11224b), 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 (148b)\n\nFile v999.999.1000:SKILL.md\n\n---\nname: \"risk-analysis\"\ndescription: \"Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示\"\nversion: \"1.0.7\"\nlicense: \"MIT-0\"\n---\n\n# ⚠️ High-Risk Behavior Identification & Analysis Tool | 高风险行为识别分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **高风险行为识别分析工具** |\n| 🎯 核心目标 | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `OPEN_PERSON_RISK_ANALYSIS` |\n\nDeeply integrating Computer Vision, Pose Estimation, and Multimodal Health Risk Recognition algorithms, this feature\nconstructs an intelligent early warning system designed for high-risk behaviors and sudden health events. The system\nanalyzes individual behavior patterns and physiological manifestations in real-time from video or images. It precisely\ncaptures high-risk behaviors such as sudden posture changes during falls or prolonged stillness indicating abnormal\nretention. Simultaneously, by analyzing visual cues like facial microcirculation changes, abnormal skin color, and\ndecreased limb coordination, it assists in identifying precursors to sudden diseases such as heart attacks and\nstrokes.  \nLeveraging temporal behavior modeling and risk assessment models, the system effectively distinguishes between daily\nactivities and potential dangers. Once an anomaly is detected, it immediately triggers a multi-level warning mechanism,\nnotifying family members and caregivers via APP push, SMS, and voice broadcasts. It synchronously transmits anomaly\nfootage, risk type, and location information. This provides 24/7, unobtrusive, and precise safety protection for\nhigh-risk groups like the elderly living alone and chronic disease patients, realizing a closed-loop health management\nsystem that shifts from passive response to active prevention.\n\n本功能深度融合计算机视觉、姿态估计与多模态健康风险识别算法，构建了一套面向高危行为与突发健康事件的智能预警系统。系统可实时解析视频或图片中的个体行为模式与生理表征，精准捕捉老人跌倒时的姿态骤变、异常滞留时的长时间静止等高危行为，同时通过面部微循环变化、肤色异常、肢体协调性下降等视觉线索，辅助识别心梗、脑梗等突发疾病的前兆特征。借助时序行为建模与风险等级评估模型，系统能够有效区分日常活动与潜在危险，一旦检测到异常，立即触发分级预警机制，通过APP推送、短信、语音播报等多渠道通知家属及护理人员，并同步发送异常画面、风险类型与位置信息，为独居老人、慢性病患者等高风险群体提供7×24小时无感化、精准化的安全守护，实现从被动应对到主动预防的健康管理闭环\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频或图片分析识别高风险行为和健康风险，及时发出预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跌倒识别 |\n| 2 | 异常行为检测 |\n| 3 | 心梗脑梗前兆识别 |\n| 4 | 健康风险评估 |\n| 5 | 实时预警 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **仅当用户明确提及\"风险分析\"、\"跌倒\"、\"跌倒检测\"、\"行为识别\"、\"安全监测\"、\"老人看护\"、\"风险识别\"、\"高危风险识别\" |\n| 🖼️ 支持输入 | 本地视频/图片文件、网络视频/图片URL、实时流地址 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.risk_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.risk_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明：scripts脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  opencv-python>=4.5.5\n  numpy>=1.21.0\n  pillow>=9.0.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备输入源 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行风险分析 | 调用 `-m scripts.risk_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 获取分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地文件路径（与--url二选一） | 适用于本地文件分析 |\n| `--url` | 网络URL或实时流地址（与--input二选一） | API 服务自动下载网络资源 |\n| `--list` | 列出该 open-id 的历史风险分析报告（与--input/--url互斥） | 用于云端历史报告查询 |\n| `--page-num` | 分页页码，配合--list使用（默认 1） | 按需填写 |\n| `--page-size` | 分页大小，配合--list使用（默认 30） | 按需填写 |\n| `--api-url` | API服务地址（可选，使用默认值） | 按需填写 |\n| `--mode` | 分析模式（all/fall/health/behavior，默认all） | 按需填写 |\n| `--threshold` | 预警阈值（0.1-1.0，默认0.8） | 按需填写 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n| `--alert` | 是否开启自动预警（true/false，默认false） | 按需填写 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/risk_analysis.py`](scripts/risk_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/risk_categories.md`](references/risk_categories.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov/jpg/png/rtsp/http/https |\n| 📁 格式支持 | 最大支持视频大小：200MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供参考，不能替代专业安防和医疗诊断 |\n| 🔎 使用提醒 | 高风险事件会自动记录到日志目录 |\n| 📁 格式支持 | 实时流分析支持持续监测，检测到风险立即触发预警 |\n| 🚫 脚本限制 | **禁止临时生成脚本**：执行检测或历史报告查询时，只能使用本技能自带脚本，不得临时生成替代脚本 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地视频文件\npython -m scripts.risk_analysis --input /path/to/video.mp4\n\n# 分析网络视频URL\npython -m scripts.risk_analysis --url https://example.com/video.mp4\n\n# 跌倒识别模式（只检测跌倒事件）\npython -m scripts.risk_analysis --input video.mp4 --mode fall\n\n# 实时流监测（RTSP摄像头）\npython -m scripts.risk_analysis --url rtsp://camera_ip:554/stream --alert true\n\n# 自定义预警阈值\npython -m scripts.risk_analysis --input video.mp4 --threshold 0.7\n\n# 保存结果到文件\npython -m scripts.risk_analysis --input video.mp4 --output result.json\n\n# 📋 列出指定用户的历史风险分析报告\npython -m scripts.risk_analysis --list\n\n# 列出指定用户的历史报告，自定义分页\npython -m scripts.risk_analysis --list --page-num 2 --page-size 20\n```\n\n## ⚠️ 风险类型说明 | Risk Type Description\n| 维度/类型 | 说明 |\n|---|---|\n| 跌倒风险（fall） | 识别人员跌倒事件，置信度>0.8触发高等级预警 |\n| 健康风险（health） | 识别心梗/脑梗前兆、突发疾病症状等 |\n| 异常行为（behavior） | 识别剧烈运动、长时间静止、闯入等异常行为 |\n| 综合模式（all） | 同时检测所有类型风险 |\n\n## 🚦 预警等级 | Alert Levels\n| 等级/类型 | 说明 |\n|---|---|\n| **高风险（红色）** | 置信度>0.9，立即触发报警 |\n| **中风险（黄色）** | 置信度0.7-0.9，记录并关注 |\n| **低风险（蓝色）** | 置信度0.5-0.7，仅记录日志 |\n\nFile v999.999.1000:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"new-smyx-risk-analysis\",\n  \"version\": \"999.999.1000\",\n  \"publishedAt\": 1783897106334\n}\n\nFile v999.999.1000:references/risk_categories.md\n\n# 风险分类标准与预警等级说明\n\n## 一、风险类型分类\n\n### 1. 跌倒风险（fall）\n**识别场景**：\n- 人员突然倒地且长时间未起身\n- 身体倾斜角度超过阈值\n- 运动轨迹突然变化\n\n**风险等级判定**：\n- 高风险（≥0.9）：明确倒地且无动作\n- 中风险（0.7-0.9）：疑似跌倒，姿态异常\n- 低风险（<0.7）：短暂弯腰或坐下\n\n### 2. 健康风险（health）\n#### 2.1 心梗前兆\n- 表情痛苦，手捂胸口\n- 出汗过多，面色苍白\n- 突然站立不稳\n\n#### 2.2 脑梗前兆\n- 口角歪斜，流口水\n- 单侧肢体无力\n- 言语不清，表情僵硬\n\n#### 2.3 突发疾病\n- 突然倒地抽搐\n- 长时间静止不动\n- 异常痛苦表情\n\n### 3. 异常行为（behavior）\n- **剧烈运动**：快速奔跑、打斗等\n- **长时间静止**：同一姿势保持超过30分钟\n- **区域闯入**：进入禁止区域\n- **物品遗留**：异常物品出现在监测区域\n- **人员聚集**：超过5人聚集超过10分钟\n\n## 二、预警等级标准\n\n| 等级 | 颜色 | 置信度范围 | 处理策略 |\n|------|------|-----------|---------|\n| 高风险 | 红色 | ≥0.9 | 立即触发多渠道报警，通知相关人员 |\n| 中风险 | 黄色 | 0.7-0.9 | 记录事件，自动抓拍图片，通知管理员关注 |\n| 低风险 | 蓝色 | 0.5-0.7 | 仅记录日志，不主动通知 |\n\n## 三、预警内容模板\n```\n🚨 高风险事件预警\n⏰ 时间: 2024-01-01 12:00:00\n⚠️ 类型: 跌倒风险\n📊 置信度: 0.95\n📝 描述: 检测到人员倒地，已超过10秒未起身\n💡 建议: 立即查看现场情况，必要时拨打急救电话\n📍 位置: 客厅摄像头\n```\n\n## 四、处理建议库\n\n### 跌倒事件\n1. 立即查看现场，确认人员意识状态\n2. 如有受伤，不要随意移动，拨打120\n3. 检查周边环境，消除安全隐患\n4. 必要时联系家属\n\n### 心梗/脑梗前兆\n1. 立即拨打120急救电话\n2. 让患者保持平躺，不要移动\n3. 如有病史，服用对应急救药物\n4. 密切观察生命体征\n\n### 异常闯入\n1. 查看监控确认人员身份\n2. 必要时启动安防报警\n3. 通知安保人员前往处理\n4. 保存监控录像作为证据\n\nFile v999.999.1000: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 v999.999.1000:scripts/config.yaml\n\n{}\n\nFile v999.999.1000:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v999.999.1000: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 v999.999.1000: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 v999.999.1000: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 v999.999.1000:skill-card.md\n\n## Description: <br>\nAnalyzes video or image inputs for fall, abnormal-behavior, and visual health-risk signals, then returns structured risk findings, recommendations, and report links. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and developers use this skill to submit surveillance, care, or safety-monitoring media for cloud-assisted risk analysis and to retrieve identity-linked historical reports. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Sensitive video, image, and health-risk data may be sent to publisher cloud services. <br>\nMitigation: Use only approved media, confirm recipient and retention expectations before use, and avoid private surveillance footage unless all required permissions are in place. <br>\nRisk: Identity-linked report history may be created or reused with limited user control. <br>\nMitigation: Run the skill only where identity-linked history is expected, and review access to generated reports before sharing output. <br>\nRisk: Local user and token records may persist in the workspace. <br>\nMitigation: Restrict workspace access and inspect or clear persisted local data according to the deployment's retention policy. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/new-smyx-risk-analysis) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [Risk categories and alert levels](references/risk_categories.md) <br>\n- [API documentation](skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown text with structured JSON analysis content and report links.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Can save returned analysis text to a caller-specified output file.] <br>\n\n## Skill Version(s): <br>\n999.999.1000 (source: ClawHub release evidence; artifact frontmatter version 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 v999.999.1000:requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v999.999.1000:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nArchive v999.999.999: 33 files, 40590 bytes\n\nFiles: __init__.py (0b), references/risk_categories.md (2211b), requirements.txt (45b), scripts/__init__.py (31b), scripts/config.py (617b), scripts/config.yaml (3b), scripts/risk_analysis.py (3178b), scripts/skill.py (570b), skill-card.md (2912b), SKILL.md (11224b), 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 (147b)\n\nFile v999.999.999:SKILL.md\n\n---\nname: \"risk-analysis\"\ndescription: \"Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示\"\nversion: \"1.0.6\"\nlicense: \"MIT-0\"\n---\n\n# ⚠️ High-Risk Behavior Identification & Analysis Tool | 高风险行为识别分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **高风险行为识别分析工具** |\n| 🎯 核心目标 | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `OPEN_PERSON_RISK_ANALYSIS` |\n\nDeeply integrating Computer Vision, Pose Estimation, and Multimodal Health Risk Recognition algorithms, this feature\nconstructs an intelligent early warning system designed for high-risk behaviors and sudden health events. The system\nanalyzes individual behavior patterns and physiological manifestations in real-time from video or images. It precisely\ncaptures high-risk behaviors such as sudden posture changes during falls or prolonged stillness indicating abnormal\nretention. Simultaneously, by analyzing visual cues like facial microcirculation changes, abnormal skin color, and\ndecreased limb coordination, it assists in identifying precursors to sudden diseases such as heart attacks and\nstrokes.  \nLeveraging temporal behavior modeling and risk assessment models, the system effectively distinguishes between daily\nactivities and potential dangers. Once an anomaly is detected, it immediately triggers a multi-level warning mechanism,\nnotifying family members and caregivers via APP push, SMS, and voice broadcasts. It synchronously transmits anomaly\nfootage, risk type, and location information. This provides 24/7, unobtrusive, and precise safety protection for\nhigh-risk groups like the elderly living alone and chronic disease patients, realizing a closed-loop health management\nsystem that shifts from passive response to active prevention.\n\n本功能深度融合计算机视觉、姿态估计与多模态健康风险识别算法，构建了一套面向高危行为与突发健康事件的智能预警系统。系统可实时解析视频或图片中的个体行为模式与生理表征，精准捕捉老人跌倒时的姿态骤变、异常滞留时的长时间静止等高危行为，同时通过面部微循环变化、肤色异常、肢体协调性下降等视觉线索，辅助识别心梗、脑梗等突发疾病的前兆特征。借助时序行为建模与风险等级评估模型，系统能够有效区分日常活动与潜在危险，一旦检测到异常，立即触发分级预警机制，通过APP推送、短信、语音播报等多渠道通知家属及护理人员，并同步发送异常画面、风险类型与位置信息，为独居老人、慢性病患者等高风险群体提供7×24小时无感化、精准化的安全守护，实现从被动应对到主动预防的健康管理闭环\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频或图片分析识别高风险行为和健康风险，及时发出预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跌倒识别 |\n| 2 | 异常行为检测 |\n| 3 | 心梗脑梗前兆识别 |\n| 4 | 健康风险评估 |\n| 5 | 实时预警 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **仅当用户明确提及\"风险分析\"、\"跌倒\"、\"跌倒检测\"、\"行为识别\"、\"安全监测\"、\"老人看护\"、\"风险识别\"、\"高危风险识别\" |\n| 🖼️ 支持输入 | 本地视频/图片文件、网络视频/图片URL、实时流地址 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.risk_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.risk_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明：scripts脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  opencv-python>=4.5.5\n  numpy>=1.21.0\n  pillow>=9.0.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备输入源 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行风险分析 | 调用 `-m scripts.risk_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 获取分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地文件路径（与--url二选一） | 适用于本地文件分析 |\n| `--url` | 网络URL或实时流地址（与--input二选一） | API 服务自动下载网络资源 |\n| `--list` | 列出该 open-id 的历史风险分析报告（与--input/--url互斥） | 用于云端历史报告查询 |\n| `--page-num` | 分页页码，配合--list使用（默认 1） | 按需填写 |\n| `--page-size` | 分页大小，配合--list使用（默认 30） | 按需填写 |\n| `--api-url` | API服务地址（可选，使用默认值） | 按需填写 |\n| `--mode` | 分析模式（all/fall/health/behavior，默认all） | 按需填写 |\n| `--threshold` | 预警阈值（0.1-1.0，默认0.8） | 按需填写 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n| `--alert` | 是否开启自动预警（true/false，默认false） | 按需填写 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/risk_analysis.py`](scripts/risk_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/risk_categories.md`](references/risk_categories.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov/jpg/png/rtsp/http/https |\n| 📁 格式支持 | 最大支持视频大小：200MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供参考，不能替代专业安防和医疗诊断 |\n| 🔎 使用提醒 | 高风险事件会自动记录到日志目录 |\n| 📁 格式支持 | 实时流分析支持持续监测，检测到风险立即触发预警 |\n| 🚫 脚本限制 | **禁止临时生成脚本**：执行检测或历史报告查询时，只能使用本技能自带脚本，不得临时生成替代脚本 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地视频文件\npython -m scripts.risk_analysis --input /path/to/video.mp4\n\n# 分析网络视频URL\npython -m scripts.risk_analysis --url https://example.com/video.mp4\n\n# 跌倒识别模式（只检测跌倒事件）\npython -m scripts.risk_analysis --input video.mp4 --mode fall\n\n# 实时流监测（RTSP摄像头）\npython -m scripts.risk_analysis --url rtsp://camera_ip:554/stream --alert true\n\n# 自定义预警阈值\npython -m scripts.risk_analysis --input video.mp4 --threshold 0.7\n\n# 保存结果到文件\npython -m scripts.risk_analysis --input video.mp4 --output result.json\n\n# 📋 列出指定用户的历史风险分析报告\npython -m scripts.risk_analysis --list\n\n# 列出指定用户的历史报告，自定义分页\npython -m scripts.risk_analysis --list --page-num 2 --page-size 20\n```\n\n## ⚠️ 风险类型说明 | Risk Type Description\n| 维度/类型 | 说明 |\n|---|---|\n| 跌倒风险（fall） | 识别人员跌倒事件，置信度>0.8触发高等级预警 |\n| 健康风险（health） | 识别心梗/脑梗前兆、突发疾病症状等 |\n| 异常行为（behavior） | 识别剧烈运动、长时间静止、闯入等异常行为 |\n| 综合模式（all） | 同时检测所有类型风险 |\n\n## 🚦 预警等级 | Alert Levels\n| 等级/类型 | 说明 |\n|---|---|\n| **高风险（红色）** | 置信度>0.9，立即触发报警 |\n| **中风险（黄色）** | 置信度0.7-0.9，记录并关注 |\n| **低风险（蓝色）** | 置信度0.5-0.7，仅记录日志 |\n\nFile v999.999.999:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"new-smyx-risk-analysis\",\n  \"version\": \"999.999.999\",\n  \"publishedAt\": 1783451172611\n}\n\nFile v999.999.999:references/risk_categories.md\n\n# 风险分类标准与预警等级说明\n\n## 一、风险类型分类\n\n### 1. 跌倒风险（fall）\n**识别场景**：\n- 人员突然倒地且长时间未起身\n- 身体倾斜角度超过阈值\n- 运动轨迹突然变化\n\n**风险等级判定**：\n- 高风险（≥0.9）：明确倒地且无动作\n- 中风险（0.7-0.9）：疑似跌倒，姿态异常\n- 低风险（<0.7）：短暂弯腰或坐下\n\n### 2. 健康风险（health）\n#### 2.1 心梗前兆\n- 表情痛苦，手捂胸口\n- 出汗过多，面色苍白\n- 突然站立不稳\n\n#### 2.2 脑梗前兆\n- 口角歪斜，流口水\n- 单侧肢体无力\n- 言语不清，表情僵硬\n\n#### 2.3 突发疾病\n- 突然倒地抽搐\n- 长时间静止不动\n- 异常痛苦表情\n\n### 3. 异常行为（behavior）\n- **剧烈运动**：快速奔跑、打斗等\n- **长时间静止**：同一姿势保持超过30分钟\n- **区域闯入**：进入禁止区域\n- **物品遗留**：异常物品出现在监测区域\n- **人员聚集**：超过5人聚集超过10分钟\n\n## 二、预警等级标准\n\n| 等级 | 颜色 | 置信度范围 | 处理策略 |\n|------|------|-----------|---------|\n| 高风险 | 红色 | ≥0.9 | 立即触发多渠道报警，通知相关人员 |\n| 中风险 | 黄色 | 0.7-0.9 | 记录事件，自动抓拍图片，通知管理员关注 |\n| 低风险 | 蓝色 | 0.5-0.7 | 仅记录日志，不主动通知 |\n\n## 三、预警内容模板\n```\n🚨 高风险事件预警\n⏰ 时间: 2024-01-01 12:00:00\n⚠️ 类型: 跌倒风险\n📊 置信度: 0.95\n📝 描述: 检测到人员倒地，已超过10秒未起身\n💡 建议: 立即查看现场情况，必要时拨打急救电话\n📍 位置: 客厅摄像头\n```\n\n## 四、处理建议库\n\n### 跌倒事件\n1. 立即查看现场，确认人员意识状态\n2. 如有受伤，不要随意移动，拨打120\n3. 检查周边环境，消除安全隐患\n4. 必要时联系家属\n\n### 心梗/脑梗前兆\n1. 立即拨打120急救电话\n2. 让患者保持平躺，不要移动\n3. 如有病史，服用对应急救药物\n4. 密切观察生命体征\n\n### 异常闯入\n1. 查看监控确认人员身份\n2. 必要时启动安防报警\n3. 通知安保人员前往处理\n4. 保存监控录像作为证据\n\nFile v999.999.999: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 v999.999.999:scripts/config.yaml\n\n{}\n\nFile v999.999.999:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v999.999.999: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 v999.999.999: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 v999.999.999: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 v999.999.999:skill-card.md\n\n## Description: <br>\nSupports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and operators use this skill to submit videos, images, URLs, or camera streams for high-risk behavior and health-risk analysis, including fall detection, abnormal behavior detection, and alert-oriented structured reports. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Sensitive videos, images, camera streams, and inferred health-risk results may be sent to publisher-operated external services. <br>\nMitigation: Use only with informed approval for the media being analyzed, restrict use to approved endpoints, and avoid submitting content that should not leave the user's environment. <br>\nRisk: The skill may create or reuse an identity, store service tokens, and query identity-linked report history. <br>\nMitigation: Require clear disclosure of identity creation, token storage, retention, and deletion behavior before normal approval; isolate workspaces and remove local tokens or report history when the task is complete. <br>\nRisk: Health-risk and surveillance outputs could be wrong or incomplete. <br>\nMitigation: Treat results as advisory and require human review before medical, safety, security, or emergency-response decisions. <br>\nRisk: Alerts and report links may expose sensitive incidents to unintended recipients. <br>\nMitigation: Confirm alert recipients, access controls, and report-link sharing behavior before enabling automated warnings. <br>\n\n\n## Reference(s): <br>\n- [Risk Categories and Alert Levels](references/risk_categories.md) <br>\n- [API Documentation](skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill Demo](https://lifeemergence.com/sample.html) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, JSON, Shell commands, Files] <br>\n**Output Format:** [Markdown and structured JSON analysis reports with optional saved output files and report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May upload media or submit media URLs to publisher-operated external services and may query identity-linked report history.] <br>\n\n## Skill Version(s): <br>\n999.999.999 (source: ClawHub release metadata; artifact frontmatter version is 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 v999.999.999:requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v999.999.999:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nArchive v1.0.7: 33 files, 40531 bytes\n\nFiles: __init__.py (0b), references/risk_categories.md (2211b), requirements.txt (45b), scripts/__init__.py (31b), scripts/config.py (617b), scripts/config.yaml (3b), scripts/risk_analysis.py (3178b), scripts/skill.py (570b), skill-card.md (2671b), SKILL.md (11224b), 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 (141b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"risk-analysis\"\ndescription: \"Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示\"\nversion: \"1.0.6\"\nlicense: \"MIT-0\"\n---\n\n# ⚠️ High-Risk Behavior Identification & Analysis Tool | 高风险行为识别分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **高风险行为识别分析工具** |\n| 🎯 核心目标 | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `OPEN_PERSON_RISK_ANALYSIS` |\n\nDeeply integrating Computer Vision, Pose Estimation, and Multimodal Health Risk Recognition algorithms, this feature\nconstructs an intelligent early warning system designed for high-risk behaviors and sudden health events. The system\nanalyzes individual behavior patterns and physiological manifestations in real-time from video or images. It precisely\ncaptures high-risk behaviors such as sudden posture changes during falls or prolonged stillness indicating abnormal\nretention. Simultaneously, by analyzing visual cues like facial microcirculation changes, abnormal skin color, and\ndecreased limb coordination, it assists in identifying precursors to sudden diseases such as heart attacks and\nstrokes.  \nLeveraging temporal behavior modeling and risk assessment models, the system effectively distinguishes between daily\nactivities and potential dangers. Once an anomaly is detected, it immediately triggers a multi-level warning mechanism,\nnotifying family members and caregivers via APP push, SMS, and voice broadcasts. It synchronously transmits anomaly\nfootage, risk type, and location information. This provides 24/7, unobtrusive, and precise safety protection for\nhigh-risk groups like the elderly living alone and chronic disease patients, realizing a closed-loop health management\nsystem that shifts from passive response to active prevention.\n\n本功能深度融合计算机视觉、姿态估计与多模态健康风险识别算法，构建了一套面向高危行为与突发健康事件的智能预警系统。系统可实时解析视频或图片中的个体行为模式与生理表征，精准捕捉老人跌倒时的姿态骤变、异常滞留时的长时间静止等高危行为，同时通过面部微循环变化、肤色异常、肢体协调性下降等视觉线索，辅助识别心梗、脑梗等突发疾病的前兆特征。借助时序行为建模与风险等级评估模型，系统能够有效区分日常活动与潜在危险，一旦检测到异常，立即触发分级预警机制，通过APP推送、短信、语音播报等多渠道通知家属及护理人员，并同步发送异常画面、风险类型与位置信息，为独居老人、慢性病患者等高风险群体提供7×24小时无感化、精准化的安全守护，实现从被动应对到主动预防的健康管理闭环\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频或图片分析识别高风险行为和健康风险，及时发出预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跌倒识别 |\n| 2 | 异常行为检测 |\n| 3 | 心梗脑梗前兆识别 |\n| 4 | 健康风险评估 |\n| 5 | 实时预警 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **仅当用户明确提及\"风险分析\"、\"跌倒\"、\"跌倒检测\"、\"行为识别\"、\"安全监测\"、\"老人看护\"、\"风险识别\"、\"高危风险识别\" |\n| 🖼️ 支持输入 | 本地视频/图片文件、网络视频/图片URL、实时流地址 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.risk_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.risk_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明：scripts脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  opencv-python>=4.5.5\n  numpy>=1.21.0\n  pillow>=9.0.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备输入源 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行风险分析 | 调用 `-m scripts.risk_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 获取分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地文件路径（与--url二选一） | 适用于本地文件分析 |\n| `--url` | 网络URL或实时流地址（与--input二选一） | API 服务自动下载网络资源 |\n| `--list` | 列出该 open-id 的历史风险分析报告（与--input/--url互斥） | 用于云端历史报告查询 |\n| `--page-num` | 分页页码，配合--list使用（默认 1） | 按需填写 |\n| `--page-size` | 分页大小，配合--list使用（默认 30） | 按需填写 |\n| `--api-url` | API服务地址（可选，使用默认值） | 按需填写 |\n| `--mode` | 分析模式（all/fall/health/behavior，默认all） | 按需填写 |\n| `--threshold` | 预警阈值（0.1-1.0，默认0.8） | 按需填写 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n| `--alert` | 是否开启自动预警（true/false，默认false） | 按需填写 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/risk_analysis.py`](scripts/risk_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/risk_categories.md`](references/risk_categories.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov/jpg/png/rtsp/http/https |\n| 📁 格式支持 | 最大支持视频大小：200MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供参考，不能替代专业安防和医疗诊断 |\n| 🔎 使用提醒 | 高风险事件会自动记录到日志目录 |\n| 📁 格式支持 | 实时流分析支持持续监测，检测到风险立即触发预警 |\n| 🚫 脚本限制 | **禁止临时生成脚本**：执行检测或历史报告查询时，只能使用本技能自带脚本，不得临时生成替代脚本 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地视频文件\npython -m scripts.risk_analysis --input /path/to/video.mp4\n\n# 分析网络视频URL\npython -m scripts.risk_analysis --url https://example.com/video.mp4\n\n# 跌倒识别模式（只检测跌倒事件）\npython -m scripts.risk_analysis --input video.mp4 --mode fall\n\n# 实时流监测（RTSP摄像头）\npython -m scripts.risk_analysis --url rtsp://camera_ip:554/stream --alert true\n\n# 自定义预警阈值\npython -m scripts.risk_analysis --input video.mp4 --threshold 0.7\n\n# 保存结果到文件\npython -m scripts.risk_analysis --input video.mp4 --output result.json\n\n# 📋 列出指定用户的历史风险分析报告\npython -m scripts.risk_analysis --list\n\n# 列出指定用户的历史报告，自定义分页\npython -m scripts.risk_analysis --list --page-num 2 --page-size 20\n```\n\n## ⚠️ 风险类型说明 | Risk Type Description\n| 维度/类型 | 说明 |\n|---|---|\n| 跌倒风险（fall） | 识别人员跌倒事件，置信度>0.8触发高等级预警 |\n| 健康风险（health） | 识别心梗/脑梗前兆、突发疾病症状等 |\n| 异常行为（behavior） | 识别剧烈运动、长时间静止、闯入等异常行为 |\n| 综合模式（all） | 同时检测所有类型风险 |\n\n## 🚦 预警等级 | Alert Levels\n| 等级/类型 | 说明 |\n|---|---|\n| **高风险（红色）** | 置信度>0.9，立即触发报警 |\n| **中风险（黄色）** | 置信度0.7-0.9，记录并关注 |\n| **低风险（蓝色）** | 置信度0.5-0.7，仅记录日志 |\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"new-smyx-risk-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1783321115766\n}\n\nFile v1.0.7:references/risk_categories.md\n\n# 风险分类标准与预警等级说明\n\n## 一、风险类型分类\n\n### 1. 跌倒风险（fall）\n**识别场景**：\n- 人员突然倒地且长时间未起身\n- 身体倾斜角度超过阈值\n- 运动轨迹突然变化\n\n**风险等级判定**：\n- 高风险（≥0.9）：明确倒地且无动作\n- 中风险（0.7-0.9）：疑似跌倒，姿态异常\n- 低风险（<0.7）：短暂弯腰或坐下\n\n### 2. 健康风险（health）\n#### 2.1 心梗前兆\n- 表情痛苦，手捂胸口\n- 出汗过多，面色苍白\n- 突然站立不稳\n\n#### 2.2 脑梗前兆\n- 口角歪斜，流口水\n- 单侧肢体无力\n- 言语不清，表情僵硬\n\n#### 2.3 突发疾病\n- 突然倒地抽搐\n- 长时间静止不动\n- 异常痛苦表情\n\n### 3. 异常行为（behavior）\n- **剧烈运动**：快速奔跑、打斗等\n- **长时间静止**：同一姿势保持超过30分钟\n- **区域闯入**：进入禁止区域\n- **物品遗留**：异常物品出现在监测区域\n- **人员聚集**：超过5人聚集超过10分钟\n\n## 二、预警等级标准\n\n| 等级 | 颜色 | 置信度范围 | 处理策略 |\n|------|------|-----------|---------|\n| 高风险 | 红色 | ≥0.9 | 立即触发多渠道报警，通知相关人员 |\n| 中风险 | 黄色 | 0.7-0.9 | 记录事件，自动抓拍图片，通知管理员关注 |\n| 低风险 | 蓝色 | 0.5-0.7 | 仅记录日志，不主动通知 |\n\n## 三、预警内容模板\n```\n🚨 高风险事件预警\n⏰ 时间: 2024-01-01 12:00:00\n⚠️ 类型: 跌倒风险\n📊 置信度: 0.95\n📝 描述: 检测到人员倒地，已超过10秒未起身\n💡 建议: 立即查看现场情况，必要时拨打急救电话\n📍 位置: 客厅摄像头\n```\n\n## 四、处理建议库\n\n### 跌倒事件\n1. 立即查看现场，确认人员意识状态\n2. 如有受伤，不要随意移动，拨打120\n3. 检查周边环境，消除安全隐患\n4. 必要时联系家属\n\n### 心梗/脑梗前兆\n1. 立即拨打120急救电话\n2. 让患者保持平躺，不要移动\n3. 如有病史，服用对应急救药物\n4. 密切观察生命体征\n\n### 异常闯入\n1. 查看监控确认人员身份\n2. 必要时启动安防报警\n3. 通知安保人员前往处理\n4. 保存监控录像作为证据\n\nFile v1.0.7:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.7:scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.7:skill-card.md\n\n## Description: <br>\nSupports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users, caregivers, care teams, and developers use this skill to analyze submitted videos, images, or media URLs for fall, abnormal behavior, and health-risk signals, and to retrieve cloud-hosted report history. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Sensitive videos, images, inferred risk events, location metadata, and report metadata may be sent to provider cloud services. <br>\nMitigation: Use the skill only with explicit consent, confirm where media and reports are stored, and verify retention and deletion controls before deployment. <br>\nRisk: Persistent identity, token, notification, and cloud history flows may expose personal monitoring data without enough clear user control. <br>\nMitigation: Restrict use to administrator-configured environments, disable automatic notifications until reviewed, and confirm how open-id values, tokens, logs, and historical reports can be removed. <br>\nRisk: Video-based health and safety risk analysis can produce incorrect or incomplete alerts. <br>\nMitigation: Treat outputs as advisory, review results before operational action, and do not use the skill as a substitute for professional medical diagnosis or emergency response procedures. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/new-smyx-risk-analysis) <br>\n- [Skill Demo](https://lifeemergence.com/sample.html) <br>\n- [Risk Categories](references/risk_categories.md) <br>\n- [API Documentation](skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, JSON, Guidance] <br>\n**Output Format:** [Markdown with structured JSON report content and report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include cloud report links and cloud-hosted history query results.] <br>\n\n## Skill Version(s): <br>\n1.0.7 (source: server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.7:requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.7:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nArchive v1.0.6: 33 files, 40397 bytes\n\nFiles: __init__.py (0b), references/risk_categories.md (2211b), requirements.txt (45b), scripts/__init__.py (31b), scripts/config.py (617b), scripts/config.yaml (3b), scripts/risk_analysis.py (3178b), scripts/skill.py (570b), skill-card.md (2875b), SKILL.md (11224b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (22801b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28605b), _meta.json (141b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"risk-analysis\"\ndescription: \"Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示\"\nversion: \"1.0.5\"\nlicense: \"MIT-0\"\n---\n\n# ⚠️ High-Risk Behavior Identification & Analysis Tool | 高风险行为识别分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **高风险行为识别分析工具** |\n| 🎯 核心目标 | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `OPEN_PERSON_RISK_ANALYSIS` |\n\nDeeply integrating Computer Vision, Pose Estimation, and Multimodal Health Risk Recognition algorithms, this feature\nconstructs an intelligent early warning system designed for high-risk behaviors and sudden health events. The system\nanalyzes individual behavior patterns and physiological manifestations in real-time from video or images. It precisely\ncaptures high-risk behaviors such as sudden posture changes during falls or prolonged stillness indicating abnormal\nretention. Simultaneously, by analyzing visual cues like facial microcirculation changes, abnormal skin color, and\ndecreased limb coordination, it assists in identifying precursors to sudden diseases such as heart attacks and\nstrokes.  \nLeveraging temporal behavior modeling and risk assessment models, the system effectively distinguishes between daily\nactivities and potential dangers. Once an anomaly is detected, it immediately triggers a multi-level warning mechanism,\nnotifying family members and caregivers via APP push, SMS, and voice broadcasts. It synchronously transmits anomaly\nfootage, risk type, and location information. This provides 24/7, unobtrusive, and precise safety protection for\nhigh-risk groups like the elderly living alone and chronic disease patients, realizing a closed-loop health management\nsystem that shifts from passive response to active prevention.\n\n本功能深度融合计算机视觉、姿态估计与多模态健康风险识别算法，构建了一套面向高危行为与突发健康事件的智能预警系统。系统可实时解析视频或图片中的个体行为模式与生理表征，精准捕捉老人跌倒时的姿态骤变、异常滞留时的长时间静止等高危行为，同时通过面部微循环变化、肤色异常、肢体协调性下降等视觉线索，辅助识别心梗、脑梗等突发疾病的前兆特征。借助时序行为建模与风险等级评估模型，系统能够有效区分日常活动与潜在危险，一旦检测到异常，立即触发分级预警机制，通过APP推送、短信、语音播报等多渠道通知家属及护理人员，并同步发送异常画面、风险类型与位置信息，为独居老人、慢性病患者等高风险群体提供7×24小时无感化、精准化的安全守护，实现从被动应对到主动预防的健康管理闭环\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频或图片分析识别高风险行为和健康风险，及时发出预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跌倒识别 |\n| 2 | 异常行为检测 |\n| 3 | 心梗脑梗前兆识别 |\n| 4 | 健康风险评估 |\n| 5 | 实时预警 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **仅当用户明确提及\"风险分析\"、\"跌倒\"、\"跌倒检测\"、\"行为识别\"、\"安全监测\"、\"老人看护\"、\"风险识别\"、\"高危风险识别\" |\n| 🖼️ 支持输入 | 本地视频/图片文件、网络视频/图片URL、实时流地址 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.risk_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.risk_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明：scripts脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  opencv-python>=4.5.5\n  numpy>=1.21.0\n  pillow>=9.0.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备输入源 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行风险分析 | 调用 `-m scripts.risk_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 获取分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地文件路径（与--url二选一） | 适用于本地文件分析 |\n| `--url` | 网络URL或实时流地址（与--input二选一） | API 服务自动下载网络资源 |\n| `--list` | 列出该 open-id 的历史风险分析报告（与--input/--url互斥） | 用于云端历史报告查询 |\n| `--page-num` | 分页页码，配合--list使用（默认 1） | 按需填写 |\n| `--page-size` | 分页大小，配合--list使用（默认 30） | 按需填写 |\n| `--api-url` | API服务地址（可选，使用默认值） | 按需填写 |\n| `--mode` | 分析模式（all/fall/health/behavior，默认all） | 按需填写 |\n| `--threshold` | 预警阈值（0.1-1.0，默认0.8） | 按需填写 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n| `--alert` | 是否开启自动预警（true/false，默认false） | 按需填写 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/risk_analysis.py`](scripts/risk_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/risk_categories.md`](references/risk_categories.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov/jpg/png/rtsp/http/https |\n| 📁 格式支持 | 最大支持视频大小：200MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供参考，不能替代专业安防和医疗诊断 |\n| 🔎 使用提醒 | 高风险事件会自动记录到日志目录 |\n| 📁 格式支持 | 实时流分析支持持续监测，检测到风险立即触发预警 |\n| 🚫 脚本限制 | **禁止临时生成脚本**：执行检测或历史报告查询时，只能使用本技能自带脚本，不得临时生成替代脚本 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地视频文件\npython -m scripts.risk_analysis --input /path/to/video.mp4\n\n# 分析网络视频URL\npython -m scripts.risk_analysis --url https://example.com/video.mp4\n\n# 跌倒识别模式（只检测跌倒事件）\npython -m scripts.risk_analysis --input video.mp4 --mode fall\n\n# 实时流监测（RTSP摄像头）\npython -m scripts.risk_analysis --url rtsp://camera_ip:554/stream --alert true\n\n# 自定义预警阈值\npython -m scripts.risk_analysis --input video.mp4 --threshold 0.7\n\n# 保存结果到文件\npython -m scripts.risk_analysis --input video.mp4 --output result.json\n\n# 📋 列出指定用户的历史风险分析报告\npython -m scripts.risk_analysis --list\n\n# 列出指定用户的历史报告，自定义分页\npython -m scripts.risk_analysis --list --page-num 2 --page-size 20\n```\n\n## ⚠️ 风险类型说明 | Risk Type Description\n| 维度/类型 | 说明 |\n|---|---|\n| 跌倒风险（fall） | 识别人员跌倒事件，置信度>0.8触发高等级预警 |\n| 健康风险（health） | 识别心梗/脑梗前兆、突发疾病症状等 |\n| 异常行为（behavior） | 识别剧烈运动、长时间静止、闯入等异常行为 |\n| 综合模式（all） | 同时检测所有类型风险 |\n\n## 🚦 预警等级 | Alert Levels\n| 等级/类型 | 说明 |\n|---|---|\n| **高风险（红色）** | 置信度>0.9，立即触发报警 |\n| **中风险（黄色）** | 置信度0.7-0.9，记录并关注 |\n| **低风险（蓝色）** | 置信度0.5-0.7，仅记录日志 |\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"new-smyx-risk-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1782873626160\n}\n\nFile v1.0.6:references/risk_categories.md\n\n# 风险分类标准与预警等级说明\n\n## 一、风险类型分类\n\n### 1. 跌倒风险（fall）\n**识别场景**：\n- 人员突然倒地且长时间未起身\n- 身体倾斜角度超过阈值\n- 运动轨迹突然变化\n\n**风险等级判定**：\n- 高风险（≥0.9）：明确倒地且无动作\n- 中风险（0.7-0.9）：疑似跌倒，姿态异常\n- 低风险（<0.7）：短暂弯腰或坐下\n\n### 2. 健康风险（health）\n#### 2.1 心梗前兆\n- 表情痛苦，手捂胸口\n- 出汗过多，面色苍白\n- 突然站立不稳\n\n#### 2.2 脑梗前兆\n- 口角歪斜，流口水\n- 单侧肢体无力\n- 言语不清，表情僵硬\n\n#### 2.3 突发疾病\n- 突然倒地抽搐\n- 长时间静止不动\n- 异常痛苦表情\n\n### 3. 异常行为（behavior）\n- **剧烈运动**：快速奔跑、打斗等\n- **长时间静止**：同一姿势保持超过30分钟\n- **区域闯入**：进入禁止区域\n- **物品遗留**：异常物品出现在监测区域\n- **人员聚集**：超过5人聚集超过10分钟\n\n## 二、预警等级标准\n\n| 等级 | 颜色 | 置信度范围 | 处理策略 |\n|------|------|-----------|---------|\n| 高风险 | 红色 | ≥0.9 | 立即触发多渠道报警，通知相关人员 |\n| 中风险 | 黄色 | 0.7-0.9 | 记录事件，自动抓拍图片，通知管理员关注 |\n| 低风险 | 蓝色 | 0.5-0.7 | 仅记录日志，不主动通知 |\n\n## 三、预警内容模板\n```\n🚨 高风险事件预警\n⏰ 时间: 2024-01-01 12:00:00\n⚠️ 类型: 跌倒风险\n📊 置信度: 0.95\n📝 描述: 检测到人员倒地，已超过10秒未起身\n💡 建议: 立即查看现场情况，必要时拨打急救电话\n📍 位置: 客厅摄像头\n```\n\n## 四、处理建议库\n\n### 跌倒事件\n1. 立即查看现场，确认人员意识状态\n2. 如有受伤，不要随意移动，拨打120\n3. 检查周边环境，消除安全隐患\n4. 必要时联系家属\n\n### 心梗/脑梗前兆\n1. 立即拨打120急救电话\n2. 让患者保持平躺，不要移动\n3. 如有病史，服用对应急救药物\n4. 密切观察生命体征\n\n### 异常闯入\n1. 查看监控确认人员身份\n2. 必要时启动安防报警\n3. 通知安保人员前往处理\n4. 保存监控录像作为证据\n\nFile v1.0.6:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.6:scripts/config.yaml\n\n{}\n\nFile v1.0.6:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.6:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.6:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.6:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.6:skill-card.md\n\n## Description: <br>\nSupports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and caregiving or safety-monitoring workflows use this skill to submit video, image, URL, or stream inputs for high-risk behavior and health-risk analysis, including falls, abnormal behavior, and possible heart-attack or stroke warning signs. Results are advisory and are not a substitute for professional security review or medical diagnosis. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Private images, videos, camera streams, or media URLs may be uploaded to a third-party cloud service. <br>\nMitigation: Install and run only where users have approval for the people, locations, and health-related media being analyzed; avoid submitting sensitive media without that approval. <br>\nRisk: The skill may silently create or reuse a local identity, register or log in remotely, and associate cloud reports with that identity. <br>\nMitigation: Review identity and account behavior before deployment, and use the skill only in environments where automatic identity association is acceptable. <br>\nRisk: Account tokens may be stored in a local workspace database without clear user control. <br>\nMitigation: Limit installation to trusted workspaces, restrict filesystem access, and remove local token stores when the skill is no longer needed. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/new-smyx-risk-analysis) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [Risk categories and alert levels](artifact/references/risk_categories.md) <br>\n- [API documentation](artifact/skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, JSON, Guidance] <br>\n**Output Format:** [Markdown text with structured analysis results, recommendations, report-history tables, and report links; JSON-style detail may be included when returned by the service.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May save results to a user-selected output file.] <br>\n\n## Skill Version(s): <br>\n1.0.6 (source: server release metadata; artifact frontmatter lists 1.0.5) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.6:requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.6:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nArchive v1.0.5: 33 files, 37508 bytes\n\nFiles: __init__.py (0b), references/risk_categories.md (2211b), requirements.txt (45b), scripts/__init__.py (31b), scripts/config.py (617b), scripts/config.yaml (3b), scripts/risk_analysis.py (3178b), scripts/skill.py (570b), skill-card.md (2835b), SKILL.md (11224b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (22801b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (13468b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (23409b), _meta.json (141b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: \"risk-analysis\"\ndescription: \"Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示\"\nversion: \"1.0.5\"\nlicense: \"MIT-0\"\n---\n\n# ⚠️ High-Risk Behavior Identification & Analysis Tool | 高风险行为识别分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **高风险行为识别分析工具** |\n| 🎯 核心目标 | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `OPEN_PERSON_RISK_ANALYSIS` |\n\nDeeply integrating Computer Vision, Pose Estimation, and Multimodal Health Risk Recognition algorithms, this feature\nconstructs an intelligent early warning system designed for high-risk behaviors and sudden health events. The system\nanalyzes individual behavior patterns and physiological manifestations in real-time from video or images. It precisely\ncaptures high-risk behaviors such as sudden posture changes during falls or prolonged stillness indicating abnormal\nretention. Simultaneously, by analyzing visual cues like facial microcirculation changes, abnormal skin color, and\ndecreased limb coordination, it assists in identifying precursors to sudden diseases such as heart attacks and\nstrokes.  \nLeveraging temporal behavior modeling and risk assessment models, the system effectively distinguishes between daily\nactivities and potential dangers. Once an anomaly is detected, it immediately triggers a multi-level warning mechanism,\nnotifying family members and caregivers via APP push, SMS, and voice broadcasts. It synchronously transmits anomaly\nfootage, risk type, and location information. This provides 24/7, unobtrusive, and precise safety protection for\nhigh-risk groups like the elderly living alone and chronic disease patients, realizing a closed-loop health management\nsystem that shifts from passive response to active prevention.\n\n本功能深度融合计算机视觉、姿态估计与多模态健康风险识别算法，构建了一套面向高危行为与突发健康事件的智能预警系统。系统可实时解析视频或图片中的个体行为模式与生理表征，精准捕捉老人跌倒时的姿态骤变、异常滞留时的长时间静止等高危行为，同时通过面部微循环变化、肤色异常、肢体协调性下降等视觉线索，辅助识别心梗、脑梗等突发疾病的前兆特征。借助时序行为建模与风险等级评估模型，系统能够有效区分日常活动与潜在危险，一旦检测到异常，立即触发分级预警机制，通过APP推送、短信、语音播报等多渠道通知家属及护理人员，并同步发送异常画面、风险类型与位置信息，为独居老人、慢性病患者等高风险群体提供7×24小时无感化、精准化的安全守护，实现从被动应对到主动预防的健康管理闭环\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频或图片分析识别高风险行为和健康风险，及时发出预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跌倒识别 |\n| 2 | 异常行为检测 |\n| 3 | 心梗脑梗前兆识别 |\n| 4 | 健康风险评估 |\n| 5 | 实时预警 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **仅当用户明确提及\"风险分析\"、\"跌倒\"、\"跌倒检测\"、\"行为识别\"、\"安全监测\"、\"老人看护\"、\"风险识别\"、\"高危风险识别\" |\n| 🖼️ 支持输入 | 本地视频/图片文件、网络视频/图片URL、实时流地址 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.risk_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.risk_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明：scripts脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  opencv-python>=4.5.5\n  numpy>=1.21.0\n  pillow>=9.0.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备输入源 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行风险分析 | 调用 `-m scripts.risk_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 获取分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地文件路径（与--url二选一） | 适用于本地文件分析 |\n| `--url` | 网络URL或实时流地址（与--input二选一） | API 服务自动下载网络资源 |\n| `--list` | 列出该 open-id 的历史风险分析报告（与--input/--url互斥） | 用于云端历史报告查询 |\n| `--page-num` | 分页页码，配合--list使用（默认 1） | 按需填写 |\n| `--page-size` | 分页大小，配合--list使用（默认 30） | 按需填写 |\n| `--api-url` | API服务地址（可选，使用默认值） | 按需填写 |\n| `--mode` | 分析模式（all/fall/health/behavior，默认all） | 按需填写 |\n| `--threshold` | 预警阈值（0.1-1.0，默认0.8） | 按需填写 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n| `--alert` | 是否开启自动预警（true/false，默认false） | 按需填写 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/risk_analysis.py`](scripts/risk_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/risk_categories.md`](references/risk_categories.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov/jpg/png/rtsp/http/https |\n| 📁 格式支持 | 最大支持视频大小：200MB |\n| 🧑‍⚖️ 结果性质 | 分析结果仅供参考，不能替代专业安防和医疗诊断 |\n| 🔎 使用提醒 | 高风险事件会自动记录到日志目录 |\n| 📁 格式支持 | 实时流分析支持持续监测，检测到风险立即触发预警 |\n| 🚫 脚本限制 | **禁止临时生成脚本**：执行检测或历史报告查询时，只能使用本技能自带脚本，不得临时生成替代脚本 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地视频文件\npython -m scripts.risk_analysis --input /path/to/video.mp4\n\n# 分析网络视频URL\npython -m scripts.risk_analysis --url https://example.com/video.mp4\n\n# 跌倒识别模式（只检测跌倒事件）\npython -m scripts.risk_analysis --input video.mp4 --mode fall\n\n# 实时流监测（RTSP摄像头）\npython -m scripts.risk_analysis --url rtsp://camera_ip:554/stream --alert true\n\n# 自定义预警阈值\npython -m scripts.risk_analysis --input video.mp4 --threshold 0.7\n\n# 保存结果到文件\npython -m scripts.risk_analysis --input video.mp4 --output result.json\n\n# 📋 列出指定用户的历史风险分析报告\npython -m scripts.risk_analysis --list\n\n# 列出指定用户的历史报告，自定义分页\npython -m scripts.risk_analysis --list --page-num 2 --page-size 20\n```\n\n## ⚠️ 风险类型说明 | Risk Type Description\n| 维度/类型 | 说明 |\n|---|---|\n| 跌倒风险（fall） | 识别人员跌倒事件，置信度>0.8触发高等级预警 |\n| 健康风险（health） | 识别心梗/脑梗前兆、突发疾病症状等 |\n| 异常行为（behavior） | 识别剧烈运动、长时间静止、闯入等异常行为 |\n| 综合模式（all） | 同时检测所有类型风险 |\n\n## 🚦 预警等级 | Alert Levels\n| 等级/类型 | 说明 |\n|---|---|\n| **高风险（红色）** | 置信度>0.9，立即触发报警 |\n| **中风险（黄色）** | 置信度0.7-0.9，记录并关注 |\n| **低风险（蓝色）** | 置信度0.5-0.7，仅记录日志 |\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"new-smyx-risk-analysis\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1782377905560\n}\n\nFile v1.0.5:references/risk_categories.md\n\n# 风险分类标准与预警等级说明\n\n## 一、风险类型分类\n\n### 1. 跌倒风险（fall）\n**识别场景**：\n- 人员突然倒地且长时间未起身\n- 身体倾斜角度超过阈值\n- 运动轨迹突然变化\n\n**风险等级判定**：\n- 高风险（≥0.9）：明确倒地且无动作\n- 中风险（0.7-0.9）：疑似跌倒，姿态异常\n- 低风险（<0.7）：短暂弯腰或坐下\n\n### 2. 健康风险（health）\n#### 2.1 心梗前兆\n- 表情痛苦，手捂胸口\n- 出汗过多，面色苍白\n- 突然站立不稳\n\n#### 2.2 脑梗前兆\n- 口角歪斜，流口水\n- 单侧肢体无力\n- 言语不清，表情僵硬\n\n#### 2.3 突发疾病\n- 突然倒地抽搐\n- 长时间静止不动\n- 异常痛苦表情\n\n### 3. 异常行为（behavior）\n- **剧烈运动**：快速奔跑、打斗等\n- **长时间静止**：同一姿势保持超过30分钟\n- **区域闯入**：进入禁止区域\n- **物品遗留**：异常物品出现在监测区域\n- **人员聚集**：超过5人聚集超过10分钟\n\n## 二、预警等级标准\n\n| 等级 | 颜色 | 置信度范围 | 处理策略 |\n|------|------|-----------|---------|\n| 高风险 | 红色 | ≥0.9 | 立即触发多渠道报警，通知相关人员 |\n| 中风险 | 黄色 | 0.7-0.9 | 记录事件，自动抓拍图片，通知管理员关注 |\n| 低风险 | 蓝色 | 0.5-0.7 | 仅记录日志，不主动通知 |\n\n## 三、预警内容模板\n```\n🚨 高风险事件预警\n⏰ 时间: 2024-01-01 12:00:00\n⚠️ 类型: 跌倒风险\n📊 置信度: 0.95\n📝 描述: 检测到人员倒地，已超过10秒未起身\n💡 建议: 立即查看现场情况，必要时拨打急救电话\n📍 位置: 客厅摄像头\n```\n\n## 四、处理建议库\n\n### 跌倒事件\n1. 立即查看现场，确认人员意识状态\n2. 如有受伤，不要随意移动，拨打120\n3. 检查周边环境，消除安全隐患\n4. 必要时联系家属\n\n### 心梗/脑梗前兆\n1. 立即拨打120急救电话\n2. 让患者保持平躺，不要移动\n3. 如有病史，服用对应急救药物\n4. 密切观察生命体征\n\n### 异常闯入\n1. 查看监控确认人员身份\n2. 必要时启动安防报警\n3. 通知安保人员前往处理\n4. 保存监控录像作为证据\n\nFile v1.0.5:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.5:scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.5:skill-card.md\n\n## Description: <br>\nAnalyzes video or images to identify falls, abnormal behavior, and possible health-risk signals, then returns structured risk reports, warnings, recommendations, and report links. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users, care teams, and developers use this skill to submit video or image files, media URLs, or streams for high-risk behavior and health-risk analysis. The skill can also query cloud-stored historical analysis reports associated with the current internal user identity. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Sensitive videos, images, analysis metadata, and identity-linked report history may be sent to the vendor service. <br>\nMitigation: Use only with media and report history that are approved for vendor processing, and avoid sensitive household, medical, or surveillance footage unless retention and access controls are understood. <br>\nRisk: The skill can create or reuse a local identity and store service tokens in the workspace data directory. <br>\nMitigation: Run it in a controlled workspace, restrict access to generated data, and review or remove stored identity and token data after use. <br>\nRisk: Risk analysis output may affect safety or health decisions but is not a substitute for professional security or medical assessment. <br>\nMitigation: Treat results as advisory, require human review for alerts, and escalate urgent safety or health concerns to qualified responders. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/new-smyx-risk-analysis) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [Risk classification standards and alert levels](references/risk_categories.md) <br>\n- [API interface documentation](skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, JSON, Files, Guidance] <br>\n**Output Format:** [Markdown text with JSON-like structured analysis results and optional saved output files] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include risk labels, confidence-style levels, recommendations, report export links, and paginated history listings returned by the vendor service.] <br>\n\n## Skill Version(s): <br>\n1.0.5 (source: server release metadata and SKILL.md frontmatter) <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:requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.5:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3","readmeExcerpt":"Skill: High-Risk Behavior Identification & Analysis Tool | 高风险行为识别分析工具 Owner: smyx-sunjinhui Summary: Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示 Tags: latest:999.999.1005 Version history: v999.999.1","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.risk_analysis --list"},{"language":"text","snippet":"requests>=2.28.0\n  opencv-python>=4.5.5\n  numpy>=1.21.0\n  pillow>=9.0.0"},{"language":"bash","snippet":"# 分析本地视频文件\npython -m scripts.risk_analysis --input /path/to/video.mp4\n\n# 分析网络视频URL\npython -m scripts.risk_analysis --url https://example.com/video.mp4\n\n# 跌倒识别模式（只检测跌倒事件）\npython -m scripts.risk_analysis --input video.mp4 --mode fall\n\n# 实时流监测（RTSP摄像头）\npython -m scripts.risk_analysis --url rtsp://camera_ip:554/stream --alert true\n\n# 自定义预警阈值\npython -m scripts.risk_analysis --input video.mp4 --threshold 0.7\n\n# 保存结果到文件\npython -m scripts.risk_analysis --input video.mp4 --output result.json\n\n# 📋 列出指定用户的历史风险分析报告\npython -m scripts.risk_analysis --list\n\n# 列出指定用户的历史报告，自定义分页\npython -m scripts.risk_analysis --list --page-num 2 --page-size 20"},{"language":"text","snippet":"🚨 高风险事件预警\n⏰ 时间: 2024-01-01 12:00:00\n⚠️ 类型: 跌倒风险\n📊 置信度: 0.95\n📝 描述: 检测到人员倒地，已超过10秒未起身\n💡 建议: 立即查看现场情况，必要时拨打急救电话\n📍 位置: 客厅摄像头"},{"language":"bash","snippet":"python -m scripts.risk_analysis --list"},{"language":"text","snippet":"requests>=2.28.0\n  opencv-python>=4.5.5\n  numpy>=1.21.0\n  pillow>=9.0.0"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"risk-analysis\"\ndescription: \"Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示\"\nversion: \"1.0.13\"\nlicense: \"MIT-0\"\n---\n\n# ⚠️ High-Risk Behavior Identification & Analysis Tool | 高风险行为识别分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **高风险行为识别分析工具** |\n| 🎯 核心目标 | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `OPEN_PERSON_RISK_ANALYSIS` |\n\nDeeply integrating Computer Vision, Pose Estimation, and Multimodal Health Risk Recognition algorithms, this feature\nconstructs an intelligent early warning system designed for high-risk behaviors and sudden health events. The system\nanalyzes individual behavior patterns and physiological manifestations in real-time from video or images. It precisely\ncaptures high-risk behaviors such as sudden posture changes during falls or prolonged stillness indicating abnormal\nretention. Simultaneously, by analyzing visual cues like facial microcirculation changes, abnormal skin color, and\ndecreased limb coordination, it assists in identifying precursors to sudden diseases such as heart attacks and\nstrokes.  \nLeveraging temporal behavior modeling and risk assessment models, the system effectively distinguishes between daily\nactivities and potential dangers. Once an anomaly is detected, it immediately triggers a multi-level warning mechanism,\nnotifying family members and caregivers via APP push, SMS, and voice broadcasts. It synchronously transmits anomaly\nfootage, risk type, and location information. This provides 24/7, unobtrusive, and precise safety protection for\nhigh-risk groups like the elderly living alone and chronic disease patients, realizing a closed-loop health management\nsystem that shifts from passive response to active prevention.\n\n本功能深度融合计算机视觉、姿态估计与多模态健康风险识别算法，构建了一套面向高危行为与突发健康事件的智能预警系统。系统可实时解析视频或图片中的个体行为模式与生理表征，精准捕捉老人跌倒时的姿态骤变、异常滞留时的长时间静止等高危行为，同时通过面部微循环变化、肤色异常、肢体协调性下降等视觉线索，辅助识别心梗、脑梗等突发疾病的前兆特征。借助时序行为建模与风险等级评估模型，系统能够有效区分日常活动与潜在危险，一旦检测到异常，立即触发分级预警机制，通过APP推送、短信、语音播报等多渠道通知家属及护理人员，并同步发送异常画面、风险类型与位置信息，为独居老人、慢性病患者等高风险群体提供7×24小时无感化、精准化的安全守护，实现从被动应对到主动预防的健康管理闭环\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频或图片分析识别高风险行为和健康风险，及时发出预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跌倒识别 |\n| 2 | 异常行为检测 |\n| 3 | 心梗脑梗前兆识别 |\n| 4 | 健康风险评估 |\n| 5 | 实时预警 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **仅当用户明确提及\"风险分析\"、\"跌倒\"、\"跌倒检测\"、\"行为识别\"、\"安全监测\"、\"老人看护\"、\"风险识别\"、\"高危风险识别\" |\n| 🖼️ 支持输入 | 本地视频/图片文件、网络视频/图片URL、实时流地址 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"new-smyx-risk-analysis\",\n  \"version\": \"999.999.1005\",\n  \"publishedAt\": 1787624610399\n}"},{"path":"references/risk_categories.md","content":"# 风险分类标准与预警等级说明\n\n## 一、风险类型分类\n\n### 1. 跌倒风险（fall）\n**识别场景**：\n- 人员突然倒地且长时间未起身\n- 身体倾斜角度超过阈值\n- 运动轨迹突然变化\n\n**风险等级判定**：\n- 高风险（≥0.9）：明确倒地且无动作\n- 中风险（0.7-0.9）：疑似跌倒，姿态异常\n- 低风险（<0.7）：短暂弯腰或坐下\n\n### 2. 健康风险（health）\n#### 2.1 心梗前兆\n- 表情痛苦，手捂胸口\n- 出汗过多，面色苍白\n- 突然站立不稳\n\n#### 2.2 脑梗前兆\n- 口角歪斜，流口水\n- 单侧肢体无力\n- 言语不清，表情僵硬\n\n#### 2.3 突发疾病\n- 突然倒地抽搐\n- 长时间静止不动\n- 异常痛苦表情\n\n### 3. 异常行为（behavior）\n- **剧烈运动**：快速奔跑、打斗等\n- **长时间静止**：同一姿势保持超过30分钟\n- **区域闯入**：进入禁止区域\n- **物品遗留**：异常物品出现在监测区域\n- **人员聚集**：超过5人聚集超过10分钟\n\n## 二、预警等级标准\n\n| 等级 | 颜色 | 置信度范围 | 处理策略 |\n|------|------|-----------|---------|\n| 高风险 | 红色 | ≥0.9 | 立即触发多渠道报警，通知相关人员 |\n| 中风险 | 黄色 | 0.7-0.9 | 记录事件，自动抓拍图片，通知管理员关注 |\n| 低风险 | 蓝色 | 0.5-0.7 | 仅记录日志，不主动通知 |\n\n## 三、预警内容模板\n```\n🚨 高风险事件预警\n⏰ 时间: 2024-01-01 12:00:00\n⚠️ 类型: 跌倒风险\n📊 置信度: 0.95\n📝 描述: 检测到人员倒地，已超过10秒未起身\n💡 建议: 立即查看现场情况，必要时拨打急救电话\n📍 位置: 客厅摄像头\n```\n\n## 四、处理建议库\n\n### 跌倒事件\n1. 立即查看现场，确认人员意识状态\n2. 如有受伤，不要随意移动，拨打120\n3. 检查周边环境，消除安全隐患\n4. 必要时联系家属\n\n### 心梗/脑梗前兆\n1. 立即拨打120急救电话\n2. 让患者保持平躺，不要移动\n3. 如有病史，服用对应急救药物\n4. 密切观察生命体征\n\n### 异常闯入\n1. 查看监控确认人员身份\n2. 必要时启动安防报警\n3. 通知安保人员前往处理\n4. 保存监控录像作为证据"},{"path":"skills/smyx_analysis/references/api_doc.md","content":"# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |"},{"path":"scripts/config.yaml","content":"{}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示 Skill: High-Risk Behavior Identification & Analysis Tool | 高风险行为识别分析工具 Owner: smyx-sunjinhui Summary: Supports identifying high-risk behaviors and health risks through video/images, including elderly falls, precursors to heart attacks and strokes, and abnormal behaviors, issuing timely warning alerts. | 高风险行为识别分析工具，支持通过视频/图片识别高危行为和健康风险，包括老人跌倒、心梗脑梗前兆、异常行为等，及时发出预警提示 Tags: latest:999.999.1005 Version history: v999.999.1","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":939,"uniquenessScore":51,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T23:13:10.409Z","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:13:10.409Z","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:29:00.496Z","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"}]}}}