{"id":"be6b5fb1-b8db-462c-93f8-198a0400cd69","entityType":"agent","slug":"clawhub-smyx-sunjinhui-smyx-elderly-gait-instability-detection-","name":"Elderly Gait Instability / Shuffling Step Detection | 老年人步态不稳/小碎步识别","canonicalUrl":"https://www.xpersona.co/agent/clawhub-smyx-sunjinhui-smyx-elderly-gait-instability-detection-","canonicalPath":"/agent/clawhub-smyx-sunjinhui-smyx-elderly-gait-instability-detection-","generatedAt":"2026-10-10T07:56:37.195Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T04:27:51.606Z","emptyReason":null},"description":"Using a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.7K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-elderly-gait-instability-detection-analysis","sourceUrl":"https://clawhub.ai/smyx-sunjinhui/smyx-elderly-gait-instability-detection-analysis","homepage":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-gait-instability-detection-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/smyx-sunjinhui/smyx-elderly-gait-instability-detection-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-gait-instability-detection-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":65,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Elderly Gait Instability / Shuffling Step Detection | 老年人步态不稳/小碎步识别 technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T04:27:51.606Z","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-10T04:27:51.606Z","emptyReason":null},"stars":null,"forks":null,"downloads":1686,"packageName":null,"latestVersion":"1.0.11","tractionLabel":"1.7K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T04:27:51.606Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T04:27:51.606Z","lastCrawledAt":"2026-10-10T04:27:51.606Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T04:27:51.606Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.11","createdAt":"2026-09-27T19:23:38.394Z","changelog":"- Removed the skill-card.md file from the project. - No functional changes to core skill or codebase.","fileCount":31,"zipByteSize":40919},{"version":"1.0.10","createdAt":"2026-09-22T22:45:26.081Z","changelog":"- Updated SKILL.md with an incremented version number and minor content adjustments. - Removed the obsolete skill-card.md file. - Made changes to the skill configuration (skills/smyx_common/scripts/config.yaml). - No new features or functional changes introduced.","fileCount":31,"zipByteSize":41166},{"version":"1.0.9","createdAt":"2026-09-08T23:40:31.668Z","changelog":"- Updated SKILL.md with version number and documentation improvements. - Removed the file skill-card.md. - No changes to code or functionality; documentation/versioning only.","fileCount":31,"zipByteSize":41048},{"version":"1.0.8","createdAt":"2026-08-28T04:15:29.876Z","changelog":"- Removed the file skill-card.md from the skill package. - No feature or functionality changes; this update only affects documentation files.","fileCount":31,"zipByteSize":41061},{"version":"1.0.7","createdAt":"2026-08-21T05:14:29.037Z","changelog":"- Updated skill version to 1.0.11. - SKILL.md revised with the new version and description. - Removed obsolete file: skill-card.md. - Minor documentation and configuration updates for consistency.","fileCount":31,"zipByteSize":41253},{"version":"1.0.6","createdAt":"2026-08-13T16:25:40.142Z","changelog":"- Updated version from 1.0.9 to 1.0.10 in SKILL.md. - Removed the file skill-card.md. - No functional or behavioral changes documented—documentation changes only.","fileCount":31,"zipByteSize":41045},{"version":"1.0.5","createdAt":"2026-08-07T17:08:36.713Z","changelog":"- Updated SKILL.md version and content for documentation and metadata improvements. - Removed redundant or unused file: skill-card.md. - No changes to core skill features or user-facing functionality. - Version incremented to reflect documentation updates.","fileCount":31,"zipByteSize":41108},{"version":"1.0.4","createdAt":"2026-07-27T23:39:29.776Z","changelog":"- Updated version number from 1.0.6 to 1.0.7 in SKILL.md. - Removed the file skill-card.md. - No functional or logic changes to skill behavior; update is primarily related to documentation and metadata.","fileCount":31,"zipByteSize":41178}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-elderly-gait-instability-detection-analysis","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-elderly-gait-instability-detection-analysis` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/smyx-sunjinhui/smyx-elderly-gait-instability-detection-analysis before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-gait-instability-detection-/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-gait-instability-detection-/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-gait-instability-detection-/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-gait-instability-detection-/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-gait-instability-detection-/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-gait-instability-detection-/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:56:37.193Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-gait-instability-detection-/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-gait-instability-detection-/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-gait-instability-detection-/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-gait-instability-detection-/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T04:27:51.606Z","emptyReason":null},"readme":"Skill: Elderly Gait Instability / Shuffling Step Detection | 老年人步态不稳/小碎步识别\n\nOwner: smyx-sunjinhui\n\nSummary: Using a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。\n\nTags: latest:1.0.11\n\nVersion history:\n\nv1.0.11 | 2026-09-27T19:23:38.394Z | auto\n\n- Removed the skill-card.md file from the project.\n- No functional changes to core skill or codebase.\n\nv1.0.10 | 2026-09-22T22:45:26.081Z | auto\n\n- Updated SKILL.md with an incremented version number and minor content adjustments.\n- Removed the obsolete skill-card.md file.\n- Made changes to the skill configuration (skills/smyx_common/scripts/config.yaml).\n- No new features or functional changes introduced.\n\nv1.0.9 | 2026-09-08T23:40:31.668Z | auto\n\n- Updated SKILL.md with version number and documentation improvements.\n- Removed the file skill-card.md.\n- No changes to code or functionality; documentation/versioning only.\n\nv1.0.8 | 2026-08-28T04:15:29.876Z | auto\n\n- Removed the file skill-card.md from the skill package.\n- No feature or functionality changes; this update only affects documentation files.\n\nv1.0.7 | 2026-08-21T05:14:29.037Z | auto\n\n- Updated skill version to 1.0.11.\n- SKILL.md revised with the new version and description.\n- Removed obsolete file: skill-card.md.\n- Minor documentation and configuration updates for consistency.\n\nv1.0.6 | 2026-08-13T16:25:40.142Z | auto\n\n- Updated version from 1.0.9 to 1.0.10 in SKILL.md.\n- Removed the file skill-card.md.\n- No functional or behavioral changes documented—documentation changes only.\n\nv1.0.5 | 2026-08-07T17:08:36.713Z | auto\n\n- Updated SKILL.md version and content for documentation and metadata improvements.\n- Removed redundant or unused file: skill-card.md.\n- No changes to core skill features or user-facing functionality.\n- Version incremented to reflect documentation updates.\n\nv1.0.4 | 2026-07-27T23:39:29.776Z | auto\n\n- Updated version number from 1.0.6 to 1.0.7 in SKILL.md.\n- Removed the file skill-card.md.\n- No functional or logic changes to skill behavior; update is primarily related to documentation and metadata.\n\nv1.0.3 | 2026-07-17T04:19:28.777Z | auto\n\nsmyx-elderly-gait-instability-detection-analysis 1.0.3 changelog:\n\n- Updated documentation in SKILL.md to reflect new details and requirements.\n- Bumped version metadata (from 1.0.4 to 1.0.6) in documentation.\n- Removed obsolete or duplicate documentation file: skill-card.md.\n- Minor script or utility adjustments in skills/smyx_common/scripts/util.py.\n\nv1.0.2 | 2026-07-06T03:14:25.091Z | auto\n\n- Updated internal configuration in scripts/config.py.\n- No changes to user-facing features or documentation.\n\nv1.0.1 | 2026-07-03T10:34:27.223Z | auto\n\n- Major update: The skill’s user identity (open-id) handling is now fully automated and invisible to the user.\n- End users are no longer prompted or required to input any identity information; internal identity management is handled by the script.\n- All history report queries are forced to use the cloud API—reading from local memory or manual aggregation is strictly prohibited.\n- Documentation has been significantly restructured and condensed, with clearer workflow and usage sections.\n- API usage and parameter handling have been updated for greater consistency and security.\n\nv1.0.0 | 2026-05-25T11:16:58.849Z | auto\n\n- Initial release of smyx-elderly-gait-instability-detection-analysis.\n- Uses AI pose estimation on videos to analyze elderly gait parameters (step length, gait speed, trunk sway, cadence).\n- Outputs fall risk level (low/medium/high) based on detected gait abnormalities.\n- Supports scheduled or automatic monitoring, generates alerts/reports for medium/high risk levels.\n- Strict privacy controls and open-id verification required for all operations.\n- Designed for integration with smart cameras and health-management platforms for elderly care.\n\nArchive index:\n\nArchive v1.0.11: 31 files, 40919 bytes\n\nFiles: references/api_doc.md (2636b), scripts/__init__.py (62b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (586b), scripts/smyx_elderly_gait_instability_detection_analysis.py (3598b), skill-card.md (2147b), SKILL.md (12641b), 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 (168b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: \"smyx-elderly-gait-instability-detection-analysis\"\ndescription: \"Using a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。\"\nversion: \"1.0.15\"\nlicense: \"MIT-0\"\n---\n\n# 🚶 Elderly Gait Instability / Shuffling Step Detection | 老年人步态不稳/小碎步识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人步态不稳/小碎步识别** |\n| 🎯 核心目标 | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. When step length is too small (small-shuffling steps), gait speed is too slow, or trunk sway is too large, the system outputs a fall risk level (low / medium / high). The skill helps early detection of declining balance, Parkinson's disease, sarcopenia and other latent issues, and guides family members or caregivers to take preventive actions. Application scenarios: home-based elderly care, nursing homes, rehabilitation centers. The system can be scheduled (e.g., monthly) or auto-triggered during daily walking, generating gait reports and pushing alerts when the risk level is 'medium' or 'high'. Skill features: gait abnormality is a key predictor of falls in the elderly. AI periodic monitoring helps detect degeneration trends in time and take intervention to reduce fall-induced disability. Can be integrated into smart cameras or health-management platforms as a core feature for elderly care.\n\n通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。该技能有助于早期发现老年人平衡能力下降、帕金森病、肌少症等潜在问题，指导家属或护理人员采取预防措施。应用场景：居家养老、养老院、康复中心。系统定期（如每月）或在老年人日常行走时自动触发检测，生成步态报告，当风险等级为'中'或'高'时推送提醒。技能特点：步态异常是老年人跌倒的重要预测因子。通过AI定期监测，可及早发现退化趋势，采取干预措施，降低跌倒致残率。该技能可集成到智能摄像头或健康管理平台中，成为养老监护的核心功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的老年人步态安全 AI。你的任务是分析老年人直线行走的侧面或正面视频，提取步态参数（步幅、步速、躯干摇摆角、步频），并综合评估跌倒风险等级。不要提供医疗诊断或临床建议，仅输出基于视频的步态客观指标与风险分级。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于走廊/客厅直线行走视频，量化老年人步幅、步速、躯干摇摆等步态指标，综合评估跌倒风险等级（low / medium / high）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与姿态估计（下肢/躯干关键点） |\n| 2 | 行走片段识别 |\n| 3 | 步幅长度（cm |\n| 4 | 结合身高换算） |\n| 5 | 步速（m/s） |\n| 6 | 步频（步/分钟） |\n| 7 | 躯干左右摇摆角（°） |\n| 8 | 步幅变异性（CV） |\n| 9 | 双支撑相占比 |\n| 10 | 步态模式描述（normal / short_steps / wide_sway / slow / mixed） |\n| 11 | 跌倒风险分级（low / medium / high） |\n| 12 | 关键风险因子列举 |\n| 13 | 医疗复核/康复建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供老年人直线行走视频 URL 或文件需要分析时，默认触发本技能进行步态不稳/小碎步识别 |\n| 🔎 明确分析意图 | 当用户明确提及步态不稳、小碎步、步幅小、步速慢、躯干摇摆、走路不稳、跌倒风险、帕金森步态、肌少症、平衡能力下降等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看步态分析历史报告、跌倒风险评估报告清单、老人步态报告清单、查询历史步态记录、显示所有步态分析报告、显示老人跌倒风险诊断报告，查询步态风险预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_gait_instability_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备老年人直线行走视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行老年人步态不稳/小碎步识别 | 调用 `-m scripts.smyx_elderly_gait_instability_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地老年人直线行走视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络老年人直线行走视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，老年人步态安全场景默认 `other` | 按需填写 |\n| `--list` | 显示老年人步态不稳历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_elderly_gait_instability_detection_analysis.py`](scripts/smyx_elderly_gait_instability_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议覆盖完整直线行走片段、≥ 25 FPS |\n| 🧑‍⚖️ 结果性质 | 步幅 cm 估算依赖身高/标定信息，若未提供身高则采用经验比例换算，绝对值仅供参考、趋势更有意义 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为辅助筛查参考，本工具不替代专业康复/神经科评估 |\n| 🔏 隐私合规 | 隐私合规：步态视频涉及个人健康信息，使用前需取得被监护人或家属知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input /path/to/walk.mp4\n\n# 分析网络直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --url https://example.com/walk.mp4\n\n# 显示历史步态识别报告（自动触发关键词：查看步态分析历史报告、跌倒风险评估报告清单等）\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --output result.json\n```\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-gait-instability-detection-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1790537018394\n}\n\nFile v1.0.11:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人步态不稳/小碎步识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动老年人步态不稳识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果与跌倒风险等级\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史步态分析记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` - 老年人步态不稳/小碎步识别\n\n## 输入约束\n\n- 摄像头建议固定于走廊或客厅，覆盖一段直线行走路径（侧面或正面均可）\n- 时长建议 ≥ 5 秒（推荐 10-30 秒），帧率 ≥ 25 FPS\n- 老年人需在视频中完成至少 3-5 步连续行走，光照均匀、背景简洁\n- 可选附带：身高（用于像素 → cm 换算）、年龄、是否使用助行器\n\n## 关键观测指标\n\n- `step_length_cm` - 步幅长度（cm，估算）\n- `gait_speed_m_s` - 步速（m/s）\n- `cadence_steps_min` - 步频（步/分钟）\n- `trunk_sway_deg` - 躯干左右摇摆角度（°）\n- `step_length_variability` - 步幅变异性（CV）\n- `double_support_ratio` - 双支撑相占比（%）\n\n## 跌倒风险等级判定（仅作筛查提示）\n\n- `low` - 步幅、步速、躯干稳定均处于正常范围\n- `medium` - 步幅偏小 / 步速偏慢 / 躯干摇摆增大 任一指标异常\n- `high` - 多项指标同时异常，或步幅显著缩小（小碎步典型表现）+ 躯干摇摆过大\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到行走人体\n- `walking_detected` - 是否检测到直线行走片段\n- `gait_metrics` - 各步态参数数值（step_length_cm / gait_speed_m_s / cadence_steps_min / trunk_sway_deg / step_length_variability / double_support_ratio）\n- `gait_pattern` - 步态特征描述（normal / short_steps / wide_sway / slow / mixed）\n- `fall_risk_level` - 跌倒风险等级（low / medium / high）\n- `risk_factors` - 触发风险等级的关键因子\n- `alert_message` - 提示文本（如\"检测到小碎步 + 躯干左右摇摆增大，跌倒风险偏高，建议加强陪护或就医评估\"）\n- `medical_followup_hint` - 医疗复核/康复建议（仅作提示，非诊断）\n\n> 仅输出基于视频的步态客观指标与风险分级，不提供医学诊断；如疑似帕金森、肌少症或近期发生跌倒，请前往专业医疗机构评估。\n\nFile v1.0.11:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.11:scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.11:skill-card.md\n\n## Description:\n\nAnalyzes walking videos to summarize gait metrics and screen for low, medium, or high fall risk in older adults.\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\nCaregivers and elder-care teams use walking footage to review gait measures, fall-risk screening results, and historical reports. Results support monitoring, not medical diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Videos or private video URLs are sent to the Life Emergence cloud service.\n\nMitigation: Obtain consent from the recorded person or caregiver and avoid sensitive signed or private URLs unless intended.\n\nRisk: The skill can create or reuse a local identity, store tokens, and access sensitive cloud report history with limited user control.\n\nMitigation: Review account, token storage, and report-history access controls before production use.\n\nRisk: Fall-risk screening results may be mistaken for a medical diagnosis.\n\nMitigation: Treat results as screening information and seek professional assessment for clinical decisions.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-gait-instability-detection-analysis)\n- [Gait analysis API documentation](references/api_doc.md)\n- [Skill demonstration](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON]\n\n**Output Format:** [Structured gait report or JSON; Markdown table for report history]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Gait metrics, low/medium/high fall-risk screening, and optional report links; historical reports may be retrieved from the cloud.]\n\n## Skill Version(s):\n\n1.0.11 (source: server-resolved ClawHub release)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.11:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.11:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.10: 31 files, 41166 bytes\n\nFiles: references/api_doc.md (2636b), scripts/__init__.py (62b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (586b), scripts/smyx_elderly_gait_instability_detection_analysis.py (3598b), skill-card.md (2715b), SKILL.md (12641b), 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 (168b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: \"smyx-elderly-gait-instability-detection-analysis\"\ndescription: \"Using a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。\"\nversion: \"1.0.15\"\nlicense: \"MIT-0\"\n---\n\n# 🚶 Elderly Gait Instability / Shuffling Step Detection | 老年人步态不稳/小碎步识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人步态不稳/小碎步识别** |\n| 🎯 核心目标 | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. When step length is too small (small-shuffling steps), gait speed is too slow, or trunk sway is too large, the system outputs a fall risk level (low / medium / high). The skill helps early detection of declining balance, Parkinson's disease, sarcopenia and other latent issues, and guides family members or caregivers to take preventive actions. Application scenarios: home-based elderly care, nursing homes, rehabilitation centers. The system can be scheduled (e.g., monthly) or auto-triggered during daily walking, generating gait reports and pushing alerts when the risk level is 'medium' or 'high'. Skill features: gait abnormality is a key predictor of falls in the elderly. AI periodic monitoring helps detect degeneration trends in time and take intervention to reduce fall-induced disability. Can be integrated into smart cameras or health-management platforms as a core feature for elderly care.\n\n通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。该技能有助于早期发现老年人平衡能力下降、帕金森病、肌少症等潜在问题，指导家属或护理人员采取预防措施。应用场景：居家养老、养老院、康复中心。系统定期（如每月）或在老年人日常行走时自动触发检测，生成步态报告，当风险等级为'中'或'高'时推送提醒。技能特点：步态异常是老年人跌倒的重要预测因子。通过AI定期监测，可及早发现退化趋势，采取干预措施，降低跌倒致残率。该技能可集成到智能摄像头或健康管理平台中，成为养老监护的核心功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的老年人步态安全 AI。你的任务是分析老年人直线行走的侧面或正面视频，提取步态参数（步幅、步速、躯干摇摆角、步频），并综合评估跌倒风险等级。不要提供医疗诊断或临床建议，仅输出基于视频的步态客观指标与风险分级。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于走廊/客厅直线行走视频，量化老年人步幅、步速、躯干摇摆等步态指标，综合评估跌倒风险等级（low / medium / high）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与姿态估计（下肢/躯干关键点） |\n| 2 | 行走片段识别 |\n| 3 | 步幅长度（cm |\n| 4 | 结合身高换算） |\n| 5 | 步速（m/s） |\n| 6 | 步频（步/分钟） |\n| 7 | 躯干左右摇摆角（°） |\n| 8 | 步幅变异性（CV） |\n| 9 | 双支撑相占比 |\n| 10 | 步态模式描述（normal / short_steps / wide_sway / slow / mixed） |\n| 11 | 跌倒风险分级（low / medium / high） |\n| 12 | 关键风险因子列举 |\n| 13 | 医疗复核/康复建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供老年人直线行走视频 URL 或文件需要分析时，默认触发本技能进行步态不稳/小碎步识别 |\n| 🔎 明确分析意图 | 当用户明确提及步态不稳、小碎步、步幅小、步速慢、躯干摇摆、走路不稳、跌倒风险、帕金森步态、肌少症、平衡能力下降等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看步态分析历史报告、跌倒风险评估报告清单、老人步态报告清单、查询历史步态记录、显示所有步态分析报告、显示老人跌倒风险诊断报告，查询步态风险预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_gait_instability_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备老年人直线行走视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行老年人步态不稳/小碎步识别 | 调用 `-m scripts.smyx_elderly_gait_instability_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地老年人直线行走视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络老年人直线行走视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，老年人步态安全场景默认 `other` | 按需填写 |\n| `--list` | 显示老年人步态不稳历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_elderly_gait_instability_detection_analysis.py`](scripts/smyx_elderly_gait_instability_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议覆盖完整直线行走片段、≥ 25 FPS |\n| 🧑‍⚖️ 结果性质 | 步幅 cm 估算依赖身高/标定信息，若未提供身高则采用经验比例换算，绝对值仅供参考、趋势更有意义 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为辅助筛查参考，本工具不替代专业康复/神经科评估 |\n| 🔏 隐私合规 | 隐私合规：步态视频涉及个人健康信息，使用前需取得被监护人或家属知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input /path/to/walk.mp4\n\n# 分析网络直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --url https://example.com/walk.mp4\n\n# 显示历史步态识别报告（自动触发关键词：查看步态分析历史报告、跌倒风险评估报告清单等）\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-gait-instability-detection-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1790117126081\n}\n\nFile v1.0.10:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人步态不稳/小碎步识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动老年人步态不稳识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果与跌倒风险等级\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史步态分析记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` - 老年人步态不稳/小碎步识别\n\n## 输入约束\n\n- 摄像头建议固定于走廊或客厅，覆盖一段直线行走路径（侧面或正面均可）\n- 时长建议 ≥ 5 秒（推荐 10-30 秒），帧率 ≥ 25 FPS\n- 老年人需在视频中完成至少 3-5 步连续行走，光照均匀、背景简洁\n- 可选附带：身高（用于像素 → cm 换算）、年龄、是否使用助行器\n\n## 关键观测指标\n\n- `step_length_cm` - 步幅长度（cm，估算）\n- `gait_speed_m_s` - 步速（m/s）\n- `cadence_steps_min` - 步频（步/分钟）\n- `trunk_sway_deg` - 躯干左右摇摆角度（°）\n- `step_length_variability` - 步幅变异性（CV）\n- `double_support_ratio` - 双支撑相占比（%）\n\n## 跌倒风险等级判定（仅作筛查提示）\n\n- `low` - 步幅、步速、躯干稳定均处于正常范围\n- `medium` - 步幅偏小 / 步速偏慢 / 躯干摇摆增大 任一指标异常\n- `high` - 多项指标同时异常，或步幅显著缩小（小碎步典型表现）+ 躯干摇摆过大\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到行走人体\n- `walking_detected` - 是否检测到直线行走片段\n- `gait_metrics` - 各步态参数数值（step_length_cm / gait_speed_m_s / cadence_steps_min / trunk_sway_deg / step_length_variability / double_support_ratio）\n- `gait_pattern` - 步态特征描述（normal / short_steps / wide_sway / slow / mixed）\n- `fall_risk_level` - 跌倒风险等级（low / medium / high）\n- `risk_factors` - 触发风险等级的关键因子\n- `alert_message` - 提示文本（如\"检测到小碎步 + 躯干左右摇摆增大，跌倒风险偏高，建议加强陪护或就医评估\"）\n- `medical_followup_hint` - 医疗复核/康复建议（仅作提示，非诊断）\n\n> 仅输出基于视频的步态客观指标与风险分级，不提供医学诊断；如疑似帕金森、肌少症或近期发生跌倒，请前往专业医疗机构评估。\n\nFile v1.0.10:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.10:scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.10:skill-card.md\n\n## Description:\n\nAnalyzes fixed-camera walking video to estimate gait metrics such as step length, gait speed, trunk sway, and cadence, then returns gait stability signals and fall-risk classifications.\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, caregivers, care organizations, and health-platform developers use this skill to analyze elderly walking videos or URLs and receive structured gait metrics, fall-risk levels, report links, and history lookups. Outputs are screening aids and do not replace professional medical or rehabilitation evaluation.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Elderly gait videos, video URLs, and health report links may contain sensitive health or personal data and are sent to configured cloud services.\n\nMitigation: Use only with informed consent and acceptable retention, access-control, encryption, and report-sharing practices; avoid protected or highly sensitive footage unless those controls are in place.\n\nRisk: The skill can silently create or reuse a persistent local/cloud identity for history and report retrieval.\n\nMitigation: Review identity behavior before deployment and ensure users or administrators understand and approve how reports are associated and retrieved.\n\nRisk: Fall-risk outputs are screening signals and may be incorrect or incomplete for clinical decisions.\n\nMitigation: Treat results as advisory gait observations and route concerning findings to qualified medical or rehabilitation professionals.\n\n## Reference(s):\n\n- [API interface documentation](references/api_doc.md)\n- [Shared analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-gait-instability-detection-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown and JSON-style structured analysis text with command examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include gait metrics, fall-risk level, risk factors, alert text, report links, and history tables.]\n\n## Skill Version(s):\n\n1.0.10 (source: server release metadata; artifact frontmatter reports 1.0.15)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.10:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.10:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.9: 31 files, 41048 bytes\n\nFiles: references/api_doc.md (2636b), scripts/__init__.py (62b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (586b), scripts/smyx_elderly_gait_instability_detection_analysis.py (3598b), skill-card.md (2380b), SKILL.md (12641b), 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 (167b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: \"smyx-elderly-gait-instability-detection-analysis\"\ndescription: \"Using a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。\"\nversion: \"1.0.13\"\nlicense: \"MIT-0\"\n---\n\n# 🚶 Elderly Gait Instability / Shuffling Step Detection | 老年人步态不稳/小碎步识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人步态不稳/小碎步识别** |\n| 🎯 核心目标 | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. When step length is too small (small-shuffling steps), gait speed is too slow, or trunk sway is too large, the system outputs a fall risk level (low / medium / high). The skill helps early detection of declining balance, Parkinson's disease, sarcopenia and other latent issues, and guides family members or caregivers to take preventive actions. Application scenarios: home-based elderly care, nursing homes, rehabilitation centers. The system can be scheduled (e.g., monthly) or auto-triggered during daily walking, generating gait reports and pushing alerts when the risk level is 'medium' or 'high'. Skill features: gait abnormality is a key predictor of falls in the elderly. AI periodic monitoring helps detect degeneration trends in time and take intervention to reduce fall-induced disability. Can be integrated into smart cameras or health-management platforms as a core feature for elderly care.\n\n通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。该技能有助于早期发现老年人平衡能力下降、帕金森病、肌少症等潜在问题，指导家属或护理人员采取预防措施。应用场景：居家养老、养老院、康复中心。系统定期（如每月）或在老年人日常行走时自动触发检测，生成步态报告，当风险等级为'中'或'高'时推送提醒。技能特点：步态异常是老年人跌倒的重要预测因子。通过AI定期监测，可及早发现退化趋势，采取干预措施，降低跌倒致残率。该技能可集成到智能摄像头或健康管理平台中，成为养老监护的核心功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的老年人步态安全 AI。你的任务是分析老年人直线行走的侧面或正面视频，提取步态参数（步幅、步速、躯干摇摆角、步频），并综合评估跌倒风险等级。不要提供医疗诊断或临床建议，仅输出基于视频的步态客观指标与风险分级。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于走廊/客厅直线行走视频，量化老年人步幅、步速、躯干摇摆等步态指标，综合评估跌倒风险等级（low / medium / high）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与姿态估计（下肢/躯干关键点） |\n| 2 | 行走片段识别 |\n| 3 | 步幅长度（cm |\n| 4 | 结合身高换算） |\n| 5 | 步速（m/s） |\n| 6 | 步频（步/分钟） |\n| 7 | 躯干左右摇摆角（°） |\n| 8 | 步幅变异性（CV） |\n| 9 | 双支撑相占比 |\n| 10 | 步态模式描述（normal / short_steps / wide_sway / slow / mixed） |\n| 11 | 跌倒风险分级（low / medium / high） |\n| 12 | 关键风险因子列举 |\n| 13 | 医疗复核/康复建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供老年人直线行走视频 URL 或文件需要分析时，默认触发本技能进行步态不稳/小碎步识别 |\n| 🔎 明确分析意图 | 当用户明确提及步态不稳、小碎步、步幅小、步速慢、躯干摇摆、走路不稳、跌倒风险、帕金森步态、肌少症、平衡能力下降等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看步态分析历史报告、跌倒风险评估报告清单、老人步态报告清单、查询历史步态记录、显示所有步态分析报告、显示老人跌倒风险诊断报告，查询步态风险预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_gait_instability_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备老年人直线行走视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行老年人步态不稳/小碎步识别 | 调用 `-m scripts.smyx_elderly_gait_instability_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地老年人直线行走视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络老年人直线行走视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，老年人步态安全场景默认 `other` | 按需填写 |\n| `--list` | 显示老年人步态不稳历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_elderly_gait_instability_detection_analysis.py`](scripts/smyx_elderly_gait_instability_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议覆盖完整直线行走片段、≥ 25 FPS |\n| 🧑‍⚖️ 结果性质 | 步幅 cm 估算依赖身高/标定信息，若未提供身高则采用经验比例换算，绝对值仅供参考、趋势更有意义 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为辅助筛查参考，本工具不替代专业康复/神经科评估 |\n| 🔏 隐私合规 | 隐私合规：步态视频涉及个人健康信息，使用前需取得被监护人或家属知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input /path/to/walk.mp4\n\n# 分析网络直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --url https://example.com/walk.mp4\n\n# 显示历史步态识别报告（自动触发关键词：查看步态分析历史报告、跌倒风险评估报告清单等）\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-gait-instability-detection-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1788910831668\n}\n\nFile v1.0.9:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人步态不稳/小碎步识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动老年人步态不稳识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果与跌倒风险等级\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史步态分析记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` - 老年人步态不稳/小碎步识别\n\n## 输入约束\n\n- 摄像头建议固定于走廊或客厅，覆盖一段直线行走路径（侧面或正面均可）\n- 时长建议 ≥ 5 秒（推荐 10-30 秒），帧率 ≥ 25 FPS\n- 老年人需在视频中完成至少 3-5 步连续行走，光照均匀、背景简洁\n- 可选附带：身高（用于像素 → cm 换算）、年龄、是否使用助行器\n\n## 关键观测指标\n\n- `step_length_cm` - 步幅长度（cm，估算）\n- `gait_speed_m_s` - 步速（m/s）\n- `cadence_steps_min` - 步频（步/分钟）\n- `trunk_sway_deg` - 躯干左右摇摆角度（°）\n- `step_length_variability` - 步幅变异性（CV）\n- `double_support_ratio` - 双支撑相占比（%）\n\n## 跌倒风险等级判定（仅作筛查提示）\n\n- `low` - 步幅、步速、躯干稳定均处于正常范围\n- `medium` - 步幅偏小 / 步速偏慢 / 躯干摇摆增大 任一指标异常\n- `high` - 多项指标同时异常，或步幅显著缩小（小碎步典型表现）+ 躯干摇摆过大\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到行走人体\n- `walking_detected` - 是否检测到直线行走片段\n- `gait_metrics` - 各步态参数数值（step_length_cm / gait_speed_m_s / cadence_steps_min / trunk_sway_deg / step_length_variability / double_support_ratio）\n- `gait_pattern` - 步态特征描述（normal / short_steps / wide_sway / slow / mixed）\n- `fall_risk_level` - 跌倒风险等级（low / medium / high）\n- `risk_factors` - 触发风险等级的关键因子\n- `alert_message` - 提示文本（如\"检测到小碎步 + 躯干左右摇摆增大，跌倒风险偏高，建议加强陪护或就医评估\"）\n- `medical_followup_hint` - 医疗复核/康复建议（仅作提示，非诊断）\n\n> 仅输出基于视频的步态客观指标与风险分级，不提供医学诊断；如疑似帕金森、肌少症或近期发生跌倒，请前往专业医疗机构评估。\n\nFile v1.0.9:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.9:scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.9:skill-card.md\n\n## Description:\n\nAnalyzes fixed-camera walking videos to estimate gait metrics such as step length, gait speed, trunk sway, and cadence, then reports gait stability indicators and a low, medium, or high fall-risk level.\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\nDevelopers and care-technology teams can use this skill to route elderly walking videos through a gait-analysis workflow that returns objective movement metrics, fall-risk screening, recommendations, and report links. It is intended for assistive screening and monitoring rather than medical diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive elderly-person gait videos and account-linked report history may be sent to cloud services with under-disclosed persistence.\n\nMitigation: Use only with informed consent, confirm the destination service and retention policy, and make identity and report-history use explicit and user controlled.\n\nRisk: Security evidence flags unsafe defaults including a development HTTP profile, silent account registration, and plaintext token storage.\n\nMitigation: Disable development HTTP endpoints, require HTTPS, avoid silent account registration for ordinary analysis, and avoid plaintext token storage before deployment.\n\n## Reference(s):\n\n- [API interface documentation](references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-gait-instability-detection-analysis)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, guidance]\n\n**Output Format:** [Markdown and JSON-style structured analysis output]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Includes gait metrics, gait-pattern labels, fall-risk level, risk factors, recommendations, historical report listings, and report links.]\n\n## Skill Version(s):\n\n1.0.9 (source: server release metadata; artifact frontmatter reports 1.0.13)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.9:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.9:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.8: 31 files, 41061 bytes\n\nFiles: references/api_doc.md (2636b), scripts/__init__.py (62b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (586b), scripts/smyx_elderly_gait_instability_detection_analysis.py (3598b), skill-card.md (2464b), SKILL.md (12641b), 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 (167b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"smyx-elderly-gait-instability-detection-analysis\"\ndescription: \"Using a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🚶 Elderly Gait Instability / Shuffling Step Detection | 老年人步态不稳/小碎步识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人步态不稳/小碎步识别** |\n| 🎯 核心目标 | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. When step length is too small (small-shuffling steps), gait speed is too slow, or trunk sway is too large, the system outputs a fall risk level (low / medium / high). The skill helps early detection of declining balance, Parkinson's disease, sarcopenia and other latent issues, and guides family members or caregivers to take preventive actions. Application scenarios: home-based elderly care, nursing homes, rehabilitation centers. The system can be scheduled (e.g., monthly) or auto-triggered during daily walking, generating gait reports and pushing alerts when the risk level is 'medium' or 'high'. Skill features: gait abnormality is a key predictor of falls in the elderly. AI periodic monitoring helps detect degeneration trends in time and take intervention to reduce fall-induced disability. Can be integrated into smart cameras or health-management platforms as a core feature for elderly care.\n\n通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。该技能有助于早期发现老年人平衡能力下降、帕金森病、肌少症等潜在问题，指导家属或护理人员采取预防措施。应用场景：居家养老、养老院、康复中心。系统定期（如每月）或在老年人日常行走时自动触发检测，生成步态报告，当风险等级为'中'或'高'时推送提醒。技能特点：步态异常是老年人跌倒的重要预测因子。通过AI定期监测，可及早发现退化趋势，采取干预措施，降低跌倒致残率。该技能可集成到智能摄像头或健康管理平台中，成为养老监护的核心功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的老年人步态安全 AI。你的任务是分析老年人直线行走的侧面或正面视频，提取步态参数（步幅、步速、躯干摇摆角、步频），并综合评估跌倒风险等级。不要提供医疗诊断或临床建议，仅输出基于视频的步态客观指标与风险分级。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于走廊/客厅直线行走视频，量化老年人步幅、步速、躯干摇摆等步态指标，综合评估跌倒风险等级（low / medium / high）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与姿态估计（下肢/躯干关键点） |\n| 2 | 行走片段识别 |\n| 3 | 步幅长度（cm |\n| 4 | 结合身高换算） |\n| 5 | 步速（m/s） |\n| 6 | 步频（步/分钟） |\n| 7 | 躯干左右摇摆角（°） |\n| 8 | 步幅变异性（CV） |\n| 9 | 双支撑相占比 |\n| 10 | 步态模式描述（normal / short_steps / wide_sway / slow / mixed） |\n| 11 | 跌倒风险分级（low / medium / high） |\n| 12 | 关键风险因子列举 |\n| 13 | 医疗复核/康复建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供老年人直线行走视频 URL 或文件需要分析时，默认触发本技能进行步态不稳/小碎步识别 |\n| 🔎 明确分析意图 | 当用户明确提及步态不稳、小碎步、步幅小、步速慢、躯干摇摆、走路不稳、跌倒风险、帕金森步态、肌少症、平衡能力下降等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看步态分析历史报告、跌倒风险评估报告清单、老人步态报告清单、查询历史步态记录、显示所有步态分析报告、显示老人跌倒风险诊断报告，查询步态风险预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_gait_instability_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备老年人直线行走视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行老年人步态不稳/小碎步识别 | 调用 `-m scripts.smyx_elderly_gait_instability_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地老年人直线行走视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络老年人直线行走视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，老年人步态安全场景默认 `other` | 按需填写 |\n| `--list` | 显示老年人步态不稳历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_elderly_gait_instability_detection_analysis.py`](scripts/smyx_elderly_gait_instability_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议覆盖完整直线行走片段、≥ 25 FPS |\n| 🧑‍⚖️ 结果性质 | 步幅 cm 估算依赖身高/标定信息，若未提供身高则采用经验比例换算，绝对值仅供参考、趋势更有意义 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为辅助筛查参考，本工具不替代专业康复/神经科评估 |\n| 🔏 隐私合规 | 隐私合规：步态视频涉及个人健康信息，使用前需取得被监护人或家属知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input /path/to/walk.mp4\n\n# 分析网络直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --url https://example.com/walk.mp4\n\n# 显示历史步态识别报告（自动触发关键词：查看步态分析历史报告、跌倒风险评估报告清单等）\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-gait-instability-detection-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1787890529876\n}\n\nFile v1.0.8:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人步态不稳/小碎步识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动老年人步态不稳识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果与跌倒风险等级\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史步态分析记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` - 老年人步态不稳/小碎步识别\n\n## 输入约束\n\n- 摄像头建议固定于走廊或客厅，覆盖一段直线行走路径（侧面或正面均可）\n- 时长建议 ≥ 5 秒（推荐 10-30 秒），帧率 ≥ 25 FPS\n- 老年人需在视频中完成至少 3-5 步连续行走，光照均匀、背景简洁\n- 可选附带：身高（用于像素 → cm 换算）、年龄、是否使用助行器\n\n## 关键观测指标\n\n- `step_length_cm` - 步幅长度（cm，估算）\n- `gait_speed_m_s` - 步速（m/s）\n- `cadence_steps_min` - 步频（步/分钟）\n- `trunk_sway_deg` - 躯干左右摇摆角度（°）\n- `step_length_variability` - 步幅变异性（CV）\n- `double_support_ratio` - 双支撑相占比（%）\n\n## 跌倒风险等级判定（仅作筛查提示）\n\n- `low` - 步幅、步速、躯干稳定均处于正常范围\n- `medium` - 步幅偏小 / 步速偏慢 / 躯干摇摆增大 任一指标异常\n- `high` - 多项指标同时异常，或步幅显著缩小（小碎步典型表现）+ 躯干摇摆过大\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到行走人体\n- `walking_detected` - 是否检测到直线行走片段\n- `gait_metrics` - 各步态参数数值（step_length_cm / gait_speed_m_s / cadence_steps_min / trunk_sway_deg / step_length_variability / double_support_ratio）\n- `gait_pattern` - 步态特征描述（normal / short_steps / wide_sway / slow / mixed）\n- `fall_risk_level` - 跌倒风险等级（low / medium / high）\n- `risk_factors` - 触发风险等级的关键因子\n- `alert_message` - 提示文本（如\"检测到小碎步 + 躯干左右摇摆增大，跌倒风险偏高，建议加强陪护或就医评估\"）\n- `medical_followup_hint` - 医疗复核/康复建议（仅作提示，非诊断）\n\n> 仅输出基于视频的步态客观指标与风险分级，不提供医学诊断；如疑似帕金森、肌少症或近期发生跌倒，请前往专业医疗机构评估。\n\nFile v1.0.8:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.8:scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.8:skill-card.md\n\n## Description:\n\nAnalyzes elderly-person walking videos to estimate gait metrics such as step length, gait speed, cadence, trunk sway, and fall-risk level.\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, caregivers, and health-management developers use this skill to submit fixed-camera walking videos or video URLs for structured gait screening reports and historical report lookup. The output is a screening aid and does not replace professional clinical assessment.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive elderly-person gait videos and report history are sent to the configured LifeEmergence/SMYX cloud service.\n\nMitigation: Confirm the endpoint, data-retention terms, consent basis, and deletion process before installing or running the skill.\n\nRisk: The skill manages user identity, remote registration, stored tokens, and history access automatically.\n\nMitigation: Review how identities are created, where tokens are stored, and who can access historical reports before deployment.\n\nRisk: The output is a fall-risk screening report and may be mistaken for a diagnosis.\n\nMitigation: Present results as auxiliary screening information and require professional medical review for clinical decisions.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-gait-instability-detection-analysis)\n- [API Interface Documentation](references/api_doc.md)\n- [SMYX Analysis API Documentation](skills/smyx_analysis/references/api_doc.md)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, json, shell commands, guidance]\n\n**Output Format:** [Markdown text with structured JSON report content and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include gait metrics, fall-risk level, risk factors, alert text, medical follow-up hints, and historical report links.]\n\n## Skill Version(s):\n\n1.0.8 (source: server release metadata; artifact frontmatter reports 1.0.11)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.8:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.8:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.7: 31 files, 41253 bytes\n\nFiles: references/api_doc.md (2636b), scripts/__init__.py (62b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (586b), scripts/smyx_elderly_gait_instability_detection_analysis.py (3598b), skill-card.md (2839b), SKILL.md (12641b), 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 (167b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"smyx-elderly-gait-instability-detection-analysis\"\ndescription: \"Using a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🚶 Elderly Gait Instability / Shuffling Step Detection | 老年人步态不稳/小碎步识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人步态不稳/小碎步识别** |\n| 🎯 核心目标 | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. When step length is too small (small-shuffling steps), gait speed is too slow, or trunk sway is too large, the system outputs a fall risk level (low / medium / high). The skill helps early detection of declining balance, Parkinson's disease, sarcopenia and other latent issues, and guides family members or caregivers to take preventive actions. Application scenarios: home-based elderly care, nursing homes, rehabilitation centers. The system can be scheduled (e.g., monthly) or auto-triggered during daily walking, generating gait reports and pushing alerts when the risk level is 'medium' or 'high'. Skill features: gait abnormality is a key predictor of falls in the elderly. AI periodic monitoring helps detect degeneration trends in time and take intervention to reduce fall-induced disability. Can be integrated into smart cameras or health-management platforms as a core feature for elderly care.\n\n通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。该技能有助于早期发现老年人平衡能力下降、帕金森病、肌少症等潜在问题，指导家属或护理人员采取预防措施。应用场景：居家养老、养老院、康复中心。系统定期（如每月）或在老年人日常行走时自动触发检测，生成步态报告，当风险等级为'中'或'高'时推送提醒。技能特点：步态异常是老年人跌倒的重要预测因子。通过AI定期监测，可及早发现退化趋势，采取干预措施，降低跌倒致残率。该技能可集成到智能摄像头或健康管理平台中，成为养老监护的核心功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的老年人步态安全 AI。你的任务是分析老年人直线行走的侧面或正面视频，提取步态参数（步幅、步速、躯干摇摆角、步频），并综合评估跌倒风险等级。不要提供医疗诊断或临床建议，仅输出基于视频的步态客观指标与风险分级。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于走廊/客厅直线行走视频，量化老年人步幅、步速、躯干摇摆等步态指标，综合评估跌倒风险等级（low / medium / high）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与姿态估计（下肢/躯干关键点） |\n| 2 | 行走片段识别 |\n| 3 | 步幅长度（cm |\n| 4 | 结合身高换算） |\n| 5 | 步速（m/s） |\n| 6 | 步频（步/分钟） |\n| 7 | 躯干左右摇摆角（°） |\n| 8 | 步幅变异性（CV） |\n| 9 | 双支撑相占比 |\n| 10 | 步态模式描述（normal / short_steps / wide_sway / slow / mixed） |\n| 11 | 跌倒风险分级（low / medium / high） |\n| 12 | 关键风险因子列举 |\n| 13 | 医疗复核/康复建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供老年人直线行走视频 URL 或文件需要分析时，默认触发本技能进行步态不稳/小碎步识别 |\n| 🔎 明确分析意图 | 当用户明确提及步态不稳、小碎步、步幅小、步速慢、躯干摇摆、走路不稳、跌倒风险、帕金森步态、肌少症、平衡能力下降等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看步态分析历史报告、跌倒风险评估报告清单、老人步态报告清单、查询历史步态记录、显示所有步态分析报告、显示老人跌倒风险诊断报告，查询步态风险预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_gait_instability_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备老年人直线行走视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行老年人步态不稳/小碎步识别 | 调用 `-m scripts.smyx_elderly_gait_instability_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地老年人直线行走视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络老年人直线行走视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，老年人步态安全场景默认 `other` | 按需填写 |\n| `--list` | 显示老年人步态不稳历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_elderly_gait_instability_detection_analysis.py`](scripts/smyx_elderly_gait_instability_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议覆盖完整直线行走片段、≥ 25 FPS |\n| 🧑‍⚖️ 结果性质 | 步幅 cm 估算依赖身高/标定信息，若未提供身高则采用经验比例换算，绝对值仅供参考、趋势更有意义 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为辅助筛查参考，本工具不替代专业康复/神经科评估 |\n| 🔏 隐私合规 | 隐私合规：步态视频涉及个人健康信息，使用前需取得被监护人或家属知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input /path/to/walk.mp4\n\n# 分析网络直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --url https://example.com/walk.mp4\n\n# 显示历史步态识别报告（自动触发关键词：查看步态分析历史报告、跌倒风险评估报告清单等）\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-gait-instability-detection-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1787289269037\n}\n\nFile v1.0.7:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人步态不稳/小碎步识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动老年人步态不稳识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果与跌倒风险等级\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史步态分析记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` - 老年人步态不稳/小碎步识别\n\n## 输入约束\n\n- 摄像头建议固定于走廊或客厅，覆盖一段直线行走路径（侧面或正面均可）\n- 时长建议 ≥ 5 秒（推荐 10-30 秒），帧率 ≥ 25 FPS\n- 老年人需在视频中完成至少 3-5 步连续行走，光照均匀、背景简洁\n- 可选附带：身高（用于像素 → cm 换算）、年龄、是否使用助行器\n\n## 关键观测指标\n\n- `step_length_cm` - 步幅长度（cm，估算）\n- `gait_speed_m_s` - 步速（m/s）\n- `cadence_steps_min` - 步频（步/分钟）\n- `trunk_sway_deg` - 躯干左右摇摆角度（°）\n- `step_length_variability` - 步幅变异性（CV）\n- `double_support_ratio` - 双支撑相占比（%）\n\n## 跌倒风险等级判定（仅作筛查提示）\n\n- `low` - 步幅、步速、躯干稳定均处于正常范围\n- `medium` - 步幅偏小 / 步速偏慢 / 躯干摇摆增大 任一指标异常\n- `high` - 多项指标同时异常，或步幅显著缩小（小碎步典型表现）+ 躯干摇摆过大\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到行走人体\n- `walking_detected` - 是否检测到直线行走片段\n- `gait_metrics` - 各步态参数数值（step_length_cm / gait_speed_m_s / cadence_steps_min / trunk_sway_deg / step_length_variability / double_support_ratio）\n- `gait_pattern` - 步态特征描述（normal / short_steps / wide_sway / slow / mixed）\n- `fall_risk_level` - 跌倒风险等级（low / medium / high）\n- `risk_factors` - 触发风险等级的关键因子\n- `alert_message` - 提示文本（如\"检测到小碎步 + 躯干左右摇摆增大，跌倒风险偏高，建议加强陪护或就医评估\"）\n- `medical_followup_hint` - 医疗复核/康复建议（仅作提示，非诊断）\n\n> 仅输出基于视频的步态客观指标与风险分级，不提供医学诊断；如疑似帕金森、肌少症或近期发生跌倒，请前往专业医疗机构评估。\n\nFile v1.0.7:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.7:scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.7:skill-card.md\n\n## Description:\n\nAnalyzes fixed-camera walking videos of an elderly person to estimate gait metrics such as step length, gait speed, trunk sway, and cadence, then reports gait stability and fall-risk level.\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, caregivers, rehabilitation staff, and developers can use this skill to analyze walking videos for objective gait metrics, gait-pattern summaries, and low/medium/high fall-risk screening. Results are auxiliary screening information and do not replace professional medical evaluation.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive health-related gait videos and reports are sent to a configured cloud service.\n\nMitigation: Use only with informed consent from the recorded person or their authorized caregiver, and avoid uploading videos unless the deployment's privacy, retention, and deletion terms are acceptable.\n\nRisk: The skill silently creates or reuses an identity and stores authentication tokens locally.\n\nMitigation: Review account-binding and token-storage behavior before installation, restrict filesystem access where possible, and prefer a release that documents token storage and deletion controls.\n\nRisk: History lookup can retrieve cloud-stored reports with limited user confirmation.\n\nMitigation: Require operator confirmation before report-history retrieval and verify that the active identity is authorized to access the reports.\n\nRisk: Fall-risk output and gait metrics may be mistaken for clinical diagnosis.\n\nMitigation: Present results as auxiliary screening only and route concerning findings to qualified medical or rehabilitation professionals.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-gait-instability-detection-analysis)\n- [API interface documentation](artifact/references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, files, guidance]\n\n**Output Format:** [Markdown or JSON text with optional saved result files and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Includes structured gait metrics, fall-risk level, risk factors, alert text, medical follow-up hints, and cloud report history when requested.]\n\n## Skill Version(s):\n\n1.0.7 (source: server release metadata; artifact frontmatter states 1.0.11)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.7:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.7:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.6: 31 files, 41045 bytes\n\nFiles: references/api_doc.md (2636b), scripts/__init__.py (62b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (586b), scripts/smyx_elderly_gait_instability_detection_analysis.py (3598b), skill-card.md (2431b), SKILL.md (12641b), 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 (167b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"smyx-elderly-gait-instability-detection-analysis\"\ndescription: \"Using a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 🚶 Elderly Gait Instability / Shuffling Step Detection | 老年人步态不稳/小碎步识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人步态不稳/小碎步识别** |\n| 🎯 核心目标 | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. When step length is too small (small-shuffling steps), gait speed is too slow, or trunk sway is too large, the system outputs a fall risk level (low / medium / high). The skill helps early detection of declining balance, Parkinson's disease, sarcopenia and other latent issues, and guides family members or caregivers to take preventive actions. Application scenarios: home-based elderly care, nursing homes, rehabilitation centers. The system can be scheduled (e.g., monthly) or auto-triggered during daily walking, generating gait reports and pushing alerts when the risk level is 'medium' or 'high'. Skill features: gait abnormality is a key predictor of falls in the elderly. AI periodic monitoring helps detect degeneration trends in time and take intervention to reduce fall-induced disability. Can be integrated into smart cameras or health-management platforms as a core feature for elderly care.\n\n通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。该技能有助于早期发现老年人平衡能力下降、帕金森病、肌少症等潜在问题，指导家属或护理人员采取预防措施。应用场景：居家养老、养老院、康复中心。系统定期（如每月）或在老年人日常行走时自动触发检测，生成步态报告，当风险等级为'中'或'高'时推送提醒。技能特点：步态异常是老年人跌倒的重要预测因子。通过AI定期监测，可及早发现退化趋势，采取干预措施，降低跌倒致残率。该技能可集成到智能摄像头或健康管理平台中，成为养老监护的核心功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的老年人步态安全 AI。你的任务是分析老年人直线行走的侧面或正面视频，提取步态参数（步幅、步速、躯干摇摆角、步频），并综合评估跌倒风险等级。不要提供医疗诊断或临床建议，仅输出基于视频的步态客观指标与风险分级。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于走廊/客厅直线行走视频，量化老年人步幅、步速、躯干摇摆等步态指标，综合评估跌倒风险等级（low / medium / high）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与姿态估计（下肢/躯干关键点） |\n| 2 | 行走片段识别 |\n| 3 | 步幅长度（cm |\n| 4 | 结合身高换算） |\n| 5 | 步速（m/s） |\n| 6 | 步频（步/分钟） |\n| 7 | 躯干左右摇摆角（°） |\n| 8 | 步幅变异性（CV） |\n| 9 | 双支撑相占比 |\n| 10 | 步态模式描述（normal / short_steps / wide_sway / slow / mixed） |\n| 11 | 跌倒风险分级（low / medium / high） |\n| 12 | 关键风险因子列举 |\n| 13 | 医疗复核/康复建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供老年人直线行走视频 URL 或文件需要分析时，默认触发本技能进行步态不稳/小碎步识别 |\n| 🔎 明确分析意图 | 当用户明确提及步态不稳、小碎步、步幅小、步速慢、躯干摇摆、走路不稳、跌倒风险、帕金森步态、肌少症、平衡能力下降等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看步态分析历史报告、跌倒风险评估报告清单、老人步态报告清单、查询历史步态记录、显示所有步态分析报告、显示老人跌倒风险诊断报告，查询步态风险预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_gait_instability_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备老年人直线行走视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行老年人步态不稳/小碎步识别 | 调用 `-m scripts.smyx_elderly_gait_instability_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地老年人直线行走视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络老年人直线行走视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，老年人步态安全场景默认 `other` | 按需填写 |\n| `--list` | 显示老年人步态不稳历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_elderly_gait_instability_detection_analysis.py`](scripts/smyx_elderly_gait_instability_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议覆盖完整直线行走片段、≥ 25 FPS |\n| 🧑‍⚖️ 结果性质 | 步幅 cm 估算依赖身高/标定信息，若未提供身高则采用经验比例换算，绝对值仅供参考、趋势更有意义 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为辅助筛查参考，本工具不替代专业康复/神经科评估 |\n| 🔏 隐私合规 | 隐私合规：步态视频涉及个人健康信息，使用前需取得被监护人或家属知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input /path/to/walk.mp4\n\n# 分析网络直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --url https://example.com/walk.mp4\n\n# 显示历史步态识别报告（自动触发关键词：查看步态分析历史报告、跌倒风险评估报告清单等）\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-gait-instability-detection-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1786638340142\n}\n\nFile v1.0.6:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人步态不稳/小碎步识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动老年人步态不稳识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果与跌倒风险等级\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史步态分析记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` - 老年人步态不稳/小碎步识别\n\n## 输入约束\n\n- 摄像头建议固定于走廊或客厅，覆盖一段直线行走路径（侧面或正面均可）\n- 时长建议 ≥ 5 秒（推荐 10-30 秒），帧率 ≥ 25 FPS\n- 老年人需在视频中完成至少 3-5 步连续行走，光照均匀、背景简洁\n- 可选附带：身高（用于像素 → cm 换算）、年龄、是否使用助行器\n\n## 关键观测指标\n\n- `step_length_cm` - 步幅长度（cm，估算）\n- `gait_speed_m_s` - 步速（m/s）\n- `cadence_steps_min` - 步频（步/分钟）\n- `trunk_sway_deg` - 躯干左右摇摆角度（°）\n- `step_length_variability` - 步幅变异性（CV）\n- `double_support_ratio` - 双支撑相占比（%）\n\n## 跌倒风险等级判定（仅作筛查提示）\n\n- `low` - 步幅、步速、躯干稳定均处于正常范围\n- `medium` - 步幅偏小 / 步速偏慢 / 躯干摇摆增大 任一指标异常\n- `high` - 多项指标同时异常，或步幅显著缩小（小碎步典型表现）+ 躯干摇摆过大\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到行走人体\n- `walking_detected` - 是否检测到直线行走片段\n- `gait_metrics` - 各步态参数数值（step_length_cm / gait_speed_m_s / cadence_steps_min / trunk_sway_deg / step_length_variability / double_support_ratio）\n- `gait_pattern` - 步态特征描述（normal / short_steps / wide_sway / slow / mixed）\n- `fall_risk_level` - 跌倒风险等级（low / medium / high）\n- `risk_factors` - 触发风险等级的关键因子\n- `alert_message` - 提示文本（如\"检测到小碎步 + 躯干左右摇摆增大，跌倒风险偏高，建议加强陪护或就医评估\"）\n- `medical_followup_hint` - 医疗复核/康复建议（仅作提示，非诊断）\n\n> 仅输出基于视频的步态客观指标与风险分级，不提供医学诊断；如疑似帕金森、肌少症或近期发生跌倒，请前往专业医疗机构评估。\n\nFile v1.0.6:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.6:scripts/config.yaml\n\n{}\n\nFile v1.0.6:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.6:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.6:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.6:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.6:skill-card.md\n\n## Description:\n\nUsing fixed-camera video of an elderly person walking in a straight line, this skill estimates gait metrics such as step length, gait speed, trunk sway, and cadence to report gait stability and fall-risk level.\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, caregivers, and health-management developers use this skill to analyze walking videos for objective gait indicators, fall-risk screening, historical report lookup, and follow-up guidance. The output is an auxiliary screening report and is not a medical diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill sends gait videos and report queries to the publisher's cloud service and works with sensitive health-related content.\n\nMitigation: Use it only with informed consent from the recorded person or guardian, avoid treating outputs as diagnosis, and follow appropriate privacy handling for videos and reports.\n\nRisk: The server security review says the skill silently creates or reuses a local identity and stores authentication data for health-related reports.\n\nMitigation: Review or clear the workspace data directory on shared machines and install only when this identity and token behavior is acceptable.\n\n## Reference(s):\n\n- [Elderly gait instability API documentation](artifact/references/api_doc.md)\n- [Shared analysis API documentation](artifact/skills/smyx_analysis/references/api_doc.md)\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-gait-instability-detection-analysis)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance]\n\n**Output Format:** [Markdown and JSON-style structured analysis reports with optional report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include gait metrics, fall-risk level, risk factors, alert text, history tables, and cloud report URLs.]\n\n## Skill Version(s):\n\n1.0.6 (source: server release metadata; artifact SKILL.md frontmatter reports 1.0.10)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.6:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.6:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.5: 31 files, 41108 bytes\n\nFiles: references/api_doc.md (2636b), scripts/__init__.py (62b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (586b), scripts/smyx_elderly_gait_instability_detection_analysis.py (3598b), skill-card.md (2546b), SKILL.md (12640b), 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 (167b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: \"smyx-elderly-gait-instability-detection-analysis\"\ndescription: \"Using a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 🚶 Elderly Gait Instability / Shuffling Step Detection | 老年人步态不稳/小碎步识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人步态不稳/小碎步识别** |\n| 🎯 核心目标 | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. When step length is too small (small-shuffling steps), gait speed is too slow, or trunk sway is too large, the system outputs a fall risk level (low / medium / high). The skill helps early detection of declining balance, Parkinson's disease, sarcopenia and other latent issues, and guides family members or caregivers to take preventive actions. Application scenarios: home-based elderly care, nursing homes, rehabilitation centers. The system can be scheduled (e.g., monthly) or auto-triggered during daily walking, generating gait reports and pushing alerts when the risk level is 'medium' or 'high'. Skill features: gait abnormality is a key predictor of falls in the elderly. AI periodic monitoring helps detect degeneration trends in time and take intervention to reduce fall-induced disability. Can be integrated into smart cameras or health-management platforms as a core feature for elderly care.\n\n通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。该技能有助于早期发现老年人平衡能力下降、帕金森病、肌少症等潜在问题，指导家属或护理人员采取预防措施。应用场景：居家养老、养老院、康复中心。系统定期（如每月）或在老年人日常行走时自动触发检测，生成步态报告，当风险等级为'中'或'高'时推送提醒。技能特点：步态异常是老年人跌倒的重要预测因子。通过AI定期监测，可及早发现退化趋势，采取干预措施，降低跌倒致残率。该技能可集成到智能摄像头或健康管理平台中，成为养老监护的核心功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的老年人步态安全 AI。你的任务是分析老年人直线行走的侧面或正面视频，提取步态参数（步幅、步速、躯干摇摆角、步频），并综合评估跌倒风险等级。不要提供医疗诊断或临床建议，仅输出基于视频的步态客观指标与风险分级。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于走廊/客厅直线行走视频，量化老年人步幅、步速、躯干摇摆等步态指标，综合评估跌倒风险等级（low / medium / high）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与姿态估计（下肢/躯干关键点） |\n| 2 | 行走片段识别 |\n| 3 | 步幅长度（cm |\n| 4 | 结合身高换算） |\n| 5 | 步速（m/s） |\n| 6 | 步频（步/分钟） |\n| 7 | 躯干左右摇摆角（°） |\n| 8 | 步幅变异性（CV） |\n| 9 | 双支撑相占比 |\n| 10 | 步态模式描述（normal / short_steps / wide_sway / slow / mixed） |\n| 11 | 跌倒风险分级（low / medium / high） |\n| 12 | 关键风险因子列举 |\n| 13 | 医疗复核/康复建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供老年人直线行走视频 URL 或文件需要分析时，默认触发本技能进行步态不稳/小碎步识别 |\n| 🔎 明确分析意图 | 当用户明确提及步态不稳、小碎步、步幅小、步速慢、躯干摇摆、走路不稳、跌倒风险、帕金森步态、肌少症、平衡能力下降等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看步态分析历史报告、跌倒风险评估报告清单、老人步态报告清单、查询历史步态记录、显示所有步态分析报告、显示老人跌倒风险诊断报告，查询步态风险预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_gait_instability_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备老年人直线行走视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行老年人步态不稳/小碎步识别 | 调用 `-m scripts.smyx_elderly_gait_instability_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地老年人直线行走视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络老年人直线行走视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，老年人步态安全场景默认 `other` | 按需填写 |\n| `--list` | 显示老年人步态不稳历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_elderly_gait_instability_detection_analysis.py`](scripts/smyx_elderly_gait_instability_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议覆盖完整直线行走片段、≥ 25 FPS |\n| 🧑‍⚖️ 结果性质 | 步幅 cm 估算依赖身高/标定信息，若未提供身高则采用经验比例换算，绝对值仅供参考、趋势更有意义 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为辅助筛查参考，本工具不替代专业康复/神经科评估 |\n| 🔏 隐私合规 | 隐私合规：步态视频涉及个人健康信息，使用前需取得被监护人或家属知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input /path/to/walk.mp4\n\n# 分析网络直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --url https://example.com/walk.mp4\n\n# 显示历史步态识别报告（自动触发关键词：查看步态分析历史报告、跌倒风险评估报告清单等）\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --output result.json\n```\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-gait-instability-detection-analysis\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1786122516713\n}\n\nFile v1.0.5:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人步态不稳/小碎步识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动老年人步态不稳识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果与跌倒风险等级\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史步态分析记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` - 老年人步态不稳/小碎步识别\n\n## 输入约束\n\n- 摄像头建议固定于走廊或客厅，覆盖一段直线行走路径（侧面或正面均可）\n- 时长建议 ≥ 5 秒（推荐 10-30 秒），帧率 ≥ 25 FPS\n- 老年人需在视频中完成至少 3-5 步连续行走，光照均匀、背景简洁\n- 可选附带：身高（用于像素 → cm 换算）、年龄、是否使用助行器\n\n## 关键观测指标\n\n- `step_length_cm` - 步幅长度（cm，估算）\n- `gait_speed_m_s` - 步速（m/s）\n- `cadence_steps_min` - 步频（步/分钟）\n- `trunk_sway_deg` - 躯干左右摇摆角度（°）\n- `step_length_variability` - 步幅变异性（CV）\n- `double_support_ratio` - 双支撑相占比（%）\n\n## 跌倒风险等级判定（仅作筛查提示）\n\n- `low` - 步幅、步速、躯干稳定均处于正常范围\n- `medium` - 步幅偏小 / 步速偏慢 / 躯干摇摆增大 任一指标异常\n- `high` - 多项指标同时异常，或步幅显著缩小（小碎步典型表现）+ 躯干摇摆过大\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到行走人体\n- `walking_detected` - 是否检测到直线行走片段\n- `gait_metrics` - 各步态参数数值（step_length_cm / gait_speed_m_s / cadence_steps_min / trunk_sway_deg / step_length_variability / double_support_ratio）\n- `gait_pattern` - 步态特征描述（normal / short_steps / wide_sway / slow / mixed）\n- `fall_risk_level` - 跌倒风险等级（low / medium / high）\n- `risk_factors` - 触发风险等级的关键因子\n- `alert_message` - 提示文本（如\"检测到小碎步 + 躯干左右摇摆增大，跌倒风险偏高，建议加强陪护或就医评估\"）\n- `medical_followup_hint` - 医疗复核/康复建议（仅作提示，非诊断）\n\n> 仅输出基于视频的步态客观指标与风险分级，不提供医学诊断；如疑似帕金森、肌少症或近期发生跌倒，请前往专业医疗机构评估。\n\nFile v1.0.5:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.5:scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.5:skill-card.md\n\n## Description:\n\nAnalyzes straight-line walking videos of older adults to estimate gait metrics such as step length, gait speed, cadence, and trunk sway, then returns a fall-risk level and structured report.\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 caregivers, care facilities, rehabilitation teams, and developers use this skill to submit walking videos or video URLs for gait metric extraction, fall-risk screening, and historical report lookup. Outputs are screening aids and do not replace professional medical evaluation.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Walking videos or video URLs may be sent to lifeemergence cloud services for analysis.\n\nMitigation: Use only with informed consent from the recorded person or authorized caregiver, and confirm privacy, retention, deletion, and access controls before using real health-related footage.\n\nRisk: Reports may be associated with a persistent internal identity, and local tokens may be stored in the workspace data directory.\n\nMitigation: Review account-linking and token-handling behavior before deployment, use isolated workspaces for evaluation, and clear local data when it is no longer needed.\n\nRisk: Gait metrics and fall-risk levels could be mistaken for a medical diagnosis.\n\nMitigation: Present outputs as auxiliary screening information only and direct users to professional rehabilitation or neurological evaluation for clinical decisions.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-gait-instability-detection-analysis)\n- [API Interface Documentation](references/api_doc.md)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, json, shell commands, guidance]\n\n**Output Format:** [Markdown or JSON gait-analysis report with metrics, risk level, risk factors, recommendations, and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Can query historical cloud reports and can write an output file when requested.]\n\n## Skill Version(s):\n\n1.0.5 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.5:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.5:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.4: 31 files, 41178 bytes\n\nFiles: references/api_doc.md (2636b), scripts/__init__.py (62b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (586b), scripts/smyx_elderly_gait_instability_detection_analysis.py (3598b), skill-card.md (2849b), SKILL.md (12640b), 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 (167b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: \"smyx-elderly-gait-instability-detection-analysis\"\ndescription: \"Using a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。\"\nversion: \"1.0.7\"\nlicense: \"MIT-0\"\n---\n\n# 🚶 Elderly Gait Instability / Shuffling Step Detection | 老年人步态不稳/小碎步识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人步态不稳/小碎步识别** |\n| 🎯 核心目标 | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. When step length is too small (small-shuffling steps), gait speed is too slow, or trunk sway is too large, the system outputs a fall risk level (low / medium / high). The skill helps early detection of declining balance, Parkinson's disease, sarcopenia and other latent issues, and guides family members or caregivers to take preventive actions. Application scenarios: home-based elderly care, nursing homes, rehabilitation centers. The system can be scheduled (e.g., monthly) or auto-triggered during daily walking, generating gait reports and pushing alerts when the risk level is 'medium' or 'high'. Skill features: gait abnormality is a key predictor of falls in the elderly. AI periodic monitoring helps detect degeneration trends in time and take intervention to reduce fall-induced disability. Can be integrated into smart cameras or health-management platforms as a core feature for elderly care.\n\n通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。该技能有助于早期发现老年人平衡能力下降、帕金森病、肌少症等潜在问题，指导家属或护理人员采取预防措施。应用场景：居家养老、养老院、康复中心。系统定期（如每月）或在老年人日常行走时自动触发检测，生成步态报告，当风险等级为'中'或'高'时推送提醒。技能特点：步态异常是老年人跌倒的重要预测因子。通过AI定期监测，可及早发现退化趋势，采取干预措施，降低跌倒致残率。该技能可集成到智能摄像头或健康管理平台中，成为养老监护的核心功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的老年人步态安全 AI。你的任务是分析老年人直线行走的侧面或正面视频，提取步态参数（步幅、步速、躯干摇摆角、步频），并综合评估跌倒风险等级。不要提供医疗诊断或临床建议，仅输出基于视频的步态客观指标与风险分级。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于走廊/客厅直线行走视频，量化老年人步幅、步速、躯干摇摆等步态指标，综合评估跌倒风险等级（low / medium / high）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与姿态估计（下肢/躯干关键点） |\n| 2 | 行走片段识别 |\n| 3 | 步幅长度（cm |\n| 4 | 结合身高换算） |\n| 5 | 步速（m/s） |\n| 6 | 步频（步/分钟） |\n| 7 | 躯干左右摇摆角（°） |\n| 8 | 步幅变异性（CV） |\n| 9 | 双支撑相占比 |\n| 10 | 步态模式描述（normal / short_steps / wide_sway / slow / mixed） |\n| 11 | 跌倒风险分级（low / medium / high） |\n| 12 | 关键风险因子列举 |\n| 13 | 医疗复核/康复建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供老年人直线行走视频 URL 或文件需要分析时，默认触发本技能进行步态不稳/小碎步识别 |\n| 🔎 明确分析意图 | 当用户明确提及步态不稳、小碎步、步幅小、步速慢、躯干摇摆、走路不稳、跌倒风险、帕金森步态、肌少症、平衡能力下降等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看步态分析历史报告、跌倒风险评估报告清单、老人步态报告清单、查询历史步态记录、显示所有步态分析报告、显示老人跌倒风险诊断报告，查询步态风险预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_gait_instability_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备老年人直线行走视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行老年人步态不稳/小碎步识别 | 调用 `-m scripts.smyx_elderly_gait_instability_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地老年人直线行走视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络老年人直线行走视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，老年人步态安全场景默认 `other` | 按需填写 |\n| `--list` | 显示老年人步态不稳历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_elderly_gait_instability_detection_analysis.py`](scripts/smyx_elderly_gait_instability_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议覆盖完整直线行走片段、≥ 25 FPS |\n| 🧑‍⚖️ 结果性质 | 步幅 cm 估算依赖身高/标定信息，若未提供身高则采用经验比例换算，绝对值仅供参考、趋势更有意义 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为辅助筛查参考，本工具不替代专业康复/神经科评估 |\n| 🔏 隐私合规 | 隐私合规：步态视频涉及个人健康信息，使用前需取得被监护人或家属知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input /path/to/walk.mp4\n\n# 分析网络直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --url https://example.com/walk.mp4\n\n# 显示历史步态识别报告（自动触发关键词：查看步态分析历史报告、跌倒风险评估报告清单等）\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --output result.json\n```\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-gait-instability-detection-analysis\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1785195569776\n}\n\nFile v1.0.4:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人步态不稳/小碎步识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动老年人步态不稳识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果与跌倒风险等级\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史步态分析记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` - 老年人步态不稳/小碎步识别\n\n## 输入约束\n\n- 摄像头建议固定于走廊或客厅，覆盖一段直线行走路径（侧面或正面均可）\n- 时长建议 ≥ 5 秒（推荐 10-30 秒），帧率 ≥ 25 FPS\n- 老年人需在视频中完成至少 3-5 步连续行走，光照均匀、背景简洁\n- 可选附带：身高（用于像素 → cm 换算）、年龄、是否使用助行器\n\n## 关键观测指标\n\n- `step_length_cm` - 步幅长度（cm，估算）\n- `gait_speed_m_s` - 步速（m/s）\n- `cadence_steps_min` - 步频（步/分钟）\n- `trunk_sway_deg` - 躯干左右摇摆角度（°）\n- `step_length_variability` - 步幅变异性（CV）\n- `double_support_ratio` - 双支撑相占比（%）\n\n## 跌倒风险等级判定（仅作筛查提示）\n\n- `low` - 步幅、步速、躯干稳定均处于正常范围\n- `medium` - 步幅偏小 / 步速偏慢 / 躯干摇摆增大 任一指标异常\n- `high` - 多项指标同时异常，或步幅显著缩小（小碎步典型表现）+ 躯干摇摆过大\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到行走人体\n- `walking_detected` - 是否检测到直线行走片段\n- `gait_metrics` - 各步态参数数值（step_length_cm / gait_speed_m_s / cadence_steps_min / trunk_sway_deg / step_length_variability / double_support_ratio）\n- `gait_pattern` - 步态特征描述（normal / short_steps / wide_sway / slow / mixed）\n- `fall_risk_level` - 跌倒风险等级（low / medium / high）\n- `risk_factors` - 触发风险等级的关键因子\n- `alert_message` - 提示文本（如\"检测到小碎步 + 躯干左右摇摆增大，跌倒风险偏高，建议加强陪护或就医评估\"）\n- `medical_followup_hint` - 医疗复核/康复建议（仅作提示，非诊断）\n\n> 仅输出基于视频的步态客观指标与风险分级，不提供医学诊断；如疑似帕金森、肌少症或近期发生跌倒，请前往专业医疗机构评估。\n\nFile v1.0.4:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.4:scripts/config.yaml\n\n{}\n\nFile v1.0.4:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.4:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.4:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.4:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.4:skill-card.md\n\n## Description: <br>\nAnalyzes fixed-camera walking videos of older adults to estimate gait metrics such as step length, gait speed, trunk sway, and cadence, then reports gait stability and fall-risk level. <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>\nCaregivers, elder-care operators, rehabilitation staff, and developers use this skill to analyze straight-line walking videos, generate gait metrics, and review fall-risk screening reports or prior report history. The output is screening support only and does not replace professional medical or rehabilitation assessment. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Gait videos, report queries, identity values, and derived health reports may be sent to Life Emergence cloud services. <br>\nMitigation: Confirm consent, retention expectations, account ownership, and deletion controls before processing real elderly-person footage. <br>\nRisk: The skill may silently create or reuse local identities and cached tokens for report access. <br>\nMitigation: Use an isolated workspace and review existing data/smyx-api-key.txt and data/smyx-common-claw.db state before installation or execution. <br>\nRisk: Gait metrics and fall-risk levels are screening outputs and may be inaccurate without appropriate video quality, calibration, or clinical context. <br>\nMitigation: Treat results as decision support only and route concerning findings to qualified medical or rehabilitation professionals. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-gait-instability-detection-analysis) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [API interface documentation](artifact/references/api_doc.md) <br>\n- [Shared analysis API documentation](artifact/skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, json, shell commands, guidance] <br>\n**Output Format:** [Markdown and text reports with structured JSON content, shell command examples, and report links.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include gait metrics, fall-risk level, risk factors, history-query results, and a cloud report export link.] <br>\n\n## Skill Version(s): <br>\n1.0.4 (source: server release metadata and target metadata; artifact frontmatter says 1.0.7) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.4:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.4:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.3: 31 files, 41104 bytes\n\nFiles: references/api_doc.md (2636b), scripts/__init__.py (62b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (586b), scripts/smyx_elderly_gait_instability_detection_analysis.py (3598b), skill-card.md (2625b), SKILL.md (12640b), 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 (167b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: \"smyx-elderly-gait-instability-detection-analysis\"\ndescription: \"Using a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。\"\nversion: \"1.0.6\"\nlicense: \"MIT-0\"\n---\n\n# 🚶 Elderly Gait Instability / Shuffling Step Detection | 老年人步态不稳/小碎步识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人步态不稳/小碎步识别** |\n| 🎯 核心目标 | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. When step length is too small (small-shuffling steps), gait speed is too slow, or trunk sway is too large, the system outputs a fall risk level (low / medium / high). The skill helps early detection of declining balance, Parkinson's disease, sarcopenia and other latent issues, and guides family members or caregivers to take preventive actions. Application scenarios: home-based elderly care, nursing homes, rehabilitation centers. The system can be scheduled (e.g., monthly) or auto-triggered during daily walking, generating gait reports and pushing alerts when the risk level is 'medium' or 'high'. Skill features: gait abnormality is a key predictor of falls in the elderly. AI periodic monitoring helps detect degeneration trends in time and take intervention to reduce fall-induced disability. Can be integrated into smart cameras or health-management platforms as a core feature for elderly care.\n\n通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。该技能有助于早期发现老年人平衡能力下降、帕金森病、肌少症等潜在问题，指导家属或护理人员采取预防措施。应用场景：居家养老、养老院、康复中心。系统定期（如每月）或在老年人日常行走时自动触发检测，生成步态报告，当风险等级为'中'或'高'时推送提醒。技能特点：步态异常是老年人跌倒的重要预测因子。通过AI定期监测，可及早发现退化趋势，采取干预措施，降低跌倒致残率。该技能可集成到智能摄像头或健康管理平台中，成为养老监护的核心功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的老年人步态安全 AI。你的任务是分析老年人直线行走的侧面或正面视频，提取步态参数（步幅、步速、躯干摇摆角、步频），并综合评估跌倒风险等级。不要提供医疗诊断或临床建议，仅输出基于视频的步态客观指标与风险分级。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于走廊/客厅直线行走视频，量化老年人步幅、步速、躯干摇摆等步态指标，综合评估跌倒风险等级（low / medium / high）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与姿态估计（下肢/躯干关键点） |\n| 2 | 行走片段识别 |\n| 3 | 步幅长度（cm |\n| 4 | 结合身高换算） |\n| 5 | 步速（m/s） |\n| 6 | 步频（步/分钟） |\n| 7 | 躯干左右摇摆角（°） |\n| 8 | 步幅变异性（CV） |\n| 9 | 双支撑相占比 |\n| 10 | 步态模式描述（normal / short_steps / wide_sway / slow / mixed） |\n| 11 | 跌倒风险分级（low / medium / high） |\n| 12 | 关键风险因子列举 |\n| 13 | 医疗复核/康复建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供老年人直线行走视频 URL 或文件需要分析时，默认触发本技能进行步态不稳/小碎步识别 |\n| 🔎 明确分析意图 | 当用户明确提及步态不稳、小碎步、步幅小、步速慢、躯干摇摆、走路不稳、跌倒风险、帕金森步态、肌少症、平衡能力下降等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看步态分析历史报告、跌倒风险评估报告清单、老人步态报告清单、查询历史步态记录、显示所有步态分析报告、显示老人跌倒风险诊断报告，查询步态风险预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_gait_instability_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备老年人直线行走视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行老年人步态不稳/小碎步识别 | 调用 `-m scripts.smyx_elderly_gait_instability_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地老年人直线行走视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络老年人直线行走视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，老年人步态安全场景默认 `other` | 按需填写 |\n| `--list` | 显示老年人步态不稳历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_elderly_gait_instability_detection_analysis.py`](scripts/smyx_elderly_gait_instability_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议覆盖完整直线行走片段、≥ 25 FPS |\n| 🧑‍⚖️ 结果性质 | 步幅 cm 估算依赖身高/标定信息，若未提供身高则采用经验比例换算，绝对值仅供参考、趋势更有意义 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为辅助筛查参考，本工具不替代专业康复/神经科评估 |\n| 🔏 隐私合规 | 隐私合规：步态视频涉及个人健康信息，使用前需取得被监护人或家属知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input /path/to/walk.mp4\n\n# 分析网络直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --url https://example.com/walk.mp4\n\n# 显示历史步态识别报告（自动触发关键词：查看步态分析历史报告、跌倒风险评估报告清单等）\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --output result.json\n```\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-gait-instability-detection-analysis\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1784261968777\n}\n\nFile v1.0.3:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人步态不稳/小碎步识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动老年人步态不稳识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果与跌倒风险等级\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史步态分析记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` - 老年人步态不稳/小碎步识别\n\n## 输入约束\n\n- 摄像头建议固定于走廊或客厅，覆盖一段直线行走路径（侧面或正面均可）\n- 时长建议 ≥ 5 秒（推荐 10-30 秒），帧率 ≥ 25 FPS\n- 老年人需在视频中完成至少 3-5 步连续行走，光照均匀、背景简洁\n- 可选附带：身高（用于像素 → cm 换算）、年龄、是否使用助行器\n\n## 关键观测指标\n\n- `step_length_cm` - 步幅长度（cm，估算）\n- `gait_speed_m_s` - 步速（m/s）\n- `cadence_steps_min` - 步频（步/分钟）\n- `trunk_sway_deg` - 躯干左右摇摆角度（°）\n- `step_length_variability` - 步幅变异性（CV）\n- `double_support_ratio` - 双支撑相占比（%）\n\n## 跌倒风险等级判定（仅作筛查提示）\n\n- `low` - 步幅、步速、躯干稳定均处于正常范围\n- `medium` - 步幅偏小 / 步速偏慢 / 躯干摇摆增大 任一指标异常\n- `high` - 多项指标同时异常，或步幅显著缩小（小碎步典型表现）+ 躯干摇摆过大\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到行走人体\n- `walking_detected` - 是否检测到直线行走片段\n- `gait_metrics` - 各步态参数数值（step_length_cm / gait_speed_m_s / cadence_steps_min / trunk_sway_deg / step_length_variability / double_support_ratio）\n- `gait_pattern` - 步态特征描述（normal / short_steps / wide_sway / slow / mixed）\n- `fall_risk_level` - 跌倒风险等级（low / medium / high）\n- `risk_factors` - 触发风险等级的关键因子\n- `alert_message` - 提示文本（如\"检测到小碎步 + 躯干左右摇摆增大，跌倒风险偏高，建议加强陪护或就医评估\"）\n- `medical_followup_hint` - 医疗复核/康复建议（仅作提示，非诊断）\n\n> 仅输出基于视频的步态客观指标与风险分级，不提供医学诊断；如疑似帕金森、肌少症或近期发生跌倒，请前往专业医疗机构评估。\n\nFile v1.0.3:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.3:scripts/config.yaml\n\n{}\n\nFile v1.0.3:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.3:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.3:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.3:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.3:skill-card.md\n\n## Description: <br>\nAnalyzes fixed-camera walking videos of older adults to estimate gait metrics such as step length, gait speed, trunk sway, and cadence, then returns a low, medium, or high fall-risk level. <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>\nCaregivers, care organizations, rehabilitation teams, and health-platform developers use this skill to screen walking videos for gait instability indicators and generate structured fall-risk reports. The output is intended as auxiliary screening information, not a medical diagnosis. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill processes elderly gait videos and report history through an external cloud service, which may involve sensitive health or caregiving footage. <br>\nMitigation: Use only with appropriate consent and review data retention, access control, and encryption practices before using real footage. <br>\nRisk: The skill silently creates or reuses identity-linked local account tokens for analysis and history lookup. <br>\nMitigation: Review token storage, identity association, and who can access historical reports before installation or deployment. <br>\nRisk: Gait metrics and fall-risk levels are auxiliary screening outputs and may be inaccurate or incomplete. <br>\nMitigation: Treat results as decision support and route concerning findings to qualified clinical or rehabilitation professionals. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-gait-instability-detection-analysis) <br>\n- [API interface documentation](references/api_doc.md) <br>\n- [SMYX analysis 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 tables or JSON structured analysis reports] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Includes gait metrics, risk factors, fall-risk level, advisory text, and report links when available.] <br>\n\n## Skill Version(s): <br>\n1.0.3 (source: server release metadata; artifact frontmatter reports 1.0.6) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.3:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.3:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.2: 31 files, 41009 bytes\n\nFiles: references/api_doc.md (2636b), scripts/__init__.py (62b), scripts/config.py (700b), scripts/config.yaml (3b), scripts/skill.py (586b), scripts/smyx_elderly_gait_instability_detection_analysis.py (3598b), skill-card.md (2630b), SKILL.md (12640b), 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 (167b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: \"smyx-elderly-gait-instability-detection-analysis\"\ndescription: \"Using a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。\"\nversion: \"1.0.4\"\nlicense: \"MIT-0\"\n---\n\n# 🚶 Elderly Gait Instability / Shuffling Step Detection | 老年人步态不稳/小碎步识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人步态不稳/小碎步识别** |\n| 🎯 核心目标 | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. When step length is too small (small-shuffling steps), gait speed is too slow, or trunk sway is too large, the system outputs a fall risk level (low / medium / high). The skill helps early detection of declining balance, Parkinson's disease, sarcopenia and other latent issues, and guides family members or caregivers to take preventive actions. Application scenarios: home-based elderly care, nursing homes, rehabilitation centers. The system can be scheduled (e.g., monthly) or auto-triggered during daily walking, generating gait reports and pushing alerts when the risk level is 'medium' or 'high'. Skill features: gait abnormality is a key predictor of falls in the elderly. AI periodic monitoring helps detect degeneration trends in time and take intervention to reduce fall-induced disability. Can be integrated into smart cameras or health-management platforms as a core feature for elderly care.\n\n通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。该技能有助于早期发现老年人平衡能力下降、帕金森病、肌少症等潜在问题，指导家属或护理人员采取预防措施。应用场景：居家养老、养老院、康复中心。系统定期（如每月）或在老年人日常行走时自动触发检测，生成步态报告，当风险等级为'中'或'高'时推送提醒。技能特点：步态异常是老年人跌倒的重要预测因子。通过AI定期监测，可及早发现退化趋势，采取干预措施，降低跌倒致残率。该技能可集成到智能摄像头或健康管理平台中，成为养老监护的核心功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的老年人步态安全 AI。你的任务是分析老年人直线行走的侧面或正面视频，提取步态参数（步幅、步速、躯干摇摆角、步频），并综合评估跌倒风险等级。不要提供医疗诊断或临床建议，仅输出基于视频的步态客观指标与风险分级。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于走廊/客厅直线行走视频，量化老年人步幅、步速、躯干摇摆等步态指标，综合评估跌倒风险等级（low / medium / high）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与姿态估计（下肢/躯干关键点） |\n| 2 | 行走片段识别 |\n| 3 | 步幅长度（cm |\n| 4 | 结合身高换算） |\n| 5 | 步速（m/s） |\n| 6 | 步频（步/分钟） |\n| 7 | 躯干左右摇摆角（°） |\n| 8 | 步幅变异性（CV） |\n| 9 | 双支撑相占比 |\n| 10 | 步态模式描述（normal / short_steps / wide_sway / slow / mixed） |\n| 11 | 跌倒风险分级（low / medium / high） |\n| 12 | 关键风险因子列举 |\n| 13 | 医疗复核/康复建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供老年人直线行走视频 URL 或文件需要分析时，默认触发本技能进行步态不稳/小碎步识别 |\n| 🔎 明确分析意图 | 当用户明确提及步态不稳、小碎步、步幅小、步速慢、躯干摇摆、走路不稳、跌倒风险、帕金森步态、肌少症、平衡能力下降等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看步态分析历史报告、跌倒风险评估报告清单、老人步态报告清单、查询历史步态记录、显示所有步态分析报告、显示老人跌倒风险诊断报告，查询步态风险预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_gait_instability_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备老年人直线行走视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行老年人步态不稳/小碎步识别 | 调用 `-m scripts.smyx_elderly_gait_instability_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地老年人直线行走视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络老年人直线行走视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，老年人步态安全场景默认 `other` | 按需填写 |\n| `--list` | 显示老年人步态不稳历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_elderly_gait_instability_detection_analysis.py`](scripts/smyx_elderly_gait_instability_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议覆盖完整直线行走片段、≥ 25 FPS |\n| 🧑‍⚖️ 结果性质 | 步幅 cm 估算依赖身高/标定信息，若未提供身高则采用经验比例换算，绝对值仅供参考、趋势更有意义 |\n| 🧑‍⚖️ 结果性质 | 检测结果仅作为辅助筛查参考，本工具不替代专业康复/神经科评估 |\n| 🔏 隐私合规 | 隐私合规：步态视频涉及个人健康信息，使用前需取得被监护人或家属知情同意，并妥善保管/加密相关录像 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input /path/to/walk.mp4\n\n# 分析网络直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --url https://example.com/walk.mp4\n\n# 显示历史步态识别报告（自动触发关键词：查看步态分析历史报告、跌倒风险评估报告清单等）\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --output result.json\n```\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-gait-instability-detection-analysis\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1783307665091\n}\n\nFile v1.0.2:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人步态不稳/小碎步识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动老年人步态不稳识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果与跌倒风险等级\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史步态分析记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` - 老年人步态不稳/小碎步识别\n\n## 输入约束\n\n- 摄像头建议固定于走廊或客厅，覆盖一段直线行走路径（侧面或正面均可）\n- 时长建议 ≥ 5 秒（推荐 10-30 秒），帧率 ≥ 25 FPS\n- 老年人需在视频中完成至少 3-5 步连续行走，光照均匀、背景简洁\n- 可选附带：身高（用于像素 → cm 换算）、年龄、是否使用助行器\n\n## 关键观测指标\n\n- `step_length_cm` - 步幅长度（cm，估算）\n- `gait_speed_m_s` - 步速（m/s）\n- `cadence_steps_min` - 步频（步/分钟）\n- `trunk_sway_deg` - 躯干左右摇摆角度（°）\n- `step_length_variability` - 步幅变异性（CV）\n- `double_support_ratio` - 双支撑相占比（%）\n\n## 跌倒风险等级判定（仅作筛查提示）\n\n- `low` - 步幅、步速、躯干稳定均处于正常范围\n- `medium` - 步幅偏小 / 步速偏慢 / 躯干摇摆增大 任一指标异常\n- `high` - 多项指标同时异常，或步幅显著缩小（小碎步典型表现）+ 躯干摇摆过大\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到行走人体\n- `walking_detected` - 是否检测到直线行走片段\n- `gait_metrics` - 各步态参数数值（step_length_cm / gait_speed_m_s / cadence_steps_min / trunk_sway_deg / step_length_variability / double_support_ratio）\n- `gait_pattern` - 步态特征描述（normal / short_steps / wide_sway / slow / mixed）\n- `fall_risk_level` - 跌倒风险等级（low / medium / high）\n- `risk_factors` - 触发风险等级的关键因子\n- `alert_message` - 提示文本（如\"检测到小碎步 + 躯干左右摇摆增大，跌倒风险偏高，建议加强陪护或就医评估\"）\n- `medical_followup_hint` - 医疗复核/康复建议（仅作提示，非诊断）\n\n> 仅输出基于视频的步态客观指标与风险分级，不提供医学诊断；如疑似帕金森、肌少症或近期发生跌倒，请前往专业医疗机构评估。\n\nFile v1.0.2:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.2:scripts/config.yaml\n\n{}\n\nFile v1.0.2:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.2:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.2:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.2:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.2:skill-card.md\n\n## Description: <br>\nAnalyzes fixed-camera videos of an older adult walking to estimate gait metrics and return a fall-risk level with a structured report. <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>\nDevelopers and care-platform operators can use this skill to send hallway or living-room walking videos to a cloud analysis service and receive gait metrics, risk factors, and report links for screening and monitoring workflows. It is not a medical diagnosis tool. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Sensitive gait videos and account-linked metadata are sent to LifeEmergence cloud services. <br>\nMitigation: Use only with informed consent, avoid unnecessary personal data, and follow applicable privacy and health-data handling requirements. <br>\nRisk: The skill automatically creates or reuses local identity state and stores service tokens in the workspace data directory. <br>\nMitigation: Run it in a controlled workspace, restrict file access, and remove or rotate stored tokens after use when appropriate. <br>\nRisk: Gait metrics and fall-risk levels can be mistaken for clinical diagnosis. <br>\nMitigation: Present results as screening information only and route concerning results to qualified medical or rehabilitation professionals. <br>\n\n\n## Reference(s): <br>\n- [Skill API documentation](artifact/references/api_doc.md) <br>\n- [Shared analysis API documentation](artifact/skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-gait-instability-detection-analysis) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, JSON, Shell commands, Guidance] <br>\n**Output Format:** [Markdown and JSON-style structured analysis with report links; shell commands for analysis and history queries.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Can output fall-risk level, gait metrics, risk factors, alerts, and report export links.] <br>\n\n## Skill Version(s): <br>\n1.0.2 (source: server release metadata; artifact frontmatter says 1.0.4) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.2:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.2:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3","readmeExcerpt":"Skill: Elderly Gait Instability / Shuffling Step Detection | 老年人步态不稳/小碎步识别 Owner: smyx-sunjinhui Summary: Using a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. | 通过走廊或客厅的固定摄像头拍摄老年人直线行走","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.smyx_elderly_gait_instability_detection_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input /path/to/walk.mp4\n\n# 分析网络直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --url https://example.com/walk.mp4\n\n# 显示历史步态识别报告（自动触发关键词：查看步态分析历史报告、跌倒风险评估报告清单等）\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --output result.json"},{"language":"bash","snippet":"python -m scripts.smyx_elderly_gait_instability_detection_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input /path/to/walk.mp4\n\n# 分析网络直线行走视频\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --url https://example.com/walk.mp4\n\n# 显示历史步态识别报告（自动触发关键词：查看步态分析历史报告、跌倒风险评估报告清单等）\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_gait_instability_detection_analysis --input walk.mp4 --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"smyx-elderly-gait-instability-detection-analysis\"\ndescription: \"Using a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。\"\nversion: \"1.0.15\"\nlicense: \"MIT-0\"\n---\n\n# 🚶 Elderly Gait Instability / Shuffling Step Detection | 老年人步态不稳/小碎步识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人步态不稳/小碎步识别** |\n| 🎯 核心目标 | 通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera in a hallway or living room to record video of an elderly person walking in a straight line, AI pose estimation and gait analysis extract parameters such as step length (cm), gait speed (m/s), trunk sway angle (left-right tilt), and cadence to evaluate gait stability. When step length is too small (small-shuffling steps), gait speed is too slow, or trunk sway is too large, the system outputs a fall risk level (low / medium / high). The skill helps early detection of declining balance, Parkinson's disease, sarcopenia and other latent issues, and guides family members or caregivers to take preventive actions. Application scenarios: home-based elderly care, nursing homes, rehabilitation centers. The system can be scheduled (e.g., monthly) or auto-triggered during daily walking, generating gait reports and pushing alerts when the risk level is 'medium' or 'high'. Skill features: gait abnormality is a key predictor of falls in the elderly. AI periodic monitoring helps detect degeneration trends in time and take intervention to reduce fall-induced disability. Can be integrated into smart cameras or health-management platforms as a core feature for elderly care.\n\n通过走廊或客厅的固定摄像头拍摄老年人直线行走的视频，利用AI姿态估计和步态分析技术检测步幅长度（cm）、步速（m/s）、躯干摇摆角度（左右倾斜度）以及步频等参数，评估步态稳定性。当步幅过小（小碎步）、步速过慢、躯干摇摆幅度过大时，输出跌倒风险等级（低/中/高）。该技能有助于早期发现老年人平衡能力下降、帕金森病、肌少症等潜在问题，指导家属或护理人员采取预防措施。应用场景：居家养老、养老院、康复中心。系统定期（如每月）或在老年人日常行走时自动触发检测，生成步态报告，当风险等级为'中'或'高'时推送提醒。技能特点：步态异常是老年人跌倒的重要预测因子。通过AI定期监测，可及早发现退化趋势，采取干预措施，降低跌倒致残率。该技能可集成到智能摄像头或健康管理平台中，成为养老监护的核心功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的老年人步态安全 AI。你的任务是分析老年人直线行走的侧面或正面视频，提取步态参数（步幅、步速、躯干摇摆角、步频），并综合评估跌倒风险等级。不要提供医疗诊断或临床建议，仅输出基于视频的步态客观指标与风险分级。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于走廊/客厅直线行走视频，量化老年人步幅、步速、躯干摇摆等步态指标，综合评估跌倒风险等级（low / medium / high）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与姿态估计（下肢/躯干关键点） |\n| 2"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-gait-instability-detection-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1790537018394\n}"},{"path":"references/api_doc.md","content":"# API 接口文档\n\n此处用于存放老年人步态不稳/小碎步识别 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动老年人步态不稳识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取分析结果与跌倒风险等级\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史步态分析记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_ELDERLY_GAIT_INSTABILITY_DETECTION_ANALYSIS` - 老年人步态不稳/小碎步识别\n\n## 输入约束\n\n- 摄像头建议固定于走廊或客厅，覆盖一段直线行走路径（侧面或正面均可）\n- 时长建议 ≥ 5 秒（推荐 10-30 秒），帧率 ≥ 25 FPS\n- 老年人需在视频中完成至少 3-5 步连续行走，光照均匀、背景简洁\n- 可选附带：身高（用于像素 → cm 换算）、年龄、是否使用助行器\n\n## 关键观测指标\n\n- `step_length_cm` - 步幅长度（cm，估算）\n- `gait_speed_m_s` - 步速（m/s）\n- `cadence_steps_min` - 步频（步/分钟）\n- `trunk_sway_deg` - 躯干左右摇摆角度（°）\n- `step_length_variability` - 步幅变异性（CV）\n- `double_support_ratio` - 双支撑相占比（%）\n\n## 跌倒风险等级判定（仅作筛查提示）\n\n- `low` - 步幅、步速、躯干稳定均处于正常范围\n- `medium` - 步幅偏小 / 步速偏慢 / 躯干摇摆增大 任一指标异常\n- `high` - 多项指标同时异常，或步幅显著缩小（小碎步典型表现）+ 躯干摇摆过大\n\n## 输出字段（参考）\n\n- `person_detected` - 是否检测到行走人体\n- `walking_detected` - 是否检测到直线行走片段\n- `gait_metrics` - 各步态参数数值（step_length_cm / gait_speed_m_s / cadence_steps_min / trunk_sway_deg / step_length_variability / double_support_ratio）\n- `gait_pattern` - 步态特征描述（normal / short_steps / wide_sway / slow / mixed）\n- `fall_risk_level` - 跌倒风险等级（low / medium / high）\n- `risk_factors` - 触发风险等级的关键因子\n- `alert_message` - 提示文本（如\"检测到小碎步 + 躯干左右摇摆增大，跌倒风险偏高，建议加强陪护或就医评估\"）\n- `medical_followup_hint` - 医疗复核/康复建议（仅作提示，非诊断）\n\n> 仅输出基于视频的步态客观指标与风险分级，不提供医学诊断；如疑似帕金森、肌少症或近期发生跌倒，请前往专业医疗机构评估。"},{"path":"skills/smyx_analysis/references/api_doc.md","content":"# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |"},{"path":"scripts/config.yaml","content":"{}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1087,"uniquenessScore":43,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T04:27:51.606Z","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-10T04:27:51.606Z","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:56:37.195Z","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"}]}}}