{"id":"67b37bfb-c1d6-4d84-b571-1f1da8231e1e","entityType":"agent","slug":"clawhub-smyx-sunjinhui-smyx-diet-analysis","name":"Dietary Behavior Health Analyzer | 饮食行为健康分析工具","canonicalUrl":"https://www.xpersona.co/agent/clawhub-smyx-sunjinhui-smyx-diet-analysis","canonicalPath":"/agent/clawhub-smyx-sunjinhui-smyx-diet-analysis","generatedAt":"2026-10-10T08:10:23.172Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-09T18:08:30.731Z","emptyReason":null},"description":"Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议 Skill: Dietary Behavior Health Analyzer | 饮食行为健康分析工具 Owner: smyx-sunjinhui Summary: Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议 Tags: latest:1.0.15 Version history: v1.0.15","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2.2K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-diet-analysis","sourceUrl":"https://clawhub.ai/smyx-sunjinhui/smyx-diet-analysis","homepage":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-diet-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/smyx-sunjinhui/smyx-diet-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-diet-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":67,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured anal"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T18:08:30.731Z","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:08:30.731Z","emptyReason":null},"stars":null,"forks":null,"downloads":2157,"packageName":null,"latestVersion":"1.0.15","tractionLabel":"2.2K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T18:08:30.731Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T18:08:30.731Z","lastCrawledAt":"2026-10-09T18:08:30.731Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T18:08:30.731Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.15","createdAt":"2026-10-01T00:38:38.338Z","changelog":"- Removed the file: skill-card.md. - No functional changes to the skill itself. Documentation/metadata only.","fileCount":31,"zipByteSize":40913},{"version":"1.0.14","createdAt":"2026-09-22T11:04:27.487Z","changelog":"- Updated skill version to 1.0.17. - Removed obsolete file: skill-card.md. - Updated SKILL.md content and versioning information. - Minor changes made to the configuration file (config.yaml).","fileCount":31,"zipByteSize":40969},{"version":"1.0.13","createdAt":"2026-08-24T11:02:29.666Z","changelog":"- Removed the file skill-card.md from the project. - No functional or code changes; this update only affects documentation/package metadata. - Existing skill features and usage remain unchanged.","fileCount":31,"zipByteSize":41226},{"version":"1.0.12","createdAt":"2026-08-20T18:42:39.973Z","changelog":"- Version bumped from 1.0.12 to 1.0.13. - Documentation updated in SKILL.md. - skill-card.md file removed. - No changes to core logic or features; this update is documentation-only.","fileCount":31,"zipByteSize":41094},{"version":"1.0.11","createdAt":"2026-08-15T18:30:30.224Z","changelog":"- Version updated from 1.0.10 to 1.0.12. - Internal configuration changes in SKILL.md and config.yaml. - Removed redundant or outdated documentation (skill-card.md). - No user-facing feature or functionality changes.","fileCount":31,"zipByteSize":41105},{"version":"1.0.10","createdAt":"2026-08-06T01:17:32.133Z","changelog":"- Updated SKILL.md to reflect version 1.0.10 (from 1.0.9). - Removed the file skill-card.md. - No feature or functionality changes; documentation and metadata updates only.","fileCount":31,"zipByteSize":41064},{"version":"1.0.9","createdAt":"2026-07-27T10:24:27.369Z","changelog":"- Version bumped to 1.0.9. - Documentation updated in SKILL.md; improvements or clarifications made. - Obsolete or redundant file skill-card.md removed.","fileCount":31,"zipByteSize":41365},{"version":"1.0.8","createdAt":"2026-07-18T14:48:28.379Z","changelog":"- Updated version to 1.0.8. - Internal logic improvements in common utility script. - Documentation updated in SKILL.md for clarity and version alignment. - Obsolete file skill-card.md removed.","fileCount":31,"zipByteSize":41169}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-diet-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-diet-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-diet-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-diet-analysis/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-diet-analysis/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-diet-analysis/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-diet-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-10T08:10:23.167Z"}},"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-diet-analysis/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-diet-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-diet-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-diet-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:08:30.731Z","emptyReason":null},"readme":"Skill: Dietary Behavior Health Analyzer | 饮食行为健康分析工具\n\nOwner: smyx-sunjinhui\n\nSummary: Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议\n\nTags: latest:1.0.15\n\nVersion history:\n\nv1.0.15 | 2026-10-01T00:38:38.338Z | auto\n\n- Removed the file: skill-card.md.\n- No functional changes to the skill itself. Documentation/metadata only.\n\nv1.0.14 | 2026-09-22T11:04:27.487Z | auto\n\n- Updated skill version to 1.0.17.\n- Removed obsolete file: skill-card.md.\n- Updated SKILL.md content and versioning information.\n- Minor changes made to the configuration file (config.yaml).\n\nv1.0.13 | 2026-08-24T11:02:29.666Z | auto\n\n- Removed the file skill-card.md from the project.\n- No functional or code changes; this update only affects documentation/package metadata.\n- Existing skill features and usage remain unchanged.\n\nv1.0.12 | 2026-08-20T18:42:39.973Z | auto\n\n- Version bumped from 1.0.12 to 1.0.13.\n- Documentation updated in SKILL.md.\n- skill-card.md file removed.\n- No changes to core logic or features; this update is documentation-only.\n\nv1.0.11 | 2026-08-15T18:30:30.224Z | auto\n\n- Version updated from 1.0.10 to 1.0.12.\n- Internal configuration changes in SKILL.md and config.yaml.\n- Removed redundant or outdated documentation (skill-card.md).\n- No user-facing feature or functionality changes.\n\nv1.0.10 | 2026-08-06T01:17:32.133Z | auto\n\n- Updated SKILL.md to reflect version 1.0.10 (from 1.0.9).\n- Removed the file skill-card.md.\n- No feature or functionality changes; documentation and metadata updates only.\n\nv1.0.9 | 2026-07-27T10:24:27.369Z | auto\n\n- Version bumped to 1.0.9.\n- Documentation updated in SKILL.md; improvements or clarifications made.\n- Obsolete or redundant file skill-card.md removed.\n\nv1.0.8 | 2026-07-18T14:48:28.379Z | auto\n\n- Updated version to 1.0.8.\n- Internal logic improvements in common utility script.\n- Documentation updated in SKILL.md for clarity and version alignment.\n- Obsolete file skill-card.md removed.\n\nv1.0.7 | 2026-07-08T19:15:33.485Z | auto\n\n- Updated skill version to 1.0.7.\n- Removed unnecessary file: skill-card.md.\n- Updated documentation (SKILL.md) content.\n- Modified skill configuration script at skills/smyx_common/scripts/config.py.\n\nv1.0.6 | 2026-06-30T14:35:42.477Z | auto\n\n## Version 1.0.6\n\n- Updated `dao.py` and `util.py` in `skills/smyx_common/scripts/`.\n- Internal code improvements and optimizations.\n- No changes to user-facing features or documentation.\n\nv1.0.5 | 2026-06-27T00:19:26.363Z | auto\n\n**Major update: User privacy workflow and documentation overhaul, plus minor script/file changes**\n\n- Overhaul of SKILL.md: strengthened privacy/identity processing – user identity is now managed entirely internally, never exposed or asked from user.\n- Updated documentation structure and wording for clarity, including step-by-step flows and expanded examples.\n- All user-facing interactions and examples now remove any references to open-id or identity parameters.\n- Minor adjustments to scripts, requirements, configuration, and references to match the new privacy workflow.\n- Removed deprecated or redundant documentation files (e.g., skill-card.md).\n- Added explicit license information and improved formatting/visual structure in SKILL.md.\n\nv1.0.4 | 2026-05-27T04:24:39.163Z | auto\n\n- Added a privacy and data security statement, clarifying information anonymization, secure transmission, and non-retention of user video files.\n- Updated version to 1.0.1 in documentation.\n- No logic or interface changes to analysis capabilities or APIs.\n- Documentation improvements for privacy, safe handling of open-id, and clear process flow.\n- No changes to input parameters or usage examples.\n\nv1.0.3 | 2026-05-23T09:39:40.867Z | auto\n\n- Major refactor: Separated analysis logic into new `skills/smyx_analysis` module.\n- Removed all files related to `face_analysis` skill.\n- Updated open-id acquisition flow: now only user input is accepted, config file lookup removed.\n- Changed video file requirements: maximum file size reduced from 100MB to 10MB.\n- Updated example commands and usage documentation for revised open-id handling and directory structure.\n\nv1.0.2 | 2026-05-13T04:24:44.231Z | auto\n\nv1.0.2\n\n- Updated configuration handling in config.py and related YAML files.\n- Improved initialization logic in __init__.py for better config file loading.\n- Enhanced utility functions in util.py.\n- Refined support for separate development, testing, and production config files.\n\nv1.0.1 | 2026-05-10T02:20:38.961Z | auto\n\n- Updated configuration files in the `skills/smyx_common/scripts/` directory, including support for dev, test, and production environments.\n- Adjusted script structure and config loading logic in face and diet analysis scripts.\n- Made minor updates to the documentation (SKILL.md), including alignment and metadata normalization.\n- Improved configuration management and parameter handling for API communication.\n\nv1.0.0 | 2026-04-15T09:13:18.852Z | auto\n\ndiet-analysis v1.0.0 initial release:\n\n- Provides automated video analysis of eating behaviors, habits, and dietary patterns.\n- Identifies unhealthy eating tendencies and generates structured analysis reports with nutrition recommendations.\n- Enforces strict rules to only use cloud interfaces for report history (never read local memory or fallback).\n- Requires open-id (api-key, username, or phone number) for all operations, following a specific retrieval sequence.\n- Supports comprehensive and specialized analyses (speed, habit, structure, risk) via simple command-line options.\n- Outputs history results as interactive Markdown tables with direct report links.\n\nArchive index:\n\nArchive v1.0.15: 31 files, 40913 bytes\n\nFiles: references/api_doc.md (637b), scripts/__init__.py (32b), scripts/config.py (657b), scripts/config.yaml (2b), scripts/diet_analysis.py (8661b), scripts/skill.py (567b), skill-card.md (2079b), SKILL.md (11279b), 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.15:SKILL.md\n\n---\nname: \"diet-analysis\"\ndescription: \"Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议\"\nversion: \"1.0.17\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Dietary Behavior Health Analyzer | 饮食行为健康分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **饮食行为健康分析工具** |\n| 🎯 核心目标 | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DIET_ANALYSIS` |\n\nPowered by advanced computer vision technology, this personal health management assistant is dedicated to deeply\nanalyzing users' dietary behaviors and habits through video streams. When users upload dining videos or start real-time\nrecording, the system automatically tracks and analyzes the entire eating process. It precisely identifies undesirable\nbehaviors such as wolfing down food, picky eating, and improper posture, while simultaneously performing an intelligent\nbreakdown of the food types, portion proportions, and nutritional structure on the plate.\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.diet_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.diet_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🍽️ 饮食行为分析维度 | Dietary Behavior Dimensions\n本技能重点评估以下饮食行为维度：\n\n1. **进食速度评估**\n    - 过快进食：短时间内大量进食，狼吞虎咽\n    - 适中进食：咀嚼充分，节奏均匀\n    - 过慢进食：进食时间过长，咀嚼过度\n\n2. **进餐习惯评估**\n    - 专注进食：专注用餐，不边吃边玩手机/看电视\n    - 分心进食：同时进行多个活动，注意力不集中\n    - 进食姿势：坐姿端正/走动进食/其他异常姿势\n\n3. **食物选择与结构**\n    - 食物种类识别：主食/蛋白质/蔬菜/油脂分配比例\n    - 烹饪方式识别：油炸/清蒸/红烧/生食\n    - 份量评估：份量过大/适中/不足\n\n4. **不良饮食行为识别**\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.diet_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/speed/habit/structure/risk，默认 comprehensive（综合分析） | 按需填写 |\n| `--list` | 显示饮食行为分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/diet_analysis.py`](scripts/diet_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## 📝 隐私与数据安全声明 | Privacy & Data Security\n| 序号 | 说明 |\n|---:|---|\n| 1 | **数据保密处理** |\n| 2 | 系统基于内部身份标识仅作为用户关联信息，**不保存任何可直接识别个人身份的明文信息**。 |\n| 3 | **安全传输** |\n| 4 | 所有数据（包括视频文件及关联标识）均通过 **HTTPS/TLS 加密通道** 发送至云端 API 进行分析，防止数据在传输过程中被窃取或篡改。 |\n| 5 | **数据留存策略** |\n| 6 | 云端服务器遵循“最小必要原则”，**分析任务完成后即刻删除原始视频数据，不进行持久化存储**，确保用户隐私数据不被留存或滥用。 |\n## 🧰 使用示例 | Examples\n```bash\n# 综合饮食行为分析\npython -m scripts.diet_analysis --input /path/to/meal_video.mp4 --analysis-type comprehensive\n\n# 进食速度专项分析\npython -m scripts.diet_analysis --url https://example.com/meal_video.mp4 --analysis-type speed\n\n# 进餐习惯专项分析\npython -m scripts.diet_analysis --input /path/to/habit_video.mp4 --analysis-type habit\n\n# 显示历史分析报告/显示分析报告清单列表/显示历史饮食报告（自动触发关键词：查看历史饮食报告、历史报告、饮食报告清单等）\npython -m scripts.diet_analysis --list\n\n# 输出精简报告\npython -m scripts.diet_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.diet_analysis --input video.mp4 --analysis-type comprehensive --output result.json\n```\n\nFile v1.0.15:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-diet-analysis\",\n  \"version\": \"1.0.15\",\n  \"publishedAt\": 1790815118338\n}\n\nFile v1.0.15: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- `DIET_ANALYSIS` - 饮食行为健康分析\n\nFile v1.0.15: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.15:scripts/config.yaml\n\n{}\n\nFile v1.0.15:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.15: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.15: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.15: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.15:skill-card.md\n\n## Description:\n\nAnalyzes meal videos to assess eating habits and dietary patterns, then provides structured reports and nutrition suggestions.\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\nPeople reviewing their eating habits can submit a meal video or URL for an assessment of eating speed, habits, and food choices, or retrieve earlier reports from the cloud service. Results are for general dietary guidance, not a medical diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Meal videos or video URLs are sent to an external cloud service for analysis.\n\nMitigation: Get consent before sending sensitive footage and review the service's retention and deletion terms.\n\nRisk: The skill automatically creates or reuses an internal user identity and queries cloud report history.\n\nMitigation: Check account-recovery and history-access expectations before sharing a workspace or using personal reports.\n\nRisk: Service tokens are stored in the local workspace.\n\nMitigation: Protect workspace access and avoid sharing stored credentials.\n\n## Reference(s):\n\n- [Diet analysis API documentation](references/api_doc.md)\n- [ClawHub skill release](https://clawhub.ai/smyx-sunjinhui/skills/smyx-diet-analysis)\n- [Skill demonstration](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Guidance]\n\n**Output Format:** [Structured dietary analysis report or Markdown history table; JSON output is available]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include report links or save results to a file]\n\n## Skill Version(s):\n\n1.0.15 (source: server-resolved ClawHub release)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.15:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.15:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.14: 31 files, 40969 bytes\n\nFiles: references/api_doc.md (637b), scripts/__init__.py (32b), scripts/config.py (657b), scripts/config.yaml (2b), scripts/diet_analysis.py (8661b), scripts/skill.py (567b), skill-card.md (2221b), SKILL.md (11279b), 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.14:SKILL.md\n\n---\nname: \"diet-analysis\"\ndescription: \"Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议\"\nversion: \"1.0.17\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Dietary Behavior Health Analyzer | 饮食行为健康分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **饮食行为健康分析工具** |\n| 🎯 核心目标 | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DIET_ANALYSIS` |\n\nPowered by advanced computer vision technology, this personal health management assistant is dedicated to deeply\nanalyzing users' dietary behaviors and habits through video streams. When users upload dining videos or start real-time\nrecording, the system automatically tracks and analyzes the entire eating process. It precisely identifies undesirable\nbehaviors such as wolfing down food, picky eating, and improper posture, while simultaneously performing an intelligent\nbreakdown of the food types, portion proportions, and nutritional structure on the plate.\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.diet_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.diet_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🍽️ 饮食行为分析维度 | Dietary Behavior Dimensions\n本技能重点评估以下饮食行为维度：\n\n1. **进食速度评估**\n    - 过快进食：短时间内大量进食，狼吞虎咽\n    - 适中进食：咀嚼充分，节奏均匀\n    - 过慢进食：进食时间过长，咀嚼过度\n\n2. **进餐习惯评估**\n    - 专注进食：专注用餐，不边吃边玩手机/看电视\n    - 分心进食：同时进行多个活动，注意力不集中\n    - 进食姿势：坐姿端正/走动进食/其他异常姿势\n\n3. **食物选择与结构**\n    - 食物种类识别：主食/蛋白质/蔬菜/油脂分配比例\n    - 烹饪方式识别：油炸/清蒸/红烧/生食\n    - 份量评估：份量过大/适中/不足\n\n4. **不良饮食行为识别**\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.diet_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/speed/habit/structure/risk，默认 comprehensive（综合分析） | 按需填写 |\n| `--list` | 显示饮食行为分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/diet_analysis.py`](scripts/diet_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## 📝 隐私与数据安全声明 | Privacy & Data Security\n| 序号 | 说明 |\n|---:|---|\n| 1 | **数据保密处理** |\n| 2 | 系统基于内部身份标识仅作为用户关联信息，**不保存任何可直接识别个人身份的明文信息**。 |\n| 3 | **安全传输** |\n| 4 | 所有数据（包括视频文件及关联标识）均通过 **HTTPS/TLS 加密通道** 发送至云端 API 进行分析，防止数据在传输过程中被窃取或篡改。 |\n| 5 | **数据留存策略** |\n| 6 | 云端服务器遵循“最小必要原则”，**分析任务完成后即刻删除原始视频数据，不进行持久化存储**，确保用户隐私数据不被留存或滥用。 |\n## 🧰 使用示例 | Examples\n```bash\n# 综合饮食行为分析\npython -m scripts.diet_analysis --input /path/to/meal_video.mp4 --analysis-type comprehensive\n\n# 进食速度专项分析\npython -m scripts.diet_analysis --url https://example.com/meal_video.mp4 --analysis-type speed\n\n# 进餐习惯专项分析\npython -m scripts.diet_analysis --input /path/to/habit_video.mp4 --analysis-type habit\n\n# 显示历史分析报告/显示分析报告清单列表/显示历史饮食报告（自动触发关键词：查看历史饮食报告、历史报告、饮食报告清单等）\npython -m scripts.diet_analysis --list\n\n# 输出精简报告\npython -m scripts.diet_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.diet_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-diet-analysis\",\n  \"version\": \"1.0.14\",\n  \"publishedAt\": 1790075067487\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- `DIET_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:scripts/config.yaml\n\n{}\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 dining images or videos to assess eating speed, eating habits, dietary structure, and unhealthy eating tendencies, then returns structured reports and nutrition-improvement 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\nExternal users and agent operators use this skill to submit meal-related images, videos, or public URLs for dietary behavior analysis, structured health-reference reports, history lookup, and nutrition-improvement guidance.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Eating-behavior media and identifiers are sent to the Life Emergence cloud service, and report history is cloud-linked.\n\nMitigation: Use only in trusted workspaces where users understand this data flow, and avoid sensitive videos unless identity isolation is in place.\n\nRisk: Reusable tokens and default identities may be stored locally, which can mix private report history across users in shared workspaces.\n\nMitigation: Run the skill in a single-user trusted workspace or isolate identities and token storage before shared deployment.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-diet-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [API interface documentation](references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, files, guidance]\n\n**Output Format:** [Markdown text with structured JSON excerpts, report links, and optional saved output files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include cloud report history and report export links; analysis results are health references and not medical or nutritionist diagnosis.]\n\n## Skill Version(s):\n\n1.0.14 (source: server release metadata; artifact frontmatter lists 1.0.17)\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: 31 files, 41226 bytes\n\nFiles: references/api_doc.md (637b), scripts/__init__.py (32b), scripts/config.py (657b), scripts/config.yaml (2b), scripts/diet_analysis.py (8661b), scripts/skill.py (567b), skill-card.md (2841b), SKILL.md (11279b), 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 (138b)\n\nFile v1.0.13:SKILL.md\n\n---\nname: \"diet-analysis\"\ndescription: \"Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议\"\nversion: \"1.0.13\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Dietary Behavior Health Analyzer | 饮食行为健康分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **饮食行为健康分析工具** |\n| 🎯 核心目标 | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DIET_ANALYSIS` |\n\nPowered by advanced computer vision technology, this personal health management assistant is dedicated to deeply\nanalyzing users' dietary behaviors and habits through video streams. When users upload dining videos or start real-time\nrecording, the system automatically tracks and analyzes the entire eating process. It precisely identifies undesirable\nbehaviors such as wolfing down food, picky eating, and improper posture, while simultaneously performing an intelligent\nbreakdown of the food types, portion proportions, and nutritional structure on the plate.\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.diet_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.diet_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🍽️ 饮食行为分析维度 | Dietary Behavior Dimensions\n本技能重点评估以下饮食行为维度：\n\n1. **进食速度评估**\n    - 过快进食：短时间内大量进食，狼吞虎咽\n    - 适中进食：咀嚼充分，节奏均匀\n    - 过慢进食：进食时间过长，咀嚼过度\n\n2. **进餐习惯评估**\n    - 专注进食：专注用餐，不边吃边玩手机/看电视\n    - 分心进食：同时进行多个活动，注意力不集中\n    - 进食姿势：坐姿端正/走动进食/其他异常姿势\n\n3. **食物选择与结构**\n    - 食物种类识别：主食/蛋白质/蔬菜/油脂分配比例\n    - 烹饪方式识别：油炸/清蒸/红烧/生食\n    - 份量评估：份量过大/适中/不足\n\n4. **不良饮食行为识别**\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.diet_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/speed/habit/structure/risk，默认 comprehensive（综合分析） | 按需填写 |\n| `--list` | 显示饮食行为分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/diet_analysis.py`](scripts/diet_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## 📝 隐私与数据安全声明 | Privacy & Data Security\n| 序号 | 说明 |\n|---:|---|\n| 1 | **数据保密处理** |\n| 2 | 系统基于内部身份标识仅作为用户关联信息，**不保存任何可直接识别个人身份的明文信息**。 |\n| 3 | **安全传输** |\n| 4 | 所有数据（包括视频文件及关联标识）均通过 **HTTPS/TLS 加密通道** 发送至云端 API 进行分析，防止数据在传输过程中被窃取或篡改。 |\n| 5 | **数据留存策略** |\n| 6 | 云端服务器遵循“最小必要原则”，**分析任务完成后即刻删除原始视频数据，不进行持久化存储**，确保用户隐私数据不被留存或滥用。 |\n## 🧰 使用示例 | Examples\n```bash\n# 综合饮食行为分析\npython -m scripts.diet_analysis --input /path/to/meal_video.mp4 --analysis-type comprehensive\n\n# 进食速度专项分析\npython -m scripts.diet_analysis --url https://example.com/meal_video.mp4 --analysis-type speed\n\n# 进餐习惯专项分析\npython -m scripts.diet_analysis --input /path/to/habit_video.mp4 --analysis-type habit\n\n# 显示历史分析报告/显示分析报告清单列表/显示历史饮食报告（自动触发关键词：查看历史饮食报告、历史报告、饮食报告清单等）\npython -m scripts.diet_analysis --list\n\n# 输出精简报告\npython -m scripts.diet_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.diet_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-diet-analysis\",\n  \"version\": \"1.0.13\",\n  \"publishedAt\": 1787569349666\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- `DIET_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:scripts/config.yaml\n\n{}\n\nFile v1.0.13:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.13:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.13:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.13:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.13:skill-card.md\n\n## Description:\n\nAnalyzes videos to evaluate human eating behaviors, habits, and dietary patterns, identify tendencies toward unhealthy eating, and provide structured analysis reports with nutritional improvement 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\nExternal users and agents use this skill to analyze meal videos or video URLs for eating speed, dining habits, diet structure, risk behaviors, nutrition suggestions, and cloud report history.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill handles sensitive meal videos and health-adjacent analysis data through cloud services.\n\nMitigation: Use only with content the user is authorized to submit, avoid private health records unless data-handling terms are acceptable, and treat outputs as wellness guidance rather than medical or nutritional diagnosis.\n\nRisk: Server evidence reports that the skill's HTTPS privacy claim is under-scoped and that configured endpoints include non-HTTPS or test-style hosts.\n\nMitigation: Deploy only with approved HTTPS production endpoints and validate allowed API hosts before credentials, videos, or report identifiers are sent.\n\nRisk: The skill may create or reuse local identity records and token-bearing user records for cloud report association.\n\nMitigation: Document local identity and token storage for users, restrict workspace data access, and rotate or remove stored tokens when the skill is no longer needed.\n\nRisk: Cloud history retrieval can expose prior diet-analysis reports associated with the resolved local or upstream identity.\n\nMitigation: Confirm the active identity context before listing report history and avoid displaying report links in shared or untrusted sessions.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-diet-analysis)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n- [Diet Analysis API Documentation](references/api_doc.md)\n- [Smyx Analysis API Documentation](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, json, guidance]\n\n**Output Format:** [Markdown text with structured JSON report content and optional report export links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Can write the generated report text to an output file when requested]\n\n## Skill Version(s):\n\n1.0.13 (source: frontmatter and server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.13:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.13:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.12: 31 files, 41094 bytes\n\nFiles: references/api_doc.md (637b), scripts/__init__.py (32b), scripts/config.py (657b), scripts/config.yaml (2b), scripts/diet_analysis.py (8661b), scripts/skill.py (567b), skill-card.md (2517b), SKILL.md (11279b), 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 (138b)\n\nFile v1.0.12:SKILL.md\n\n---\nname: \"diet-analysis\"\ndescription: \"Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议\"\nversion: \"1.0.13\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Dietary Behavior Health Analyzer | 饮食行为健康分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **饮食行为健康分析工具** |\n| 🎯 核心目标 | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DIET_ANALYSIS` |\n\nPowered by advanced computer vision technology, this personal health management assistant is dedicated to deeply\nanalyzing users' dietary behaviors and habits through video streams. When users upload dining videos or start real-time\nrecording, the system automatically tracks and analyzes the entire eating process. It precisely identifies undesirable\nbehaviors such as wolfing down food, picky eating, and improper posture, while simultaneously performing an intelligent\nbreakdown of the food types, portion proportions, and nutritional structure on the plate.\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.diet_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.diet_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🍽️ 饮食行为分析维度 | Dietary Behavior Dimensions\n本技能重点评估以下饮食行为维度：\n\n1. **进食速度评估**\n    - 过快进食：短时间内大量进食，狼吞虎咽\n    - 适中进食：咀嚼充分，节奏均匀\n    - 过慢进食：进食时间过长，咀嚼过度\n\n2. **进餐习惯评估**\n    - 专注进食：专注用餐，不边吃边玩手机/看电视\n    - 分心进食：同时进行多个活动，注意力不集中\n    - 进食姿势：坐姿端正/走动进食/其他异常姿势\n\n3. **食物选择与结构**\n    - 食物种类识别：主食/蛋白质/蔬菜/油脂分配比例\n    - 烹饪方式识别：油炸/清蒸/红烧/生食\n    - 份量评估：份量过大/适中/不足\n\n4. **不良饮食行为识别**\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.diet_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/speed/habit/structure/risk，默认 comprehensive（综合分析） | 按需填写 |\n| `--list` | 显示饮食行为分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/diet_analysis.py`](scripts/diet_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## 📝 隐私与数据安全声明 | Privacy & Data Security\n| 序号 | 说明 |\n|---:|---|\n| 1 | **数据保密处理** |\n| 2 | 系统基于内部身份标识仅作为用户关联信息，**不保存任何可直接识别个人身份的明文信息**。 |\n| 3 | **安全传输** |\n| 4 | 所有数据（包括视频文件及关联标识）均通过 **HTTPS/TLS 加密通道** 发送至云端 API 进行分析，防止数据在传输过程中被窃取或篡改。 |\n| 5 | **数据留存策略** |\n| 6 | 云端服务器遵循“最小必要原则”，**分析任务完成后即刻删除原始视频数据，不进行持久化存储**，确保用户隐私数据不被留存或滥用。 |\n## 🧰 使用示例 | Examples\n```bash\n# 综合饮食行为分析\npython -m scripts.diet_analysis --input /path/to/meal_video.mp4 --analysis-type comprehensive\n\n# 进食速度专项分析\npython -m scripts.diet_analysis --url https://example.com/meal_video.mp4 --analysis-type speed\n\n# 进餐习惯专项分析\npython -m scripts.diet_analysis --input /path/to/habit_video.mp4 --analysis-type habit\n\n# 显示历史分析报告/显示分析报告清单列表/显示历史饮食报告（自动触发关键词：查看历史饮食报告、历史报告、饮食报告清单等）\npython -m scripts.diet_analysis --list\n\n# 输出精简报告\npython -m scripts.diet_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.diet_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-diet-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1787251359973\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- `DIET_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:scripts/config.yaml\n\n{}\n\nFile v1.0.12:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.12:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.12:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.12:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.12:skill-card.md\n\n## Description:\n\nAnalyzes meal videos and images to evaluate eating behavior, dietary habits, and diet structure, then returns structured reports and nutrition improvement 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\nExternal users and agents use this skill to submit meal media for dietary behavior analysis, including eating speed, eating habits, diet structure, and risk behavior screening. The skill can also retrieve cloud-hosted historical analysis reports for the resolved user identity.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Eating-related images or videos are uploaded to a cloud service for analysis.\n\nMitigation: Use only with appropriate consent and avoid submitting identifiable or sensitive media unless cloud processing is acceptable.\n\nRisk: The skill automatically creates or reuses an identity and stores local authentication tokens in the workspace data directory.\n\nMitigation: Review workspace data access before installation and rotate or remove local tokens when access changes.\n\nRisk: Broad history-report requests can query prior cloud records for the resolved identity.\n\nMitigation: Run history/list commands only for authorized users and confirm the account context before displaying prior reports.\n\nRisk: Packaged development HTTP endpoint configuration is present alongside production endpoints.\n\nMitigation: Confirm production HTTPS endpoint configuration before handling sensitive media.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-diet-analysis)\n- [API documentation](artifact/references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance]\n\n**Output Format:** [Markdown or JSON text with shell command examples and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May write a result file when --output is used; supports mp4, avi, and mov media up to 10 MB or public media URLs.]\n\n## Skill Version(s):\n\n1.0.12 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.12:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.12:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.11: 31 files, 41105 bytes\n\nFiles: references/api_doc.md (637b), scripts/__init__.py (32b), scripts/config.py (657b), scripts/config.yaml (2b), scripts/diet_analysis.py (8661b), scripts/skill.py (567b), skill-card.md (2636b), SKILL.md (11279b), 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 (138b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: \"diet-analysis\"\ndescription: \"Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议\"\nversion: \"1.0.12\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Dietary Behavior Health Analyzer | 饮食行为健康分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **饮食行为健康分析工具** |\n| 🎯 核心目标 | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DIET_ANALYSIS` |\n\nPowered by advanced computer vision technology, this personal health management assistant is dedicated to deeply\nanalyzing users' dietary behaviors and habits through video streams. When users upload dining videos or start real-time\nrecording, the system automatically tracks and analyzes the entire eating process. It precisely identifies undesirable\nbehaviors such as wolfing down food, picky eating, and improper posture, while simultaneously performing an intelligent\nbreakdown of the food types, portion proportions, and nutritional structure on the plate.\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.diet_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.diet_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🍽️ 饮食行为分析维度 | Dietary Behavior Dimensions\n本技能重点评估以下饮食行为维度：\n\n1. **进食速度评估**\n    - 过快进食：短时间内大量进食，狼吞虎咽\n    - 适中进食：咀嚼充分，节奏均匀\n    - 过慢进食：进食时间过长，咀嚼过度\n\n2. **进餐习惯评估**\n    - 专注进食：专注用餐，不边吃边玩手机/看电视\n    - 分心进食：同时进行多个活动，注意力不集中\n    - 进食姿势：坐姿端正/走动进食/其他异常姿势\n\n3. **食物选择与结构**\n    - 食物种类识别：主食/蛋白质/蔬菜/油脂分配比例\n    - 烹饪方式识别：油炸/清蒸/红烧/生食\n    - 份量评估：份量过大/适中/不足\n\n4. **不良饮食行为识别**\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.diet_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/speed/habit/structure/risk，默认 comprehensive（综合分析） | 按需填写 |\n| `--list` | 显示饮食行为分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/diet_analysis.py`](scripts/diet_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## 📝 隐私与数据安全声明 | Privacy & Data Security\n| 序号 | 说明 |\n|---:|---|\n| 1 | **数据保密处理** |\n| 2 | 系统基于内部身份标识仅作为用户关联信息，**不保存任何可直接识别个人身份的明文信息**。 |\n| 3 | **安全传输** |\n| 4 | 所有数据（包括视频文件及关联标识）均通过 **HTTPS/TLS 加密通道** 发送至云端 API 进行分析，防止数据在传输过程中被窃取或篡改。 |\n| 5 | **数据留存策略** |\n| 6 | 云端服务器遵循“最小必要原则”，**分析任务完成后即刻删除原始视频数据，不进行持久化存储**，确保用户隐私数据不被留存或滥用。 |\n## 🧰 使用示例 | Examples\n```bash\n# 综合饮食行为分析\npython -m scripts.diet_analysis --input /path/to/meal_video.mp4 --analysis-type comprehensive\n\n# 进食速度专项分析\npython -m scripts.diet_analysis --url https://example.com/meal_video.mp4 --analysis-type speed\n\n# 进餐习惯专项分析\npython -m scripts.diet_analysis --input /path/to/habit_video.mp4 --analysis-type habit\n\n# 显示历史分析报告/显示分析报告清单列表/显示历史饮食报告（自动触发关键词：查看历史饮食报告、历史报告、饮食报告清单等）\npython -m scripts.diet_analysis --list\n\n# 输出精简报告\npython -m scripts.diet_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.diet_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-diet-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1786818630224\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- `DIET_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:scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.11:skill-card.md\n\n## Description:\n\nAnalyzes meal images and videos to identify dietary behavior patterns, generate structured health reports, and provide nutrition improvement 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\nExternal users and developers use this skill to submit meal media or media URLs for dietary behavior analysis, review structured reports, and retrieve historical analysis reports from the remote service.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive meal media or URLs may be uploaded to a remote service for analysis.\n\nMitigation: Review the configured endpoints and data handling before use, and avoid private health-related media unless the service is approved for that data.\n\nRisk: The skill may create or reuse an internal identity and store local account tokens.\n\nMitigation: Run the skill in an isolated account or workspace, protect local token files, and clear stored credentials when analysis is complete.\n\nRisk: Default development HTTP endpoints conflict with the skill's HTTPS-only privacy claim.\n\nMitigation: Require production HTTPS endpoints or a documented explanation before using the skill with private media.\n\nRisk: Dietary analysis reports and nutrition recommendations can be mistaken for professional medical advice.\n\nMitigation: Present outputs as informational guidance and direct users with health concerns to qualified nutrition or medical professionals.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-diet-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [Diet analysis API documentation](artifact/references/api_doc.md)\n- [Shared 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 text or JSON structured reports, with optional saved output files.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Supports basic, standard, and json detail levels; local media inputs are limited to mp4, avi, and mov files up to 10 MB.]\n\n## Skill Version(s):\n\n1.0.11 (source: server release metadata; artifact frontmatter reports 1.0.12)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.11:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.11:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.10: 31 files, 41064 bytes\n\nFiles: references/api_doc.md (637b), scripts/__init__.py (32b), scripts/config.py (657b), scripts/config.yaml (2b), scripts/diet_analysis.py (8661b), scripts/skill.py (567b), skill-card.md (2476b), SKILL.md (11279b), 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.10:SKILL.md\n\n---\nname: \"diet-analysis\"\ndescription: \"Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Dietary Behavior Health Analyzer | 饮食行为健康分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **饮食行为健康分析工具** |\n| 🎯 核心目标 | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DIET_ANALYSIS` |\n\nPowered by advanced computer vision technology, this personal health management assistant is dedicated to deeply\nanalyzing users' dietary behaviors and habits through video streams. When users upload dining videos or start real-time\nrecording, the system automatically tracks and analyzes the entire eating process. It precisely identifies undesirable\nbehaviors such as wolfing down food, picky eating, and improper posture, while simultaneously performing an intelligent\nbreakdown of the food types, portion proportions, and nutritional structure on the plate.\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.diet_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.diet_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🍽️ 饮食行为分析维度 | Dietary Behavior Dimensions\n本技能重点评估以下饮食行为维度：\n\n1. **进食速度评估**\n    - 过快进食：短时间内大量进食，狼吞虎咽\n    - 适中进食：咀嚼充分，节奏均匀\n    - 过慢进食：进食时间过长，咀嚼过度\n\n2. **进餐习惯评估**\n    - 专注进食：专注用餐，不边吃边玩手机/看电视\n    - 分心进食：同时进行多个活动，注意力不集中\n    - 进食姿势：坐姿端正/走动进食/其他异常姿势\n\n3. **食物选择与结构**\n    - 食物种类识别：主食/蛋白质/蔬菜/油脂分配比例\n    - 烹饪方式识别：油炸/清蒸/红烧/生食\n    - 份量评估：份量过大/适中/不足\n\n4. **不良饮食行为识别**\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.diet_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/speed/habit/structure/risk，默认 comprehensive（综合分析） | 按需填写 |\n| `--list` | 显示饮食行为分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/diet_analysis.py`](scripts/diet_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## 📝 隐私与数据安全声明 | Privacy & Data Security\n| 序号 | 说明 |\n|---:|---|\n| 1 | **数据保密处理** |\n| 2 | 系统基于内部身份标识仅作为用户关联信息，**不保存任何可直接识别个人身份的明文信息**。 |\n| 3 | **安全传输** |\n| 4 | 所有数据（包括视频文件及关联标识）均通过 **HTTPS/TLS 加密通道** 发送至云端 API 进行分析，防止数据在传输过程中被窃取或篡改。 |\n| 5 | **数据留存策略** |\n| 6 | 云端服务器遵循“最小必要原则”，**分析任务完成后即刻删除原始视频数据，不进行持久化存储**，确保用户隐私数据不被留存或滥用。 |\n## 🧰 使用示例 | Examples\n```bash\n# 综合饮食行为分析\npython -m scripts.diet_analysis --input /path/to/meal_video.mp4 --analysis-type comprehensive\n\n# 进食速度专项分析\npython -m scripts.diet_analysis --url https://example.com/meal_video.mp4 --analysis-type speed\n\n# 进餐习惯专项分析\npython -m scripts.diet_analysis --input /path/to/habit_video.mp4 --analysis-type habit\n\n# 显示历史分析报告/显示分析报告清单列表/显示历史饮食报告（自动触发关键词：查看历史饮食报告、历史报告、饮食报告清单等）\npython -m scripts.diet_analysis --list\n\n# 输出精简报告\npython -m scripts.diet_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.diet_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-diet-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1785979052133\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- `DIET_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:scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.10:skill-card.md\n\n## Description:\n\nAnalyzes videos to evaluate human eating behaviors, habits, and dietary patterns, identifies tendencies toward unhealthy eating, and provides structured analysis reports with nutritional improvement 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\nExternal users and developers use this skill to analyze meal videos or video URLs for eating speed, dining habits, dietary structure, risk behaviors, and nutrition recommendations. It can also query cloud-hosted diet analysis report history associated with the current workspace identity.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Meal videos or URLs are processed by a remote cloud service.\n\nMitigation: Use non-sensitive inputs unless the publisher's data handling, retention, and account practices are acceptable for the intended use.\n\nRisk: The skill silently creates or reuses identity state and stores account tokens in the local workspace.\n\nMitigation: Run the skill in a dedicated workspace and review local account state before sharing or reusing that workspace.\n\nRisk: Historical report queries are performed automatically through cloud APIs.\n\nMitigation: Review cloud report access expectations before enabling history queries, especially in shared or multi-user environments.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-diet-analysis)\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:** [JSON or Markdown-style structured analysis reports, with optional saved output files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Reports may include health scores, eating behavior observations, risk warnings, suggestions, and links to exported cloud reports.]\n\n## Skill Version(s):\n\n1.0.10 (source: frontmatter and server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.10:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.10:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.9: 31 files, 41365 bytes\n\nFiles: references/api_doc.md (637b), scripts/__init__.py (32b), scripts/config.py (657b), scripts/config.yaml (2b), scripts/diet_analysis.py (8661b), scripts/skill.py (567b), skill-card.md (3087b), SKILL.md (11278b), 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 (137b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: \"diet-analysis\"\ndescription: \"Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Dietary Behavior Health Analyzer | 饮食行为健康分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **饮食行为健康分析工具** |\n| 🎯 核心目标 | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DIET_ANALYSIS` |\n\nPowered by advanced computer vision technology, this personal health management assistant is dedicated to deeply\nanalyzing users' dietary behaviors and habits through video streams. When users upload dining videos or start real-time\nrecording, the system automatically tracks and analyzes the entire eating process. It precisely identifies undesirable\nbehaviors such as wolfing down food, picky eating, and improper posture, while simultaneously performing an intelligent\nbreakdown of the food types, portion proportions, and nutritional structure on the plate.\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.diet_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.diet_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🍽️ 饮食行为分析维度 | Dietary Behavior Dimensions\n本技能重点评估以下饮食行为维度：\n\n1. **进食速度评估**\n    - 过快进食：短时间内大量进食，狼吞虎咽\n    - 适中进食：咀嚼充分，节奏均匀\n    - 过慢进食：进食时间过长，咀嚼过度\n\n2. **进餐习惯评估**\n    - 专注进食：专注用餐，不边吃边玩手机/看电视\n    - 分心进食：同时进行多个活动，注意力不集中\n    - 进食姿势：坐姿端正/走动进食/其他异常姿势\n\n3. **食物选择与结构**\n    - 食物种类识别：主食/蛋白质/蔬菜/油脂分配比例\n    - 烹饪方式识别：油炸/清蒸/红烧/生食\n    - 份量评估：份量过大/适中/不足\n\n4. **不良饮食行为识别**\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.diet_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/speed/habit/structure/risk，默认 comprehensive（综合分析） | 按需填写 |\n| `--list` | 显示饮食行为分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/diet_analysis.py`](scripts/diet_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## 📝 隐私与数据安全声明 | Privacy & Data Security\n| 序号 | 说明 |\n|---:|---|\n| 1 | **数据保密处理** |\n| 2 | 系统基于内部身份标识仅作为用户关联信息，**不保存任何可直接识别个人身份的明文信息**。 |\n| 3 | **安全传输** |\n| 4 | 所有数据（包括视频文件及关联标识）均通过 **HTTPS/TLS 加密通道** 发送至云端 API 进行分析，防止数据在传输过程中被窃取或篡改。 |\n| 5 | **数据留存策略** |\n| 6 | 云端服务器遵循“最小必要原则”，**分析任务完成后即刻删除原始视频数据，不进行持久化存储**，确保用户隐私数据不被留存或滥用。 |\n## 🧰 使用示例 | Examples\n```bash\n# 综合饮食行为分析\npython -m scripts.diet_analysis --input /path/to/meal_video.mp4 --analysis-type comprehensive\n\n# 进食速度专项分析\npython -m scripts.diet_analysis --url https://example.com/meal_video.mp4 --analysis-type speed\n\n# 进餐习惯专项分析\npython -m scripts.diet_analysis --input /path/to/habit_video.mp4 --analysis-type habit\n\n# 显示历史分析报告/显示分析报告清单列表/显示历史饮食报告（自动触发关键词：查看历史饮食报告、历史报告、饮食报告清单等）\npython -m scripts.diet_analysis --list\n\n# 输出精简报告\npython -m scripts.diet_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.diet_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-diet-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1785147867369\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- `DIET_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:scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.9:skill-card.md\n\n## Description: <br>\nAnalyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement 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 use this skill to submit meal videos or URLs for dietary behavior analysis, including eating speed, eating habits, diet structure, risk behaviors, and nutrition-oriented recommendations. It can also retrieve cloud-hosted historical analysis reports associated with the resolved user identity. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Meal videos and report history are sent to configured lifeemergence.com cloud services and associated with an automatically resolved local or cloud identity. <br>\nMitigation: Install and run the skill only where those services and the publisher are trusted, and avoid submitting sensitive health-related media unless that linkage is acceptable. <br>\nRisk: The skill may create local workspace data and persist authentication tokens for reuse. <br>\nMitigation: Run it in a workspace with restricted data-directory access, review local data storage before reuse, and clear stored identity or token data when persistence is not desired. <br>\nRisk: Dietary behavior output can look like health guidance but is not a medical or nutrition diagnosis. <br>\nMitigation: Treat reports as wellness reference material and consult a qualified clinician or nutrition professional for medical or dietary decisions. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-diet-analysis) <br>\n- [Publisher profile](https://clawhub.ai/user/smyx-sunjinhui) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [API interface documentation](references/api_doc.md) <br>\n- [SMYX analysis API documentation](skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, JSON, shell commands, files] <br>\n**Output Format:** [Markdown and JSON text, with optional saved output files] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include structured dietary analysis, health warnings, recommendations, report links, and historical report lists.] <br>\n\n## Skill Version(s): <br>\n1.0.9 (source: frontmatter and server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.9:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.9:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.8: 31 files, 41169 bytes\n\nFiles: references/api_doc.md (637b), scripts/__init__.py (32b), scripts/config.py (657b), scripts/config.yaml (2b), scripts/diet_analysis.py (8661b), scripts/skill.py (567b), skill-card.md (2847b), SKILL.md (11278b), 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 (137b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"diet-analysis\"\ndescription: \"Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议\"\nversion: \"1.0.8\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Dietary Behavior Health Analyzer | 饮食行为健康分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **饮食行为健康分析工具** |\n| 🎯 核心目标 | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DIET_ANALYSIS` |\n\nPowered by advanced computer vision technology, this personal health management assistant is dedicated to deeply\nanalyzing users' dietary behaviors and habits through video streams. When users upload dining videos or start real-time\nrecording, the system automatically tracks and analyzes the entire eating process. It precisely identifies undesirable\nbehaviors such as wolfing down food, picky eating, and improper posture, while simultaneously performing an intelligent\nbreakdown of the food types, portion proportions, and nutritional structure on the plate.\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.diet_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.diet_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🍽️ 饮食行为分析维度 | Dietary Behavior Dimensions\n本技能重点评估以下饮食行为维度：\n\n1. **进食速度评估**\n    - 过快进食：短时间内大量进食，狼吞虎咽\n    - 适中进食：咀嚼充分，节奏均匀\n    - 过慢进食：进食时间过长，咀嚼过度\n\n2. **进餐习惯评估**\n    - 专注进食：专注用餐，不边吃边玩手机/看电视\n    - 分心进食：同时进行多个活动，注意力不集中\n    - 进食姿势：坐姿端正/走动进食/其他异常姿势\n\n3. **食物选择与结构**\n    - 食物种类识别：主食/蛋白质/蔬菜/油脂分配比例\n    - 烹饪方式识别：油炸/清蒸/红烧/生食\n    - 份量评估：份量过大/适中/不足\n\n4. **不良饮食行为识别**\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.diet_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/speed/habit/structure/risk，默认 comprehensive（综合分析） | 按需填写 |\n| `--list` | 显示饮食行为分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/diet_analysis.py`](scripts/diet_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## 📝 隐私与数据安全声明 | Privacy & Data Security\n| 序号 | 说明 |\n|---:|---|\n| 1 | **数据保密处理** |\n| 2 | 系统基于内部身份标识仅作为用户关联信息，**不保存任何可直接识别个人身份的明文信息**。 |\n| 3 | **安全传输** |\n| 4 | 所有数据（包括视频文件及关联标识）均通过 **HTTPS/TLS 加密通道** 发送至云端 API 进行分析，防止数据在传输过程中被窃取或篡改。 |\n| 5 | **数据留存策略** |\n| 6 | 云端服务器遵循“最小必要原则”，**分析任务完成后即刻删除原始视频数据，不进行持久化存储**，确保用户隐私数据不被留存或滥用。 |\n## 🧰 使用示例 | Examples\n```bash\n# 综合饮食行为分析\npython -m scripts.diet_analysis --input /path/to/meal_video.mp4 --analysis-type comprehensive\n\n# 进食速度专项分析\npython -m scripts.diet_analysis --url https://example.com/meal_video.mp4 --analysis-type speed\n\n# 进餐习惯专项分析\npython -m scripts.diet_analysis --input /path/to/habit_video.mp4 --analysis-type habit\n\n# 显示历史分析报告/显示分析报告清单列表/显示历史饮食报告（自动触发关键词：查看历史饮食报告、历史报告、饮食报告清单等）\npython -m scripts.diet_analysis --list\n\n# 输出精简报告\npython -m scripts.diet_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.diet_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-diet-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1784386108379\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- `DIET_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:scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.8:skill-card.md\n\n## Description: <br>\nAnalyzes meal videos or video URLs for eating behavior, dietary patterns, unhealthy habit indicators, and nutrition improvement 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>\nUsers and agents use this skill to submit meal videos or video URLs to the Life Emergence cloud service for dietary behavior assessment, structured nutrition guidance, and historical diet report retrieval. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Uploaded meal videos, URLs, and historical report requests are processed by a remote Life Emergence cloud service. <br>\nMitigation: Use only with media appropriate for that service, review the service's privacy and retention claims, and avoid sensitive personal or health-related videos unless the deployment has approved the data handling. <br>\nRisk: The security scan reports that the skill silently creates or reuses a local identity and stores service tokens locally. <br>\nMitigation: Review local workspace data files and token storage before installation, isolate the skill in a controlled workspace, and rotate or remove stored tokens when no longer needed. <br>\nRisk: The scanner verdict is suspicious because remote login, token storage, and historical report retrieval happen with limited user control or disclosure. <br>\nMitigation: Require operator review before deployment and clearly disclose remote processing and historical report access to end users. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill listing](https://clawhub.ai/smyx-sunjinhui/skills/smyx-diet-analysis) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [API interface documentation](references/api_doc.md) <br>\n- [Analysis API documentation](skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, json, shell commands, configuration] <br>\n**Output Format:** [Markdown and JSON-formatted analysis reports, Markdown tables for historical reports, report links, and shell commands for invoking the skill scripts.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Supports mp4, avi, and mov inputs up to 10 MB; accepts local file paths or public video URLs; output detail can be basic, standard, or json.] <br>\n\n## Skill Version(s): <br>\n1.0.8 (source: evidence.release.version and SKILL.md frontmatter) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.8:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.8:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.7: 31 files, 41208 bytes\n\nFiles: references/api_doc.md (637b), scripts/__init__.py (32b), scripts/config.py (657b), scripts/config.yaml (2b), scripts/diet_analysis.py (8661b), scripts/skill.py (567b), skill-card.md (3169b), SKILL.md (11278b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28605b), _meta.json (137b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"diet-analysis\"\ndescription: \"Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议\"\nversion: \"1.0.6\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Dietary Behavior Health Analyzer | 饮食行为健康分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **饮食行为健康分析工具** |\n| 🎯 核心目标 | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DIET_ANALYSIS` |\n\nPowered by advanced computer vision technology, this personal health management assistant is dedicated to deeply\nanalyzing users' dietary behaviors and habits through video streams. When users upload dining videos or start real-time\nrecording, the system automatically tracks and analyzes the entire eating process. It precisely identifies undesirable\nbehaviors such as wolfing down food, picky eating, and improper posture, while simultaneously performing an intelligent\nbreakdown of the food types, portion proportions, and nutritional structure on the plate.\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.diet_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.diet_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🍽️ 饮食行为分析维度 | Dietary Behavior Dimensions\n本技能重点评估以下饮食行为维度：\n\n1. **进食速度评估**\n    - 过快进食：短时间内大量进食，狼吞虎咽\n    - 适中进食：咀嚼充分，节奏均匀\n    - 过慢进食：进食时间过长，咀嚼过度\n\n2. **进餐习惯评估**\n    - 专注进食：专注用餐，不边吃边玩手机/看电视\n    - 分心进食：同时进行多个活动，注意力不集中\n    - 进食姿势：坐姿端正/走动进食/其他异常姿势\n\n3. **食物选择与结构**\n    - 食物种类识别：主食/蛋白质/蔬菜/油脂分配比例\n    - 烹饪方式识别：油炸/清蒸/红烧/生食\n    - 份量评估：份量过大/适中/不足\n\n4. **不良饮食行为识别**\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.diet_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/speed/habit/structure/risk，默认 comprehensive（综合分析） | 按需填写 |\n| `--list` | 显示饮食行为分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/diet_analysis.py`](scripts/diet_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## 📝 隐私与数据安全声明 | Privacy & Data Security\n| 序号 | 说明 |\n|---:|---|\n| 1 | **数据保密处理** |\n| 2 | 系统基于内部身份标识仅作为用户关联信息，**不保存任何可直接识别个人身份的明文信息**。 |\n| 3 | **安全传输** |\n| 4 | 所有数据（包括视频文件及关联标识）均通过 **HTTPS/TLS 加密通道** 发送至云端 API 进行分析，防止数据在传输过程中被窃取或篡改。 |\n| 5 | **数据留存策略** |\n| 6 | 云端服务器遵循“最小必要原则”，**分析任务完成后即刻删除原始视频数据，不进行持久化存储**，确保用户隐私数据不被留存或滥用。 |\n## 🧰 使用示例 | Examples\n```bash\n# 综合饮食行为分析\npython -m scripts.diet_analysis --input /path/to/meal_video.mp4 --analysis-type comprehensive\n\n# 进食速度专项分析\npython -m scripts.diet_analysis --url https://example.com/meal_video.mp4 --analysis-type speed\n\n# 进餐习惯专项分析\npython -m scripts.diet_analysis --input /path/to/habit_video.mp4 --analysis-type habit\n\n# 显示历史分析报告/显示分析报告清单列表/显示历史饮食报告（自动触发关键词：查看历史饮食报告、历史报告、饮食报告清单等）\npython -m scripts.diet_analysis --list\n\n# 输出精简报告\npython -m scripts.diet_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.diet_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-diet-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1783538133485\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- `DIET_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:scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.7:skill-card.md\n\n## Description: <br>\nAnalyzes meal videos or video URLs to evaluate eating behavior, diet structure, and unhealthy eating tendencies, then returns structured reports with nutrition improvement 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 agents use this skill to submit meal videos or video URLs for dietary behavior analysis, history lookup, and structured nutrition-oriented reporting. Outputs are advisory and should not replace professional medical or nutrition guidance. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Diet-related videos or URLs are sent to a third-party cloud service for analysis. <br>\nMitigation: Use only with videos the user is authorized to share, and avoid sensitive personal, medical, child, or third-party meal videos unless the publisher provides clearer retention and handling guarantees. <br>\nRisk: The skill creates or reuses a local identity and stores authentication tokens in a workspace SQLite database. <br>\nMitigation: Run in an isolated workspace, restrict workspace file access, and clear the workspace data directory or SQLite database when the identity state should not persist. <br>\nRisk: Historical report queries can retrieve cloud-stored report data associated with the local or upstream identity. <br>\nMitigation: Confirm the active identity context before using history lookup and avoid sharing generated report links outside the intended user session. <br>\nRisk: Dietary behavior analysis may be incomplete or inappropriate as medical advice. <br>\nMitigation: Present results as advisory wellness guidance and direct users to qualified medical or nutrition professionals for diagnosis or treatment decisions. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-diet-analysis) <br>\n- [Publisher profile](https://clawhub.ai/user/smyx-sunjinhui) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [Diet analysis API documentation](references/api_doc.md) <br>\n- [Smyx analysis API documentation](skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Analysis, API Calls, Markdown, JSON, Files, Shell commands, Guidance] <br>\n**Output Format:** [Markdown and JSON structured analysis reports, with optional saved text output and report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Accepts mp4, avi, and mov video files up to 10 MB or public video URLs; supports comprehensive, speed, habit, structure, risk, and other analysis modes.] <br>\n\n## Skill Version(s): <br>\n1.0.7 (source: server release evidence; artifact frontmatter reports 1.0.6) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.7:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.7:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.6: 31 files, 40693 bytes\n\nFiles: references/api_doc.md (637b), scripts/__init__.py (32b), scripts/config.py (657b), scripts/config.yaml (2b), scripts/diet_analysis.py (8661b), scripts/skill.py (567b), skill-card.md (2401b), SKILL.md (11278b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (22801b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28605b), _meta.json (137b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"diet-analysis\"\ndescription: \"Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议\"\nversion: \"1.0.5\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Dietary Behavior Health Analyzer | 饮食行为健康分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **饮食行为健康分析工具** |\n| 🎯 核心目标 | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DIET_ANALYSIS` |\n\nPowered by advanced computer vision technology, this personal health management assistant is dedicated to deeply\nanalyzing users' dietary behaviors and habits through video streams. When users upload dining videos or start real-time\nrecording, the system automatically tracks and analyzes the entire eating process. It precisely identifies undesirable\nbehaviors such as wolfing down food, picky eating, and improper posture, while simultaneously performing an intelligent\nbreakdown of the food types, portion proportions, and nutritional structure on the plate.\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.diet_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.diet_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🍽️ 饮食行为分析维度 | Dietary Behavior Dimensions\n本技能重点评估以下饮食行为维度：\n\n1. **进食速度评估**\n    - 过快进食：短时间内大量进食，狼吞虎咽\n    - 适中进食：咀嚼充分，节奏均匀\n    - 过慢进食：进食时间过长，咀嚼过度\n\n2. **进餐习惯评估**\n    - 专注进食：专注用餐，不边吃边玩手机/看电视\n    - 分心进食：同时进行多个活动，注意力不集中\n    - 进食姿势：坐姿端正/走动进食/其他异常姿势\n\n3. **食物选择与结构**\n    - 食物种类识别：主食/蛋白质/蔬菜/油脂分配比例\n    - 烹饪方式识别：油炸/清蒸/红烧/生食\n    - 份量评估：份量过大/适中/不足\n\n4. **不良饮食行为识别**\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.diet_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--analysis-type` | 分析类型，可选值：comprehensive/speed/habit/structure/risk，默认 comprehensive（综合分析） | 按需填写 |\n| `--list` | 显示饮食行为分析历史报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/diet_analysis.py`](scripts/diet_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## 📝 隐私与数据安全声明 | Privacy & Data Security\n| 序号 | 说明 |\n|---:|---|\n| 1 | **数据保密处理** |\n| 2 | 系统基于内部身份标识仅作为用户关联信息，**不保存任何可直接识别个人身份的明文信息**。 |\n| 3 | **安全传输** |\n| 4 | 所有数据（包括视频文件及关联标识）均通过 **HTTPS/TLS 加密通道** 发送至云端 API 进行分析，防止数据在传输过程中被窃取或篡改。 |\n| 5 | **数据留存策略** |\n| 6 | 云端服务器遵循“最小必要原则”，**分析任务完成后即刻删除原始视频数据，不进行持久化存储**，确保用户隐私数据不被留存或滥用。 |\n## 🧰 使用示例 | Examples\n```bash\n# 综合饮食行为分析\npython -m scripts.diet_analysis --input /path/to/meal_video.mp4 --analysis-type comprehensive\n\n# 进食速度专项分析\npython -m scripts.diet_analysis --url https://example.com/meal_video.mp4 --analysis-type speed\n\n# 进餐习惯专项分析\npython -m scripts.diet_analysis --input /path/to/habit_video.mp4 --analysis-type habit\n\n# 显示历史分析报告/显示分析报告清单列表/显示历史饮食报告（自动触发关键词：查看历史饮食报告、历史报告、饮食报告清单等）\npython -m scripts.diet_analysis --list\n\n# 输出精简报告\npython -m scripts.diet_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.diet_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-diet-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1782830142477\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- `DIET_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:scripts/config.yaml\n\n{}\n\nFile v1.0.6:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.6:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.6:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.6:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.6:skill-card.md\n\n## Description: <br>\nAnalyzes meal videos to evaluate eating behavior, dining habits, and diet structure, then returns structured reports and nutrition improvement 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 agents use this skill to submit meal videos or video URLs for dietary behavior analysis, retrieve structured health-oriented reports, and list prior cloud-hosted analysis results. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Personal meal videos and report history are processed by the Life Emergence cloud service. <br>\nMitigation: Use the skill only when that cloud processing is acceptable, avoid submitting unnecessary sensitive footage, and review service requirements before deployment. <br>\nRisk: The skill can create or reuse a persistent local identity and store local authentication tokens. <br>\nMitigation: Restrict workspace access and review or clear the workspace data directory when persistent account linkage or cached credentials are not desired. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-diet-analysis) <br>\n- [Diet analysis API documentation](references/api_doc.md) <br>\n- [SMYX analysis API documentation](skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Analysis, Text, Markdown, JSON, Files] <br>\n**Output Format:** [Markdown text with structured JSON payloads, report links, and optional saved output files.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Supports mp4, avi, and mov meal videos up to 10 MB; accepts local file paths or video URLs; supports comprehensive, speed, habit, structure, risk, and other analysis modes.] <br>\n\n## Skill Version(s): <br>\n1.0.6 (source: server release metadata; SKILL.md frontmatter reports 1.0.5) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.6: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","readmeExcerpt":"Skill: Dietary Behavior Health Analyzer | 饮食行为健康分析工具 Owner: smyx-sunjinhui Summary: Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议 Tags: latest:1.0.15 Version history: v1.0.15 ","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.diet_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 综合饮食行为分析\npython -m scripts.diet_analysis --input /path/to/meal_video.mp4 --analysis-type comprehensive\n\n# 进食速度专项分析\npython -m scripts.diet_analysis --url https://example.com/meal_video.mp4 --analysis-type speed\n\n# 进餐习惯专项分析\npython -m scripts.diet_analysis --input /path/to/habit_video.mp4 --analysis-type habit\n\n# 显示历史分析报告/显示分析报告清单列表/显示历史饮食报告（自动触发关键词：查看历史饮食报告、历史报告、饮食报告清单等）\npython -m scripts.diet_analysis --list\n\n# 输出精简报告\npython -m scripts.diet_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.diet_analysis --input video.mp4 --analysis-type comprehensive --output result.json"},{"language":"bash","snippet":"python -m scripts.diet_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 综合饮食行为分析\npython -m scripts.diet_analysis --input /path/to/meal_video.mp4 --analysis-type comprehensive\n\n# 进食速度专项分析\npython -m scripts.diet_analysis --url https://example.com/meal_video.mp4 --analysis-type speed\n\n# 进餐习惯专项分析\npython -m scripts.diet_analysis --input /path/to/habit_video.mp4 --analysis-type habit\n\n# 显示历史分析报告/显示分析报告清单列表/显示历史饮食报告（自动触发关键词：查看历史饮食报告、历史报告、饮食报告清单等）\npython -m scripts.diet_analysis --list\n\n# 输出精简报告\npython -m scripts.diet_analysis --input video.mp4 --analysis-type comprehensive --detail basic\n\n# 保存结果到文件\npython -m scripts.diet_analysis --input video.mp4 --analysis-type comprehensive --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"diet-analysis\"\ndescription: \"Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议\"\nversion: \"1.0.17\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Dietary Behavior Health Analyzer | 饮食行为健康分析工具\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **饮食行为健康分析工具** |\n| 🎯 核心目标 | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `DIET_ANALYSIS` |\n\nPowered by advanced computer vision technology, this personal health management assistant is dedicated to deeply\nanalyzing users' dietary behaviors and habits through video streams. When users upload dining videos or start real-time\nrecording, the system automatically tracks and analyzes the entire eating process. It precisely identifies undesirable\nbehaviors such as wolfing down food, picky eating, and improper posture, while simultaneously performing an intelligent\nbreakdown of the food types, portion proportions, and nutritional structure on the plate.\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.diet_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.diet_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🍽️ 饮食行为分析维度 | Dietary Behavior Dimensions\n本技能重点评估以下饮食行为维度：\n\n1. **进食速度评估**\n    - 过快进食：短时间内大量进食，狼吞虎咽\n    - 适中进食：咀嚼充分，节奏均匀\n    - 过慢进食：进食时间过长，咀嚼过度\n\n2. **进餐习惯评估**\n    - 专注进食：专注用餐，不边吃边玩手机/看电视\n    - 分心进食：同时进行多个活动，注意力不集中\n    - 进食姿势：坐姿端正/走动进食/其他异常姿势\n\n3. **食物选择与结构**\n    - 食物种类识别：主食/蛋白质/蔬菜/油脂分配比例\n    - 烹饪方式识别：油炸/清蒸/红烧/生食\n    - 份量评估：份量过大/适中/不足\n\n4. **不良饮食行为识别*"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-diet-analysis\",\n  \"version\": \"1.0.15\",\n  \"publishedAt\": 1790815118338\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- `DIET_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":"scripts/config.yaml","content":"{}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议 Skill: Dietary Behavior Health Analyzer | 饮食行为健康分析工具 Owner: smyx-sunjinhui Summary: Analyzes videos to evaluate human eating behaviors, habits, and dietary patterns. It identifies tendencies towards unhealthy eating and provides structured analysis reports along with nutritional improvement recommendations. | 饮食行为健康分析工具，针对人的饮食行为、进食习惯、饮食结构进行视频分析，识别不良饮食行为倾向，提供结构化分析报告和营养改善建议 Tags: latest:1.0.15 Version history: v1.0.15","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":809,"uniquenessScore":51,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T18:08:30.731Z","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:08:30.731Z","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-10T08:10:23.172Z","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"}]}}}