{"id":"8dfa4824-eca7-43c4-8699-5adf42be789b","entityType":"agent","slug":"clawhub-18072937735-smyx-child-separation-anxiety-detection-ana","name":"Child Separation Anxiety Detection (Pre-School Crying) | 儿童分离焦虑识别（上学前哭闹）","canonicalUrl":"https://www.xpersona.co/agent/clawhub-18072937735-smyx-child-separation-anxiety-detection-ana","canonicalPath":"/agent/clawhub-18072937735-smyx-child-separation-anxiety-detection-ana","generatedAt":"2026-10-10T04:52:13.718Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T20:35:07.137Z","emptyReason":null},"description":"Using a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-child-separation-anxiety-detection-analysis","sourceUrl":"https://clawhub.ai/18072937735/smyx-child-separation-anxiety-detection-analysis","homepage":"https://clawhub.ai/18072937735/skills/smyx-child-separation-anxiety-detection-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/18072937735/smyx-child-separation-anxiety-detection-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/18072937735/skills/smyx-child-separation-anxiety-detection-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":66,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Child Separation Anxiety Detection (Pre-School Crying) | 儿童分离焦虑识别（上学前哭闹） technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust met"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T20:35:07.137Z","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-09T20:35:07.137Z","emptyReason":null},"stars":null,"forks":null,"downloads":2019,"packageName":null,"latestVersion":"1.0.12","tractionLabel":"2K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T20:35:07.137Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T20:35:07.137Z","lastCrawledAt":"2026-10-09T20:35:07.137Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T20:35:07.137Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.12","createdAt":"2026-09-29T08:47:29.168Z","changelog":"- Updated version to 1.0.15 in SKILL.md to reflect current release. - Removed the file skill-card.md. - No functional or logic changes; only documentation and metadata updated.","fileCount":31,"zipByteSize":41565},{"version":"1.0.11","createdAt":"2026-09-23T00:19:26.852Z","changelog":"- Updated skill version from 1.0.12 to 1.0.14. - Minor configuration and documentation changes. - Removed the file \"skill-card.md\" from the project. - No change to user functionality or analysis workflow.","fileCount":31,"zipByteSize":41598},{"version":"1.0.10","createdAt":"2026-09-07T12:40:52.897Z","changelog":"- Updated SKILL.md content and version number. - Removed the obsolete skill-card.md file. - Documentation now reflects the latest features and usage flow. - No changes to core functionality or parameters.","fileCount":31,"zipByteSize":41678},{"version":"1.0.9","createdAt":"2026-08-25T23:42:30.801Z","changelog":"- Version bumped from 1.0.10 to 1.0.11 in SKILL.md. - Minor documentation update: updated version info in SKILL.md. - Removed legacy documentation file: skill-card.md.","fileCount":31,"zipByteSize":41671},{"version":"1.0.8","createdAt":"2026-08-22T15:20:28.807Z","changelog":"- Version updated from 1.0.8 to 1.0.10. - Documentation (SKILL.md) updated, reflecting version change. - Configuration file (config.yaml) modified. - The file skill-card.md was removed. - No feature or logic changes documented; maintenance and documentation update release.","fileCount":31,"zipByteSize":41798},{"version":"1.0.7","createdAt":"2026-08-12T08:05:51.193Z","changelog":"- Updated to version 1.0.8. - Documentation improvements in SKILL.md. - Removed the skill-card.md file.","fileCount":31,"zipByteSize":41666},{"version":"1.0.6","createdAt":"2026-07-31T23:44:28.254Z","changelog":"- Updated version to 1.0.7 in SKILL.md. - Removed the file skill-card.md. - No changes to functionality, code, or usage instructions. - Documentation maintenance and minor metadata update.","fileCount":31,"zipByteSize":41789},{"version":"1.0.5","createdAt":"2026-07-18T18:52:33.508Z","changelog":"- Updated SKILL.md to version 1.0.5 with current documentation and details. - Removed the skill-card.md file to streamline documentation. - No changes to core logic or capabilities; documentation only.","fileCount":31,"zipByteSize":41717}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-child-separation-anxiety-detection-analysis","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-child-separation-anxiety-detection-analysis` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/18072937735/smyx-child-separation-anxiety-detection-analysis before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-separation-anxiety-detection-ana/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-separation-anxiety-detection-ana/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-separation-anxiety-detection-ana/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-separation-anxiety-detection-ana/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-separation-anxiety-detection-ana/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-separation-anxiety-detection-ana/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-10T04:52:13.714Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-separation-anxiety-detection-ana/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-separation-anxiety-detection-ana/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-separation-anxiety-detection-ana/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-separation-anxiety-detection-ana/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T20:35:07.137Z","emptyReason":null},"readme":"Skill: Child Separation Anxiety Detection (Pre-School Crying) | 儿童分离焦虑识别（上学前哭闹）\n\nOwner: 18072937735\n\nSummary: Using a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。\n\nTags: latest:1.0.12\n\nVersion history:\n\nv1.0.12 | 2026-09-29T08:47:29.168Z | auto\n\n- Updated version to 1.0.15 in SKILL.md to reflect current release.\n- Removed the file skill-card.md.\n- No functional or logic changes; only documentation and metadata updated.\n\nv1.0.11 | 2026-09-23T00:19:26.852Z | auto\n\n- Updated skill version from 1.0.12 to 1.0.14.\n- Minor configuration and documentation changes.\n- Removed the file \"skill-card.md\" from the project.\n- No change to user functionality or analysis workflow.\n\nv1.0.10 | 2026-09-07T12:40:52.897Z | auto\n\n- Updated SKILL.md content and version number.\n- Removed the obsolete skill-card.md file.\n- Documentation now reflects the latest features and usage flow.\n- No changes to core functionality or parameters.\n\nv1.0.9 | 2026-08-25T23:42:30.801Z | auto\n\n- Version bumped from 1.0.10 to 1.0.11 in SKILL.md.\n- Minor documentation update: updated version info in SKILL.md.\n- Removed legacy documentation file: skill-card.md.\n\nv1.0.8 | 2026-08-22T15:20:28.807Z | auto\n\n- Version updated from 1.0.8 to 1.0.10.\n- Documentation (SKILL.md) updated, reflecting version change.\n- Configuration file (config.yaml) modified.\n- The file skill-card.md was removed.\n- No feature or logic changes documented; maintenance and documentation update release.\n\nv1.0.7 | 2026-08-12T08:05:51.193Z | auto\n\n- Updated to version 1.0.8.\n- Documentation improvements in SKILL.md.\n- Removed the skill-card.md file.\n\nv1.0.6 | 2026-07-31T23:44:28.254Z | auto\n\n- Updated version to 1.0.7 in SKILL.md.\n- Removed the file skill-card.md.\n- No changes to functionality, code, or usage instructions.\n- Documentation maintenance and minor metadata update.\n\nv1.0.5 | 2026-07-18T18:52:33.508Z | auto\n\n- Updated SKILL.md to version 1.0.5 with current documentation and details.\n- Removed the skill-card.md file to streamline documentation.\n- No changes to core logic or capabilities; documentation only.\n\nv1.0.4 | 2026-07-12T02:43:39.999Z | auto\n\n- Updated skill version to 1.0.4.\n- SKILL.md revised with latest version, removing references to the previous version.\n- Internal scripts updated: config.py, dao.py, and util.py received changes (details not specified).\n- Removed the file skill-card.md from the project.\n\nv1.0.3 | 2026-06-29T01:07:25.530Z | auto\n\n**Skill version 1.0.3 changelog:**\n\n- Updated the user identity (open-id) handling flow: moved from requiring user to input/choose open-id to fully automatic internal identity management. Users are no longer prompted to provide username or phone number.\n- Revised documentation to reflect this change: instructions, workflows, and constraints in SKILL.md updated to emphasize that no identity information is requested, displayed, or required from the user.\n- Simplified usage examples, removing references to open-id argument.\n- Removed redundant documentation/files related to skill-card and legacy API service script.\n- Clarified that all history queries and report fetching must be done via cloud APIs, with internal identity handled by the backend, not by users.\n\nv1.0.2 | 2026-06-22T10:43:30.293Z | auto\n\n- Removed the file skill-card.md.\n- No changes were made to functionality or documentation content.\n- This update contains only file cleanup.\n\nv1.0.1 | 2026-06-19T08:58:30.734Z | auto\n\n- Improved configuration file path handling for open-id retrieval, prioritizing scripts/config.yaml in the skill root directory.\n- Updated documentation to clarify open-id acquisition steps and configuration file locations.\n- SKILL.md license updated to \"MIT-0\" and description shortened for conciseness.\n- Clarified table formatting for historical report outputs, including column naming and Markdown link structure.\n- Removed redundant and obsolete documentation files (e.g., skill-card.md).\n\nv1.0.0 | 2026-05-26T14:43:54.253Z | auto\n\nInitial release – AI-powered child separation anxiety detection via video analysis.\n\n- Detects crying facial expressions, clinging, and resistance behaviors at home/kindergarten entrances based on fixed camera footage.\n- Automatically evaluates and classifies separation-anxiety level (mild/moderate/severe) and provides friendly alerts to parents/teachers.\n- Integrates with smart cameras and kindergarten management systems; supports daily monitoring and early intervention suggestions.\n- Ensures strict privacy, open-id, and API usage protocols, with mandatory cloud retrieval of historical reports and structured result outputs.\n\nArchive index:\n\nArchive v1.0.12: 31 files, 41565 bytes\n\nFiles: references/api_doc.md (3551b), scripts/__init__.py (62b), scripts/config.py (708b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_child_separation_anxiety_detection_analysis.py (3679b), skill-card.md (2384b), SKILL.md (13221b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (168b)\n\nFile v1.0.12:SKILL.md\n\n---\nname: \"smyx-child-separation-anxiety-detection-analysis\"\ndescription: \"Using a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。\"\nversion: \"1.0.15\"\nlicense: \"MIT-0\"\n---\n\n# 😢 Child Separation Anxiety Detection (Pre-School Crying) | 儿童分离焦虑识别（上学前哭闹）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童分离焦虑识别（上学前哭闹）** |\n| 🎯 核心目标 | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). The skill helps parents and teachers understand the child's emotional state and timely provide comfort or psychological guidance. Application scenarios: home drop-off, kindergarten morning reception. Daily monitoring; when the separation-anxiety level reaches moderate or above, the system pushes reminders to parents or teachers, recommending soothing measures or adjusting the separation routine. Skill features: separation anxiety is a common kindergarten / school adaptation issue, and severe cases may affect mental health and social development. AI automatic recognition helps parents and teachers pay early attention and take intervention measures to reduce children's anxiety. Can be integrated into smart cameras or kindergarten management systems.\n\n通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。应用场景：家庭送学场景、幼儿园晨间接待。系统每日监测，当分离焦虑等级为中度以上时，推送提醒给家长或老师，建议采取安抚措施或调整分离方式。技能特点：儿童分离焦虑是常见的入园/入学适应问题，严重的可能影响心理健康和社交发展。通过AI自动识别，可帮助家长和老师早期关注并采取干预措施，减轻儿童焦虑。该技能可集成到智能摄像头或幼儿园管理系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童情绪行为分析 AI。你的任务是分析上学前儿童与家长互动区域的视频，检测儿童的哭闹表情、肢体抓拽动作及抗拒行为，评估分离焦虑等级。不要提供心理诊断或处方，仅输出基于视觉的行为分析结果与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭门口/幼儿园门口固定摄像头视频，识别儿童在与家长分别时的哭闹/抓拽/抗拒行为 → 综合评估分离焦虑等级（mild/moderate/severe）→ 输出家长与老师的安抚建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与家长在场判定（parent_present） |\n| 2 | 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合） |\n| 3 | 肢体抓拽事件识别（抓家长衣服 / 抱腿 / 拉扯门框） |\n| 4 | 抗拒行为识别（后退 / 躺地 / 推开） |\n| 5 | 当次送别时长与峰值哭闹强度统计 |\n| 6 | 是否最终完成分离判定（successful_separation） |\n| 7 | 连续多日中/重度趋势预警 |\n| 8 | 面向家长/老师的友好提醒与安抚建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供家庭门口/幼儿园门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童分离焦虑识别 |\n| 🔎 明确分析意图 | 当用户明确提及儿童哭闹、入园焦虑、分离焦虑、上学哭、抱腿不放、躺地不走、幼儿园晨间接待、入学适应等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看分离焦虑历史报告、儿童入园焦虑报告清单、上学哭闹报告清单、查询历史分离焦虑事件、显示所有儿童分离焦虑报告、显示入园适应诊断报告，查询分离焦虑预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_separation_anxiety_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备家庭/幼儿园门口固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行儿童分离焦虑识别 | 调用 `-m scripts.smyx_child_separation_anxiety_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地家庭/幼儿园门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络家庭/幼儿园门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童情绪行为分析场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童分离焦虑识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_separation_anxiety_detection_analysis.py`](scripts/smyx_child_separation_anxiety_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：必须能看到儿童面部 + 双手 + 下肢 |\n| 🔎 使用提醒 | 儿童撒娇、玩耍中假哭、被风吹眼流泪等情形可能被误识别为哭闹，建议结合持续时长与抓拽/抗拒动作综合判定 |\n| 🔎 使用提醒 | 多孩家庭、多名儿童同时送学时需按区域跟踪，避免身份混淆；幼儿园场景建议每个班级配独立摄像头 |\n| 🔎 使用提醒 | 本工具**不替代**儿童心理医生评估；适用于辅助记录与早期觉察，重度情况请寻求专业帮助 |\n| 🔏 隐私合规 | 隐私合规：儿童及家长面部视频涉及未成年人高度敏感隐私，使用前需取得家长明确知情同意并向幼儿园报备，妥善加密保管；建议优先采用人体轮廓 + 面部马赛克模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input /path/to/dropoff.mp4\n\n# 分析网络家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --url https://example.com/dropoff.mp4\n\n# 显示历史儿童分离焦虑识别报告（自动触发关键词：查看分离焦虑历史报告、儿童入园焦虑报告清单等）\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --output result.json\n```\n\nFile v1.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-separation-anxiety-detection-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1790671649168\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- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童分离焦虑识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取哭闹表情/抓拽/抗拒行为统计 + 焦虑等级结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史分离焦虑事件\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` - 儿童分离焦虑识别（上学前哭闹）\n\n## 输入约束\n\n- 摄像头：家庭入户门口 / 幼儿园门口 / 晨间接待区固定摄像头，覆盖儿童与家长互动区域，**能看到儿童面部表情 + 双手 + 下肢**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS，捕捉短促哭闹与抓拽动作）；分辨率 ≥ 480p；光照稳定\n- 多儿童同时送学场景下需按区域跟踪，避免目标串扰\n- 隐私敏感场景可启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n- `subject_detected` - 是否检测到儿童\n- `parent_present` - 是否有家长在场（用于判断\"分离\"上下文）\n- `crying_face_score` - 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合）\n- `grab_event_count` - 肢体抓拽事件次数（抓家长衣服/抱腿/拉扯门框）\n- `resistance_event_count` - 抗拒行为次数（后退、躺地、推开）\n- `event_duration_sec` - 当次送别场景持续时长\n- `peak_crying_intensity` - 哭闹强度峰值（0-1）\n- `successful_separation` - 最终是否完成分离（家长离开后儿童是否平复）\n\n## 阈值与分离焦虑等级\n\n- `mild`（轻度）- 短暂皱眉/低声啜泣，无明显抓拽或抗拒，能在 1 分钟内完成分离\n- `moderate`（中度）- 持续哭泣 + ≥ 1 次抓拽/抗拒，2-5 分钟内完成分离\n- `severe`（重度）- 大声哭泣 + 多次抓拽/抗拒（≥ 3 次）+ 躺地等强烈抗拒 + 分离 ≥ 5 分钟仍未平复，或连续多日处于该状态\n\n## 输出字段（参考）\n\n- `subject_detected` / `parent_present` / `successful_separation`\n- `behavior_metrics` - 当次行为统计（crying_face_score / grab_event_count / resistance_event_count / event_duration_sec / peak_crying_intensity）\n- `consecutive_moderate_severe_days` - 连续中/重度天数（用于趋势预警）\n- `separation_anxiety_level` - 分离焦虑等级（mild / moderate / severe）\n- `alert_type` - 提醒类型（separation_anxiety_moderate / separation_anxiety_severe / improving / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长/老师的友好文本（如\"宝宝今早分离时哭泣约 4 分钟、抱腿 3 次，焦虑等级中度，建议家长今晚多陪伴或与老师沟通入园适应方案\"）\n- `recommend_action` - 建议动作（push_parent_notice / notify_teacher / suggest_gradual_separation / suggest_transition_object / observe_only）\n- `tip_for_parent` - 家长安抚建议（如\"明天提前 10 分钟到园，给孩子带一个安抚玩偶\"）\n\n> 仅输出基于视觉的客观行为统计与友好提醒，**不提供分离焦虑障碍（Separation Anxiety Disorder）等心理诊断或处方**；若儿童哭闹影响入园 ≥ 3-4 周或伴随躯体化症状（呕吐、入睡困难等）请咨询儿童心理医生。\n\nFile v1.0.12:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.12:scripts/config.yaml\n\n{}\n\nFile v1.0.12:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.12:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.12:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.12:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.12:skill-card.md\n\n## Description:\n\nAnalyzes home or kindergarten drop-off videos for crying and resistance behaviors and reports a mild, moderate, or severe separation-anxiety level.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nParents and teachers can use drop-off footage to review a child's visible distress and receive behavioral summaries and supportive suggestions; this is not a clinical diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Children's and families' entrance videos or URLs are sent to a cloud analysis service.\n\nMitigation: Obtain appropriate consent and confirm the service's retention, access, and deletion practices before submitting minors' footage.\n\nRisk: The skill silently creates or reuses an identity and stores tokens and profile data locally.\n\nMitigation: Review identity creation and local data protection before installation; restrict access to stored credentials and profile data.\n\nRisk: Keyword-triggered history requests can retrieve prior cloud reports and report links.\n\nMitigation: Restrict report access to authorized users and confirm export-link handling and deletion options.\n\nRisk: Visual behavior estimates may mistake play or incidental tears for anxiety and are not a diagnosis.\n\nMitigation: Review the footage and context with a caregiver; seek qualified professional assessment for persistent or severe concerns.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/18072937735/skills/smyx-child-separation-anxiety-detection-analysis)\n- [Skill API documentation](references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON]\n\n**Output Format:** [Structured analysis report or history list in text, Markdown, or JSON]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include behavior summaries, suggested actions, and links to current or prior cloud reports.]\n\n## Skill Version(s):\n\n1.0.12 (source: server release metadata; bundled SKILL.md lists 1.0.15)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 41598 bytes\n\nFiles: references/api_doc.md (3551b), scripts/__init__.py (62b), scripts/config.py (708b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_child_separation_anxiety_detection_analysis.py (3679b), skill-card.md (2479b), SKILL.md (13221b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (168b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: \"smyx-child-separation-anxiety-detection-analysis\"\ndescription: \"Using a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。\"\nversion: \"1.0.14\"\nlicense: \"MIT-0\"\n---\n\n# 😢 Child Separation Anxiety Detection (Pre-School Crying) | 儿童分离焦虑识别（上学前哭闹）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童分离焦虑识别（上学前哭闹）** |\n| 🎯 核心目标 | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). The skill helps parents and teachers understand the child's emotional state and timely provide comfort or psychological guidance. Application scenarios: home drop-off, kindergarten morning reception. Daily monitoring; when the separation-anxiety level reaches moderate or above, the system pushes reminders to parents or teachers, recommending soothing measures or adjusting the separation routine. Skill features: separation anxiety is a common kindergarten / school adaptation issue, and severe cases may affect mental health and social development. AI automatic recognition helps parents and teachers pay early attention and take intervention measures to reduce children's anxiety. Can be integrated into smart cameras or kindergarten management systems.\n\n通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。应用场景：家庭送学场景、幼儿园晨间接待。系统每日监测，当分离焦虑等级为中度以上时，推送提醒给家长或老师，建议采取安抚措施或调整分离方式。技能特点：儿童分离焦虑是常见的入园/入学适应问题，严重的可能影响心理健康和社交发展。通过AI自动识别，可帮助家长和老师早期关注并采取干预措施，减轻儿童焦虑。该技能可集成到智能摄像头或幼儿园管理系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童情绪行为分析 AI。你的任务是分析上学前儿童与家长互动区域的视频，检测儿童的哭闹表情、肢体抓拽动作及抗拒行为，评估分离焦虑等级。不要提供心理诊断或处方，仅输出基于视觉的行为分析结果与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭门口/幼儿园门口固定摄像头视频，识别儿童在与家长分别时的哭闹/抓拽/抗拒行为 → 综合评估分离焦虑等级（mild/moderate/severe）→ 输出家长与老师的安抚建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与家长在场判定（parent_present） |\n| 2 | 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合） |\n| 3 | 肢体抓拽事件识别（抓家长衣服 / 抱腿 / 拉扯门框） |\n| 4 | 抗拒行为识别（后退 / 躺地 / 推开） |\n| 5 | 当次送别时长与峰值哭闹强度统计 |\n| 6 | 是否最终完成分离判定（successful_separation） |\n| 7 | 连续多日中/重度趋势预警 |\n| 8 | 面向家长/老师的友好提醒与安抚建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供家庭门口/幼儿园门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童分离焦虑识别 |\n| 🔎 明确分析意图 | 当用户明确提及儿童哭闹、入园焦虑、分离焦虑、上学哭、抱腿不放、躺地不走、幼儿园晨间接待、入学适应等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看分离焦虑历史报告、儿童入园焦虑报告清单、上学哭闹报告清单、查询历史分离焦虑事件、显示所有儿童分离焦虑报告、显示入园适应诊断报告，查询分离焦虑预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_separation_anxiety_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备家庭/幼儿园门口固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行儿童分离焦虑识别 | 调用 `-m scripts.smyx_child_separation_anxiety_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地家庭/幼儿园门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络家庭/幼儿园门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童情绪行为分析场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童分离焦虑识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_separation_anxiety_detection_analysis.py`](scripts/smyx_child_separation_anxiety_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：必须能看到儿童面部 + 双手 + 下肢 |\n| 🔎 使用提醒 | 儿童撒娇、玩耍中假哭、被风吹眼流泪等情形可能被误识别为哭闹，建议结合持续时长与抓拽/抗拒动作综合判定 |\n| 🔎 使用提醒 | 多孩家庭、多名儿童同时送学时需按区域跟踪，避免身份混淆；幼儿园场景建议每个班级配独立摄像头 |\n| 🔎 使用提醒 | 本工具**不替代**儿童心理医生评估；适用于辅助记录与早期觉察，重度情况请寻求专业帮助 |\n| 🔏 隐私合规 | 隐私合规：儿童及家长面部视频涉及未成年人高度敏感隐私，使用前需取得家长明确知情同意并向幼儿园报备，妥善加密保管；建议优先采用人体轮廓 + 面部马赛克模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input /path/to/dropoff.mp4\n\n# 分析网络家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --url https://example.com/dropoff.mp4\n\n# 显示历史儿童分离焦虑识别报告（自动触发关键词：查看分离焦虑历史报告、儿童入园焦虑报告清单等）\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --output result.json\n```\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-separation-anxiety-detection-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1790122766852\n}\n\nFile v1.0.11:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放儿童分离焦虑识别（上学前哭闹）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童分离焦虑识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取哭闹表情/抓拽/抗拒行为统计 + 焦虑等级结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史分离焦虑事件\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` - 儿童分离焦虑识别（上学前哭闹）\n\n## 输入约束\n\n- 摄像头：家庭入户门口 / 幼儿园门口 / 晨间接待区固定摄像头，覆盖儿童与家长互动区域，**能看到儿童面部表情 + 双手 + 下肢**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS，捕捉短促哭闹与抓拽动作）；分辨率 ≥ 480p；光照稳定\n- 多儿童同时送学场景下需按区域跟踪，避免目标串扰\n- 隐私敏感场景可启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n- `subject_detected` - 是否检测到儿童\n- `parent_present` - 是否有家长在场（用于判断\"分离\"上下文）\n- `crying_face_score` - 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合）\n- `grab_event_count` - 肢体抓拽事件次数（抓家长衣服/抱腿/拉扯门框）\n- `resistance_event_count` - 抗拒行为次数（后退、躺地、推开）\n- `event_duration_sec` - 当次送别场景持续时长\n- `peak_crying_intensity` - 哭闹强度峰值（0-1）\n- `successful_separation` - 最终是否完成分离（家长离开后儿童是否平复）\n\n## 阈值与分离焦虑等级\n\n- `mild`（轻度）- 短暂皱眉/低声啜泣，无明显抓拽或抗拒，能在 1 分钟内完成分离\n- `moderate`（中度）- 持续哭泣 + ≥ 1 次抓拽/抗拒，2-5 分钟内完成分离\n- `severe`（重度）- 大声哭泣 + 多次抓拽/抗拒（≥ 3 次）+ 躺地等强烈抗拒 + 分离 ≥ 5 分钟仍未平复，或连续多日处于该状态\n\n## 输出字段（参考）\n\n- `subject_detected` / `parent_present` / `successful_separation`\n- `behavior_metrics` - 当次行为统计（crying_face_score / grab_event_count / resistance_event_count / event_duration_sec / peak_crying_intensity）\n- `consecutive_moderate_severe_days` - 连续中/重度天数（用于趋势预警）\n- `separation_anxiety_level` - 分离焦虑等级（mild / moderate / severe）\n- `alert_type` - 提醒类型（separation_anxiety_moderate / separation_anxiety_severe / improving / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长/老师的友好文本（如\"宝宝今早分离时哭泣约 4 分钟、抱腿 3 次，焦虑等级中度，建议家长今晚多陪伴或与老师沟通入园适应方案\"）\n- `recommend_action` - 建议动作（push_parent_notice / notify_teacher / suggest_gradual_separation / suggest_transition_object / observe_only）\n- `tip_for_parent` - 家长安抚建议（如\"明天提前 10 分钟到园，给孩子带一个安抚玩偶\"）\n\n> 仅输出基于视觉的客观行为统计与友好提醒，**不提供分离焦虑障碍（Separation Anxiety Disorder）等心理诊断或处方**；若儿童哭闹影响入园 ≥ 3-4 周或伴随躯体化症状（呕吐、入睡困难等）请咨询儿童心理医生。\n\nFile v1.0.11:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.11:scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.11:skill-card.md\n\n## Description:\n\nAnalyzes home entrance or kindergarten gate video to identify crying, clinging, and resistance behaviors and summarize a child's separation-anxiety level as mild, moderate, or severe.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal caregivers, teachers, and developers can use this skill to process drop-off videos from a home entrance or kindergarten gate and receive behavior observations, anxiety-level summaries, and supportive next-step guidance. The skill is intended for visual behavior analysis and friendly reminders, not psychological diagnosis or treatment.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill processes highly sensitive videos of children and links analysis to a cloud service.\n\nMitigation: Use only with explicit parent or guardian consent for cloud processing and report retention, and limit inputs to appropriate drop-off scenes.\n\nRisk: Identity tokens and local records may persist after use.\n\nMitigation: Run in a contained workspace and delete or revoke local database and token files when analysis is complete.\n\nRisk: The security guidance warns against shared writable locations until the import-path issue is fixed.\n\nMitigation: Deploy from a dedicated, non-shared workspace and review import paths before installation.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-child-separation-anxiety-detection-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [API documentation](references/api_doc.md)\n- [Shared analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, guidance]\n\n**Output Format:** [Markdown report or JSON-style structured analysis from API results]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include behavior metrics, anxiety-level labels, report links, and recommended parent or teacher actions.]\n\n## Skill Version(s):\n\n1.0.11 (source: server release metadata; artifact frontmatter reports 1.0.14)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.11:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.11:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.10: 31 files, 41678 bytes\n\nFiles: references/api_doc.md (3551b), scripts/__init__.py (62b), scripts/config.py (708b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_child_separation_anxiety_detection_analysis.py (3679b), skill-card.md (2694b), SKILL.md (13221b), 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 (168b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: \"smyx-child-separation-anxiety-detection-analysis\"\ndescription: \"Using a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。\"\nversion: \"1.0.12\"\nlicense: \"MIT-0\"\n---\n\n# 😢 Child Separation Anxiety Detection (Pre-School Crying) | 儿童分离焦虑识别（上学前哭闹）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童分离焦虑识别（上学前哭闹）** |\n| 🎯 核心目标 | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). The skill helps parents and teachers understand the child's emotional state and timely provide comfort or psychological guidance. Application scenarios: home drop-off, kindergarten morning reception. Daily monitoring; when the separation-anxiety level reaches moderate or above, the system pushes reminders to parents or teachers, recommending soothing measures or adjusting the separation routine. Skill features: separation anxiety is a common kindergarten / school adaptation issue, and severe cases may affect mental health and social development. AI automatic recognition helps parents and teachers pay early attention and take intervention measures to reduce children's anxiety. Can be integrated into smart cameras or kindergarten management systems.\n\n通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。应用场景：家庭送学场景、幼儿园晨间接待。系统每日监测，当分离焦虑等级为中度以上时，推送提醒给家长或老师，建议采取安抚措施或调整分离方式。技能特点：儿童分离焦虑是常见的入园/入学适应问题，严重的可能影响心理健康和社交发展。通过AI自动识别，可帮助家长和老师早期关注并采取干预措施，减轻儿童焦虑。该技能可集成到智能摄像头或幼儿园管理系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童情绪行为分析 AI。你的任务是分析上学前儿童与家长互动区域的视频，检测儿童的哭闹表情、肢体抓拽动作及抗拒行为，评估分离焦虑等级。不要提供心理诊断或处方，仅输出基于视觉的行为分析结果与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭门口/幼儿园门口固定摄像头视频，识别儿童在与家长分别时的哭闹/抓拽/抗拒行为 → 综合评估分离焦虑等级（mild/moderate/severe）→ 输出家长与老师的安抚建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与家长在场判定（parent_present） |\n| 2 | 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合） |\n| 3 | 肢体抓拽事件识别（抓家长衣服 / 抱腿 / 拉扯门框） |\n| 4 | 抗拒行为识别（后退 / 躺地 / 推开） |\n| 5 | 当次送别时长与峰值哭闹强度统计 |\n| 6 | 是否最终完成分离判定（successful_separation） |\n| 7 | 连续多日中/重度趋势预警 |\n| 8 | 面向家长/老师的友好提醒与安抚建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供家庭门口/幼儿园门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童分离焦虑识别 |\n| 🔎 明确分析意图 | 当用户明确提及儿童哭闹、入园焦虑、分离焦虑、上学哭、抱腿不放、躺地不走、幼儿园晨间接待、入学适应等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看分离焦虑历史报告、儿童入园焦虑报告清单、上学哭闹报告清单、查询历史分离焦虑事件、显示所有儿童分离焦虑报告、显示入园适应诊断报告，查询分离焦虑预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_separation_anxiety_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备家庭/幼儿园门口固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行儿童分离焦虑识别 | 调用 `-m scripts.smyx_child_separation_anxiety_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地家庭/幼儿园门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络家庭/幼儿园门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童情绪行为分析场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童分离焦虑识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_separation_anxiety_detection_analysis.py`](scripts/smyx_child_separation_anxiety_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：必须能看到儿童面部 + 双手 + 下肢 |\n| 🔎 使用提醒 | 儿童撒娇、玩耍中假哭、被风吹眼流泪等情形可能被误识别为哭闹，建议结合持续时长与抓拽/抗拒动作综合判定 |\n| 🔎 使用提醒 | 多孩家庭、多名儿童同时送学时需按区域跟踪，避免身份混淆；幼儿园场景建议每个班级配独立摄像头 |\n| 🔎 使用提醒 | 本工具**不替代**儿童心理医生评估；适用于辅助记录与早期觉察，重度情况请寻求专业帮助 |\n| 🔏 隐私合规 | 隐私合规：儿童及家长面部视频涉及未成年人高度敏感隐私，使用前需取得家长明确知情同意并向幼儿园报备，妥善加密保管；建议优先采用人体轮廓 + 面部马赛克模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input /path/to/dropoff.mp4\n\n# 分析网络家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --url https://example.com/dropoff.mp4\n\n# 显示历史儿童分离焦虑识别报告（自动触发关键词：查看分离焦虑历史报告、儿童入园焦虑报告清单等）\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-separation-anxiety-detection-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1788784852897\n}\n\nFile v1.0.10:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放儿童分离焦虑识别（上学前哭闹）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童分离焦虑识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取哭闹表情/抓拽/抗拒行为统计 + 焦虑等级结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史分离焦虑事件\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` - 儿童分离焦虑识别（上学前哭闹）\n\n## 输入约束\n\n- 摄像头：家庭入户门口 / 幼儿园门口 / 晨间接待区固定摄像头，覆盖儿童与家长互动区域，**能看到儿童面部表情 + 双手 + 下肢**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS，捕捉短促哭闹与抓拽动作）；分辨率 ≥ 480p；光照稳定\n- 多儿童同时送学场景下需按区域跟踪，避免目标串扰\n- 隐私敏感场景可启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n- `subject_detected` - 是否检测到儿童\n- `parent_present` - 是否有家长在场（用于判断\"分离\"上下文）\n- `crying_face_score` - 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合）\n- `grab_event_count` - 肢体抓拽事件次数（抓家长衣服/抱腿/拉扯门框）\n- `resistance_event_count` - 抗拒行为次数（后退、躺地、推开）\n- `event_duration_sec` - 当次送别场景持续时长\n- `peak_crying_intensity` - 哭闹强度峰值（0-1）\n- `successful_separation` - 最终是否完成分离（家长离开后儿童是否平复）\n\n## 阈值与分离焦虑等级\n\n- `mild`（轻度）- 短暂皱眉/低声啜泣，无明显抓拽或抗拒，能在 1 分钟内完成分离\n- `moderate`（中度）- 持续哭泣 + ≥ 1 次抓拽/抗拒，2-5 分钟内完成分离\n- `severe`（重度）- 大声哭泣 + 多次抓拽/抗拒（≥ 3 次）+ 躺地等强烈抗拒 + 分离 ≥ 5 分钟仍未平复，或连续多日处于该状态\n\n## 输出字段（参考）\n\n- `subject_detected` / `parent_present` / `successful_separation`\n- `behavior_metrics` - 当次行为统计（crying_face_score / grab_event_count / resistance_event_count / event_duration_sec / peak_crying_intensity）\n- `consecutive_moderate_severe_days` - 连续中/重度天数（用于趋势预警）\n- `separation_anxiety_level` - 分离焦虑等级（mild / moderate / severe）\n- `alert_type` - 提醒类型（separation_anxiety_moderate / separation_anxiety_severe / improving / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长/老师的友好文本（如\"宝宝今早分离时哭泣约 4 分钟、抱腿 3 次，焦虑等级中度，建议家长今晚多陪伴或与老师沟通入园适应方案\"）\n- `recommend_action` - 建议动作（push_parent_notice / notify_teacher / suggest_gradual_separation / suggest_transition_object / observe_only）\n- `tip_for_parent` - 家长安抚建议（如\"明天提前 10 分钟到园，给孩子带一个安抚玩偶\"）\n\n> 仅输出基于视觉的客观行为统计与友好提醒，**不提供分离焦虑障碍（Separation Anxiety Disorder）等心理诊断或处方**；若儿童哭闹影响入园 ≥ 3-4 周或伴随躯体化症状（呕吐、入睡困难等）请咨询儿童心理医生。\n\nFile v1.0.10:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.10:scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.10:skill-card.md\n\n## Description:\n\nAnalyzes fixed-camera home or kindergarten drop-off videos to detect crying expressions, clinging or resistance behaviors, and estimate mild, moderate, or severe separation-anxiety levels.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nParents, teachers, and developers can use this skill to analyze consented pre-school drop-off videos, produce behavior statistics and separation-anxiety level estimates, and review history reports for trends. It is an aid for observation and early awareness, not a psychological diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive child videos and family identity data may be sent to cloud APIs.\n\nMitigation: Use only with explicit guardian or institution consent, prefer masked or non-sensitive footage, and confirm data handling requirements before deployment.\n\nRisk: Plaintext development endpoints and token persistence may expose sensitive request or identity data.\n\nMitigation: Avoid sensitive real child footage until HTTPS production endpoints and token storage are verified.\n\nRisk: Service responses may include payment-skill installation instructions.\n\nMitigation: Do not let an agent automatically follow returned payment-skill installation or recharge instructions; require human review.\n\nRisk: Behavior analysis may be mistaken for a clinical diagnosis.\n\nMitigation: Present outputs as visual behavior observations and friendly reminders only, and direct severe or persistent cases to qualified child mental-health professionals.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-child-separation-anxiety-detection-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [API documentation](references/api_doc.md)\n- [Shared analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, guidance]\n\n**Output Format:** [Markdown and JSON-style structured analysis reports with optional report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Supports local video files or video URLs, history-list output, and optional file output.]\n\n## Skill Version(s):\n\n1.0.10 (source: server release metadata; artifact frontmatter lists 1.0.12)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 41671 bytes\n\nFiles: references/api_doc.md (3551b), scripts/__init__.py (62b), scripts/config.py (708b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_child_separation_anxiety_detection_analysis.py (3679b), skill-card.md (2669b), SKILL.md (13221b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (472b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (167b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: \"smyx-child-separation-anxiety-detection-analysis\"\ndescription: \"Using a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 😢 Child Separation Anxiety Detection (Pre-School Crying) | 儿童分离焦虑识别（上学前哭闹）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童分离焦虑识别（上学前哭闹）** |\n| 🎯 核心目标 | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). The skill helps parents and teachers understand the child's emotional state and timely provide comfort or psychological guidance. Application scenarios: home drop-off, kindergarten morning reception. Daily monitoring; when the separation-anxiety level reaches moderate or above, the system pushes reminders to parents or teachers, recommending soothing measures or adjusting the separation routine. Skill features: separation anxiety is a common kindergarten / school adaptation issue, and severe cases may affect mental health and social development. AI automatic recognition helps parents and teachers pay early attention and take intervention measures to reduce children's anxiety. Can be integrated into smart cameras or kindergarten management systems.\n\n通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。应用场景：家庭送学场景、幼儿园晨间接待。系统每日监测，当分离焦虑等级为中度以上时，推送提醒给家长或老师，建议采取安抚措施或调整分离方式。技能特点：儿童分离焦虑是常见的入园/入学适应问题，严重的可能影响心理健康和社交发展。通过AI自动识别，可帮助家长和老师早期关注并采取干预措施，减轻儿童焦虑。该技能可集成到智能摄像头或幼儿园管理系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童情绪行为分析 AI。你的任务是分析上学前儿童与家长互动区域的视频，检测儿童的哭闹表情、肢体抓拽动作及抗拒行为，评估分离焦虑等级。不要提供心理诊断或处方，仅输出基于视觉的行为分析结果与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭门口/幼儿园门口固定摄像头视频，识别儿童在与家长分别时的哭闹/抓拽/抗拒行为 → 综合评估分离焦虑等级（mild/moderate/severe）→ 输出家长与老师的安抚建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与家长在场判定（parent_present） |\n| 2 | 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合） |\n| 3 | 肢体抓拽事件识别（抓家长衣服 / 抱腿 / 拉扯门框） |\n| 4 | 抗拒行为识别（后退 / 躺地 / 推开） |\n| 5 | 当次送别时长与峰值哭闹强度统计 |\n| 6 | 是否最终完成分离判定（successful_separation） |\n| 7 | 连续多日中/重度趋势预警 |\n| 8 | 面向家长/老师的友好提醒与安抚建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供家庭门口/幼儿园门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童分离焦虑识别 |\n| 🔎 明确分析意图 | 当用户明确提及儿童哭闹、入园焦虑、分离焦虑、上学哭、抱腿不放、躺地不走、幼儿园晨间接待、入学适应等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看分离焦虑历史报告、儿童入园焦虑报告清单、上学哭闹报告清单、查询历史分离焦虑事件、显示所有儿童分离焦虑报告、显示入园适应诊断报告，查询分离焦虑预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_separation_anxiety_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备家庭/幼儿园门口固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行儿童分离焦虑识别 | 调用 `-m scripts.smyx_child_separation_anxiety_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地家庭/幼儿园门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络家庭/幼儿园门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童情绪行为分析场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童分离焦虑识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_separation_anxiety_detection_analysis.py`](scripts/smyx_child_separation_anxiety_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：必须能看到儿童面部 + 双手 + 下肢 |\n| 🔎 使用提醒 | 儿童撒娇、玩耍中假哭、被风吹眼流泪等情形可能被误识别为哭闹，建议结合持续时长与抓拽/抗拒动作综合判定 |\n| 🔎 使用提醒 | 多孩家庭、多名儿童同时送学时需按区域跟踪，避免身份混淆；幼儿园场景建议每个班级配独立摄像头 |\n| 🔎 使用提醒 | 本工具**不替代**儿童心理医生评估；适用于辅助记录与早期觉察，重度情况请寻求专业帮助 |\n| 🔏 隐私合规 | 隐私合规：儿童及家长面部视频涉及未成年人高度敏感隐私，使用前需取得家长明确知情同意并向幼儿园报备，妥善加密保管；建议优先采用人体轮廓 + 面部马赛克模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input /path/to/dropoff.mp4\n\n# 分析网络家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --url https://example.com/dropoff.mp4\n\n# 显示历史儿童分离焦虑识别报告（自动触发关键词：查看分离焦虑历史报告、儿童入园焦虑报告清单等）\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-separation-anxiety-detection-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1787701350801\n}\n\nFile v1.0.9:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放儿童分离焦虑识别（上学前哭闹）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童分离焦虑识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取哭闹表情/抓拽/抗拒行为统计 + 焦虑等级结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史分离焦虑事件\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` - 儿童分离焦虑识别（上学前哭闹）\n\n## 输入约束\n\n- 摄像头：家庭入户门口 / 幼儿园门口 / 晨间接待区固定摄像头，覆盖儿童与家长互动区域，**能看到儿童面部表情 + 双手 + 下肢**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS，捕捉短促哭闹与抓拽动作）；分辨率 ≥ 480p；光照稳定\n- 多儿童同时送学场景下需按区域跟踪，避免目标串扰\n- 隐私敏感场景可启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n- `subject_detected` - 是否检测到儿童\n- `parent_present` - 是否有家长在场（用于判断\"分离\"上下文）\n- `crying_face_score` - 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合）\n- `grab_event_count` - 肢体抓拽事件次数（抓家长衣服/抱腿/拉扯门框）\n- `resistance_event_count` - 抗拒行为次数（后退、躺地、推开）\n- `event_duration_sec` - 当次送别场景持续时长\n- `peak_crying_intensity` - 哭闹强度峰值（0-1）\n- `successful_separation` - 最终是否完成分离（家长离开后儿童是否平复）\n\n## 阈值与分离焦虑等级\n\n- `mild`（轻度）- 短暂皱眉/低声啜泣，无明显抓拽或抗拒，能在 1 分钟内完成分离\n- `moderate`（中度）- 持续哭泣 + ≥ 1 次抓拽/抗拒，2-5 分钟内完成分离\n- `severe`（重度）- 大声哭泣 + 多次抓拽/抗拒（≥ 3 次）+ 躺地等强烈抗拒 + 分离 ≥ 5 分钟仍未平复，或连续多日处于该状态\n\n## 输出字段（参考）\n\n- `subject_detected` / `parent_present` / `successful_separation`\n- `behavior_metrics` - 当次行为统计（crying_face_score / grab_event_count / resistance_event_count / event_duration_sec / peak_crying_intensity）\n- `consecutive_moderate_severe_days` - 连续中/重度天数（用于趋势预警）\n- `separation_anxiety_level` - 分离焦虑等级（mild / moderate / severe）\n- `alert_type` - 提醒类型（separation_anxiety_moderate / separation_anxiety_severe / improving / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长/老师的友好文本（如\"宝宝今早分离时哭泣约 4 分钟、抱腿 3 次，焦虑等级中度，建议家长今晚多陪伴或与老师沟通入园适应方案\"）\n- `recommend_action` - 建议动作（push_parent_notice / notify_teacher / suggest_gradual_separation / suggest_transition_object / observe_only）\n- `tip_for_parent` - 家长安抚建议（如\"明天提前 10 分钟到园，给孩子带一个安抚玩偶\"）\n\n> 仅输出基于视觉的客观行为统计与友好提醒，**不提供分离焦虑障碍（Separation Anxiety Disorder）等心理诊断或处方**；若儿童哭闹影响入园 ≥ 3-4 周或伴随躯体化症状（呕吐、入睡困难等）请咨询儿童心理医生。\n\nFile v1.0.9:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.9:scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.9:skill-card.md\n\n## Description:\n\nAnalyzes home-entrance or kindergarten-gate videos to identify crying expressions, clinging actions, and resistance behaviors, then summarizes a mild, moderate, or severe separation-anxiety level with caregiver and teacher guidance.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nParents, teachers, school operators, and developers can use this skill to analyze fixed-camera child drop-off media for visible crying, clinging, and resistance patterns. It produces behavior summaries, anxiety-level classifications, history lookups, and non-diagnostic comfort or escalation suggestions.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Child and caregiver videos, media URLs, account identifiers, and report history may be sent to external services.\n\nMitigation: Use only with explicit guardian and school consent, confirm retention and deletion terms with the publisher, and avoid uploading real child media until data handling is approved.\n\nRisk: The skill may silently create or reuse cloud-linked identities and store tokens.\n\nMitigation: Review authorization, identity-linking, token storage, and report-access controls before deployment.\n\nRisk: Behavior analysis can be mistaken for clinical diagnosis or produce misleading classifications.\n\nMitigation: Treat outputs as visual behavior summaries only, review recommendations with caregivers or qualified staff, and seek professional support for severe or persistent concerns.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-child-separation-anxiety-detection-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [API documentation](artifact/references/api_doc.md)\n- [Analysis API documentation](artifact/skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, guidance]\n\n**Output Format:** [Markdown or JSON analysis report with behavior metrics, anxiety level, recommendations, history tables, and report links.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May call external APIs to analyze local or URL media and to retrieve historical reports.]\n\n## Skill Version(s):\n\n1.0.9 (source: server release metadata; artifact SKILL.md states 1.0.11)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 41798 bytes\n\nFiles: references/api_doc.md (3551b), scripts/__init__.py (62b), scripts/config.py (708b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_child_separation_anxiety_detection_analysis.py (3679b), skill-card.md (2947b), SKILL.md (13221b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (472b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (167b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"smyx-child-separation-anxiety-detection-analysis\"\ndescription: \"Using a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 😢 Child Separation Anxiety Detection (Pre-School Crying) | 儿童分离焦虑识别（上学前哭闹）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童分离焦虑识别（上学前哭闹）** |\n| 🎯 核心目标 | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). The skill helps parents and teachers understand the child's emotional state and timely provide comfort or psychological guidance. Application scenarios: home drop-off, kindergarten morning reception. Daily monitoring; when the separation-anxiety level reaches moderate or above, the system pushes reminders to parents or teachers, recommending soothing measures or adjusting the separation routine. Skill features: separation anxiety is a common kindergarten / school adaptation issue, and severe cases may affect mental health and social development. AI automatic recognition helps parents and teachers pay early attention and take intervention measures to reduce children's anxiety. Can be integrated into smart cameras or kindergarten management systems.\n\n通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。应用场景：家庭送学场景、幼儿园晨间接待。系统每日监测，当分离焦虑等级为中度以上时，推送提醒给家长或老师，建议采取安抚措施或调整分离方式。技能特点：儿童分离焦虑是常见的入园/入学适应问题，严重的可能影响心理健康和社交发展。通过AI自动识别，可帮助家长和老师早期关注并采取干预措施，减轻儿童焦虑。该技能可集成到智能摄像头或幼儿园管理系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童情绪行为分析 AI。你的任务是分析上学前儿童与家长互动区域的视频，检测儿童的哭闹表情、肢体抓拽动作及抗拒行为，评估分离焦虑等级。不要提供心理诊断或处方，仅输出基于视觉的行为分析结果与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭门口/幼儿园门口固定摄像头视频，识别儿童在与家长分别时的哭闹/抓拽/抗拒行为 → 综合评估分离焦虑等级（mild/moderate/severe）→ 输出家长与老师的安抚建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与家长在场判定（parent_present） |\n| 2 | 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合） |\n| 3 | 肢体抓拽事件识别（抓家长衣服 / 抱腿 / 拉扯门框） |\n| 4 | 抗拒行为识别（后退 / 躺地 / 推开） |\n| 5 | 当次送别时长与峰值哭闹强度统计 |\n| 6 | 是否最终完成分离判定（successful_separation） |\n| 7 | 连续多日中/重度趋势预警 |\n| 8 | 面向家长/老师的友好提醒与安抚建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供家庭门口/幼儿园门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童分离焦虑识别 |\n| 🔎 明确分析意图 | 当用户明确提及儿童哭闹、入园焦虑、分离焦虑、上学哭、抱腿不放、躺地不走、幼儿园晨间接待、入学适应等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看分离焦虑历史报告、儿童入园焦虑报告清单、上学哭闹报告清单、查询历史分离焦虑事件、显示所有儿童分离焦虑报告、显示入园适应诊断报告，查询分离焦虑预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_separation_anxiety_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备家庭/幼儿园门口固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行儿童分离焦虑识别 | 调用 `-m scripts.smyx_child_separation_anxiety_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地家庭/幼儿园门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络家庭/幼儿园门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童情绪行为分析场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童分离焦虑识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_separation_anxiety_detection_analysis.py`](scripts/smyx_child_separation_anxiety_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：必须能看到儿童面部 + 双手 + 下肢 |\n| 🔎 使用提醒 | 儿童撒娇、玩耍中假哭、被风吹眼流泪等情形可能被误识别为哭闹，建议结合持续时长与抓拽/抗拒动作综合判定 |\n| 🔎 使用提醒 | 多孩家庭、多名儿童同时送学时需按区域跟踪，避免身份混淆；幼儿园场景建议每个班级配独立摄像头 |\n| 🔎 使用提醒 | 本工具**不替代**儿童心理医生评估；适用于辅助记录与早期觉察，重度情况请寻求专业帮助 |\n| 🔏 隐私合规 | 隐私合规：儿童及家长面部视频涉及未成年人高度敏感隐私，使用前需取得家长明确知情同意并向幼儿园报备，妥善加密保管；建议优先采用人体轮廓 + 面部马赛克模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input /path/to/dropoff.mp4\n\n# 分析网络家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --url https://example.com/dropoff.mp4\n\n# 显示历史儿童分离焦虑识别报告（自动触发关键词：查看分离焦虑历史报告、儿童入园焦虑报告清单等）\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-separation-anxiety-detection-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1787412028807\n}\n\nFile v1.0.8:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放儿童分离焦虑识别（上学前哭闹）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童分离焦虑识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取哭闹表情/抓拽/抗拒行为统计 + 焦虑等级结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史分离焦虑事件\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` - 儿童分离焦虑识别（上学前哭闹）\n\n## 输入约束\n\n- 摄像头：家庭入户门口 / 幼儿园门口 / 晨间接待区固定摄像头，覆盖儿童与家长互动区域，**能看到儿童面部表情 + 双手 + 下肢**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS，捕捉短促哭闹与抓拽动作）；分辨率 ≥ 480p；光照稳定\n- 多儿童同时送学场景下需按区域跟踪，避免目标串扰\n- 隐私敏感场景可启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n- `subject_detected` - 是否检测到儿童\n- `parent_present` - 是否有家长在场（用于判断\"分离\"上下文）\n- `crying_face_score` - 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合）\n- `grab_event_count` - 肢体抓拽事件次数（抓家长衣服/抱腿/拉扯门框）\n- `resistance_event_count` - 抗拒行为次数（后退、躺地、推开）\n- `event_duration_sec` - 当次送别场景持续时长\n- `peak_crying_intensity` - 哭闹强度峰值（0-1）\n- `successful_separation` - 最终是否完成分离（家长离开后儿童是否平复）\n\n## 阈值与分离焦虑等级\n\n- `mild`（轻度）- 短暂皱眉/低声啜泣，无明显抓拽或抗拒，能在 1 分钟内完成分离\n- `moderate`（中度）- 持续哭泣 + ≥ 1 次抓拽/抗拒，2-5 分钟内完成分离\n- `severe`（重度）- 大声哭泣 + 多次抓拽/抗拒（≥ 3 次）+ 躺地等强烈抗拒 + 分离 ≥ 5 分钟仍未平复，或连续多日处于该状态\n\n## 输出字段（参考）\n\n- `subject_detected` / `parent_present` / `successful_separation`\n- `behavior_metrics` - 当次行为统计（crying_face_score / grab_event_count / resistance_event_count / event_duration_sec / peak_crying_intensity）\n- `consecutive_moderate_severe_days` - 连续中/重度天数（用于趋势预警）\n- `separation_anxiety_level` - 分离焦虑等级（mild / moderate / severe）\n- `alert_type` - 提醒类型（separation_anxiety_moderate / separation_anxiety_severe / improving / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长/老师的友好文本（如\"宝宝今早分离时哭泣约 4 分钟、抱腿 3 次，焦虑等级中度，建议家长今晚多陪伴或与老师沟通入园适应方案\"）\n- `recommend_action` - 建议动作（push_parent_notice / notify_teacher / suggest_gradual_separation / suggest_transition_object / observe_only）\n- `tip_for_parent` - 家长安抚建议（如\"明天提前 10 分钟到园，给孩子带一个安抚玩偶\"）\n\n> 仅输出基于视觉的客观行为统计与友好提醒，**不提供分离焦虑障碍（Separation Anxiety Disorder）等心理诊断或处方**；若儿童哭闹影响入园 ≥ 3-4 周或伴随躯体化症状（呕吐、入睡困难等）请咨询儿童心理医生。\n\nFile v1.0.8:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.8:scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.8:skill-card.md\n\n## Description:\n\nAnalyzes fixed-camera home or kindergarten drop-off video to identify crying facial expressions, clinging or resistance behaviors, and produce a mild, moderate, or severe separation-anxiety assessment with parent and teacher guidance.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nParents, teachers, and developers integrating school drop-off camera workflows use this skill to turn uploaded or URL-based child drop-off video into structured behavior observations, separation-anxiety level estimates, friendly reminders, and report links. The skill is assistive and explicitly does not replace evaluation by a child psychology professional.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill handles child, home, or kindergarten video through a configured cloud service.\n\nMitigation: Use only with explicit guardian consent, confirm retention and deletion expectations, and restrict use to authorized caregivers, teachers, or operators.\n\nRisk: The security evidence states that account identity can be silently created or reused and auth tokens can be stored locally.\n\nMitigation: Review the installation environment before deployment, restrict workspace and database access, and clear local credentials when access should end.\n\nRisk: Historical reports may contain sensitive child behavior data and can be queried by the skill.\n\nMitigation: Require explicit user intent before listing historical reports and verify that only authorized users can access report history.\n\nRisk: Visual behavior analysis may confuse crying, play, environmental effects, or multiple children and is not a clinical diagnosis.\n\nMitigation: Treat results as assistive observations, review outputs before acting, and seek professional support for persistent or severe concerns.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-child-separation-anxiety-detection-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 text with structured JSON report content, friendly guidance, historical report listings, and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include report export links; local video input is documented for mp4, avi, and mov files up to 10 MB.]\n\n## Skill Version(s):\n\n1.0.8 (source: server release metadata; artifact frontmatter reports 1.0.10)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 41666 bytes\n\nFiles: references/api_doc.md (3551b), scripts/__init__.py (62b), scripts/config.py (708b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_child_separation_anxiety_detection_analysis.py (3679b), skill-card.md (2589b), SKILL.md (13220b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (167b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"smyx-child-separation-anxiety-detection-analysis\"\ndescription: \"Using a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。\"\nversion: \"1.0.8\"\nlicense: \"MIT-0\"\n---\n\n# 😢 Child Separation Anxiety Detection (Pre-School Crying) | 儿童分离焦虑识别（上学前哭闹）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童分离焦虑识别（上学前哭闹）** |\n| 🎯 核心目标 | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). The skill helps parents and teachers understand the child's emotional state and timely provide comfort or psychological guidance. Application scenarios: home drop-off, kindergarten morning reception. Daily monitoring; when the separation-anxiety level reaches moderate or above, the system pushes reminders to parents or teachers, recommending soothing measures or adjusting the separation routine. Skill features: separation anxiety is a common kindergarten / school adaptation issue, and severe cases may affect mental health and social development. AI automatic recognition helps parents and teachers pay early attention and take intervention measures to reduce children's anxiety. Can be integrated into smart cameras or kindergarten management systems.\n\n通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。应用场景：家庭送学场景、幼儿园晨间接待。系统每日监测，当分离焦虑等级为中度以上时，推送提醒给家长或老师，建议采取安抚措施或调整分离方式。技能特点：儿童分离焦虑是常见的入园/入学适应问题，严重的可能影响心理健康和社交发展。通过AI自动识别，可帮助家长和老师早期关注并采取干预措施，减轻儿童焦虑。该技能可集成到智能摄像头或幼儿园管理系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童情绪行为分析 AI。你的任务是分析上学前儿童与家长互动区域的视频，检测儿童的哭闹表情、肢体抓拽动作及抗拒行为，评估分离焦虑等级。不要提供心理诊断或处方，仅输出基于视觉的行为分析结果与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭门口/幼儿园门口固定摄像头视频，识别儿童在与家长分别时的哭闹/抓拽/抗拒行为 → 综合评估分离焦虑等级（mild/moderate/severe）→ 输出家长与老师的安抚建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与家长在场判定（parent_present） |\n| 2 | 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合） |\n| 3 | 肢体抓拽事件识别（抓家长衣服 / 抱腿 / 拉扯门框） |\n| 4 | 抗拒行为识别（后退 / 躺地 / 推开） |\n| 5 | 当次送别时长与峰值哭闹强度统计 |\n| 6 | 是否最终完成分离判定（successful_separation） |\n| 7 | 连续多日中/重度趋势预警 |\n| 8 | 面向家长/老师的友好提醒与安抚建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供家庭门口/幼儿园门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童分离焦虑识别 |\n| 🔎 明确分析意图 | 当用户明确提及儿童哭闹、入园焦虑、分离焦虑、上学哭、抱腿不放、躺地不走、幼儿园晨间接待、入学适应等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看分离焦虑历史报告、儿童入园焦虑报告清单、上学哭闹报告清单、查询历史分离焦虑事件、显示所有儿童分离焦虑报告、显示入园适应诊断报告，查询分离焦虑预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_separation_anxiety_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备家庭/幼儿园门口固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行儿童分离焦虑识别 | 调用 `-m scripts.smyx_child_separation_anxiety_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地家庭/幼儿园门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络家庭/幼儿园门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童情绪行为分析场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童分离焦虑识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_separation_anxiety_detection_analysis.py`](scripts/smyx_child_separation_anxiety_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：必须能看到儿童面部 + 双手 + 下肢 |\n| 🔎 使用提醒 | 儿童撒娇、玩耍中假哭、被风吹眼流泪等情形可能被误识别为哭闹，建议结合持续时长与抓拽/抗拒动作综合判定 |\n| 🔎 使用提醒 | 多孩家庭、多名儿童同时送学时需按区域跟踪，避免身份混淆；幼儿园场景建议每个班级配独立摄像头 |\n| 🔎 使用提醒 | 本工具**不替代**儿童心理医生评估；适用于辅助记录与早期觉察，重度情况请寻求专业帮助 |\n| 🔏 隐私合规 | 隐私合规：儿童及家长面部视频涉及未成年人高度敏感隐私，使用前需取得家长明确知情同意并向幼儿园报备，妥善加密保管；建议优先采用人体轮廓 + 面部马赛克模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input /path/to/dropoff.mp4\n\n# 分析网络家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --url https://example.com/dropoff.mp4\n\n# 显示历史儿童分离焦虑识别报告（自动触发关键词：查看分离焦虑历史报告、儿童入园焦虑报告清单等）\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-separation-anxiety-detection-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1786521951193\n}\n\nFile v1.0.7:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放儿童分离焦虑识别（上学前哭闹）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童分离焦虑识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取哭闹表情/抓拽/抗拒行为统计 + 焦虑等级结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史分离焦虑事件\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` - 儿童分离焦虑识别（上学前哭闹）\n\n## 输入约束\n\n- 摄像头：家庭入户门口 / 幼儿园门口 / 晨间接待区固定摄像头，覆盖儿童与家长互动区域，**能看到儿童面部表情 + 双手 + 下肢**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS，捕捉短促哭闹与抓拽动作）；分辨率 ≥ 480p；光照稳定\n- 多儿童同时送学场景下需按区域跟踪，避免目标串扰\n- 隐私敏感场景可启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n- `subject_detected` - 是否检测到儿童\n- `parent_present` - 是否有家长在场（用于判断\"分离\"上下文）\n- `crying_face_score` - 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合）\n- `grab_event_count` - 肢体抓拽事件次数（抓家长衣服/抱腿/拉扯门框）\n- `resistance_event_count` - 抗拒行为次数（后退、躺地、推开）\n- `event_duration_sec` - 当次送别场景持续时长\n- `peak_crying_intensity` - 哭闹强度峰值（0-1）\n- `successful_separation` - 最终是否完成分离（家长离开后儿童是否平复）\n\n## 阈值与分离焦虑等级\n\n- `mild`（轻度）- 短暂皱眉/低声啜泣，无明显抓拽或抗拒，能在 1 分钟内完成分离\n- `moderate`（中度）- 持续哭泣 + ≥ 1 次抓拽/抗拒，2-5 分钟内完成分离\n- `severe`（重度）- 大声哭泣 + 多次抓拽/抗拒（≥ 3 次）+ 躺地等强烈抗拒 + 分离 ≥ 5 分钟仍未平复，或连续多日处于该状态\n\n## 输出字段（参考）\n\n- `subject_detected` / `parent_present` / `successful_separation`\n- `behavior_metrics` - 当次行为统计（crying_face_score / grab_event_count / resistance_event_count / event_duration_sec / peak_crying_intensity）\n- `consecutive_moderate_severe_days` - 连续中/重度天数（用于趋势预警）\n- `separation_anxiety_level` - 分离焦虑等级（mild / moderate / severe）\n- `alert_type` - 提醒类型（separation_anxiety_moderate / separation_anxiety_severe / improving / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长/老师的友好文本（如\"宝宝今早分离时哭泣约 4 分钟、抱腿 3 次，焦虑等级中度，建议家长今晚多陪伴或与老师沟通入园适应方案\"）\n- `recommend_action` - 建议动作（push_parent_notice / notify_teacher / suggest_gradual_separation / suggest_transition_object / observe_only）\n- `tip_for_parent` - 家长安抚建议（如\"明天提前 10 分钟到园，给孩子带一个安抚玩偶\"）\n\n> 仅输出基于视觉的客观行为统计与友好提醒，**不提供分离焦虑障碍（Separation Anxiety Disorder）等心理诊断或处方**；若儿童哭闹影响入园 ≥ 3-4 周或伴随躯体化症状（呕吐、入睡困难等）请咨询儿童心理医生。\n\nFile v1.0.7:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.7:scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.7:skill-card.md\n\n## Description:\n\nAnalyzes fixed-camera home or kindergarten drop-off videos to detect crying expressions, clinging or resistance behaviors, and produce a mild/moderate/severe separation-anxiety assessment with supportive guidance.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nParents, teachers, and school operators can use this skill to review child drop-off footage for visual signs of crying, clinging, and resistance, then receive structured observations and calming recommendations. It is intended as an assistive observation tool, not as a psychological diagnosis or prescription.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive child and parent video may be processed by external cloud APIs and retained in report history.\n\nMitigation: Use only with appropriate guardian and school consent, upload only necessary footage, and avoid deployment where cloud processing or report-history retention is unacceptable.\n\nRisk: The skill can create or reuse an internal user identity, store reusable tokens locally, and retrieve report history tied to that identity.\n\nMitigation: Install only in controlled workspaces, restrict filesystem access, remove or rotate local tokens when no longer needed, and review history lookup behavior before use.\n\nRisk: Automated behavior analysis may produce incorrect assessments or be mistaken for clinical judgment.\n\nMitigation: Treat outputs as assistive observations, review results with caregivers or teachers, and seek qualified child mental-health support for persistent or severe concerns.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-child-separation-anxiety-detection-analysis)\n- [API Documentation](references/api_doc.md)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Files, Guidance]\n\n**Output Format:** [Markdown report with structured JSON fields, behavior metrics, recommendations, and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May save analysis output to a user-specified local file.]\n\n## Skill Version(s):\n\n1.0.7 (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.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, 41789 bytes\n\nFiles: references/api_doc.md (3551b), scripts/__init__.py (62b), scripts/config.py (708b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_child_separation_anxiety_detection_analysis.py (3679b), skill-card.md (2964b), SKILL.md (13220b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (167b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"smyx-child-separation-anxiety-detection-analysis\"\ndescription: \"Using a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。\"\nversion: \"1.0.7\"\nlicense: \"MIT-0\"\n---\n\n# 😢 Child Separation Anxiety Detection (Pre-School Crying) | 儿童分离焦虑识别（上学前哭闹）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童分离焦虑识别（上学前哭闹）** |\n| 🎯 核心目标 | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). The skill helps parents and teachers understand the child's emotional state and timely provide comfort or psychological guidance. Application scenarios: home drop-off, kindergarten morning reception. Daily monitoring; when the separation-anxiety level reaches moderate or above, the system pushes reminders to parents or teachers, recommending soothing measures or adjusting the separation routine. Skill features: separation anxiety is a common kindergarten / school adaptation issue, and severe cases may affect mental health and social development. AI automatic recognition helps parents and teachers pay early attention and take intervention measures to reduce children's anxiety. Can be integrated into smart cameras or kindergarten management systems.\n\n通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。应用场景：家庭送学场景、幼儿园晨间接待。系统每日监测，当分离焦虑等级为中度以上时，推送提醒给家长或老师，建议采取安抚措施或调整分离方式。技能特点：儿童分离焦虑是常见的入园/入学适应问题，严重的可能影响心理健康和社交发展。通过AI自动识别，可帮助家长和老师早期关注并采取干预措施，减轻儿童焦虑。该技能可集成到智能摄像头或幼儿园管理系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童情绪行为分析 AI。你的任务是分析上学前儿童与家长互动区域的视频，检测儿童的哭闹表情、肢体抓拽动作及抗拒行为，评估分离焦虑等级。不要提供心理诊断或处方，仅输出基于视觉的行为分析结果与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭门口/幼儿园门口固定摄像头视频，识别儿童在与家长分别时的哭闹/抓拽/抗拒行为 → 综合评估分离焦虑等级（mild/moderate/severe）→ 输出家长与老师的安抚建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与家长在场判定（parent_present） |\n| 2 | 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合） |\n| 3 | 肢体抓拽事件识别（抓家长衣服 / 抱腿 / 拉扯门框） |\n| 4 | 抗拒行为识别（后退 / 躺地 / 推开） |\n| 5 | 当次送别时长与峰值哭闹强度统计 |\n| 6 | 是否最终完成分离判定（successful_separation） |\n| 7 | 连续多日中/重度趋势预警 |\n| 8 | 面向家长/老师的友好提醒与安抚建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供家庭门口/幼儿园门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童分离焦虑识别 |\n| 🔎 明确分析意图 | 当用户明确提及儿童哭闹、入园焦虑、分离焦虑、上学哭、抱腿不放、躺地不走、幼儿园晨间接待、入学适应等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看分离焦虑历史报告、儿童入园焦虑报告清单、上学哭闹报告清单、查询历史分离焦虑事件、显示所有儿童分离焦虑报告、显示入园适应诊断报告，查询分离焦虑预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_separation_anxiety_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备家庭/幼儿园门口固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行儿童分离焦虑识别 | 调用 `-m scripts.smyx_child_separation_anxiety_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地家庭/幼儿园门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络家庭/幼儿园门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童情绪行为分析场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童分离焦虑识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_separation_anxiety_detection_analysis.py`](scripts/smyx_child_separation_anxiety_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：必须能看到儿童面部 + 双手 + 下肢 |\n| 🔎 使用提醒 | 儿童撒娇、玩耍中假哭、被风吹眼流泪等情形可能被误识别为哭闹，建议结合持续时长与抓拽/抗拒动作综合判定 |\n| 🔎 使用提醒 | 多孩家庭、多名儿童同时送学时需按区域跟踪，避免身份混淆；幼儿园场景建议每个班级配独立摄像头 |\n| 🔎 使用提醒 | 本工具**不替代**儿童心理医生评估；适用于辅助记录与早期觉察，重度情况请寻求专业帮助 |\n| 🔏 隐私合规 | 隐私合规：儿童及家长面部视频涉及未成年人高度敏感隐私，使用前需取得家长明确知情同意并向幼儿园报备，妥善加密保管；建议优先采用人体轮廓 + 面部马赛克模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input /path/to/dropoff.mp4\n\n# 分析网络家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --url https://example.com/dropoff.mp4\n\n# 显示历史儿童分离焦虑识别报告（自动触发关键词：查看分离焦虑历史报告、儿童入园焦虑报告清单等）\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-separation-anxiety-detection-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1785541468254\n}\n\nFile v1.0.6:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放儿童分离焦虑识别（上学前哭闹）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童分离焦虑识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取哭闹表情/抓拽/抗拒行为统计 + 焦虑等级结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史分离焦虑事件\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` - 儿童分离焦虑识别（上学前哭闹）\n\n## 输入约束\n\n- 摄像头：家庭入户门口 / 幼儿园门口 / 晨间接待区固定摄像头，覆盖儿童与家长互动区域，**能看到儿童面部表情 + 双手 + 下肢**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS，捕捉短促哭闹与抓拽动作）；分辨率 ≥ 480p；光照稳定\n- 多儿童同时送学场景下需按区域跟踪，避免目标串扰\n- 隐私敏感场景可启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n- `subject_detected` - 是否检测到儿童\n- `parent_present` - 是否有家长在场（用于判断\"分离\"上下文）\n- `crying_face_score` - 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合）\n- `grab_event_count` - 肢体抓拽事件次数（抓家长衣服/抱腿/拉扯门框）\n- `resistance_event_count` - 抗拒行为次数（后退、躺地、推开）\n- `event_duration_sec` - 当次送别场景持续时长\n- `peak_crying_intensity` - 哭闹强度峰值（0-1）\n- `successful_separation` - 最终是否完成分离（家长离开后儿童是否平复）\n\n## 阈值与分离焦虑等级\n\n- `mild`（轻度）- 短暂皱眉/低声啜泣，无明显抓拽或抗拒，能在 1 分钟内完成分离\n- `moderate`（中度）- 持续哭泣 + ≥ 1 次抓拽/抗拒，2-5 分钟内完成分离\n- `severe`（重度）- 大声哭泣 + 多次抓拽/抗拒（≥ 3 次）+ 躺地等强烈抗拒 + 分离 ≥ 5 分钟仍未平复，或连续多日处于该状态\n\n## 输出字段（参考）\n\n- `subject_detected` / `parent_present` / `successful_separation`\n- `behavior_metrics` - 当次行为统计（crying_face_score / grab_event_count / resistance_event_count / event_duration_sec / peak_crying_intensity）\n- `consecutive_moderate_severe_days` - 连续中/重度天数（用于趋势预警）\n- `separation_anxiety_level` - 分离焦虑等级（mild / moderate / severe）\n- `alert_type` - 提醒类型（separation_anxiety_moderate / separation_anxiety_severe / improving / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长/老师的友好文本（如\"宝宝今早分离时哭泣约 4 分钟、抱腿 3 次，焦虑等级中度，建议家长今晚多陪伴或与老师沟通入园适应方案\"）\n- `recommend_action` - 建议动作（push_parent_notice / notify_teacher / suggest_gradual_separation / suggest_transition_object / observe_only）\n- `tip_for_parent` - 家长安抚建议（如\"明天提前 10 分钟到园，给孩子带一个安抚玩偶\"）\n\n> 仅输出基于视觉的客观行为统计与友好提醒，**不提供分离焦虑障碍（Separation Anxiety Disorder）等心理诊断或处方**；若儿童哭闹影响入园 ≥ 3-4 周或伴随躯体化症状（呕吐、入睡困难等）请咨询儿童心理医生。\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>\nUsing a fixed camera at a home entrance or kindergarten gate, the skill analyzes pre-school child video for crying expressions, clinging actions, and resistance behaviors, then returns a mild, moderate, or severe separation-anxiety assessment with supportive reminders. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[18072937735](https://clawhub.ai/user/18072937735) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nParents, teachers, and developers integrating home or kindergarten video workflows use this skill to produce visual behavior analysis, separation-anxiety level estimates, historical report lookups, and gentle care suggestions. It is an assistive observation tool and not a psychological diagnosis or prescription. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Child and parent video data may be uploaded to configured cloud services and linked to persistent report-history identity. <br>\nMitigation: Use only with explicit guardian consent, documented school or household approval, defined retention and deletion practices, and externally enforced access control. <br>\nRisk: Visual behavior analysis may be mistaken for clinical diagnosis or over-relied on for child mental-health decisions. <br>\nMitigation: Present outputs as assistive observations and supportive reminders; escalate persistent or severe concerns to qualified child mental-health professionals. <br>\nRisk: False positives can occur from play, temporary distress, environmental irritation, unclear video, or multiple children in frame. <br>\nMitigation: Require clear coverage of the child's face, hands, and lower body; review duration, context, and repeated observations before acting on alerts. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-child-separation-anxiety-detection-analysis) <br>\n- [Skill Demo](https://lifeemergence.com/sample.html) <br>\n- [API Documentation](references/api_doc.md) <br>\n- [Shared Analysis API Documentation](skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, json, shell commands, guidance] <br>\n**Output Format:** [Markdown or JSON analysis reports with behavior metrics, alert fields, recommendations, and report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May save an output file when requested; history-list output is presented as a Markdown table.] <br>\n\n## Skill Version(s): <br>\n1.0.6 (source: server release evidence and target metadata; artifact frontmatter reports 1.0.7) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.6:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.6:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.5: 31 files, 41717 bytes\n\nFiles: references/api_doc.md (3551b), scripts/__init__.py (62b), scripts/config.py (708b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_child_separation_anxiety_detection_analysis.py (3679b), skill-card.md (2854b), SKILL.md (13220b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (167b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: \"smyx-child-separation-anxiety-detection-analysis\"\ndescription: \"Using a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。\"\nversion: \"1.0.5\"\nlicense: \"MIT-0\"\n---\n\n# 😢 Child Separation Anxiety Detection (Pre-School Crying) | 儿童分离焦虑识别（上学前哭闹）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童分离焦虑识别（上学前哭闹）** |\n| 🎯 核心目标 | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). The skill helps parents and teachers understand the child's emotional state and timely provide comfort or psychological guidance. Application scenarios: home drop-off, kindergarten morning reception. Daily monitoring; when the separation-anxiety level reaches moderate or above, the system pushes reminders to parents or teachers, recommending soothing measures or adjusting the separation routine. Skill features: separation anxiety is a common kindergarten / school adaptation issue, and severe cases may affect mental health and social development. AI automatic recognition helps parents and teachers pay early attention and take intervention measures to reduce children's anxiety. Can be integrated into smart cameras or kindergarten management systems.\n\n通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。应用场景：家庭送学场景、幼儿园晨间接待。系统每日监测，当分离焦虑等级为中度以上时，推送提醒给家长或老师，建议采取安抚措施或调整分离方式。技能特点：儿童分离焦虑是常见的入园/入学适应问题，严重的可能影响心理健康和社交发展。通过AI自动识别，可帮助家长和老师早期关注并采取干预措施，减轻儿童焦虑。该技能可集成到智能摄像头或幼儿园管理系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童情绪行为分析 AI。你的任务是分析上学前儿童与家长互动区域的视频，检测儿童的哭闹表情、肢体抓拽动作及抗拒行为，评估分离焦虑等级。不要提供心理诊断或处方，仅输出基于视觉的行为分析结果与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭门口/幼儿园门口固定摄像头视频，识别儿童在与家长分别时的哭闹/抓拽/抗拒行为 → 综合评估分离焦虑等级（mild/moderate/severe）→ 输出家长与老师的安抚建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与家长在场判定（parent_present） |\n| 2 | 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合） |\n| 3 | 肢体抓拽事件识别（抓家长衣服 / 抱腿 / 拉扯门框） |\n| 4 | 抗拒行为识别（后退 / 躺地 / 推开） |\n| 5 | 当次送别时长与峰值哭闹强度统计 |\n| 6 | 是否最终完成分离判定（successful_separation） |\n| 7 | 连续多日中/重度趋势预警 |\n| 8 | 面向家长/老师的友好提醒与安抚建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供家庭门口/幼儿园门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童分离焦虑识别 |\n| 🔎 明确分析意图 | 当用户明确提及儿童哭闹、入园焦虑、分离焦虑、上学哭、抱腿不放、躺地不走、幼儿园晨间接待、入学适应等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看分离焦虑历史报告、儿童入园焦虑报告清单、上学哭闹报告清单、查询历史分离焦虑事件、显示所有儿童分离焦虑报告、显示入园适应诊断报告，查询分离焦虑预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_separation_anxiety_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备家庭/幼儿园门口固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行儿童分离焦虑识别 | 调用 `-m scripts.smyx_child_separation_anxiety_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地家庭/幼儿园门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络家庭/幼儿园门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童情绪行为分析场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童分离焦虑识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_separation_anxiety_detection_analysis.py`](scripts/smyx_child_separation_anxiety_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：必须能看到儿童面部 + 双手 + 下肢 |\n| 🔎 使用提醒 | 儿童撒娇、玩耍中假哭、被风吹眼流泪等情形可能被误识别为哭闹，建议结合持续时长与抓拽/抗拒动作综合判定 |\n| 🔎 使用提醒 | 多孩家庭、多名儿童同时送学时需按区域跟踪，避免身份混淆；幼儿园场景建议每个班级配独立摄像头 |\n| 🔎 使用提醒 | 本工具**不替代**儿童心理医生评估；适用于辅助记录与早期觉察，重度情况请寻求专业帮助 |\n| 🔏 隐私合规 | 隐私合规：儿童及家长面部视频涉及未成年人高度敏感隐私，使用前需取得家长明确知情同意并向幼儿园报备，妥善加密保管；建议优先采用人体轮廓 + 面部马赛克模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input /path/to/dropoff.mp4\n\n# 分析网络家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --url https://example.com/dropoff.mp4\n\n# 显示历史儿童分离焦虑识别报告（自动触发关键词：查看分离焦虑历史报告、儿童入园焦虑报告清单等）\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --output result.json\n```\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-separation-anxiety-detection-analysis\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1784400753508\n}\n\nFile v1.0.5:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放儿童分离焦虑识别（上学前哭闹）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童分离焦虑识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取哭闹表情/抓拽/抗拒行为统计 + 焦虑等级结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史分离焦虑事件\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` - 儿童分离焦虑识别（上学前哭闹）\n\n## 输入约束\n\n- 摄像头：家庭入户门口 / 幼儿园门口 / 晨间接待区固定摄像头，覆盖儿童与家长互动区域，**能看到儿童面部表情 + 双手 + 下肢**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS，捕捉短促哭闹与抓拽动作）；分辨率 ≥ 480p；光照稳定\n- 多儿童同时送学场景下需按区域跟踪，避免目标串扰\n- 隐私敏感场景可启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n- `subject_detected` - 是否检测到儿童\n- `parent_present` - 是否有家长在场（用于判断\"分离\"上下文）\n- `crying_face_score` - 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合）\n- `grab_event_count` - 肢体抓拽事件次数（抓家长衣服/抱腿/拉扯门框）\n- `resistance_event_count` - 抗拒行为次数（后退、躺地、推开）\n- `event_duration_sec` - 当次送别场景持续时长\n- `peak_crying_intensity` - 哭闹强度峰值（0-1）\n- `successful_separation` - 最终是否完成分离（家长离开后儿童是否平复）\n\n## 阈值与分离焦虑等级\n\n- `mild`（轻度）- 短暂皱眉/低声啜泣，无明显抓拽或抗拒，能在 1 分钟内完成分离\n- `moderate`（中度）- 持续哭泣 + ≥ 1 次抓拽/抗拒，2-5 分钟内完成分离\n- `severe`（重度）- 大声哭泣 + 多次抓拽/抗拒（≥ 3 次）+ 躺地等强烈抗拒 + 分离 ≥ 5 分钟仍未平复，或连续多日处于该状态\n\n## 输出字段（参考）\n\n- `subject_detected` / `parent_present` / `successful_separation`\n- `behavior_metrics` - 当次行为统计（crying_face_score / grab_event_count / resistance_event_count / event_duration_sec / peak_crying_intensity）\n- `consecutive_moderate_severe_days` - 连续中/重度天数（用于趋势预警）\n- `separation_anxiety_level` - 分离焦虑等级（mild / moderate / severe）\n- `alert_type` - 提醒类型（separation_anxiety_moderate / separation_anxiety_severe / improving / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长/老师的友好文本（如\"宝宝今早分离时哭泣约 4 分钟、抱腿 3 次，焦虑等级中度，建议家长今晚多陪伴或与老师沟通入园适应方案\"）\n- `recommend_action` - 建议动作（push_parent_notice / notify_teacher / suggest_gradual_separation / suggest_transition_object / observe_only）\n- `tip_for_parent` - 家长安抚建议（如\"明天提前 10 分钟到园，给孩子带一个安抚玩偶\"）\n\n> 仅输出基于视觉的客观行为统计与友好提醒，**不提供分离焦虑障碍（Separation Anxiety Disorder）等心理诊断或处方**；若儿童哭闹影响入园 ≥ 3-4 周或伴随躯体化症状（呕吐、入睡困难等）请咨询儿童心理医生。\n\nFile v1.0.5:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.5:scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.5:skill-card.md\n\n## Description: <br>\nAnalyzes fixed-camera pre-school drop-off videos to identify crying expressions, clinging or resistance behaviors, and produce a mild, moderate, or severe separation-anxiety level with supportive guidance. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[18072937735](https://clawhub.ai/user/18072937735) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nParents, teachers, and operators of child-care monitoring workflows use this skill to analyze home-entrance or kindergarten-gate video and generate behavior observations, trend alerts, and calming recommendations. It is intended as supportive visual analysis, not a clinical diagnosis. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill processes highly sensitive child-related video or video URLs through a cloud service. <br>\nMitigation: Use only with appropriate guardian and school consent, review the remote service and retention practices, and prefer privacy-preserving capture such as masking where practical. <br>\nRisk: The security evidence says the skill automatically creates or reuses persistent identities with locally stored tokens. <br>\nMitigation: Install only in environments where that identity behavior is acceptable, restrict local token access, and clear stored credentials when the workflow is no longer needed. <br>\nRisk: The security verdict is suspicious because the data flow combines sensitive media upload with persistent identity binding. <br>\nMitigation: Review the skill carefully before deployment, limit use to the intended child-care monitoring scenario, and avoid using outputs as clinical diagnosis or prescription. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-child-separation-anxiety-detection-analysis) <br>\n- [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):** [Text, Markdown, JSON, Shell commands, Files] <br>\n**Output Format:** [Markdown or JSON analysis report with behavior metrics, anxiety level, recommendations, and optional report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Can write the report to a user-specified output file and can list historical cloud reports.] <br>\n\n## Skill Version(s): <br>\n1.0.5 (source: frontmatter and server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.5:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.5:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.4: 31 files, 41871 bytes\n\nFiles: references/api_doc.md (3551b), scripts/__init__.py (62b), scripts/config.py (708b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_child_separation_anxiety_detection_analysis.py (3679b), skill-card.md (3240b), SKILL.md (13220b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (167b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: \"smyx-child-separation-anxiety-detection-analysis\"\ndescription: \"Using a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。\"\nversion: \"1.0.4\"\nlicense: \"MIT-0\"\n---\n\n# 😢 Child Separation Anxiety Detection (Pre-School Crying) | 儿童分离焦虑识别（上学前哭闹）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童分离焦虑识别（上学前哭闹）** |\n| 🎯 核心目标 | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). The skill helps parents and teachers understand the child's emotional state and timely provide comfort or psychological guidance. Application scenarios: home drop-off, kindergarten morning reception. Daily monitoring; when the separation-anxiety level reaches moderate or above, the system pushes reminders to parents or teachers, recommending soothing measures or adjusting the separation routine. Skill features: separation anxiety is a common kindergarten / school adaptation issue, and severe cases may affect mental health and social development. AI automatic recognition helps parents and teachers pay early attention and take intervention measures to reduce children's anxiety. Can be integrated into smart cameras or kindergarten management systems.\n\n通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。应用场景：家庭送学场景、幼儿园晨间接待。系统每日监测，当分离焦虑等级为中度以上时，推送提醒给家长或老师，建议采取安抚措施或调整分离方式。技能特点：儿童分离焦虑是常见的入园/入学适应问题，严重的可能影响心理健康和社交发展。通过AI自动识别，可帮助家长和老师早期关注并采取干预措施，减轻儿童焦虑。该技能可集成到智能摄像头或幼儿园管理系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童情绪行为分析 AI。你的任务是分析上学前儿童与家长互动区域的视频，检测儿童的哭闹表情、肢体抓拽动作及抗拒行为，评估分离焦虑等级。不要提供心理诊断或处方，仅输出基于视觉的行为分析结果与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭门口/幼儿园门口固定摄像头视频，识别儿童在与家长分别时的哭闹/抓拽/抗拒行为 → 综合评估分离焦虑等级（mild/moderate/severe）→ 输出家长与老师的安抚建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与家长在场判定（parent_present） |\n| 2 | 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合） |\n| 3 | 肢体抓拽事件识别（抓家长衣服 / 抱腿 / 拉扯门框） |\n| 4 | 抗拒行为识别（后退 / 躺地 / 推开） |\n| 5 | 当次送别时长与峰值哭闹强度统计 |\n| 6 | 是否最终完成分离判定（successful_separation） |\n| 7 | 连续多日中/重度趋势预警 |\n| 8 | 面向家长/老师的友好提醒与安抚建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供家庭门口/幼儿园门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童分离焦虑识别 |\n| 🔎 明确分析意图 | 当用户明确提及儿童哭闹、入园焦虑、分离焦虑、上学哭、抱腿不放、躺地不走、幼儿园晨间接待、入学适应等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看分离焦虑历史报告、儿童入园焦虑报告清单、上学哭闹报告清单、查询历史分离焦虑事件、显示所有儿童分离焦虑报告、显示入园适应诊断报告，查询分离焦虑预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_separation_anxiety_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备家庭/幼儿园门口固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行儿童分离焦虑识别 | 调用 `-m scripts.smyx_child_separation_anxiety_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地家庭/幼儿园门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络家庭/幼儿园门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童情绪行为分析场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童分离焦虑识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_separation_anxiety_detection_analysis.py`](scripts/smyx_child_separation_anxiety_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：必须能看到儿童面部 + 双手 + 下肢 |\n| 🔎 使用提醒 | 儿童撒娇、玩耍中假哭、被风吹眼流泪等情形可能被误识别为哭闹，建议结合持续时长与抓拽/抗拒动作综合判定 |\n| 🔎 使用提醒 | 多孩家庭、多名儿童同时送学时需按区域跟踪，避免身份混淆；幼儿园场景建议每个班级配独立摄像头 |\n| 🔎 使用提醒 | 本工具**不替代**儿童心理医生评估；适用于辅助记录与早期觉察，重度情况请寻求专业帮助 |\n| 🔏 隐私合规 | 隐私合规：儿童及家长面部视频涉及未成年人高度敏感隐私，使用前需取得家长明确知情同意并向幼儿园报备，妥善加密保管；建议优先采用人体轮廓 + 面部马赛克模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input /path/to/dropoff.mp4\n\n# 分析网络家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --url https://example.com/dropoff.mp4\n\n# 显示历史儿童分离焦虑识别报告（自动触发关键词：查看分离焦虑历史报告、儿童入园焦虑报告清单等）\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --output result.json\n```\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-separation-anxiety-detection-analysis\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1783824219999\n}\n\nFile v1.0.4:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放儿童分离焦虑识别（上学前哭闹）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童分离焦虑识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取哭闹表情/抓拽/抗拒行为统计 + 焦虑等级结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史分离焦虑事件\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` - 儿童分离焦虑识别（上学前哭闹）\n\n## 输入约束\n\n- 摄像头：家庭入户门口 / 幼儿园门口 / 晨间接待区固定摄像头，覆盖儿童与家长互动区域，**能看到儿童面部表情 + 双手 + 下肢**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS，捕捉短促哭闹与抓拽动作）；分辨率 ≥ 480p；光照稳定\n- 多儿童同时送学场景下需按区域跟踪，避免目标串扰\n- 隐私敏感场景可启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n- `subject_detected` - 是否检测到儿童\n- `parent_present` - 是否有家长在场（用于判断\"分离\"上下文）\n- `crying_face_score` - 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合）\n- `grab_event_count` - 肢体抓拽事件次数（抓家长衣服/抱腿/拉扯门框）\n- `resistance_event_count` - 抗拒行为次数（后退、躺地、推开）\n- `event_duration_sec` - 当次送别场景持续时长\n- `peak_crying_intensity` - 哭闹强度峰值（0-1）\n- `successful_separation` - 最终是否完成分离（家长离开后儿童是否平复）\n\n## 阈值与分离焦虑等级\n\n- `mild`（轻度）- 短暂皱眉/低声啜泣，无明显抓拽或抗拒，能在 1 分钟内完成分离\n- `moderate`（中度）- 持续哭泣 + ≥ 1 次抓拽/抗拒，2-5 分钟内完成分离\n- `severe`（重度）- 大声哭泣 + 多次抓拽/抗拒（≥ 3 次）+ 躺地等强烈抗拒 + 分离 ≥ 5 分钟仍未平复，或连续多日处于该状态\n\n## 输出字段（参考）\n\n- `subject_detected` / `parent_present` / `successful_separation`\n- `behavior_metrics` - 当次行为统计（crying_face_score / grab_event_count / resistance_event_count / event_duration_sec / peak_crying_intensity）\n- `consecutive_moderate_severe_days` - 连续中/重度天数（用于趋势预警）\n- `separation_anxiety_level` - 分离焦虑等级（mild / moderate / severe）\n- `alert_type` - 提醒类型（separation_anxiety_moderate / separation_anxiety_severe / improving / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长/老师的友好文本（如\"宝宝今早分离时哭泣约 4 分钟、抱腿 3 次，焦虑等级中度，建议家长今晚多陪伴或与老师沟通入园适应方案\"）\n- `recommend_action` - 建议动作（push_parent_notice / notify_teacher / suggest_gradual_separation / suggest_transition_object / observe_only）\n- `tip_for_parent` - 家长安抚建议（如\"明天提前 10 分钟到园，给孩子带一个安抚玩偶\"）\n\n> 仅输出基于视觉的客观行为统计与友好提醒，**不提供分离焦虑障碍（Separation Anxiety Disorder）等心理诊断或处方**；若儿童哭闹影响入园 ≥ 3-4 周或伴随躯体化症状（呕吐、入睡困难等）请咨询儿童心理医生。\n\nFile v1.0.4:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.4:scripts/config.yaml\n\n{}\n\nFile v1.0.4:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.4:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.4:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.4:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.4:skill-card.md\n\n## Description: <br>\nAnalyzes fixed-camera drop-off videos to detect crying expressions, clinging or resistance behaviors, and produce a mild, moderate, or severe separation-anxiety level with parent or teacher guidance. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[18072937735](https://clawhub.ai/user/18072937735) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nParents, teachers, kindergarten staff, and developers can use this skill to analyze home-entrance or kindergarten-gate video and summarize visible behaviors related to child separation anxiety. It supports early awareness and friendly reminders, not psychological diagnosis or treatment. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill handles sensitive child and parent video and may send video files or URLs to a configured remote service. <br>\nMitigation: Use only with guardian and school consent, limit inputs to necessary footage, and confirm how reports, tokens, and uploaded media are protected before deployment. <br>\nRisk: The skill can create or reuse a local account identity and query cloud-stored history reports. <br>\nMitigation: Invoke history-report queries only when access to cloud records is intended, and review local identity and report storage practices before operational use. <br>\nRisk: Behavioral analysis may be mistaken for a psychological diagnosis or may produce misleading results in ambiguous video. <br>\nMitigation: Present outputs as visual behavior observations and friendly reminders, review moderate or severe findings, and refer persistent or severe concerns to qualified child mental-health professionals. <br>\nRisk: False positives or identity confusion can occur when the child is partially visible, multiple children are present, or crying-like cues have non-anxiety causes. <br>\nMitigation: Use fixed-camera footage where the child's face, hands, and lower body are visible, and review results especially in multi-child scenes or cases involving play, wind, or other confounding cues. <br>\n\n\n## Reference(s): <br>\n- [Skill API documentation](artifact/references/api_doc.md) <br>\n- [Analysis service API documentation](artifact/skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-child-separation-anxiety-detection-analysis) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, JSON, guidance] <br>\n**Output Format:** [Markdown summaries or JSON reports with behavior metrics, anxiety level, alerts, recommendations, and report links.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May call remote APIs and optionally write report output to a file when --output is used.] <br>\n\n## Skill Version(s): <br>\n1.0.4 (source: frontmatter and server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.4:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.4:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.3: 31 files, 38762 bytes\n\nFiles: references/api_doc.md (3551b), scripts/__init__.py (62b), scripts/config.py (708b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_child_separation_anxiety_detection_analysis.py (3679b), skill-card.md (3382b), SKILL.md (13220b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (22801b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (13468b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (23409b), _meta.json (167b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: \"smyx-child-separation-anxiety-detection-analysis\"\ndescription: \"Using a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。\"\nversion: \"1.0.2\"\nlicense: \"MIT-0\"\n---\n\n# 😢 Child Separation Anxiety Detection (Pre-School Crying) | 儿童分离焦虑识别（上学前哭闹）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童分离焦虑识别（上学前哭闹）** |\n| 🎯 核心目标 | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). The skill helps parents and teachers understand the child's emotional state and timely provide comfort or psychological guidance. Application scenarios: home drop-off, kindergarten morning reception. Daily monitoring; when the separation-anxiety level reaches moderate or above, the system pushes reminders to parents or teachers, recommending soothing measures or adjusting the separation routine. Skill features: separation anxiety is a common kindergarten / school adaptation issue, and severe cases may affect mental health and social development. AI automatic recognition helps parents and teachers pay early attention and take intervention measures to reduce children's anxiety. Can be integrated into smart cameras or kindergarten management systems.\n\n通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。应用场景：家庭送学场景、幼儿园晨间接待。系统每日监测，当分离焦虑等级为中度以上时，推送提醒给家长或老师，建议采取安抚措施或调整分离方式。技能特点：儿童分离焦虑是常见的入园/入学适应问题，严重的可能影响心理健康和社交发展。通过AI自动识别，可帮助家长和老师早期关注并采取干预措施，减轻儿童焦虑。该技能可集成到智能摄像头或幼儿园管理系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童情绪行为分析 AI。你的任务是分析上学前儿童与家长互动区域的视频，检测儿童的哭闹表情、肢体抓拽动作及抗拒行为，评估分离焦虑等级。不要提供心理诊断或处方，仅输出基于视觉的行为分析结果与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭门口/幼儿园门口固定摄像头视频，识别儿童在与家长分别时的哭闹/抓拽/抗拒行为 → 综合评估分离焦虑等级（mild/moderate/severe）→ 输出家长与老师的安抚建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与家长在场判定（parent_present） |\n| 2 | 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合） |\n| 3 | 肢体抓拽事件识别（抓家长衣服 / 抱腿 / 拉扯门框） |\n| 4 | 抗拒行为识别（后退 / 躺地 / 推开） |\n| 5 | 当次送别时长与峰值哭闹强度统计 |\n| 6 | 是否最终完成分离判定（successful_separation） |\n| 7 | 连续多日中/重度趋势预警 |\n| 8 | 面向家长/老师的友好提醒与安抚建议生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供家庭门口/幼儿园门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童分离焦虑识别 |\n| 🔎 明确分析意图 | 当用户明确提及儿童哭闹、入园焦虑、分离焦虑、上学哭、抱腿不放、躺地不走、幼儿园晨间接待、入学适应等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看分离焦虑历史报告、儿童入园焦虑报告清单、上学哭闹报告清单、查询历史分离焦虑事件、显示所有儿童分离焦虑报告、显示入园适应诊断报告，查询分离焦虑预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_separation_anxiety_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备家庭/幼儿园门口固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行儿童分离焦虑识别 | 调用 `-m scripts.smyx_child_separation_anxiety_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地家庭/幼儿园门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络家庭/幼儿园门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童情绪行为分析场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童分离焦虑识别历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_separation_anxiety_detection_analysis.py`](scripts/smyx_child_separation_anxiety_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov 视频，最大 10MB；**关键**：必须能看到儿童面部 + 双手 + 下肢 |\n| 🔎 使用提醒 | 儿童撒娇、玩耍中假哭、被风吹眼流泪等情形可能被误识别为哭闹，建议结合持续时长与抓拽/抗拒动作综合判定 |\n| 🔎 使用提醒 | 多孩家庭、多名儿童同时送学时需按区域跟踪，避免身份混淆；幼儿园场景建议每个班级配独立摄像头 |\n| 🔎 使用提醒 | 本工具**不替代**儿童心理医生评估；适用于辅助记录与早期觉察，重度情况请寻求专业帮助 |\n| 🔏 隐私合规 | 隐私合规：儿童及家长面部视频涉及未成年人高度敏感隐私，使用前需取得家长明确知情同意并向幼儿园报备，妥善加密保管；建议优先采用人体轮廓 + 面部马赛克模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input /path/to/dropoff.mp4\n\n# 分析网络家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --url https://example.com/dropoff.mp4\n\n# 显示历史儿童分离焦虑识别报告（自动触发关键词：查看分离焦虑历史报告、儿童入园焦虑报告清单等）\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --output result.json\n```\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-separation-anxiety-detection-analysis\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1782695245530\n}\n\nFile v1.0.3:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放儿童分离焦虑识别（上学前哭闹）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童分离焦虑识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取哭闹表情/抓拽/抗拒行为统计 + 焦虑等级结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史分离焦虑事件\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` - 儿童分离焦虑识别（上学前哭闹）\n\n## 输入约束\n\n- 摄像头：家庭入户门口 / 幼儿园门口 / 晨间接待区固定摄像头，覆盖儿童与家长互动区域，**能看到儿童面部表情 + 双手 + 下肢**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS，捕捉短促哭闹与抓拽动作）；分辨率 ≥ 480p；光照稳定\n- 多儿童同时送学场景下需按区域跟踪，避免目标串扰\n- 隐私敏感场景可启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n- `subject_detected` - 是否检测到儿童\n- `parent_present` - 是否有家长在场（用于判断\"分离\"上下文）\n- `crying_face_score` - 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合）\n- `grab_event_count` - 肢体抓拽事件次数（抓家长衣服/抱腿/拉扯门框）\n- `resistance_event_count` - 抗拒行为次数（后退、躺地、推开）\n- `event_duration_sec` - 当次送别场景持续时长\n- `peak_crying_intensity` - 哭闹强度峰值（0-1）\n- `successful_separation` - 最终是否完成分离（家长离开后儿童是否平复）\n\n## 阈值与分离焦虑等级\n\n- `mild`（轻度）- 短暂皱眉/低声啜泣，无明显抓拽或抗拒，能在 1 分钟内完成分离\n- `moderate`（中度）- 持续哭泣 + ≥ 1 次抓拽/抗拒，2-5 分钟内完成分离\n- `severe`（重度）- 大声哭泣 + 多次抓拽/抗拒（≥ 3 次）+ 躺地等强烈抗拒 + 分离 ≥ 5 分钟仍未平复，或连续多日处于该状态\n\n## 输出字段（参考）\n\n- `subject_detected` / `parent_present` / `successful_separation`\n- `behavior_metrics` - 当次行为统计（crying_face_score / grab_event_count / resistance_event_count / event_duration_sec / peak_crying_intensity）\n- `consecutive_moderate_severe_days` - 连续中/重度天数（用于趋势预警）\n- `separation_anxiety_level` - 分离焦虑等级（mild / moderate / severe）\n- `alert_type` - 提醒类型（separation_anxiety_moderate / separation_anxiety_severe / improving / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长/老师的友好文本（如\"宝宝今早分离时哭泣约 4 分钟、抱腿 3 次，焦虑等级中度，建议家长今晚多陪伴或与老师沟通入园适应方案\"）\n- `recommend_action` - 建议动作（push_parent_notice / notify_teacher / suggest_gradual_separation / suggest_transition_object / observe_only）\n- `tip_for_parent` - 家长安抚建议（如\"明天提前 10 分钟到园，给孩子带一个安抚玩偶\"）\n\n> 仅输出基于视觉的客观行为统计与友好提醒，**不提供分离焦虑障碍（Separation Anxiety Disorder）等心理诊断或处方**；若儿童哭闹影响入园 ≥ 3-4 周或伴随躯体化症状（呕吐、入睡困难等）请咨询儿童心理医生。\n\nFile v1.0.3:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.3:scripts/config.yaml\n\n{}\n\nFile v1.0.3:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.3:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.3:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.3:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.3:skill-card.md\n\n## Description: <br>\nAnalyzes home-entry or kindergarten drop-off video to identify crying expressions, clinging actions, resistance behaviors, and a mild, moderate, or severe separation-anxiety level for caregiver and teacher review. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[18072937735](https://clawhub.ai/user/18072937735) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nParents, teachers, school operators, and agent users can use this skill to submit fixed-camera drop-off videos or URLs for structured visual behavior analysis and friendly follow-up suggestions. It supports current analysis and cloud history lookup, but its outputs should be treated as behavioral observations rather than clinical diagnosis or treatment advice. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill processes video of minors and caregivers, which is highly sensitive personal data. <br>\nMitigation: Use only with explicit guardian consent, school approval when applicable, and a clear data-handling plan for retention, deletion, access control, and report export. <br>\nRisk: The skill sends video files or URLs to the provider's cloud service for analysis and cloud report retrieval. <br>\nMitigation: Review the provider's cloud processing, retention, and deletion policies before deployment, and avoid submitting footage that is not necessary for the stated purpose. <br>\nRisk: The skill silently creates or reuses a cloud-linked identity and stores account tokens for report history access. <br>\nMitigation: Deploy only in environments where automatic identity management and local token storage are acceptable, and restrict local workspace access accordingly. <br>\nRisk: Behavior classifications may be wrong in cases such as play crying, environmental irritation, occlusion, or multiple children in view. <br>\nMitigation: Treat output as visual behavior support for human review, not a diagnosis, and confirm moderate or severe cases with caregivers, teachers, or qualified professionals. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-child-separation-anxiety-detection-analysis) <br>\n- [Publisher Profile](https://clawhub.ai/user/18072937735) <br>\n- [API Interface Documentation...","readmeExcerpt":"Skill: Child Separation Anxiety Detection (Pre-School Crying) | 儿童分离焦虑识别（上学前哭闹） Owner: 18072937735 Summary: Using a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping ","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.smyx_child_separation_anxiety_detection_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input /path/to/dropoff.mp4\n\n# 分析网络家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --url https://example.com/dropoff.mp4\n\n# 显示历史儿童分离焦虑识别报告（自动触发关键词：查看分离焦虑历史报告、儿童入园焦虑报告清单等）\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --output result.json"},{"language":"bash","snippet":"python -m scripts.smyx_child_separation_anxiety_detection_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input /path/to/dropoff.mp4\n\n# 分析网络家庭/幼儿园门口送学视频\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --url https://example.com/dropoff.mp4\n\n# 显示历史儿童分离焦虑识别报告（自动触发关键词：查看分离焦虑历史报告、儿童入园焦虑报告清单等）\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_separation_anxiety_detection_analysis --input dropoff.mp4 --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"smyx-child-separation-anxiety-detection-analysis\"\ndescription: \"Using a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。\"\nversion: \"1.0.15\"\nlicense: \"MIT-0\"\n---\n\n# 😢 Child Separation Anxiety Detection (Pre-School Crying) | 儿童分离焦虑识别（上学前哭闹）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童分离焦虑识别（上学前哭闹）** |\n| 🎯 核心目标 | 通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` |\n\nUsing a fixed camera at the home entrance or kindergarten gate, the system analyzes pre-school videos and detects crying facial expressions (frowning, open-mouth crying, tearing), physical clinging actions (grabbing parent's clothes, hugging parent's leg, pulling door frame), and resistance behaviors (stepping back, lying on the ground), then comprehensively evaluates the separation-anxiety level (mild / moderate / severe). The skill helps parents and teachers understand the child's emotional state and timely provide comfort or psychological guidance. Application scenarios: home drop-off, kindergarten morning reception. Daily monitoring; when the separation-anxiety level reaches moderate or above, the system pushes reminders to parents or teachers, recommending soothing measures or adjusting the separation routine. Skill features: separation anxiety is a common kindergarten / school adaptation issue, and severe cases may affect mental health and social development. AI automatic recognition helps parents and teachers pay early attention and take intervention measures to reduce children's anxiety. Can be integrated into smart cameras or kindergarten management systems.\n\n通过家庭或幼儿园门口固定摄像头，分析儿童上学前的视频，检测哭闹面部表情（皱眉、张嘴哭泣、流泪）、肢体抓拽动作（抓住家长衣服、抱住家长腿、拉扯门框）以及抗拒行为（后退、躺地）等，综合评估分离焦虑等级（轻度/中度/重度）。该技能可辅助家长和教师了解儿童情绪状态，及时进行安抚或心理疏导。应用场景：家庭送学场景、幼儿园晨间接待。系统每日监测，当分离焦虑等级为中度以上时，推送提醒给家长或老师，建议采取安抚措施或调整分离方式。技能特点：儿童分离焦虑是常见的入园/入学适应问题，严重的可能影响心理健康和社交发展。通过AI自动识别，可帮助家长和老师早期关注并采取干预措施，减轻儿童焦虑。该技能可集成到智能摄像头或幼儿园管理系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童情绪行为分析 AI。你的任务是分析上学前儿童与家长互动区域的视频，检测儿童的哭闹表情、肢体抓拽动作及抗拒行为，评估分离焦虑等级。不要提供心理诊断或处方，仅输出基于视觉的行为分析结果与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭门口/幼儿园门口固定摄像头视频，识别儿"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-separation-anxiety-detection-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1790671649168\n}"},{"path":"references/api_doc.md","content":"# API 接口文档\n\n此处用于存放儿童分离焦虑识别（上学前哭闹）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童分离焦虑识别任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取哭闹表情/抓拽/抗拒行为统计 + 焦虑等级结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史分离焦虑事件\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_SEPARATION_ANXIETY_DETECTION_ANALYSIS` - 儿童分离焦虑识别（上学前哭闹）\n\n## 输入约束\n\n- 摄像头：家庭入户门口 / 幼儿园门口 / 晨间接待区固定摄像头，覆盖儿童与家长互动区域，**能看到儿童面部表情 + 双手 + 下肢**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS，捕捉短促哭闹与抓拽动作）；分辨率 ≥ 480p；光照稳定\n- 多儿童同时送学场景下需按区域跟踪，避免目标串扰\n- 隐私敏感场景可启用人体轮廓 + 面部马赛克模式\n\n## 关键观测信号\n\n- `subject_detected` - 是否检测到儿童\n- `parent_present` - 是否有家长在场（用于判断\"分离\"上下文）\n- `crying_face_score` - 哭闹面部表情评分（皱眉 + 张嘴哭泣 + 流泪综合）\n- `grab_event_count` - 肢体抓拽事件次数（抓家长衣服/抱腿/拉扯门框）\n- `resistance_event_count` - 抗拒行为次数（后退、躺地、推开）\n- `event_duration_sec` - 当次送别场景持续时长\n- `peak_crying_intensity` - 哭闹强度峰值（0-1）\n- `successful_separation` - 最终是否完成分离（家长离开后儿童是否平复）\n\n## 阈值与分离焦虑等级\n\n- `mild`（轻度）- 短暂皱眉/低声啜泣，无明显抓拽或抗拒，能在 1 分钟内完成分离\n- `moderate`（中度）- 持续哭泣 + ≥ 1 次抓拽/抗拒，2-5 分钟内完成分离\n- `severe`（重度）- 大声哭泣 + 多次抓拽/抗拒（≥ 3 次）+ 躺地等强烈抗拒 + 分离 ≥ 5 分钟仍未平复，或连续多日处于该状态\n\n## 输出字段（参考）\n\n- `subject_detected` / `parent_present` / `successful_separation`\n- `behavior_metrics` - 当次行为统计（crying_face_score / grab_event_count / resistance_event_count / event_duration_sec / peak_crying_intensity）\n- `consecutive_moderate_severe_days` - 连续中/重度天数（用于趋势预警）\n- `separation_anxiety_level` - 分离焦虑等级（mild / moderate / severe）\n- `alert_type` - 提醒类型（separation_anxiety_moderate / separation_anxiety_severe / improving / normal）\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长/老师的友好文本（如\"宝宝今早分离时哭泣约 4 分钟、抱腿 3 次，焦虑等级中度，建议家长今晚多陪伴或与老师沟通入园适应方案\"）\n- `recommend_action` - 建议动作（push_parent_notice / notify_teacher / suggest_gradual_separation / suggest_transition_object / observe_only）\n- `tip_for_parent` - 家长安抚建议（如\"明天提前 10 分钟到园，给孩子带一个安抚玩偶\"）\n\n> 仅输出基于视觉的客观行为统计与友好提醒，**不提供分离焦虑障碍（Separation Anxiety Disorder）等心理诊断或处方**；若儿童哭闹影响入园 ≥ 3-4 周或伴随躯体化症状（呕吐、入睡困难等）请咨询儿童心理医生。"},{"path":"skills/smyx_analysis/references/api_doc.md","content":"# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |"},{"path":"scripts/config.yaml","content":"{}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1113,"uniquenessScore":43,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T20:35:07.137Z","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-09T20:35:07.137Z","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-10T04:52:13.718Z","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"}]}}}