{"id":"112b2688-68ad-44d7-aaec-433dcdcfe5b1","entityType":"agent","slug":"clawhub-smyx-sunjinhui-smyx-drive-analysis","name":"Safe Driving Behavior Analyzer | 安全驾驶行为分析工具","canonicalUrl":"https://www.xpersona.co/agent/clawhub-smyx-sunjinhui-smyx-drive-analysis","canonicalPath":"/agent/clawhub-smyx-sunjinhui-smyx-drive-analysis","generatedAt":"2026-10-10T00:02:39.566Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-09T18:40:21.141Z","emptyReason":null},"description":"Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识 Skill: Safe Driving Behavior Analyzer | 安全驾驶行为分析工具 Owner: smyx-sunjinhui Summary: Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识 Tags: latest:1.0.14 Version history: v1.0.14 | 2026-09-29T01:42:35.738Z | auto - Updated version to 1.0.19 in SKILL.md.","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2.1K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-drive-analysis","sourceUrl":"https://clawhub.ai/smyx-sunjinhui/smyx-drive-analysis","homepage":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-drive-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/smyx-sunjinhui/smyx-drive-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-drive-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":67,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T18:40:21.141Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T18:40:21.141Z","emptyReason":null},"stars":null,"forks":null,"downloads":2119,"packageName":null,"latestVersion":"1.0.14","tractionLabel":"2.1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T18:40:21.141Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T18:40:21.141Z","lastCrawledAt":"2026-10-09T18:40:21.141Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T18:40:21.141Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.14","createdAt":"2026-09-29T01:42:35.738Z","changelog":"- Updated version to 1.0.19 in SKILL.md. - Removed the file skill-card.md. - No functional or behavior changes documented. - Minor documentation update to version information.","fileCount":30,"zipByteSize":40624},{"version":"1.0.13","createdAt":"2026-09-24T21:28:28.319Z","changelog":"- Updated version to 1.0.18 in SKILL.md. - Documentation refresh in SKILL.md; minor edits and info updates. - Removed redundant file: skill-card.md. - No changes to features or core logic.","fileCount":30,"zipByteSize":40785},{"version":"1.0.12","createdAt":"2026-09-06T19:24:28.205Z","changelog":"- Bumped version to 1.0.16 in SKILL.md. - Removed skill-card.md file. - No functional or API changes; documentation and metadata updates only.","fileCount":30,"zipByteSize":40977},{"version":"1.0.11","createdAt":"2026-08-27T06:37:35.189Z","changelog":"**Changelog for v1.0.11** - Updated SKILL.md version and related documentation content. - Removed the file: skill-card.md.","fileCount":30,"zipByteSize":40917},{"version":"1.0.10","createdAt":"2026-08-17T10:13:28.868Z","changelog":"drive-analysis 1.0.10 - Updated configuration in skills/smyx_common/scripts/config.yaml. - Revised documentation in SKILL.md, including minor version and doc updates. - Removed the file skill-card.md to streamline documentation.","fileCount":30,"zipByteSize":40794},{"version":"1.0.9","createdAt":"2026-08-11T11:47:34.072Z","changelog":"- Removed the file: skill-card.md - No changes to functionality or user workflows - Documentation and analysis features remain unchanged","fileCount":30,"zipByteSize":40915},{"version":"1.0.8","createdAt":"2026-08-09T13:17:40.194Z","changelog":"- Updated version to 1.0.12 in SKILL.md. - Removed the redundant file skill-card.md.","fileCount":30,"zipByteSize":40924},{"version":"1.0.7","createdAt":"2026-07-30T10:58:27.516Z","changelog":"- Version number updated from 1.0.9 to 1.0.11 in documentation. - Removed the file: skill-card.md. - Minor documentation maintenance; no functional or feature changes described.","fileCount":30,"zipByteSize":40998}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-drive-analysis","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-drive-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-drive-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-drive-analysis/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-drive-analysis/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-drive-analysis/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-drive-analysis/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T00:02:39.562Z"}},"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-drive-analysis/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-drive-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-drive-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-drive-analysis/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-09T18:40:21.141Z","emptyReason":null},"readme":"Skill: Safe Driving Behavior Analyzer | 安全驾驶行为分析工具\n\nOwner: smyx-sunjinhui\n\nSummary: Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识\n\nTags: latest:1.0.14\n\nVersion history:\n\nv1.0.14 | 2026-09-29T01:42:35.738Z | auto\n\n- Updated version to 1.0.19 in SKILL.md.\n- Removed the file skill-card.md.\n- No functional or behavior changes documented.\n- Minor documentation update to version information.\n\nv1.0.13 | 2026-09-24T21:28:28.319Z | auto\n\n- Updated version to 1.0.18 in SKILL.md.\n- Documentation refresh in SKILL.md; minor edits and info updates.\n- Removed redundant file: skill-card.md.\n- No changes to features or core logic.\n\nv1.0.12 | 2026-09-06T19:24:28.205Z | auto\n\n- Bumped version to 1.0.16 in SKILL.md.\n- Removed skill-card.md file.\n- No functional or API changes; documentation and metadata updates only.\n\nv1.0.11 | 2026-08-27T06:37:35.189Z | auto\n\n**Changelog for v1.0.11**\n\n- Updated SKILL.md version and related documentation content.\n- Removed the file: skill-card.md.\n\nv1.0.10 | 2026-08-17T10:13:28.868Z | auto\n\ndrive-analysis 1.0.10\n\n- Updated configuration in skills/smyx_common/scripts/config.yaml.\n- Revised documentation in SKILL.md, including minor version and doc updates.\n- Removed the file skill-card.md to streamline documentation.\n\nv1.0.9 | 2026-08-11T11:47:34.072Z | auto\n\n- Removed the file: skill-card.md\n- No changes to functionality or user workflows\n- Documentation and analysis features remain unchanged\n\nv1.0.8 | 2026-08-09T13:17:40.194Z | auto\n\n- Updated version to 1.0.12 in SKILL.md.\n- Removed the redundant file skill-card.md.\n\nv1.0.7 | 2026-07-30T10:58:27.516Z | auto\n\n- Version number updated from 1.0.9 to 1.0.11 in documentation.\n- Removed the file: skill-card.md.\n- Minor documentation maintenance; no functional or feature changes described.\n\nv1.0.6 | 2026-07-16T17:58:31.319Z | auto\n\n- Version bump: updated version from 1.0.8 to 1.0.9 in SKILL.md.\n- Documentation update: SKILL.md revised, with minor clarifications and no content removed.\n- Removed outdated file: skill-card.md deleted from the repository.\n\nv1.0.5 | 2026-07-10T23:47:27.363Z | auto\n\ndrive-analysis 1.0.5\n\n- SKILL.md updated: description or examples improved, version incremented.\n- Internal scripts updated: changes in config.py and util.py under skills/smyx_common/scripts/.\n- Obsolete file skill-card.md removed.\n- No changes to user-facing API or functionality described.\n\nv1.0.4 | 2026-07-03T03:38:27.639Z | auto\n\n**Refactored drive-analysis skill for improved modularity and usability.**\n\n- Introduced a new module structure: moved analysis logic to `skills/smyx_analysis`; removed deprecated face analysis module.\n- Simplified user experience: all user identity handling is now fully automatic—users are never asked for, nor see, any internal ID parameter.\n- Updated usage and documentation to clarify new automated flow and strictly cloud-based report retrieval.\n- Modernized SKILL.md layout: concise workflow, table-driven capability overviews, improved multi-language support.\n- Enhanced separation of common code and logic within `smyx_common` and `smyx_analysis` directories.\n- Cleaned and reorganized scripts and requirements for better maintainability.\n\nv1.0.3 | 2026-05-17T02:19:40.141Z | auto\n\n- Improved code structure in common utility scripts for better maintainability.\n- Refactored configuration handling in skills/smyx_common/scripts/config.py.\n- Added or updated shared utility functions in skills/smyx_common/scripts/util.py.\n- Minor initialization enhancements in skills/smyx_common/scripts/__init__.py.\n\nv1.0.2 | 2026-05-07T16:20:41.387Z | auto\n\nsmxy-drive-analysis 1.0.2\n\n- Updated internal scripts: skills/face_analysis/scripts/skill.py and skills/smyx_common/scripts/skill.py.\n- No changes to SKILL.md (documentation and user-facing features remain the same).\n\nv1.0.1 | 2026-04-30T21:30:39.730Z | auto\n\n- Improved configuration management for API keys and environment separation (dev/test/prod) in config files.\n- Enhanced logic for open-id retrieval by updating scripts/smyx_common/scripts/config.py and related configs.\n- Updated skill documentation for clarity and consistency.\n- Refactored code in utility modules for better maintainability.\n- Fixed minor bugs in analysis scripts for more robust behavior.\n\nv1.0.0 | 2026-04-15T09:15:31.887Z | auto\n\nInitial release of \"drive-analysis\" skill.\n\n- Provides professional video-based analysis of vehicle driver behaviors to identify unsafe driving, including distraction, fatigue, and improper seatbelt use.\n- Strict rules to always retrieve report history from the cloud API, never from local or long-term memory.\n- Requires a valid open-id (from config or user input) before running any analysis or queries.\n- Automatically triggers analysis on video/file upload and report listing on specific keywords.\n- Generates structured analysis reports with safety recommendations; outputs history as a Markdown table with direct report links.\n\nArchive index:\n\nArchive v1.0.14: 30 files, 40624 bytes\n\nFiles: references/api_doc.md (644b), scripts/__init__.py (39b), scripts/config.py (658b), scripts/drive_analysis.py (8904b), scripts/skill.py (573b), skill-card.md (1862b), SKILL.md (11572b), 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 (139b)\n\nFile v1.0.14:SKILL.md\n\n---\nname: \"drive-analysis\"\ndescription: \"Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识\"\nversion: \"1.0.19\"\nlicense: \"MIT-0\"\n---\n\n# 🚗 Safe Driving Behavior Analyzer | 安全驾驶行为分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **安全驾驶行为分析工具** |\n| 🎯 核心目标 | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DRIVE_ANALYSIS` |\n\nThis tool is an intelligent safe driving behavior analysis system specifically designed for motor vehicle operators. By\ndeeply analyzing video data captured during driving, it precisely identifies unsafe behaviors such as distracted\ndriving, fatigued driving, and speeding. Based on the analysis results, it generates professional and detailed driving\nbehavior assessment reports. The system aims to help drivers promptly identify and correct poor driving habits,\ncomprehensively enhance road safety awareness, and provide technical support for building a safer traffic environment.\n\n本工具是一款专为机动车驾驶人员设计的智能安全驾驶行为分析系统，通过对驾驶过程中的视频数据进行深度解析，精准识别如分心驾驶、疲劳驾驶、超速行驶等不安全行为，并基于分析结果生成专业、详尽的驾驶行为评估报告，旨在帮助驾驶人员及时发现并纠正不良驾驶习惯，全面提升道路交通安全意识，为构建更安全的交通环境提供技术支撑\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频分析对驾驶行为进行安全评估，识别不安全驾驶行为模式，提供结构化分析报告和安全驾驶改进建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频分析 |\n| 2 | 疲劳驾驶识别 |\n| 3 | 分心驾驶识别 |\n| 4 | 安全带使用检查 |\n| 5 | 驾驶姿势评估 |\n| 6 | 不良驾驶习惯识别 |\n| 7 | 交通安全建议生成 |\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.drive_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.drive_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚗 安全驾驶行为分析维度 | Safe Driving Behavior Dimensions\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| 要求 | 身体前倾过度/后仰过度 |\n| 要求 | 脚部位置不正确影响操控 |\n| 要求 | **分心类行为** |\n| 要求 | 开车刷短视频/看信息/玩游戏 |\n| 要求 | 开车接打电话 |\n| 要求 | 频繁调整导航/音乐 |\n| 要求 | 与乘车人员过度交谈互动 |\n| 要求 | **危险类行为** |\n| 要求 | 超速行驶（可识别明显加速超车行为） |\n| 要求 | 频繁变道不打转向灯 |\n| 要求 | 跟车过近（车距过近） |\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.drive_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/fatigue/distraction/seatbelt/risk，默认 | 按需填写 |\n| `--list` | 显示安全驾驶分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/drive_analysis.py`](scripts/drive_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| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 视频要求：支持 mp4/avi/mov 格式，最大 10MB |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 综合安全驾驶行为分析\npython -m scripts.drive_analysis --input /path/to/drive_video.mp4 --analysis-type comprehensive 疲劳驾驶专项分析\npython -m scripts.drive_analysis --url https://example.com/drive_video.mp4 --analysis-type fatigue 分心驾驶专项分析\npython -m scripts.drive_analysis --input /path/to/distraction_video.mp4 --analysis-type distraction 安全带专项检查\npython -m scripts.drive_analysis --input /path/to/seatbelt_check.mp4 --analysis-type seatbelt 显示历史分析报告/显示分析报告清单列表/显示历史驾驶报告（自动触发关键词：查看历史驾驶报告、历史报告、驾驶报告清单等）\npython -m scripts.drive_analysis --list\n\n# 输出精简报告\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --output result.json\n```\n\nFile v1.0.14:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-drive-analysis\",\n  \"version\": \"1.0.14\",\n  \"publishedAt\": 1790646155738\n}\n\nFile v1.0.14:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放安全驾驶行为分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动分析任务\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `DRIVE_ANALYSIS` - 安全驾驶行为分析\n\nFile v1.0.14: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.14:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.14: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.14: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.14: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.14:skill-card.md\n\n## Description:\n\nAnalyzes driver videos for unsafe driving behaviors and produces driving safety reports.\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\nDrivers and road-safety teams use this skill to assess driving footage for fatigue, distraction, seatbelt use, and other unsafe behaviors, and to review analysis reports and report history.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Driver videos or private video URLs may be sent to lifeemergence.com services.\n\nMitigation: Review the destination and obtain permission before submitting sensitive footage or private URLs.\n\nRisk: The skill can create or reuse a cloud-linked identity and persist user and token data locally for report history.\n\nMitigation: Review account creation and local data retention before installation; restrict access to stored credentials and history.\n\n## Reference(s):\n\n- [Skill listing](https://clawhub.ai/smyx-sunjinhui/skills/smyx-drive-analysis)\n- [Analysis API documentation](references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON]\n\n**Output Format:** [Driving-behavior analysis reports, structured JSON results, report links, or Markdown report-history tables]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Report detail and analysis type are selectable; results can be saved to a file.]\n\n## Skill Version(s):\n\n1.0.14 (source: ClawHub release metadata; bundled SKILL.md lists 1.0.19)\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.14:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.14:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.13: 30 files, 40785 bytes\n\nFiles: references/api_doc.md (644b), scripts/__init__.py (39b), scripts/config.py (658b), scripts/drive_analysis.py (8904b), scripts/skill.py (573b), skill-card.md (2211b), SKILL.md (11572b), 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 (139b)\n\nFile v1.0.13:SKILL.md\n\n---\nname: \"drive-analysis\"\ndescription: \"Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识\"\nversion: \"1.0.18\"\nlicense: \"MIT-0\"\n---\n\n# 🚗 Safe Driving Behavior Analyzer | 安全驾驶行为分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **安全驾驶行为分析工具** |\n| 🎯 核心目标 | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DRIVE_ANALYSIS` |\n\nThis tool is an intelligent safe driving behavior analysis system specifically designed for motor vehicle operators. By\ndeeply analyzing video data captured during driving, it precisely identifies unsafe behaviors such as distracted\ndriving, fatigued driving, and speeding. Based on the analysis results, it generates professional and detailed driving\nbehavior assessment reports. The system aims to help drivers promptly identify and correct poor driving habits,\ncomprehensively enhance road safety awareness, and provide technical support for building a safer traffic environment.\n\n本工具是一款专为机动车驾驶人员设计的智能安全驾驶行为分析系统，通过对驾驶过程中的视频数据进行深度解析，精准识别如分心驾驶、疲劳驾驶、超速行驶等不安全行为，并基于分析结果生成专业、详尽的驾驶行为评估报告，旨在帮助驾驶人员及时发现并纠正不良驾驶习惯，全面提升道路交通安全意识，为构建更安全的交通环境提供技术支撑\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频分析对驾驶行为进行安全评估，识别不安全驾驶行为模式，提供结构化分析报告和安全驾驶改进建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频分析 |\n| 2 | 疲劳驾驶识别 |\n| 3 | 分心驾驶识别 |\n| 4 | 安全带使用检查 |\n| 5 | 驾驶姿势评估 |\n| 6 | 不良驾驶习惯识别 |\n| 7 | 交通安全建议生成 |\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.drive_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.drive_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚗 安全驾驶行为分析维度 | Safe Driving Behavior Dimensions\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| 要求 | 身体前倾过度/后仰过度 |\n| 要求 | 脚部位置不正确影响操控 |\n| 要求 | **分心类行为** |\n| 要求 | 开车刷短视频/看信息/玩游戏 |\n| 要求 | 开车接打电话 |\n| 要求 | 频繁调整导航/音乐 |\n| 要求 | 与乘车人员过度交谈互动 |\n| 要求 | **危险类行为** |\n| 要求 | 超速行驶（可识别明显加速超车行为） |\n| 要求 | 频繁变道不打转向灯 |\n| 要求 | 跟车过近（车距过近） |\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.drive_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/fatigue/distraction/seatbelt/risk，默认 | 按需填写 |\n| `--list` | 显示安全驾驶分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/drive_analysis.py`](scripts/drive_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| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 视频要求：支持 mp4/avi/mov 格式，最大 10MB |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 综合安全驾驶行为分析\npython -m scripts.drive_analysis --input /path/to/drive_video.mp4 --analysis-type comprehensive 疲劳驾驶专项分析\npython -m scripts.drive_analysis --url https://example.com/drive_video.mp4 --analysis-type fatigue 分心驾驶专项分析\npython -m scripts.drive_analysis --input /path/to/distraction_video.mp4 --analysis-type distraction 安全带专项检查\npython -m scripts.drive_analysis --input /path/to/seatbelt_check.mp4 --analysis-type seatbelt 显示历史分析报告/显示分析报告清单列表/显示历史驾驶报告（自动触发关键词：查看历史驾驶报告、历史报告、驾驶报告清单等）\npython -m scripts.drive_analysis --list\n\n# 输出精简报告\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --output result.json\n```\n\nFile v1.0.13:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-drive-analysis\",\n  \"version\": \"1.0.13\",\n  \"publishedAt\": 1790285308319\n}\n\nFile v1.0.13:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放安全驾驶行为分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动分析任务\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `DRIVE_ANALYSIS` - 安全驾驶行为分析\n\nFile v1.0.13:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.13:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.13:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.13:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.13:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.13:skill-card.md\n\n## Description:\n\nAnalyzes driver videos for unsafe driving behaviors and produces driving-safety reports and recommendations.\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\nDrivers, fleet safety teams, and developers use the skill to review driving footage for potential fatigue, distraction, seatbelt use, and other unsafe behaviors, or to retrieve prior analysis reports. Reports are educational aids, not substitutes for professional driver training.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Driver videos or video URLs are processed by a remote cloud service and may contain identifiable people or vehicles.\n\nMitigation: Obtain appropriate permission before uploading footage, avoid sensitive recordings where possible, and review the publisher's retention, deletion, and access controls.\n\nRisk: The skill silently creates or reuses an identity, stores authentication tokens locally, and can fetch cloud report history on broad triggers.\n\nMitigation: Use only in a trusted environment; restrict access to local credentials and confirm authorization before retrieving or sharing report history.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/smyx-sunjinhui/skills/smyx-drive-analysis)\n- [Driving 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 analysis results, driving-safety report text, or Markdown history tables with report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Results can be saved to a file; historical reports are retrieved from a cloud service.]\n\n## Skill Version(s):\n\n1.0.13 (source: ClawHub release metadata; bundled SKILL.md lists 1.0.18)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.13:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.13:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.12: 30 files, 40977 bytes\n\nFiles: references/api_doc.md (644b), scripts/__init__.py (39b), scripts/config.py (658b), scripts/drive_analysis.py (8904b), scripts/skill.py (573b), skill-card.md (2709b), SKILL.md (11572b), 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 (139b)\n\nFile v1.0.12:SKILL.md\n\n---\nname: \"drive-analysis\"\ndescription: \"Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识\"\nversion: \"1.0.16\"\nlicense: \"MIT-0\"\n---\n\n# 🚗 Safe Driving Behavior Analyzer | 安全驾驶行为分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **安全驾驶行为分析工具** |\n| 🎯 核心目标 | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DRIVE_ANALYSIS` |\n\nThis tool is an intelligent safe driving behavior analysis system specifically designed for motor vehicle operators. By\ndeeply analyzing video data captured during driving, it precisely identifies unsafe behaviors such as distracted\ndriving, fatigued driving, and speeding. Based on the analysis results, it generates professional and detailed driving\nbehavior assessment reports. The system aims to help drivers promptly identify and correct poor driving habits,\ncomprehensively enhance road safety awareness, and provide technical support for building a safer traffic environment.\n\n本工具是一款专为机动车驾驶人员设计的智能安全驾驶行为分析系统，通过对驾驶过程中的视频数据进行深度解析，精准识别如分心驾驶、疲劳驾驶、超速行驶等不安全行为，并基于分析结果生成专业、详尽的驾驶行为评估报告，旨在帮助驾驶人员及时发现并纠正不良驾驶习惯，全面提升道路交通安全意识，为构建更安全的交通环境提供技术支撑\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频分析对驾驶行为进行安全评估，识别不安全驾驶行为模式，提供结构化分析报告和安全驾驶改进建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频分析 |\n| 2 | 疲劳驾驶识别 |\n| 3 | 分心驾驶识别 |\n| 4 | 安全带使用检查 |\n| 5 | 驾驶姿势评估 |\n| 6 | 不良驾驶习惯识别 |\n| 7 | 交通安全建议生成 |\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.drive_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.drive_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚗 安全驾驶行为分析维度 | Safe Driving Behavior Dimensions\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| 要求 | 身体前倾过度/后仰过度 |\n| 要求 | 脚部位置不正确影响操控 |\n| 要求 | **分心类行为** |\n| 要求 | 开车刷短视频/看信息/玩游戏 |\n| 要求 | 开车接打电话 |\n| 要求 | 频繁调整导航/音乐 |\n| 要求 | 与乘车人员过度交谈互动 |\n| 要求 | **危险类行为** |\n| 要求 | 超速行驶（可识别明显加速超车行为） |\n| 要求 | 频繁变道不打转向灯 |\n| 要求 | 跟车过近（车距过近） |\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.drive_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/fatigue/distraction/seatbelt/risk，默认 | 按需填写 |\n| `--list` | 显示安全驾驶分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/drive_analysis.py`](scripts/drive_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| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 视频要求：支持 mp4/avi/mov 格式，最大 10MB |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 综合安全驾驶行为分析\npython -m scripts.drive_analysis --input /path/to/drive_video.mp4 --analysis-type comprehensive 疲劳驾驶专项分析\npython -m scripts.drive_analysis --url https://example.com/drive_video.mp4 --analysis-type fatigue 分心驾驶专项分析\npython -m scripts.drive_analysis --input /path/to/distraction_video.mp4 --analysis-type distraction 安全带专项检查\npython -m scripts.drive_analysis --input /path/to/seatbelt_check.mp4 --analysis-type seatbelt 显示历史分析报告/显示分析报告清单列表/显示历史驾驶报告（自动触发关键词：查看历史驾驶报告、历史报告、驾驶报告清单等）\npython -m scripts.drive_analysis --list\n\n# 输出精简报告\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --output result.json\n```\n\nFile v1.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-drive-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1788722668205\n}\n\nFile v1.0.12:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放安全驾驶行为分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动分析任务\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `DRIVE_ANALYSIS` - 安全驾驶行为分析\n\nFile v1.0.12:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.12:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.12:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.12:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.12:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.12:skill-card.md\n\n## Description:\n\nAnalyzes videos of vehicle drivers to identify unsafe driving behaviors and generate professional road-safety reports.\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\nDrivers, road-safety teams, and developers use this skill to analyze driving videos or video URLs for fatigue, distraction, seatbelt use, posture, and other unsafe behaviors. It returns structured findings, safety suggestions, history-query results, and report links for education and awareness workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Driving videos, video URLs, and report-history requests are sent to remote services.\n\nMitigation: Use only with approved driving media, confirm the service operator and data-retention practices, and verify production HTTPS endpoints before installation.\n\nRisk: The skill can create or reuse an internal user identity and persist authentication tokens locally.\n\nMitigation: Review local SQLite token storage, workspace file permissions, identity lifecycle, and token cleanup requirements before deployment.\n\nRisk: Packaged configuration includes plaintext development HTTP endpoints.\n\nMitigation: Confirm the active configuration uses trusted production HTTPS endpoints and does not route production traffic to development hosts.\n\nRisk: A payment-required response can instruct the agent to install a separate payment skill.\n\nMitigation: Require user or administrator approval before installing payment-related skills or following recharge workflows.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-drive-analysis)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n- [API Documentation](artifact/references/api_doc.md)\n- [Analysis API Documentation](artifact/skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, files, guidance]\n\n**Output Format:** [Markdown report text or structured JSON, with optional saved output files and report export links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Supports mp4, avi, and mov inputs up to 10 MB; can analyze local files or remote video URLs and query cloud report history.]\n\n## Skill Version(s):\n\n1.0.12 (source: server release metadata; SKILL.md frontmatter says 1.0.16)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.12:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.12:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.11: 30 files, 40917 bytes\n\nFiles: references/api_doc.md (644b), scripts/__init__.py (39b), scripts/config.py (658b), scripts/drive_analysis.py (8904b), scripts/skill.py (573b), skill-card.md (2572b), SKILL.md (11572b), 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 (139b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: \"drive-analysis\"\ndescription: \"Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识\"\nversion: \"1.0.14\"\nlicense: \"MIT-0\"\n---\n\n# 🚗 Safe Driving Behavior Analyzer | 安全驾驶行为分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **安全驾驶行为分析工具** |\n| 🎯 核心目标 | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DRIVE_ANALYSIS` |\n\nThis tool is an intelligent safe driving behavior analysis system specifically designed for motor vehicle operators. By\ndeeply analyzing video data captured during driving, it precisely identifies unsafe behaviors such as distracted\ndriving, fatigued driving, and speeding. Based on the analysis results, it generates professional and detailed driving\nbehavior assessment reports. The system aims to help drivers promptly identify and correct poor driving habits,\ncomprehensively enhance road safety awareness, and provide technical support for building a safer traffic environment.\n\n本工具是一款专为机动车驾驶人员设计的智能安全驾驶行为分析系统，通过对驾驶过程中的视频数据进行深度解析，精准识别如分心驾驶、疲劳驾驶、超速行驶等不安全行为，并基于分析结果生成专业、详尽的驾驶行为评估报告，旨在帮助驾驶人员及时发现并纠正不良驾驶习惯，全面提升道路交通安全意识，为构建更安全的交通环境提供技术支撑\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频分析对驾驶行为进行安全评估，识别不安全驾驶行为模式，提供结构化分析报告和安全驾驶改进建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频分析 |\n| 2 | 疲劳驾驶识别 |\n| 3 | 分心驾驶识别 |\n| 4 | 安全带使用检查 |\n| 5 | 驾驶姿势评估 |\n| 6 | 不良驾驶习惯识别 |\n| 7 | 交通安全建议生成 |\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.drive_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.drive_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚗 安全驾驶行为分析维度 | Safe Driving Behavior Dimensions\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| 要求 | 身体前倾过度/后仰过度 |\n| 要求 | 脚部位置不正确影响操控 |\n| 要求 | **分心类行为** |\n| 要求 | 开车刷短视频/看信息/玩游戏 |\n| 要求 | 开车接打电话 |\n| 要求 | 频繁调整导航/音乐 |\n| 要求 | 与乘车人员过度交谈互动 |\n| 要求 | **危险类行为** |\n| 要求 | 超速行驶（可识别明显加速超车行为） |\n| 要求 | 频繁变道不打转向灯 |\n| 要求 | 跟车过近（车距过近） |\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.drive_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/fatigue/distraction/seatbelt/risk，默认 | 按需填写 |\n| `--list` | 显示安全驾驶分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/drive_analysis.py`](scripts/drive_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| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 视频要求：支持 mp4/avi/mov 格式，最大 10MB |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 综合安全驾驶行为分析\npython -m scripts.drive_analysis --input /path/to/drive_video.mp4 --analysis-type comprehensive 疲劳驾驶专项分析\npython -m scripts.drive_analysis --url https://example.com/drive_video.mp4 --analysis-type fatigue 分心驾驶专项分析\npython -m scripts.drive_analysis --input /path/to/distraction_video.mp4 --analysis-type distraction 安全带专项检查\npython -m scripts.drive_analysis --input /path/to/seatbelt_check.mp4 --analysis-type seatbelt 显示历史分析报告/显示分析报告清单列表/显示历史驾驶报告（自动触发关键词：查看历史驾驶报告、历史报告、驾驶报告清单等）\npython -m scripts.drive_analysis --list\n\n# 输出精简报告\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --output result.json\n```\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-drive-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1787812655189\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- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动分析任务\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `DRIVE_ANALYSIS` - 安全驾驶行为分析\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:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.11:skill-card.md\n\n## Description:\n\nAnalyzes driver videos to identify unsafe behaviors such as fatigue, distraction, seat belt issues, posture concerns, and other driving risks, then returns structured safety reports and report links.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and agents use this skill to submit driving videos or video URLs for safety behavior analysis, then review structured findings and safety-improvement suggestions. It can also retrieve cloud-stored historical driving-analysis reports associated with the local or upstream identity.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Driving videos or video URLs may be uploaded to configured remote services for analysis.\n\nMitigation: Install only when the publisher and service endpoints are trusted, and avoid submitting sensitive media unless users have consent and the retention expectations are acceptable.\n\nRisk: The skill may read or create a local identity and persist tokens in a workspace SQLite database.\n\nMitigation: Run in a controlled workspace, inspect or clear local data after use, and avoid sharing the workspace database with unintended users.\n\nRisk: Historical report queries may return cloud-stored reports linked to the resolved identity.\n\nMitigation: Use separate identities or isolated workspaces when report history should not be mixed across users or deployments.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-drive-analysis)\n- [Publisher profile](https://clawhub.ai/user/smyx-sunjinhui)\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, files]\n\n**Output Format:** [JSON or Markdown analysis report with optional report export link]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May save analysis output to a local file when an output path is provided.]\n\n## Skill Version(s):\n\n1.0.11 (source: server release metadata; artifact frontmatter states 1.0.14)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.11:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.11:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.10: 30 files, 40794 bytes\n\nFiles: references/api_doc.md (644b), scripts/__init__.py (39b), scripts/config.py (658b), scripts/drive_analysis.py (8904b), scripts/skill.py (573b), skill-card.md (2332b), SKILL.md (11572b), 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 (139b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: \"drive-analysis\"\ndescription: \"Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识\"\nversion: \"1.0.13\"\nlicense: \"MIT-0\"\n---\n\n# 🚗 Safe Driving Behavior Analyzer | 安全驾驶行为分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **安全驾驶行为分析工具** |\n| 🎯 核心目标 | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DRIVE_ANALYSIS` |\n\nThis tool is an intelligent safe driving behavior analysis system specifically designed for motor vehicle operators. By\ndeeply analyzing video data captured during driving, it precisely identifies unsafe behaviors such as distracted\ndriving, fatigued driving, and speeding. Based on the analysis results, it generates professional and detailed driving\nbehavior assessment reports. The system aims to help drivers promptly identify and correct poor driving habits,\ncomprehensively enhance road safety awareness, and provide technical support for building a safer traffic environment.\n\n本工具是一款专为机动车驾驶人员设计的智能安全驾驶行为分析系统，通过对驾驶过程中的视频数据进行深度解析，精准识别如分心驾驶、疲劳驾驶、超速行驶等不安全行为，并基于分析结果生成专业、详尽的驾驶行为评估报告，旨在帮助驾驶人员及时发现并纠正不良驾驶习惯，全面提升道路交通安全意识，为构建更安全的交通环境提供技术支撑\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频分析对驾驶行为进行安全评估，识别不安全驾驶行为模式，提供结构化分析报告和安全驾驶改进建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频分析 |\n| 2 | 疲劳驾驶识别 |\n| 3 | 分心驾驶识别 |\n| 4 | 安全带使用检查 |\n| 5 | 驾驶姿势评估 |\n| 6 | 不良驾驶习惯识别 |\n| 7 | 交通安全建议生成 |\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.drive_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.drive_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚗 安全驾驶行为分析维度 | Safe Driving Behavior Dimensions\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| 要求 | 身体前倾过度/后仰过度 |\n| 要求 | 脚部位置不正确影响操控 |\n| 要求 | **分心类行为** |\n| 要求 | 开车刷短视频/看信息/玩游戏 |\n| 要求 | 开车接打电话 |\n| 要求 | 频繁调整导航/音乐 |\n| 要求 | 与乘车人员过度交谈互动 |\n| 要求 | **危险类行为** |\n| 要求 | 超速行驶（可识别明显加速超车行为） |\n| 要求 | 频繁变道不打转向灯 |\n| 要求 | 跟车过近（车距过近） |\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.drive_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/fatigue/distraction/seatbelt/risk，默认 | 按需填写 |\n| `--list` | 显示安全驾驶分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/drive_analysis.py`](scripts/drive_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| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 视频要求：支持 mp4/avi/mov 格式，最大 10MB |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 综合安全驾驶行为分析\npython -m scripts.drive_analysis --input /path/to/drive_video.mp4 --analysis-type comprehensive 疲劳驾驶专项分析\npython -m scripts.drive_analysis --url https://example.com/drive_video.mp4 --analysis-type fatigue 分心驾驶专项分析\npython -m scripts.drive_analysis --input /path/to/distraction_video.mp4 --analysis-type distraction 安全带专项检查\npython -m scripts.drive_analysis --input /path/to/seatbelt_check.mp4 --analysis-type seatbelt 显示历史分析报告/显示分析报告清单列表/显示历史驾驶报告（自动触发关键词：查看历史驾驶报告、历史报告、驾驶报告清单等）\npython -m scripts.drive_analysis --list\n\n# 输出精简报告\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-drive-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1786961608868\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- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动分析任务\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `DRIVE_ANALYSIS` - 安全驾驶行为分析\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:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.10:skill-card.md\n\n## Description:\n\nAnalyzes driver videos or video URLs to identify unsafe driving behaviors and produce structured safety reports.\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 external users use this skill to submit driver footage or video URLs for safety behavior analysis, then review structured findings, recommendations, report links, or historical report lists.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Driver videos, video URLs, or related analysis data may be sent to the configured remote service.\n\nMitigation: Review the configured service destination, obtain appropriate consent, and avoid submitting private footage unless the service retention and access controls are acceptable.\n\nRisk: The skill can query cloud history for the current identity.\n\nMitigation: Use the skill only with approved account contexts and review expected report visibility before enabling history queries.\n\nRisk: The skill may create or reuse local identities and persist identity or service tokens in the local workspace database.\n\nMitigation: Protect the workspace, restrict use on shared systems, and remove or rotate persisted tokens when they are no longer needed.\n\n## Reference(s):\n\n- [API interface documentation](references/api_doc.md)\n- [SMYX analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-drive-analysis)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Files, Guidance]\n\n**Output Format:** [Markdown or JSON driving behavior analysis reports; optional saved result files.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include safety findings, recommendations, report links, and historical report tables returned by the configured service.]\n\n## Skill Version(s):\n\n1.0.10 (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.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: 30 files, 40915 bytes\n\nFiles: references/api_doc.md (644b), scripts/__init__.py (39b), scripts/config.py (658b), scripts/drive_analysis.py (8904b), scripts/skill.py (573b), skill-card.md (2560b), SKILL.md (11572b), 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 (138b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: \"drive-analysis\"\ndescription: \"Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识\"\nversion: \"1.0.12\"\nlicense: \"MIT-0\"\n---\n\n# 🚗 Safe Driving Behavior Analyzer | 安全驾驶行为分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **安全驾驶行为分析工具** |\n| 🎯 核心目标 | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DRIVE_ANALYSIS` |\n\nThis tool is an intelligent safe driving behavior analysis system specifically designed for motor vehicle operators. By\ndeeply analyzing video data captured during driving, it precisely identifies unsafe behaviors such as distracted\ndriving, fatigued driving, and speeding. Based on the analysis results, it generates professional and detailed driving\nbehavior assessment reports. The system aims to help drivers promptly identify and correct poor driving habits,\ncomprehensively enhance road safety awareness, and provide technical support for building a safer traffic environment.\n\n本工具是一款专为机动车驾驶人员设计的智能安全驾驶行为分析系统，通过对驾驶过程中的视频数据进行深度解析，精准识别如分心驾驶、疲劳驾驶、超速行驶等不安全行为，并基于分析结果生成专业、详尽的驾驶行为评估报告，旨在帮助驾驶人员及时发现并纠正不良驾驶习惯，全面提升道路交通安全意识，为构建更安全的交通环境提供技术支撑\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频分析对驾驶行为进行安全评估，识别不安全驾驶行为模式，提供结构化分析报告和安全驾驶改进建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频分析 |\n| 2 | 疲劳驾驶识别 |\n| 3 | 分心驾驶识别 |\n| 4 | 安全带使用检查 |\n| 5 | 驾驶姿势评估 |\n| 6 | 不良驾驶习惯识别 |\n| 7 | 交通安全建议生成 |\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.drive_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.drive_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚗 安全驾驶行为分析维度 | Safe Driving Behavior Dimensions\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| 要求 | 身体前倾过度/后仰过度 |\n| 要求 | 脚部位置不正确影响操控 |\n| 要求 | **分心类行为** |\n| 要求 | 开车刷短视频/看信息/玩游戏 |\n| 要求 | 开车接打电话 |\n| 要求 | 频繁调整导航/音乐 |\n| 要求 | 与乘车人员过度交谈互动 |\n| 要求 | **危险类行为** |\n| 要求 | 超速行驶（可识别明显加速超车行为） |\n| 要求 | 频繁变道不打转向灯 |\n| 要求 | 跟车过近（车距过近） |\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.drive_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/fatigue/distraction/seatbelt/risk，默认 | 按需填写 |\n| `--list` | 显示安全驾驶分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/drive_analysis.py`](scripts/drive_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| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 视频要求：支持 mp4/avi/mov 格式，最大 10MB |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 综合安全驾驶行为分析\npython -m scripts.drive_analysis --input /path/to/drive_video.mp4 --analysis-type comprehensive 疲劳驾驶专项分析\npython -m scripts.drive_analysis --url https://example.com/drive_video.mp4 --analysis-type fatigue 分心驾驶专项分析\npython -m scripts.drive_analysis --input /path/to/distraction_video.mp4 --analysis-type distraction 安全带专项检查\npython -m scripts.drive_analysis --input /path/to/seatbelt_check.mp4 --analysis-type seatbelt 显示历史分析报告/显示分析报告清单列表/显示历史驾驶报告（自动触发关键词：查看历史驾驶报告、历史报告、驾驶报告清单等）\npython -m scripts.drive_analysis --list\n\n# 输出精简报告\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-drive-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1786448854072\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- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动分析任务\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `DRIVE_ANALYSIS` - 安全驾驶行为分析\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: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: prod\n\nFile v1.0.9:skill-card.md\n\n## Description:\n\nAnalyzes videos of vehicle drivers to identify unsafe driving behaviors and generates professional analysis reports to help enhance road safety awareness.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to analyze driver videos or video URLs for unsafe driving behaviors such as fatigue, distraction, seatbelt non-use, posture issues, and risky behavior, then receive a structured safety report and report link.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Driver videos or video URLs, report metadata, and generated identity information may be sent to the publisher's cloud service.\n\nMitigation: Use only footage you are authorized to share, avoid sensitive footage until privacy and retention terms are confirmed, and obtain the publisher's permissions, retention, and deletion details before production use.\n\nRisk: The skill can silently create or reuse an identity and stores account tokens locally in the workspace.\n\nMitigation: Run it in a controlled workspace, restrict workspace access, remove local token and data files after use when appropriate, and do not share the workspace with unauthorized users.\n\nRisk: Cloud report history is queried with limited direct user control.\n\nMitigation: Confirm the active user identity before querying history and review publisher account controls for report access, deletion, and account closure.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-drive-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):** [Analysis, Markdown, JSON, Files]\n\n**Output Format:** [Markdown text with structured JSON content and optional saved output files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Produces driver-safety analysis summaries, history listings, and report export links; local video inputs are limited to mp4, avi, and mov files up to 10 MB.]\n\n## Skill Version(s):\n\n1.0.9 (source: server release metadata; artifact frontmatter lists 1.0.12)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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: 30 files, 40924 bytes\n\nFiles: references/api_doc.md (644b), scripts/__init__.py (39b), scripts/config.py (658b), scripts/drive_analysis.py (8904b), scripts/skill.py (573b), skill-card.md (2607b), SKILL.md (11572b), 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 (138b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"drive-analysis\"\ndescription: \"Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识\"\nversion: \"1.0.12\"\nlicense: \"MIT-0\"\n---\n\n# 🚗 Safe Driving Behavior Analyzer | 安全驾驶行为分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **安全驾驶行为分析工具** |\n| 🎯 核心目标 | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DRIVE_ANALYSIS` |\n\nThis tool is an intelligent safe driving behavior analysis system specifically designed for motor vehicle operators. By\ndeeply analyzing video data captured during driving, it precisely identifies unsafe behaviors such as distracted\ndriving, fatigued driving, and speeding. Based on the analysis results, it generates professional and detailed driving\nbehavior assessment reports. The system aims to help drivers promptly identify and correct poor driving habits,\ncomprehensively enhance road safety awareness, and provide technical support for building a safer traffic environment.\n\n本工具是一款专为机动车驾驶人员设计的智能安全驾驶行为分析系统，通过对驾驶过程中的视频数据进行深度解析，精准识别如分心驾驶、疲劳驾驶、超速行驶等不安全行为，并基于分析结果生成专业、详尽的驾驶行为评估报告，旨在帮助驾驶人员及时发现并纠正不良驾驶习惯，全面提升道路交通安全意识，为构建更安全的交通环境提供技术支撑\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频分析对驾驶行为进行安全评估，识别不安全驾驶行为模式，提供结构化分析报告和安全驾驶改进建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频分析 |\n| 2 | 疲劳驾驶识别 |\n| 3 | 分心驾驶识别 |\n| 4 | 安全带使用检查 |\n| 5 | 驾驶姿势评估 |\n| 6 | 不良驾驶习惯识别 |\n| 7 | 交通安全建议生成 |\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.drive_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.drive_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚗 安全驾驶行为分析维度 | Safe Driving Behavior Dimensions\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| 要求 | 身体前倾过度/后仰过度 |\n| 要求 | 脚部位置不正确影响操控 |\n| 要求 | **分心类行为** |\n| 要求 | 开车刷短视频/看信息/玩游戏 |\n| 要求 | 开车接打电话 |\n| 要求 | 频繁调整导航/音乐 |\n| 要求 | 与乘车人员过度交谈互动 |\n| 要求 | **危险类行为** |\n| 要求 | 超速行驶（可识别明显加速超车行为） |\n| 要求 | 频繁变道不打转向灯 |\n| 要求 | 跟车过近（车距过近） |\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.drive_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/fatigue/distraction/seatbelt/risk，默认 | 按需填写 |\n| `--list` | 显示安全驾驶分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/drive_analysis.py`](scripts/drive_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| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 视频要求：支持 mp4/avi/mov 格式，最大 10MB |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 综合安全驾驶行为分析\npython -m scripts.drive_analysis --input /path/to/drive_video.mp4 --analysis-type comprehensive 疲劳驾驶专项分析\npython -m scripts.drive_analysis --url https://example.com/drive_video.mp4 --analysis-type fatigue 分心驾驶专项分析\npython -m scripts.drive_analysis --input /path/to/distraction_video.mp4 --analysis-type distraction 安全带专项检查\npython -m scripts.drive_analysis --input /path/to/seatbelt_check.mp4 --analysis-type seatbelt 显示历史分析报告/显示分析报告清单列表/显示历史驾驶报告（自动触发关键词：查看历史驾驶报告、历史报告、驾驶报告清单等）\npython -m scripts.drive_analysis --list\n\n# 输出精简报告\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-drive-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1786281460194\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- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动分析任务\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `DRIVE_ANALYSIS` - 安全驾驶行为分析\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:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.8:skill-card.md\n\n## Description:\n\nAnalyzes driver videos to identify unsafe driving behaviors and generate structured road-safety reports.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to analyze driving videos or video URLs for fatigue, distraction, seatbelt use, posture, and other unsafe driving patterns. It returns structured reports, safety suggestions, and links to cloud-hosted report details or history when available.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Driving videos or video URLs may be sent to the configured cloud service and can contain sensitive driver, vehicle, route, or location information.\n\nMitigation: Use only approved media, confirm consent and data-handling requirements, and install the skill only where the configured cloud analysis service is acceptable.\n\nRisk: The skill can silently create or reuse an internal account identity and store account or token data locally.\n\nMitigation: Review local workspace storage policies before installation, restrict workspace access, and clear stored identity data according to the environment's retention policy.\n\nRisk: Cloud report history can be queried, which may expose prior driving-analysis reports associated with the resolved identity.\n\nMitigation: Limit use to environments where historical report access is expected, and verify account scoping before enabling report-list workflows.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-drive-analysis)\n- [Publisher profile](https://clawhub.ai/user/smyx-sunjinhui)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [API documentation](references/api_doc.md)\n- [Analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown and JSON analysis reports, with optional saved text output]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include cloud report links and historical report tables.]\n\n## Skill Version(s):\n\n1.0.8 (source: server release metadata; artifact SKILL.md frontmatter says 1.0.12)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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: 30 files, 40998 bytes\n\nFiles: references/api_doc.md (644b), scripts/__init__.py (39b), scripts/config.py (658b), scripts/drive_analysis.py (8904b), scripts/skill.py (573b), skill-card.md (2877b), SKILL.md (11572b), 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 (138b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"drive-analysis\"\ndescription: \"Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🚗 Safe Driving Behavior Analyzer | 安全驾驶行为分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **安全驾驶行为分析工具** |\n| 🎯 核心目标 | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DRIVE_ANALYSIS` |\n\nThis tool is an intelligent safe driving behavior analysis system specifically designed for motor vehicle operators. By\ndeeply analyzing video data captured during driving, it precisely identifies unsafe behaviors such as distracted\ndriving, fatigued driving, and speeding. Based on the analysis results, it generates professional and detailed driving\nbehavior assessment reports. The system aims to help drivers promptly identify and correct poor driving habits,\ncomprehensively enhance road safety awareness, and provide technical support for building a safer traffic environment.\n\n本工具是一款专为机动车驾驶人员设计的智能安全驾驶行为分析系统，通过对驾驶过程中的视频数据进行深度解析，精准识别如分心驾驶、疲劳驾驶、超速行驶等不安全行为，并基于分析结果生成专业、详尽的驾驶行为评估报告，旨在帮助驾驶人员及时发现并纠正不良驾驶习惯，全面提升道路交通安全意识，为构建更安全的交通环境提供技术支撑\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频分析对驾驶行为进行安全评估，识别不安全驾驶行为模式，提供结构化分析报告和安全驾驶改进建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频分析 |\n| 2 | 疲劳驾驶识别 |\n| 3 | 分心驾驶识别 |\n| 4 | 安全带使用检查 |\n| 5 | 驾驶姿势评估 |\n| 6 | 不良驾驶习惯识别 |\n| 7 | 交通安全建议生成 |\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.drive_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.drive_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚗 安全驾驶行为分析维度 | Safe Driving Behavior Dimensions\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| 要求 | 身体前倾过度/后仰过度 |\n| 要求 | 脚部位置不正确影响操控 |\n| 要求 | **分心类行为** |\n| 要求 | 开车刷短视频/看信息/玩游戏 |\n| 要求 | 开车接打电话 |\n| 要求 | 频繁调整导航/音乐 |\n| 要求 | 与乘车人员过度交谈互动 |\n| 要求 | **危险类行为** |\n| 要求 | 超速行驶（可识别明显加速超车行为） |\n| 要求 | 频繁变道不打转向灯 |\n| 要求 | 跟车过近（车距过近） |\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.drive_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/fatigue/distraction/seatbelt/risk，默认 | 按需填写 |\n| `--list` | 显示安全驾驶分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/drive_analysis.py`](scripts/drive_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| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 视频要求：支持 mp4/avi/mov 格式，最大 10MB |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 综合安全驾驶行为分析\npython -m scripts.drive_analysis --input /path/to/drive_video.mp4 --analysis-type comprehensive 疲劳驾驶专项分析\npython -m scripts.drive_analysis --url https://example.com/drive_video.mp4 --analysis-type fatigue 分心驾驶专项分析\npython -m scripts.drive_analysis --input /path/to/distraction_video.mp4 --analysis-type distraction 安全带专项检查\npython -m scripts.drive_analysis --input /path/to/seatbelt_check.mp4 --analysis-type seatbelt 显示历史分析报告/显示分析报告清单列表/显示历史驾驶报告（自动触发关键词：查看历史驾驶报告、历史报告、驾驶报告清单等）\npython -m scripts.drive_analysis --list\n\n# 输出精简报告\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-drive-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1785409107516\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- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动分析任务\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `DRIVE_ANALYSIS` - 安全驾驶行为分析\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:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.7:skill-card.md\n\n## Description: <br>\nAnalyzes driver videos to identify unsafe driving behaviors and produce structured safety reports. <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>\nDrivers, fleet reviewers, safety trainers, or agents acting for them use this skill to submit driving videos or URLs for unsafe-behavior analysis and retrieve structured reports or report history. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Driver videos, faces, license plates, location clues, report history, and account identifiers may be sent to a remote lifeemergence.com service. <br>\nMitigation: Use only with explicit consent, avoid confidential or unnecessary footage, and install only when the remote service is trusted for this data. <br>\nRisk: The skill may create or reuse a local identity and store service tokens in the workspace data directory. <br>\nMitigation: Run it in a trusted workspace, protect the data directory, and remove or rotate stored tokens when the skill is no longer needed. <br>\nRisk: Historical report lookup can expose prior analysis records associated with the resolved account identity. <br>\nMitigation: Limit history queries to authorized users and review returned reports before sharing them. <br>\nRisk: Driving-safety analysis output is educational guidance and may be incomplete or inaccurate for operational decisions. <br>\nMitigation: Treat results as supplemental safety review material and validate important findings with qualified reviewers or established safety processes. <br>\n\n\n## Reference(s): <br>\n- [API documentation](references/api_doc.md) <br>\n- [Analysis API error codes](skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-drive-analysis) <br>\n- [Publisher profile](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance] <br>\n**Output Format:** [Markdown text with embedded JSON or structured analysis content; optional output file when requested.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Can include report links returned by the remote service; supports basic, standard, and json detail modes.] <br>\n\n## Skill Version(s): <br>\n1.0.7 (source: server release metadata; artifact frontmatter says 1.0.11) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.7:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.7:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.6: 30 files, 41014 bytes\n\nFiles: references/api_doc.md (644b), scripts/__init__.py (39b), scripts/config.py (658b), scripts/drive_analysis.py (8904b), scripts/skill.py (573b), skill-card.md (2873b), SKILL.md (11571b), 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 (138b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"drive-analysis\"\ndescription: \"Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 🚗 Safe Driving Behavior Analyzer | 安全驾驶行为分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **安全驾驶行为分析工具** |\n| 🎯 核心目标 | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DRIVE_ANALYSIS` |\n\nThis tool is an intelligent safe driving behavior analysis system specifically designed for motor vehicle operators. By\ndeeply analyzing video data captured during driving, it precisely identifies unsafe behaviors such as distracted\ndriving, fatigued driving, and speeding. Based on the analysis results, it generates professional and detailed driving\nbehavior assessment reports. The system aims to help drivers promptly identify and correct poor driving habits,\ncomprehensively enhance road safety awareness, and provide technical support for building a safer traffic environment.\n\n本工具是一款专为机动车驾驶人员设计的智能安全驾驶行为分析系统，通过对驾驶过程中的视频数据进行深度解析，精准识别如分心驾驶、疲劳驾驶、超速行驶等不安全行为，并基于分析结果生成专业、详尽的驾驶行为评估报告，旨在帮助驾驶人员及时发现并纠正不良驾驶习惯，全面提升道路交通安全意识，为构建更安全的交通环境提供技术支撑\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频分析对驾驶行为进行安全评估，识别不安全驾驶行为模式，提供结构化分析报告和安全驾驶改进建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频分析 |\n| 2 | 疲劳驾驶识别 |\n| 3 | 分心驾驶识别 |\n| 4 | 安全带使用检查 |\n| 5 | 驾驶姿势评估 |\n| 6 | 不良驾驶习惯识别 |\n| 7 | 交通安全建议生成 |\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.drive_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.drive_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚗 安全驾驶行为分析维度 | Safe Driving Behavior Dimensions\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| 要求 | 身体前倾过度/后仰过度 |\n| 要求 | 脚部位置不正确影响操控 |\n| 要求 | **分心类行为** |\n| 要求 | 开车刷短视频/看信息/玩游戏 |\n| 要求 | 开车接打电话 |\n| 要求 | 频繁调整导航/音乐 |\n| 要求 | 与乘车人员过度交谈互动 |\n| 要求 | **危险类行为** |\n| 要求 | 超速行驶（可识别明显加速超车行为） |\n| 要求 | 频繁变道不打转向灯 |\n| 要求 | 跟车过近（车距过近） |\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.drive_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/fatigue/distraction/seatbelt/risk，默认 | 按需填写 |\n| `--list` | 显示安全驾驶分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/drive_analysis.py`](scripts/drive_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| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 视频要求：支持 mp4/avi/mov 格式，最大 10MB |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 综合安全驾驶行为分析\npython -m scripts.drive_analysis --input /path/to/drive_video.mp4 --analysis-type comprehensive 疲劳驾驶专项分析\npython -m scripts.drive_analysis --url https://example.com/drive_video.mp4 --analysis-type fatigue 分心驾驶专项分析\npython -m scripts.drive_analysis --input /path/to/distraction_video.mp4 --analysis-type distraction 安全带专项检查\npython -m scripts.drive_analysis --input /path/to/seatbelt_check.mp4 --analysis-type seatbelt 显示历史分析报告/显示分析报告清单列表/显示历史驾驶报告（自动触发关键词：查看历史驾驶报告、历史报告、驾驶报告清单等）\npython -m scripts.drive_analysis --list\n\n# 输出精简报告\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-drive-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1784224711319\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- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动分析任务\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `DRIVE_ANALYSIS` - 安全驾驶行为分析\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:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.6:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.6:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.6:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.6:skill-card.md\n\n## Description: <br>\nAnalyzes driver video or image inputs to identify unsafe driving behaviors and produce structured safety reports with recommendations. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and developers use this skill to submit driving footage or media URLs for safety-behavior analysis, including fatigue, distraction, seatbelt use, posture, and other risky driving patterns. The skill returns structured findings, safety suggestions, report links, and cloud report-history results. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Driver media or media URLs are sent to configured LifeEmergence cloud APIs for analysis. <br>\nMitigation: Use only footage that is authorized for cloud processing, avoid sensitive in-cabin or regulated data unless retention and deletion terms are acceptable, and confirm the configured endpoint before use. <br>\nRisk: The skill can silently create or reuse a cloud identity and automatically query account-linked report history. <br>\nMitigation: Run it only in workspaces where the account association is expected, and review report-history access expectations before enabling automatic history queries. <br>\nRisk: Identity and token material may be stored in a local workspace database. <br>\nMitigation: Protect the workspace data directory, rotate credentials if the workspace is shared or exported, and remove local stored identity data when the skill is no longer needed. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-drive-analysis) <br>\n- [Skill Demo](https://lifeemergence.com/sample.html) <br>\n- [API Interface Documentation](artifact/references/api_doc.md) <br>\n- [Analysis API Error Codes](artifact/skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown or JSON-formatted structured analysis results, report-history tables, report links, and command-line guidance.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Outputs may include cloud-generated report identifiers and export links. Local file analysis is limited to supported video formats and the configured file-size limit.] <br>\n\n## Skill Version(s): <br>\n1.0.6 (source: server release metadata; artifact frontmatter reports 1.0.9) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.6:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.6:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.5: 30 files, 40907 bytes\n\nFiles: references/api_doc.md (644b), scripts/__init__.py (39b), scripts/config.py (658b), scripts/drive_analysis.py (8904b), scripts/skill.py (573b), skill-card.md (2555b), SKILL.md (11571b), 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 (138b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: \"drive-analysis\"\ndescription: \"Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识\"\nversion: \"1.0.8\"\nlicense: \"MIT-0\"\n---\n\n# 🚗 Safe Driving Behavior Analyzer | 安全驾驶行为分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **安全驾驶行为分析工具** |\n| 🎯 核心目标 | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DRIVE_ANALYSIS` |\n\nThis tool is an intelligent safe driving behavior analysis system specifically designed for motor vehicle operators. By\ndeeply analyzing video data captured during driving, it precisely identifies unsafe behaviors such as distracted\ndriving, fatigued driving, and speeding. Based on the analysis results, it generates professional and detailed driving\nbehavior assessment reports. The system aims to help drivers promptly identify and correct poor driving habits,\ncomprehensively enhance road safety awareness, and provide technical support for building a safer traffic environment.\n\n本工具是一款专为机动车驾驶人员设计的智能安全驾驶行为分析系统，通过对驾驶过程中的视频数据进行深度解析，精准识别如分心驾驶、疲劳驾驶、超速行驶等不安全行为，并基于分析结果生成专业、详尽的驾驶行为评估报告，旨在帮助驾驶人员及时发现并纠正不良驾驶习惯，全面提升道路交通安全意识，为构建更安全的交通环境提供技术支撑\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频分析对驾驶行为进行安全评估，识别不安全驾驶行为模式，提供结构化分析报告和安全驾驶改进建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频分析 |\n| 2 | 疲劳驾驶识别 |\n| 3 | 分心驾驶识别 |\n| 4 | 安全带使用检查 |\n| 5 | 驾驶姿势评估 |\n| 6 | 不良驾驶习惯识别 |\n| 7 | 交通安全建议生成 |\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.drive_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.drive_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚗 安全驾驶行为分析维度 | Safe Driving Behavior Dimensions\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| 要求 | 身体前倾过度/后仰过度 |\n| 要求 | 脚部位置不正确影响操控 |\n| 要求 | **分心类行为** |\n| 要求 | 开车刷短视频/看信息/玩游戏 |\n| 要求 | 开车接打电话 |\n| 要求 | 频繁调整导航/音乐 |\n| 要求 | 与乘车人员过度交谈互动 |\n| 要求 | **危险类行为** |\n| 要求 | 超速行驶（可识别明显加速超车行为） |\n| 要求 | 频繁变道不打转向灯 |\n| 要求 | 跟车过近（车距过近） |\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.drive_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/fatigue/distraction/seatbelt/risk，默认 | 按需填写 |\n| `--list` | 显示安全驾驶分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/drive_analysis.py`](scripts/drive_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| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 视频要求：支持 mp4/avi/mov 格式，最大 10MB |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 综合安全驾驶行为分析\npython -m scripts.drive_analysis --input /path/to/drive_video.mp4 --analysis-type comprehensive 疲劳驾驶专项分析\npython -m scripts.drive_analysis --url https://example.com/drive_video.mp4 --analysis-type fatigue 分心驾驶专项分析\npython -m scripts.drive_analysis --input /path/to/distraction_video.mp4 --analysis-type distraction 安全带专项检查\npython -m scripts.drive_analysis --input /path/to/seatbelt_check.mp4 --analysis-type seatbelt 显示历史分析报告/显示分析报告清单列表/显示历史驾驶报告（自动触发关键词：查看历史驾驶报告、历史报告、驾驶报告清单等）\npython -m scripts.drive_analysis --list\n\n# 输出精简报告\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --output result.json\n```\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-drive-analysis\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1783727247363\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- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动分析任务\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `DRIVE_ANALYSIS` - 安全驾驶行为分析\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:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.5:skill-card.md\n\n## Description: <br>\nAnalyzes videos of vehicle drivers to identify unsafe driving behaviors and generate professional analysis reports to help improve road safety awareness. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users, drivers, and fleet safety reviewers can submit driving videos or public video URLs to assess unsafe driving behaviors such as fatigue, distraction, seatbelt misuse, posture issues, and hazardous actions. The skill returns structured reports, risk notes, safety suggestions, and report links for education and safety review. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Driver videos or video URLs are sent to the LifeEmergence cloud service for analysis. <br>\nMitigation: Use the skill only with content approved for that service, and avoid submitting sensitive footage unless the data handling terms are acceptable. <br>\nRisk: The skill automatically creates or reuses a persistent local identity and can store service tokens locally. <br>\nMitigation: Review and clear the skill data directory when a fresh or non-persistent setup is required. <br>\nRisk: History lookup can retrieve prior cloud reports associated with the current identity. <br>\nMitigation: Confirm the active workspace identity before listing reports and clear stored identity or token records when changing users. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-drive-analysis) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [API interface documentation](references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown report text with optional JSON detail and report links.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Accepts local video files or public video URLs; documented video formats are mp4, avi, and mov with a 10 MB limit.] <br>\n\n## Skill Version(s): <br>\n1.0.5 (source: server release metadata; artifact frontmatter lists 1.0.8) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.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","readmeExcerpt":"Skill: Safe Driving Behavior Analyzer | 安全驾驶行为分析工具 Owner: smyx-sunjinhui Summary: Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识 Tags: latest:1.0.14 Version history: v1.0.14 | 2026-09-29T01:42:35.738Z | auto - Updated version to 1.0.19 in SKILL.md.","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.drive_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 综合安全驾驶行为分析\npython -m scripts.drive_analysis --input /path/to/drive_video.mp4 --analysis-type comprehensive 疲劳驾驶专项分析\npython -m scripts.drive_analysis --url https://example.com/drive_video.mp4 --analysis-type fatigue 分心驾驶专项分析\npython -m scripts.drive_analysis --input /path/to/distraction_video.mp4 --analysis-type distraction 安全带专项检查\npython -m scripts.drive_analysis --input /path/to/seatbelt_check.mp4 --analysis-type seatbelt 显示历史分析报告/显示分析报告清单列表/显示历史驾驶报告（自动触发关键词：查看历史驾驶报告、历史报告、驾驶报告清单等）\npython -m scripts.drive_analysis --list\n\n# 输出精简报告\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --output result.json"},{"language":"bash","snippet":"python -m scripts.drive_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 综合安全驾驶行为分析\npython -m scripts.drive_analysis --input /path/to/drive_video.mp4 --analysis-type comprehensive 疲劳驾驶专项分析\npython -m scripts.drive_analysis --url https://example.com/drive_video.mp4 --analysis-type fatigue 分心驾驶专项分析\npython -m scripts.drive_analysis --input /path/to/distraction_video.mp4 --analysis-type distraction 安全带专项检查\npython -m scripts.drive_analysis --input /path/to/seatbelt_check.mp4 --analysis-type seatbelt 显示历史分析报告/显示分析报告清单列表/显示历史驾驶报告（自动触发关键词：查看历史驾驶报告、历史报告、驾驶报告清单等）\npython -m scripts.drive_analysis --list\n\n# 输出精简报告\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.drive_analysis --input video.mp4 --analysis-type comprehensive --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"drive-analysis\"\ndescription: \"Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识\"\nversion: \"1.0.19\"\nlicense: \"MIT-0\"\n---\n\n# 🚗 Safe Driving Behavior Analyzer | 安全驾驶行为分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **安全驾驶行为分析工具** |\n| 🎯 核心目标 | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DRIVE_ANALYSIS` |\n\nThis tool is an intelligent safe driving behavior analysis system specifically designed for motor vehicle operators. By\ndeeply analyzing video data captured during driving, it precisely identifies unsafe behaviors such as distracted\ndriving, fatigued driving, and speeding. Based on the analysis results, it generates professional and detailed driving\nbehavior assessment reports. The system aims to help drivers promptly identify and correct poor driving habits,\ncomprehensively enhance road safety awareness, and provide technical support for building a safer traffic environment.\n\n本工具是一款专为机动车驾驶人员设计的智能安全驾驶行为分析系统，通过对驾驶过程中的视频数据进行深度解析，精准识别如分心驾驶、疲劳驾驶、超速行驶等不安全行为，并基于分析结果生成专业、详尽的驾驶行为评估报告，旨在帮助驾驶人员及时发现并纠正不良驾驶习惯，全面提升道路交通安全意识，为构建更安全的交通环境提供技术支撑\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过视频分析对驾驶行为进行安全评估，识别不安全驾驶行为模式，提供结构化分析报告和安全驾驶改进建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 视频分析 |\n| 2 | 疲劳驾驶识别 |\n| 3 | 分心驾驶识别 |\n| 4 | 安全带使用检查 |\n| 5 | 驾驶姿势评估 |\n| 6 | 不良驾驶习惯识别 |\n| 7 | 交通安全建议生成 |\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.drive_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.drive_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚗 安全驾驶行为分析维度 | Safe Driving Behavior Dimensions\n| 维度/类型 | 说明 |\n|---|---|\n| 要求 | **疲劳驾驶风险** |\n| 正常 | 精神饱满，眼睛睁开，头部稳定 |\n| 轻度疲劳 | 频繁眨眼，打哈欠，头部轻微晃动 |\n| 中度疲劳 | 眼睛半闭，点头打瞌睡，反应变慢 |\n| 重度疲劳 | 闭眼睡觉，头部严重下垂，完全失去对车辆控制 |\n| 要求 | **注意力集中度** |\n| 专注驾驶 | 视线持续关注前方道路，注意力集中 |\n| 轻度分心 | 偶尔扫视车内仪表盘、后视镜 |\n| 中度分心 | 频繁看向左右两侧或车内其他位置 |\n| 严重分心 | 长时间不看前方道路 |\n| 要求 | **安全带使用检查** |\n| 正确佩戴 | 驾驶员全程系好安全带 |\n| 佩"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-drive-analysis\",\n  \"version\": \"1.0.14\",\n  \"publishedAt\": 1790646155738\n}"},{"path":"references/api_doc.md","content":"# API 接口文档\n\n此处用于存放安全驾驶行为分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动分析任务\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `DRIVE_ANALYSIS` - 安全驾驶行为分析"},{"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":"skills/smyx_analysis/scripts/config.yaml","content":"{}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识 Skill: Safe Driving Behavior Analyzer | 安全驾驶行为分析工具 Owner: smyx-sunjinhui Summary: Analyzes videos of vehicle drivers to identify unsafe driving behaviors. It generates professional analysis reports to help enhance road safety awareness. | 安全驾驶行为分析工具，针对机动车驾驶人员的驾驶行为进行视频分析，识别不安全驾驶行为，输出专业分析报告，提升道路交通安全意识 Tags: latest:1.0.14 Version history: v1.0.14 | 2026-09-29T01:42:35.738Z | auto - Updated version to 1.0.19 in SKILL.md.","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":790,"uniquenessScore":52,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T18:40:21.141Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T18:40:21.141Z","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-10T00:02:39.566Z","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"}]}}}