{"id":"a802996e-05fc-4b16-8d1a-32e22379ecf4","entityType":"agent","slug":"clawhub-18072937735-smyx-autism-stereotyped-behavior-detect-ana","name":"Autism Stereotyped Behavior Detection (Spinning / Hand-Flapping) | 自闭症儿童刻板行为识别（转圈/摆手）","canonicalUrl":"https://www.xpersona.co/agent/clawhub-18072937735-smyx-autism-stereotyped-behavior-detect-ana","canonicalPath":"/agent/clawhub-18072937735-smyx-autism-stereotyped-behavior-detect-ana","generatedAt":"2026-10-10T08:22:06.847Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T21:50:14.714Z","emptyReason":null},"description":"Using a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。","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-autism-stereotyped-behavior-detect-analysis","sourceUrl":"https://clawhub.ai/18072937735/smyx-autism-stereotyped-behavior-detect-analysis","homepage":"https://clawhub.ai/18072937735/skills/smyx-autism-stereotyped-behavior-detect-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/18072937735/smyx-autism-stereotyped-behavior-detect-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/18072937735/skills/smyx-autism-stereotyped-behavior-detect-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":66,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Autism Stereotyped Behavior Detection (Spinning / Hand-Flapping) | 自闭症儿童刻板行为识别（转圈/摆手） technical dossier on Xpersona with agent coverage, OPENCLEW support, and l"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T21:50:14.714Z","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-09T21:50:14.714Z","emptyReason":null},"stars":null,"forks":null,"downloads":1961,"packageName":null,"latestVersion":"1.0.12","tractionLabel":"2K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T21:50:14.714Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T21:50:14.714Z","lastCrawledAt":"2026-10-09T21:50:14.714Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T21:50:14.714Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.12","createdAt":"2026-09-29T20:14:33.384Z","changelog":"- Removed the file: skill-card.md. - No functional or logic changes to the skill—documentation only. - Cleanup of project files to reduce redundancy.","fileCount":31,"zipByteSize":41604},{"version":"1.0.11","createdAt":"2026-09-22T02:35:25.477Z","changelog":"- Updated version to 1.0.14 in documentation and configuration files. - Removed the redundant file skill-card.md. - General documentation improvements and version alignment in SKILL.md.","fileCount":31,"zipByteSize":41798},{"version":"1.0.10","createdAt":"2026-08-24T02:35:28.040Z","changelog":"- Removed the file: skill-card.md. - No other features or functionality were changed.","fileCount":31,"zipByteSize":41904},{"version":"1.0.9","createdAt":"2026-08-17T19:57:28.692Z","changelog":"smyx-autism-stereotyped-behavior-detect-analysis v1.0.10 - Updated skill version from 1.0.9 to 1.0.10. - Documentation improvements in SKILL.md; minor clarifications and formatting adjustments. - Removed legacy file skill-card.md for streamlined documentation. - Updated skills/smyx_common/scripts/config.yaml to support new version. - No changes to core detection logic or user workflow.","fileCount":31,"zipByteSize":41750},{"version":"1.0.8","createdAt":"2026-08-11T22:22:34.659Z","changelog":"- Version updated from 1.0.7 to 1.0.9. - Documentation updated: SKILL.md revised to reflect the new version and any minor changes. - Removed redundant documentation: skill-card.md file deleted. - No change to functionality or code logic.","fileCount":31,"zipByteSize":41795},{"version":"1.0.7","createdAt":"2026-08-04T15:32:35.855Z","changelog":"- Version updated to 1.0.7. - Documentation updated: SKILL.md revised with latest information and formatting. - Obsolete or duplicate documentation removed: skill-card.md deleted.","fileCount":31,"zipByteSize":41872},{"version":"1.0.6","createdAt":"2026-07-27T09:49:27.685Z","changelog":"- Updated skill version to 1.0.6. - Removed the file skill-card.md from the project. - SKILL.md updated with new version and potentially minor content adjustments. - No changes to scripts or capability; core functionality and workflow remain unchanged.","fileCount":31,"zipByteSize":41859},{"version":"1.0.5","createdAt":"2026-07-15T14:05:34.307Z","changelog":"## smyx-autism-stereotyped-behavior-detect-analysis v1.0.5 - Removed the file `skill-card.md` from the project. - No changes to skill logic, features, documentation, or interface.","fileCount":31,"zipByteSize":41725}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-autism-stereotyped-behavior-detect-analysis","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-autism-stereotyped-behavior-detect-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-autism-stereotyped-behavior-detect-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-autism-stereotyped-behavior-detect-ana/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-autism-stereotyped-behavior-detect-ana/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-autism-stereotyped-behavior-detect-ana/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-autism-stereotyped-behavior-detect-ana/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-autism-stereotyped-behavior-detect-ana/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-autism-stereotyped-behavior-detect-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-10T08:22:06.843Z"}},"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-autism-stereotyped-behavior-detect-ana/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-autism-stereotyped-behavior-detect-ana/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-autism-stereotyped-behavior-detect-ana/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-autism-stereotyped-behavior-detect-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-09T21:50:14.714Z","emptyReason":null},"readme":"Skill: Autism Stereotyped Behavior Detection (Spinning / Hand-Flapping) | 自闭症儿童刻板行为识别（转圈/摆手）\n\nOwner: 18072937735\n\nSummary: Using a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。\n\nTags: latest:1.0.12\n\nVersion history:\n\nv1.0.12 | 2026-09-29T20:14:33.384Z | auto\n\n- Removed the file: skill-card.md.\n- No functional or logic changes to the skill—documentation only.\n- Cleanup of project files to reduce redundancy.\n\nv1.0.11 | 2026-09-22T02:35:25.477Z | auto\n\n- Updated version to 1.0.14 in documentation and configuration files.\n- Removed the redundant file skill-card.md.\n- General documentation improvements and version alignment in SKILL.md.\n\nv1.0.10 | 2026-08-24T02:35:28.040Z | auto\n\n- Removed the file: skill-card.md.\n- No other features or functionality were changed.\n\nv1.0.9 | 2026-08-17T19:57:28.692Z | auto\n\nsmyx-autism-stereotyped-behavior-detect-analysis v1.0.10\n\n- Updated skill version from 1.0.9 to 1.0.10.\n- Documentation improvements in SKILL.md; minor clarifications and formatting adjustments.\n- Removed legacy file skill-card.md for streamlined documentation.\n- Updated skills/smyx_common/scripts/config.yaml to support new version.\n- No changes to core detection logic or user workflow.\n\nv1.0.8 | 2026-08-11T22:22:34.659Z | auto\n\n- Version updated from 1.0.7 to 1.0.9.\n- Documentation updated: SKILL.md revised to reflect the new version and any minor changes.\n- Removed redundant documentation: skill-card.md file deleted.\n- No change to functionality or code logic.\n\nv1.0.7 | 2026-08-04T15:32:35.855Z | auto\n\n- Version updated to 1.0.7.\n- Documentation updated: SKILL.md revised with latest information and formatting.\n- Obsolete or duplicate documentation removed: skill-card.md deleted.\n\nv1.0.6 | 2026-07-27T09:49:27.685Z | auto\n\n- Updated skill version to 1.0.6.\n- Removed the file skill-card.md from the project.\n- SKILL.md updated with new version and potentially minor content adjustments.\n- No changes to scripts or capability; core functionality and workflow remain unchanged.\n\nv1.0.5 | 2026-07-15T14:05:34.307Z | auto\n\n## smyx-autism-stereotyped-behavior-detect-analysis v1.0.5\n\n- Removed the file `skill-card.md` from the project.\n- No changes to skill logic, features, documentation, or interface.\n\nv1.0.4 | 2026-07-12T13:20:31.367Z | auto\n\n- Version updated to 1.0.4.\n- Documentation refinements in SKILL.md, including version number updates and minor clarifications.\n- Internal scripts (config.py, util.py) modified; details not specified.\n- Obsolete skill-card.md file removed.\n\nv1.0.3 | 2026-06-30T16:38:31.063Z | auto\n\n# smyx-autism-stereotyped-behavior-detect-analysis 1.0.3 Changelog\n\n- Internal updates to `dao.py` and `util.py` scripts in `skills/smyx_common/scripts/`.\n- Removed legacy documentation file `skill-card.md`.\n- No changes to end-user workflow or main feature set.\n\nv1.0.2 | 2026-06-28T00:23:40.940Z | auto\n\n**Major update: The skill now handles user identity automatically, removing the need for user-provided IDs. Documentation and usage instructions updated accordingly.**\n\n- Internalizes all user identity handling—users are no longer asked to provide usernames, phone numbers, or open-id; all such parameters are managed within the system.\n- Updated documentation and example commands: removed references to any user identity fields in both user-facing prompts and technical instructions.\n- Clarified and tightened privacy protections: explicit prohibition on asking for or exposing user identity values at any stage.\n- Adjusted workflow and notes to reflect a more streamlined, user-friendly process.\n- Modernized SKILL.md structure and presentation, with clearer resource indexing and scenario tables.\n- Removed obsolete files and cleaned up scripts to reflect the new authentication/identity model.\n\nv1.0.1 | 2026-06-20T08:25:33.006Z | auto\n\n- Updated config file path logic and documentation for open-id lookup, clarifying directory structure and priority.\n- Clarified project license as MIT-0.\n- Streamlined and shortened the skill description for better readability.\n- Removed redundant or deprecated documentation files (skill-card.md).\n- Updated internal references to configuration and requirement files in line with path and structure changes.\n\nv1.0.0 | 2026-05-26T14:00:00.888Z | auto\n\nInitial release of smyx-autism-stereotyped-behavior-detect-analysis\n\n- Provides automated detection of key stereotyped behaviors in children (e.g., spinning, hand flapping, body rocking) from fixed-camera videos using pose estimation and temporal action detection.\n- Generates frequency and duration statistics of each behavior, with daily and weekly reports to support rehabilitation planning.\n- Enables real-time, objective monitoring for therapists and parents to track intervention effects and personalize therapy.\n- Strict privacy and process controls: requires open-id verification before use, prohibits local memory report retrieval, and enforces cloud-based report querying.\n- Designed for integration into rehabilitation center systems or home apps; supports structured, trend-based behavior summaries.\n\nArchive index:\n\nArchive v1.0.12: 31 files, 41604 bytes\n\nFiles: references/api_doc.md (3477b), scripts/__init__.py (65b), scripts/config.py (715b), scripts/config.yaml (3b), scripts/skill.py (601b), scripts/smyx_autism_stereotyped_behavior_detect_analysis.py (3687b), skill-card.md (2353b), SKILL.md (13288b), 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-autism-stereotyped-behavior-detect-analysis\"\ndescription: \"Using a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。\"\nversion: \"1.0.14\"\nlicense: \"MIT-0\"\n---\n\n# 🧩 Autism Stereotyped Behavior Detection (Spinning / Hand-Flapping) | 自闭症儿童刻板行为识别（转圈/摆手）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **自闭症儿童刻板行为识别（转圈/摆手）** |\n| 🎯 核心目标 | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` |\n\nUsing a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. It counts the frequency (events per hour) and duration of each behavior and generates a behavior report. The skill helps therapists and parents objectively record behavior changes and evaluate intervention effects. Application scenarios: autism rehabilitation institutions, special-education schools, home interventions. Real-time monitoring; the system automatically generates daily / weekly stereotyped-behavior statistics to support rehabilitation planning. Skill features: stereotyped behaviors are a core symptom of autism, and changes in frequency / duration are important indicators of intervention effectiveness. Automatic AI recording reduces therapists' workload, enables long-term continuous monitoring, and provides data support for individualized intervention. Can be integrated into rehabilitation-center management systems or home-rehabilitation apps.\n\n通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。统计每种刻板行为的频次（次/小时）和单次持续时间，生成行为报告。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。应用场景：自闭症康复机构、特殊教育学校、家庭干预。系统实时监测，自动生成每日/每周刻板行为统计报告，为康复计划提供数据支持。技能特点：刻板行为是自闭症的核心症状之一，其频率和持续时间变化是评估干预效果的重要依据。通过AI自动监测记录，可减轻康复师负担，实现长时间连续监测，为个性化干预提供数据支持。该技能可集成到康复机构管理系统或家庭康复APP中。\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基于康复机构/家庭固定摄像头视频，识别儿童多类重复性刻板行为 → 按事件级别记录起止时间/持续秒数/置信度 → 汇总各类频次（次/小时）+ 累计时长 + 主导类别 → 可结合历史基线生成趋势报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 2D/3D 姿态关键点估计 |\n| 3 | 时序动作分类（spinning / hand_flapping / body_rocking / head_banging / finger_flicking / toe_walking / repetitive_running / repetitive_object_play 等） |\n| 4 | 事件级起止时间检测与去重 |\n| 5 | 每小时/每日频次与累计时长统计 |\n| 6 | 主导刻板行为类别识别 |\n| 7 | 与个人 7-14 天基线对比（趋势变化百分比） |\n| 8 | 康复师/家长行为摘要文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供康复/家庭儿童行为视频 URL 或文件需要分析时，默认触发本技能进行刻板行为识别 |\n| 🔎 明确分析意图 | 当用户明确提及自闭症、谱系障碍、刻板行为、转圈、摆手、摇晃、撞头、踮脚走、康复评估、特殊教育、ABA 干预效果等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看刻板行为历史报告、自闭症儿童行为报告清单、刻板行为统计报告清单、查询历史康复评估记录、显示所有刻板行为分析报告、显示特殊教育诊断报告，查询刻板行为趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_analysis.py`](scripts/smyx_autism_stereotyped_behavior_detect_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；**关键**：必须能看到儿童全身，帧率 ≥ 10 FPS |\n| 🔎 使用提醒 | 部分日常动作（鼓掌、跳舞、追逐游戏等）可能被误识别为刻板行为，建议康复师/家长进行抽样复核 |\n| 🔎 使用提醒 | 多儿童在同一视野内、家庭成员同时出现等情形可能影响识别准确性 |\n| 🧑‍⚖️ 结果性质 | 本工具**不提供自闭症诊断**，也**不替代** ADOS-2 / ADI-R / CARS 等专业评估；任何康复方案应在认证的康复治疗师指导下进行 |\n| 🔏 隐私合规 | 隐私合规：自闭症儿童行为视频涉及未成年人高度敏感隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体骨架/轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input /path/to/rehab.mp4\n\n# 分析网络康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --url https://example.com/rehab.mp4\n\n# 显示历史自闭症儿童刻板行为识别报告（自动触发关键词：查看刻板行为历史报告、自闭症儿童行为报告清单等）\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --output result.json\n```\n\nFile v1.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-autism-stereotyped-behavior-detect-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1790712873384\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_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` - 自闭症儿童刻板行为识别（转圈/摆手）\n\n## 输入约束\n\n- 摄像头：康复机构 / 特殊教育学校 / 家庭固定摄像头，覆盖儿童主要活动区域，**能看到全身**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS）；分辨率 ≥ 480p；光照稳定\n- 多儿童场景下建议结合外观特征锁定主目标（如儿童穿着特定颜色衣物）\n- 视频时长建议 ≥ 5 分钟，时序动作识别窗口需要足够样本\n- 隐私敏感场景可启用人体骨架模式\n\n## 刻板行为类别（支持扩展）\n\n| behavior_class | 中文 | 识别要点 |\n|----------------|------|----------|\n| `spinning` | 转圈 | 身体围绕垂直轴连续旋转 ≥ 360° |\n| `hand_flapping` | 摆手 | 手臂/手腕非功能性高频重复摆动 |\n| `body_rocking` | 摇晃 | 躯干前后/左右有节律摆动 |\n| `head_banging` | 撞头 | 头部反复触碰墙/家具（高优先级） |\n| `finger_flicking` | 手指弹打 | 手指反复快速弹打 |\n| `toe_walking` | 踮脚走 | 持续脚尖着地走路 |\n| `repetitive_running` | 重复奔跑 | 沿固定路线反复短距离奔跑 |\n| `repetitive_object_play` | 重复操作物体 | 反复开关、拍打、排列固定物体 |\n\n## 关键观测指标\n\n- `subject_detected` - 是否检测到儿童\n- `pose_keypoints_visible` - 关键点是否充分可见\n- `behavior_events` - 行为事件列表（含 behavior_class / start_time / end_time / duration_sec / confidence）\n- `per_class_count_hourly` - 每类行为每小时频次（次/小时）\n- `per_class_total_duration_today_sec` - 每类行为当日累计持续时间\n- `total_stereotyped_duration_today_sec` - 当日累计所有刻板行为时长\n- `dominant_behavior_class` - 当日主导刻板行为类别\n\n## 历史基线字段（可选）\n\n- `baseline_window_days` - 基线窗口（默认 7-14 天）\n- `baseline_per_class_avg_hourly` - 各类行为每小时基线均值\n- `baseline_per_class_std_hourly` - 各类行为每小时标准差\n\n## 输出字段（参考）\n\n- `subject_detected` / `pose_keypoints_visible`\n- `behavior_events` - 完整事件序列\n- `summary_metrics` - 汇总指标（per_class_count_hourly / per_class_total_duration_today_sec / total_stereotyped_duration_today_sec / dominant_behavior_class）\n- `trend_vs_baseline` - 当前 vs 基线变化（per_class_delta_pct）\n- `intervention_hint` - 用于康复师/家长的方向性参考（descriptive_only，**不构成处方**）\n- `report_message` - 文本摘要（如\"今日转圈 14 次，摆手 23 次，相比基线下降 30%，建议康复师评估当前干预方案\"）\n\n> 仅输出基于视觉的客观行为统计，**不提供自闭症诊断、量表打分、康复处方**；任何诊断与干预方案必须由专业医生/认证康复治疗师评估制定。\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 children's behavior videos for repetitive movements such as spinning, hand flapping, and body rocking, and summarizes observed events and trends.\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\nTherapists, caregivers, and special-education staff use this skill to summarize the frequency and duration of observed repetitive behaviors in children's videos and review prior reports. Its observations are not an autism diagnosis or treatment recommendation.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Children's behavior videos, video URLs, and report queries are sent to external cloud services.\n\nMitigation: Obtain guardian consent before use, avoid identifiable footage where possible, and review the service's data-handling terms.\n\nRisk: The skill may create a persistent local identity and store authentication tokens and profile data in the workspace.\n\nMitigation: Limit access to the workspace data directory, review what is retained, and remove stored identity data when no longer needed.\n\nRisk: Ordinary movements or scenes with multiple people can produce misleading behavior classifications.\n\nMitigation: Have a qualified professional review sampled detections and do not use the reports as a diagnosis or prescription.\n\n## Reference(s):\n\n- [ClawHub skill listing](https://clawhub.ai/18072937735/skills/smyx-autism-stereotyped-behavior-detect-analysis)\n- [Skill API reference](artifact/references/api_doc.md)\n- [Skill demonstration](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Analysis, Text, Markdown, JSON]\n\n**Output Format:** [Text or Markdown behavior reports and report lists; JSON when requested]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Event counts, durations, trend summaries, and links to reports may be included.]\n\n## Skill Version(s):\n\n1.0.12 (source: server-resolved release; bundled frontmatter lists 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.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, 41798 bytes\n\nFiles: references/api_doc.md (3477b), scripts/__init__.py (65b), scripts/config.py (715b), scripts/config.yaml (3b), scripts/skill.py (601b), scripts/smyx_autism_stereotyped_behavior_detect_analysis.py (3687b), skill-card.md (2866b), SKILL.md (13288b), 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-autism-stereotyped-behavior-detect-analysis\"\ndescription: \"Using a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。\"\nversion: \"1.0.14\"\nlicense: \"MIT-0\"\n---\n\n# 🧩 Autism Stereotyped Behavior Detection (Spinning / Hand-Flapping) | 自闭症儿童刻板行为识别（转圈/摆手）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **自闭症儿童刻板行为识别（转圈/摆手）** |\n| 🎯 核心目标 | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` |\n\nUsing a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. It counts the frequency (events per hour) and duration of each behavior and generates a behavior report. The skill helps therapists and parents objectively record behavior changes and evaluate intervention effects. Application scenarios: autism rehabilitation institutions, special-education schools, home interventions. Real-time monitoring; the system automatically generates daily / weekly stereotyped-behavior statistics to support rehabilitation planning. Skill features: stereotyped behaviors are a core symptom of autism, and changes in frequency / duration are important indicators of intervention effectiveness. Automatic AI recording reduces therapists' workload, enables long-term continuous monitoring, and provides data support for individualized intervention. Can be integrated into rehabilitation-center management systems or home-rehabilitation apps.\n\n通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。统计每种刻板行为的频次（次/小时）和单次持续时间，生成行为报告。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。应用场景：自闭症康复机构、特殊教育学校、家庭干预。系统实时监测，自动生成每日/每周刻板行为统计报告，为康复计划提供数据支持。技能特点：刻板行为是自闭症的核心症状之一，其频率和持续时间变化是评估干预效果的重要依据。通过AI自动监测记录，可减轻康复师负担，实现长时间连续监测，为个性化干预提供数据支持。该技能可集成到康复机构管理系统或家庭康复APP中。\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基于康复机构/家庭固定摄像头视频，识别儿童多类重复性刻板行为 → 按事件级别记录起止时间/持续秒数/置信度 → 汇总各类频次（次/小时）+ 累计时长 + 主导类别 → 可结合历史基线生成趋势报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 2D/3D 姿态关键点估计 |\n| 3 | 时序动作分类（spinning / hand_flapping / body_rocking / head_banging / finger_flicking / toe_walking / repetitive_running / repetitive_object_play 等） |\n| 4 | 事件级起止时间检测与去重 |\n| 5 | 每小时/每日频次与累计时长统计 |\n| 6 | 主导刻板行为类别识别 |\n| 7 | 与个人 7-14 天基线对比（趋势变化百分比） |\n| 8 | 康复师/家长行为摘要文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供康复/家庭儿童行为视频 URL 或文件需要分析时，默认触发本技能进行刻板行为识别 |\n| 🔎 明确分析意图 | 当用户明确提及自闭症、谱系障碍、刻板行为、转圈、摆手、摇晃、撞头、踮脚走、康复评估、特殊教育、ABA 干预效果等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看刻板行为历史报告、自闭症儿童行为报告清单、刻板行为统计报告清单、查询历史康复评估记录、显示所有刻板行为分析报告、显示特殊教育诊断报告，查询刻板行为趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_analysis.py`](scripts/smyx_autism_stereotyped_behavior_detect_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；**关键**：必须能看到儿童全身，帧率 ≥ 10 FPS |\n| 🔎 使用提醒 | 部分日常动作（鼓掌、跳舞、追逐游戏等）可能被误识别为刻板行为，建议康复师/家长进行抽样复核 |\n| 🔎 使用提醒 | 多儿童在同一视野内、家庭成员同时出现等情形可能影响识别准确性 |\n| 🧑‍⚖️ 结果性质 | 本工具**不提供自闭症诊断**，也**不替代** ADOS-2 / ADI-R / CARS 等专业评估；任何康复方案应在认证的康复治疗师指导下进行 |\n| 🔏 隐私合规 | 隐私合规：自闭症儿童行为视频涉及未成年人高度敏感隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体骨架/轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input /path/to/rehab.mp4\n\n# 分析网络康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --url https://example.com/rehab.mp4\n\n# 显示历史自闭症儿童刻板行为识别报告（自动触发关键词：查看刻板行为历史报告、自闭症儿童行为报告清单等）\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --output result.json\n```\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-autism-stereotyped-behavior-detect-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1790044525477\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_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` - 自闭症儿童刻板行为识别（转圈/摆手）\n\n## 输入约束\n\n- 摄像头：康复机构 / 特殊教育学校 / 家庭固定摄像头，覆盖儿童主要活动区域，**能看到全身**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS）；分辨率 ≥ 480p；光照稳定\n- 多儿童场景下建议结合外观特征锁定主目标（如儿童穿着特定颜色衣物）\n- 视频时长建议 ≥ 5 分钟，时序动作识别窗口需要足够样本\n- 隐私敏感场景可启用人体骨架模式\n\n## 刻板行为类别（支持扩展）\n\n| behavior_class | 中文 | 识别要点 |\n|----------------|------|----------|\n| `spinning` | 转圈 | 身体围绕垂直轴连续旋转 ≥ 360° |\n| `hand_flapping` | 摆手 | 手臂/手腕非功能性高频重复摆动 |\n| `body_rocking` | 摇晃 | 躯干前后/左右有节律摆动 |\n| `head_banging` | 撞头 | 头部反复触碰墙/家具（高优先级） |\n| `finger_flicking` | 手指弹打 | 手指反复快速弹打 |\n| `toe_walking` | 踮脚走 | 持续脚尖着地走路 |\n| `repetitive_running` | 重复奔跑 | 沿固定路线反复短距离奔跑 |\n| `repetitive_object_play` | 重复操作物体 | 反复开关、拍打、排列固定物体 |\n\n## 关键观测指标\n\n- `subject_detected` - 是否检测到儿童\n- `pose_keypoints_visible` - 关键点是否充分可见\n- `behavior_events` - 行为事件列表（含 behavior_class / start_time / end_time / duration_sec / confidence）\n- `per_class_count_hourly` - 每类行为每小时频次（次/小时）\n- `per_class_total_duration_today_sec` - 每类行为当日累计持续时间\n- `total_stereotyped_duration_today_sec` - 当日累计所有刻板行为时长\n- `dominant_behavior_class` - 当日主导刻板行为类别\n\n## 历史基线字段（可选）\n\n- `baseline_window_days` - 基线窗口（默认 7-14 天）\n- `baseline_per_class_avg_hourly` - 各类行为每小时基线均值\n- `baseline_per_class_std_hourly` - 各类行为每小时标准差\n\n## 输出字段（参考）\n\n- `subject_detected` / `pose_keypoints_visible`\n- `behavior_events` - 完整事件序列\n- `summary_metrics` - 汇总指标（per_class_count_hourly / per_class_total_duration_today_sec / total_stereotyped_duration_today_sec / dominant_behavior_class）\n- `trend_vs_baseline` - 当前 vs 基线变化（per_class_delta_pct）\n- `intervention_hint` - 用于康复师/家长的方向性参考（descriptive_only，**不构成处方**）\n- `report_message` - 文本摘要（如\"今日转圈 14 次，摆手 23 次，相比基线下降 30%，建议康复师评估当前干预方案\"）\n\n> 仅输出基于视觉的客观行为统计，**不提供自闭症诊断、量表打分、康复处方**；任何诊断与干预方案必须由专业医生/认证康复治疗师评估制定。\n\nFile v1.0.11:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.11:scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.11:skill-card.md\n\n## Description:\n\nAnalyzes fixed-camera child behavior videos to detect and report repetitive stereotyped behaviors such as spinning, hand flapping, and body rocking.\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\nRehabilitation therapists, special-education staff, developers, and caregivers can use this skill to process child behavior videos or URLs and receive objective behavior statistics and report links. The outputs support professional review of intervention progress and are not a diagnosis, rating scale, or rehabilitation prescription.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive children’s behavior videos, URLs, account identifiers, and report-history requests may be sent to configured cloud services.\n\nMitigation: Use only with explicit guardian consent, confirm the service and retention terms, and avoid use where local-only processing is required.\n\nRisk: The skill silently creates or reuses local identities and stores tokens locally.\n\nMitigation: Run it in a controlled workspace, protect local data and token files, and clear stored credentials when the analysis environment is retired or shared.\n\nRisk: Strict tenant or account separation may be required for sensitive child-health workflows.\n\nMitigation: Validate account routing and report-history access before deployment, especially in multi-user or shared rehabilitation-center environments.\n\nRisk: Computer-vision behavior classifications can be inaccurate in low-quality, multi-person, or ambiguous videos.\n\nMitigation: Have qualified caregivers or clinicians review samples and treat outputs as objective behavior statistics rather than clinical diagnosis or prescription.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-autism-stereotyped-behavior-detect-analysis)\n- [API Documentation](artifact/references/api_doc.md)\n- [Analysis API Error Reference](artifact/skills/smyx_analysis/references/api_doc.md)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, json, files, guidance]\n\n**Output Format:** [Markdown or JSON analysis report with event-level behavior statistics, summaries, recommendations, and report links.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May write the report to a user-specified output file.]\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, 41904 bytes\n\nFiles: references/api_doc.md (3477b), scripts/__init__.py (65b), scripts/config.py (715b), scripts/config.yaml (3b), scripts/skill.py (601b), scripts/smyx_autism_stereotyped_behavior_detect_analysis.py (3687b), skill-card.md (3154b), SKILL.md (13288b), 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-autism-stereotyped-behavior-detect-analysis\"\ndescription: \"Using a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 🧩 Autism Stereotyped Behavior Detection (Spinning / Hand-Flapping) | 自闭症儿童刻板行为识别（转圈/摆手）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **自闭症儿童刻板行为识别（转圈/摆手）** |\n| 🎯 核心目标 | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` |\n\nUsing a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. It counts the frequency (events per hour) and duration of each behavior and generates a behavior report. The skill helps therapists and parents objectively record behavior changes and evaluate intervention effects. Application scenarios: autism rehabilitation institutions, special-education schools, home interventions. Real-time monitoring; the system automatically generates daily / weekly stereotyped-behavior statistics to support rehabilitation planning. Skill features: stereotyped behaviors are a core symptom of autism, and changes in frequency / duration are important indicators of intervention effectiveness. Automatic AI recording reduces therapists' workload, enables long-term continuous monitoring, and provides data support for individualized intervention. Can be integrated into rehabilitation-center management systems or home-rehabilitation apps.\n\n通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。统计每种刻板行为的频次（次/小时）和单次持续时间，生成行为报告。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。应用场景：自闭症康复机构、特殊教育学校、家庭干预。系统实时监测，自动生成每日/每周刻板行为统计报告，为康复计划提供数据支持。技能特点：刻板行为是自闭症的核心症状之一，其频率和持续时间变化是评估干预效果的重要依据。通过AI自动监测记录，可减轻康复师负担，实现长时间连续监测，为个性化干预提供数据支持。该技能可集成到康复机构管理系统或家庭康复APP中。\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基于康复机构/家庭固定摄像头视频，识别儿童多类重复性刻板行为 → 按事件级别记录起止时间/持续秒数/置信度 → 汇总各类频次（次/小时）+ 累计时长 + 主导类别 → 可结合历史基线生成趋势报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 2D/3D 姿态关键点估计 |\n| 3 | 时序动作分类（spinning / hand_flapping / body_rocking / head_banging / finger_flicking / toe_walking / repetitive_running / repetitive_object_play 等） |\n| 4 | 事件级起止时间检测与去重 |\n| 5 | 每小时/每日频次与累计时长统计 |\n| 6 | 主导刻板行为类别识别 |\n| 7 | 与个人 7-14 天基线对比（趋势变化百分比） |\n| 8 | 康复师/家长行为摘要文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供康复/家庭儿童行为视频 URL 或文件需要分析时，默认触发本技能进行刻板行为识别 |\n| 🔎 明确分析意图 | 当用户明确提及自闭症、谱系障碍、刻板行为、转圈、摆手、摇晃、撞头、踮脚走、康复评估、特殊教育、ABA 干预效果等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看刻板行为历史报告、自闭症儿童行为报告清单、刻板行为统计报告清单、查询历史康复评估记录、显示所有刻板行为分析报告、显示特殊教育诊断报告，查询刻板行为趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_analysis.py`](scripts/smyx_autism_stereotyped_behavior_detect_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；**关键**：必须能看到儿童全身，帧率 ≥ 10 FPS |\n| 🔎 使用提醒 | 部分日常动作（鼓掌、跳舞、追逐游戏等）可能被误识别为刻板行为，建议康复师/家长进行抽样复核 |\n| 🔎 使用提醒 | 多儿童在同一视野内、家庭成员同时出现等情形可能影响识别准确性 |\n| 🧑‍⚖️ 结果性质 | 本工具**不提供自闭症诊断**，也**不替代** ADOS-2 / ADI-R / CARS 等专业评估；任何康复方案应在认证的康复治疗师指导下进行 |\n| 🔏 隐私合规 | 隐私合规：自闭症儿童行为视频涉及未成年人高度敏感隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体骨架/轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input /path/to/rehab.mp4\n\n# 分析网络康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --url https://example.com/rehab.mp4\n\n# 显示历史自闭症儿童刻板行为识别报告（自动触发关键词：查看刻板行为历史报告、自闭症儿童行为报告清单等）\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-autism-stereotyped-behavior-detect-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1787538928040\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_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` - 自闭症儿童刻板行为识别（转圈/摆手）\n\n## 输入约束\n\n- 摄像头：康复机构 / 特殊教育学校 / 家庭固定摄像头，覆盖儿童主要活动区域，**能看到全身**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS）；分辨率 ≥ 480p；光照稳定\n- 多儿童场景下建议结合外观特征锁定主目标（如儿童穿着特定颜色衣物）\n- 视频时长建议 ≥ 5 分钟，时序动作识别窗口需要足够样本\n- 隐私敏感场景可启用人体骨架模式\n\n## 刻板行为类别（支持扩展）\n\n| behavior_class | 中文 | 识别要点 |\n|----------------|------|----------|\n| `spinning` | 转圈 | 身体围绕垂直轴连续旋转 ≥ 360° |\n| `hand_flapping` | 摆手 | 手臂/手腕非功能性高频重复摆动 |\n| `body_rocking` | 摇晃 | 躯干前后/左右有节律摆动 |\n| `head_banging` | 撞头 | 头部反复触碰墙/家具（高优先级） |\n| `finger_flicking` | 手指弹打 | 手指反复快速弹打 |\n| `toe_walking` | 踮脚走 | 持续脚尖着地走路 |\n| `repetitive_running` | 重复奔跑 | 沿固定路线反复短距离奔跑 |\n| `repetitive_object_play` | 重复操作物体 | 反复开关、拍打、排列固定物体 |\n\n## 关键观测指标\n\n- `subject_detected` - 是否检测到儿童\n- `pose_keypoints_visible` - 关键点是否充分可见\n- `behavior_events` - 行为事件列表（含 behavior_class / start_time / end_time / duration_sec / confidence）\n- `per_class_count_hourly` - 每类行为每小时频次（次/小时）\n- `per_class_total_duration_today_sec` - 每类行为当日累计持续时间\n- `total_stereotyped_duration_today_sec` - 当日累计所有刻板行为时长\n- `dominant_behavior_class` - 当日主导刻板行为类别\n\n## 历史基线字段（可选）\n\n- `baseline_window_days` - 基线窗口（默认 7-14 天）\n- `baseline_per_class_avg_hourly` - 各类行为每小时基线均值\n- `baseline_per_class_std_hourly` - 各类行为每小时标准差\n\n## 输出字段（参考）\n\n- `subject_detected` / `pose_keypoints_visible`\n- `behavior_events` - 完整事件序列\n- `summary_metrics` - 汇总指标（per_class_count_hourly / per_class_total_duration_today_sec / total_stereotyped_duration_today_sec / dominant_behavior_class）\n- `trend_vs_baseline` - 当前 vs 基线变化（per_class_delta_pct）\n- `intervention_hint` - 用于康复师/家长的方向性参考（descriptive_only，**不构成处方**）\n- `report_message` - 文本摘要（如\"今日转圈 14 次，摆手 23 次，相比基线下降 30%，建议康复师评估当前干预方案\"）\n\n> 仅输出基于视觉的客观行为统计，**不提供自闭症诊断、量表打分、康复处方**；任何诊断与干预方案必须由专业医生/认证康复治疗师评估制定。\n\nFile v1.0.10:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.10:scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.10:skill-card.md\n\n## Description:\n\nThis skill analyzes fixed-camera child behavior videos to identify repetitive stereotyped behaviors such as spinning, hand flapping, and body rocking, then reports event counts, durations, trends, and report links.\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 therapists, caregivers, special-education staff, and developers use this skill to analyze child behavior videos, record repetitive behavior frequency and duration, and review historical behavior reports. The output is descriptive support for review and planning, not autism diagnosis, clinical scoring, or treatment prescription.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill processes highly sensitive videos of minors through a remote service.\n\nMitigation: Use only with explicit guardian consent, approved data handling terms, and minimized inputs; do not use real child, clinical, home, or school videos until privacy controls are verified.\n\nRisk: Unsafe endpoint defaults may send data or credentials over development or HTTP services.\n\nMitigation: Require reviewed production HTTPS endpoints before deployment and block development endpoint configuration in normal use.\n\nRisk: Reusable authentication tokens may be stored locally in plaintext.\n\nMitigation: Use secure credential storage, rotate any existing tokens, avoid shared workspaces, and remove local plaintext token files before handling sensitive data.\n\nRisk: Historical reports are tied to an automatically managed identity.\n\nMitigation: Verify identity isolation, consent, and authorization before listing or retrieving reports, especially in shared or multi-user environments.\n\nRisk: Behavior detections can be incorrect or affected by video quality, multiple people in view, or ambiguous daily activities.\n\nMitigation: Treat outputs as descriptive behavior statistics and require review by qualified caregivers or clinicians before using them in intervention planning.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-autism-stereotyped-behavior-detect-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [Autism behavior 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, JSON, shell commands, guidance]\n\n**Output Format:** [Markdown report or JSON, with optional saved text output]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include behavior event summaries, aggregate metrics, trend notes, historical report tables, and report links returned by a remote service.]\n\n## Skill Version(s):\n\n1.0.10 (source: frontmatter and server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 41750 bytes\n\nFiles: references/api_doc.md (3477b), scripts/__init__.py (65b), scripts/config.py (715b), scripts/config.yaml (3b), scripts/skill.py (601b), scripts/smyx_autism_stereotyped_behavior_detect_analysis.py (3687b), skill-card.md (2720b), SKILL.md (13288b), 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-autism-stereotyped-behavior-detect-analysis\"\ndescription: \"Using a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 🧩 Autism Stereotyped Behavior Detection (Spinning / Hand-Flapping) | 自闭症儿童刻板行为识别（转圈/摆手）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **自闭症儿童刻板行为识别（转圈/摆手）** |\n| 🎯 核心目标 | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` |\n\nUsing a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. It counts the frequency (events per hour) and duration of each behavior and generates a behavior report. The skill helps therapists and parents objectively record behavior changes and evaluate intervention effects. Application scenarios: autism rehabilitation institutions, special-education schools, home interventions. Real-time monitoring; the system automatically generates daily / weekly stereotyped-behavior statistics to support rehabilitation planning. Skill features: stereotyped behaviors are a core symptom of autism, and changes in frequency / duration are important indicators of intervention effectiveness. Automatic AI recording reduces therapists' workload, enables long-term continuous monitoring, and provides data support for individualized intervention. Can be integrated into rehabilitation-center management systems or home-rehabilitation apps.\n\n通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。统计每种刻板行为的频次（次/小时）和单次持续时间，生成行为报告。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。应用场景：自闭症康复机构、特殊教育学校、家庭干预。系统实时监测，自动生成每日/每周刻板行为统计报告，为康复计划提供数据支持。技能特点：刻板行为是自闭症的核心症状之一，其频率和持续时间变化是评估干预效果的重要依据。通过AI自动监测记录，可减轻康复师负担，实现长时间连续监测，为个性化干预提供数据支持。该技能可集成到康复机构管理系统或家庭康复APP中。\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基于康复机构/家庭固定摄像头视频，识别儿童多类重复性刻板行为 → 按事件级别记录起止时间/持续秒数/置信度 → 汇总各类频次（次/小时）+ 累计时长 + 主导类别 → 可结合历史基线生成趋势报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 2D/3D 姿态关键点估计 |\n| 3 | 时序动作分类（spinning / hand_flapping / body_rocking / head_banging / finger_flicking / toe_walking / repetitive_running / repetitive_object_play 等） |\n| 4 | 事件级起止时间检测与去重 |\n| 5 | 每小时/每日频次与累计时长统计 |\n| 6 | 主导刻板行为类别识别 |\n| 7 | 与个人 7-14 天基线对比（趋势变化百分比） |\n| 8 | 康复师/家长行为摘要文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供康复/家庭儿童行为视频 URL 或文件需要分析时，默认触发本技能进行刻板行为识别 |\n| 🔎 明确分析意图 | 当用户明确提及自闭症、谱系障碍、刻板行为、转圈、摆手、摇晃、撞头、踮脚走、康复评估、特殊教育、ABA 干预效果等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看刻板行为历史报告、自闭症儿童行为报告清单、刻板行为统计报告清单、查询历史康复评估记录、显示所有刻板行为分析报告、显示特殊教育诊断报告，查询刻板行为趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_analysis.py`](scripts/smyx_autism_stereotyped_behavior_detect_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；**关键**：必须能看到儿童全身，帧率 ≥ 10 FPS |\n| 🔎 使用提醒 | 部分日常动作（鼓掌、跳舞、追逐游戏等）可能被误识别为刻板行为，建议康复师/家长进行抽样复核 |\n| 🔎 使用提醒 | 多儿童在同一视野内、家庭成员同时出现等情形可能影响识别准确性 |\n| 🧑‍⚖️ 结果性质 | 本工具**不提供自闭症诊断**，也**不替代** ADOS-2 / ADI-R / CARS 等专业评估；任何康复方案应在认证的康复治疗师指导下进行 |\n| 🔏 隐私合规 | 隐私合规：自闭症儿童行为视频涉及未成年人高度敏感隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体骨架/轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input /path/to/rehab.mp4\n\n# 分析网络康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --url https://example.com/rehab.mp4\n\n# 显示历史自闭症儿童刻板行为识别报告（自动触发关键词：查看刻板行为历史报告、自闭症儿童行为报告清单等）\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-autism-stereotyped-behavior-detect-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1786996648692\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_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` - 自闭症儿童刻板行为识别（转圈/摆手）\n\n## 输入约束\n\n- 摄像头：康复机构 / 特殊教育学校 / 家庭固定摄像头，覆盖儿童主要活动区域，**能看到全身**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS）；分辨率 ≥ 480p；光照稳定\n- 多儿童场景下建议结合外观特征锁定主目标（如儿童穿着特定颜色衣物）\n- 视频时长建议 ≥ 5 分钟，时序动作识别窗口需要足够样本\n- 隐私敏感场景可启用人体骨架模式\n\n## 刻板行为类别（支持扩展）\n\n| behavior_class | 中文 | 识别要点 |\n|----------------|------|----------|\n| `spinning` | 转圈 | 身体围绕垂直轴连续旋转 ≥ 360° |\n| `hand_flapping` | 摆手 | 手臂/手腕非功能性高频重复摆动 |\n| `body_rocking` | 摇晃 | 躯干前后/左右有节律摆动 |\n| `head_banging` | 撞头 | 头部反复触碰墙/家具（高优先级） |\n| `finger_flicking` | 手指弹打 | 手指反复快速弹打 |\n| `toe_walking` | 踮脚走 | 持续脚尖着地走路 |\n| `repetitive_running` | 重复奔跑 | 沿固定路线反复短距离奔跑 |\n| `repetitive_object_play` | 重复操作物体 | 反复开关、拍打、排列固定物体 |\n\n## 关键观测指标\n\n- `subject_detected` - 是否检测到儿童\n- `pose_keypoints_visible` - 关键点是否充分可见\n- `behavior_events` - 行为事件列表（含 behavior_class / start_time / end_time / duration_sec / confidence）\n- `per_class_count_hourly` - 每类行为每小时频次（次/小时）\n- `per_class_total_duration_today_sec` - 每类行为当日累计持续时间\n- `total_stereotyped_duration_today_sec` - 当日累计所有刻板行为时长\n- `dominant_behavior_class` - 当日主导刻板行为类别\n\n## 历史基线字段（可选）\n\n- `baseline_window_days` - 基线窗口（默认 7-14 天）\n- `baseline_per_class_avg_hourly` - 各类行为每小时基线均值\n- `baseline_per_class_std_hourly` - 各类行为每小时标准差\n\n## 输出字段（参考）\n\n- `subject_detected` / `pose_keypoints_visible`\n- `behavior_events` - 完整事件序列\n- `summary_metrics` - 汇总指标（per_class_count_hourly / per_class_total_duration_today_sec / total_stereotyped_duration_today_sec / dominant_behavior_class）\n- `trend_vs_baseline` - 当前 vs 基线变化（per_class_delta_pct）\n- `intervention_hint` - 用于康复师/家长的方向性参考（descriptive_only，**不构成处方**）\n- `report_message` - 文本摘要（如\"今日转圈 14 次，摆手 23 次，相比基线下降 30%，建议康复师评估当前干预方案\"）\n\n> 仅输出基于视觉的客观行为统计，**不提供自闭症诊断、量表打分、康复处方**；任何诊断与干预方案必须由专业医生/认证康复治疗师评估制定。\n\nFile v1.0.9:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.9:scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.9:skill-card.md\n\n## Description:\n\nThis skill analyzes fixed-camera child behavior videos using pose estimation and temporal action detection to identify and report repetitive behaviors such as spinning, hand flapping, and body rocking.\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 rehabilitation teams, caregivers, and developers use this skill to submit fixed-camera child behavior videos or URLs for cloud analysis and receive event-level behavior statistics, summaries, and report links for professional review.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The workflow sends sensitive child behavior videos or video URLs to external cloud services.\n\nMitigation: Use only with explicit guardian or operator consent, confirm the account and data-retention model, and minimize or secure video data before analysis.\n\nRisk: The workflow can silently create or reuse identity data and store authentication tokens locally.\n\nMitigation: Run only in a trusted workspace, review local identity and token storage before installation, and remove stored tokens when access is no longer needed.\n\nRisk: Historical report queries may expose prior child behavior reports through cloud APIs.\n\nMitigation: Limit use to authorized operators, verify report ownership before sharing links or exports, and avoid using local memory as a source for historical reports.\n\nRisk: Behavior recognition can be incorrect or misused as clinical decision support.\n\nMitigation: Treat outputs as visual behavior statistics for professional review only; do not use them for diagnosis, scale scoring, or rehabilitation prescriptions.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-autism-stereotyped-behavior-detect-analysis)\n- [API interface documentation](references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Shell commands, Guidance]\n\n**Output Format:** [Markdown or JSON report text with optional saved output file]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include a cloud report link; results are descriptive behavior statistics, not diagnosis or treatment advice.]\n\n## Skill Version(s):\n\n1.0.9 (source: ClawHub 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.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, 41795 bytes\n\nFiles: references/api_doc.md (3477b), scripts/__init__.py (65b), scripts/config.py (715b), scripts/config.yaml (3b), scripts/skill.py (601b), scripts/smyx_autism_stereotyped_behavior_detect_analysis.py (3687b), skill-card.md (2846b), SKILL.md (13287b), 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.8:SKILL.md\n\n---\nname: \"smyx-autism-stereotyped-behavior-detect-analysis\"\ndescription: \"Using a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 🧩 Autism Stereotyped Behavior Detection (Spinning / Hand-Flapping) | 自闭症儿童刻板行为识别（转圈/摆手）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **自闭症儿童刻板行为识别（转圈/摆手）** |\n| 🎯 核心目标 | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` |\n\nUsing a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. It counts the frequency (events per hour) and duration of each behavior and generates a behavior report. The skill helps therapists and parents objectively record behavior changes and evaluate intervention effects. Application scenarios: autism rehabilitation institutions, special-education schools, home interventions. Real-time monitoring; the system automatically generates daily / weekly stereotyped-behavior statistics to support rehabilitation planning. Skill features: stereotyped behaviors are a core symptom of autism, and changes in frequency / duration are important indicators of intervention effectiveness. Automatic AI recording reduces therapists' workload, enables long-term continuous monitoring, and provides data support for individualized intervention. Can be integrated into rehabilitation-center management systems or home-rehabilitation apps.\n\n通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。统计每种刻板行为的频次（次/小时）和单次持续时间，生成行为报告。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。应用场景：自闭症康复机构、特殊教育学校、家庭干预。系统实时监测，自动生成每日/每周刻板行为统计报告，为康复计划提供数据支持。技能特点：刻板行为是自闭症的核心症状之一，其频率和持续时间变化是评估干预效果的重要依据。通过AI自动监测记录，可减轻康复师负担，实现长时间连续监测，为个性化干预提供数据支持。该技能可集成到康复机构管理系统或家庭康复APP中。\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基于康复机构/家庭固定摄像头视频，识别儿童多类重复性刻板行为 → 按事件级别记录起止时间/持续秒数/置信度 → 汇总各类频次（次/小时）+ 累计时长 + 主导类别 → 可结合历史基线生成趋势报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 2D/3D 姿态关键点估计 |\n| 3 | 时序动作分类（spinning / hand_flapping / body_rocking / head_banging / finger_flicking / toe_walking / repetitive_running / repetitive_object_play 等） |\n| 4 | 事件级起止时间检测与去重 |\n| 5 | 每小时/每日频次与累计时长统计 |\n| 6 | 主导刻板行为类别识别 |\n| 7 | 与个人 7-14 天基线对比（趋势变化百分比） |\n| 8 | 康复师/家长行为摘要文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供康复/家庭儿童行为视频 URL 或文件需要分析时，默认触发本技能进行刻板行为识别 |\n| 🔎 明确分析意图 | 当用户明确提及自闭症、谱系障碍、刻板行为、转圈、摆手、摇晃、撞头、踮脚走、康复评估、特殊教育、ABA 干预效果等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看刻板行为历史报告、自闭症儿童行为报告清单、刻板行为统计报告清单、查询历史康复评估记录、显示所有刻板行为分析报告、显示特殊教育诊断报告，查询刻板行为趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_analysis.py`](scripts/smyx_autism_stereotyped_behavior_detect_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；**关键**：必须能看到儿童全身，帧率 ≥ 10 FPS |\n| 🔎 使用提醒 | 部分日常动作（鼓掌、跳舞、追逐游戏等）可能被误识别为刻板行为，建议康复师/家长进行抽样复核 |\n| 🔎 使用提醒 | 多儿童在同一视野内、家庭成员同时出现等情形可能影响识别准确性 |\n| 🧑‍⚖️ 结果性质 | 本工具**不提供自闭症诊断**，也**不替代** ADOS-2 / ADI-R / CARS 等专业评估；任何康复方案应在认证的康复治疗师指导下进行 |\n| 🔏 隐私合规 | 隐私合规：自闭症儿童行为视频涉及未成年人高度敏感隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体骨架/轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input /path/to/rehab.mp4\n\n# 分析网络康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --url https://example.com/rehab.mp4\n\n# 显示历史自闭症儿童刻板行为识别报告（自动触发关键词：查看刻板行为历史报告、自闭症儿童行为报告清单等）\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-autism-stereotyped-behavior-detect-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1786486954659\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_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` - 自闭症儿童刻板行为识别（转圈/摆手）\n\n## 输入约束\n\n- 摄像头：康复机构 / 特殊教育学校 / 家庭固定摄像头，覆盖儿童主要活动区域，**能看到全身**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS）；分辨率 ≥ 480p；光照稳定\n- 多儿童场景下建议结合外观特征锁定主目标（如儿童穿着特定颜色衣物）\n- 视频时长建议 ≥ 5 分钟，时序动作识别窗口需要足够样本\n- 隐私敏感场景可启用人体骨架模式\n\n## 刻板行为类别（支持扩展）\n\n| behavior_class | 中文 | 识别要点 |\n|----------------|------|----------|\n| `spinning` | 转圈 | 身体围绕垂直轴连续旋转 ≥ 360° |\n| `hand_flapping` | 摆手 | 手臂/手腕非功能性高频重复摆动 |\n| `body_rocking` | 摇晃 | 躯干前后/左右有节律摆动 |\n| `head_banging` | 撞头 | 头部反复触碰墙/家具（高优先级） |\n| `finger_flicking` | 手指弹打 | 手指反复快速弹打 |\n| `toe_walking` | 踮脚走 | 持续脚尖着地走路 |\n| `repetitive_running` | 重复奔跑 | 沿固定路线反复短距离奔跑 |\n| `repetitive_object_play` | 重复操作物体 | 反复开关、拍打、排列固定物体 |\n\n## 关键观测指标\n\n- `subject_detected` - 是否检测到儿童\n- `pose_keypoints_visible` - 关键点是否充分可见\n- `behavior_events` - 行为事件列表（含 behavior_class / start_time / end_time / duration_sec / confidence）\n- `per_class_count_hourly` - 每类行为每小时频次（次/小时）\n- `per_class_total_duration_today_sec` - 每类行为当日累计持续时间\n- `total_stereotyped_duration_today_sec` - 当日累计所有刻板行为时长\n- `dominant_behavior_class` - 当日主导刻板行为类别\n\n## 历史基线字段（可选）\n\n- `baseline_window_days` - 基线窗口（默认 7-14 天）\n- `baseline_per_class_avg_hourly` - 各类行为每小时基线均值\n- `baseline_per_class_std_hourly` - 各类行为每小时标准差\n\n## 输出字段（参考）\n\n- `subject_detected` / `pose_keypoints_visible`\n- `behavior_events` - 完整事件序列\n- `summary_metrics` - 汇总指标（per_class_count_hourly / per_class_total_duration_today_sec / total_stereotyped_duration_today_sec / dominant_behavior_class）\n- `trend_vs_baseline` - 当前 vs 基线变化（per_class_delta_pct）\n- `intervention_hint` - 用于康复师/家长的方向性参考（descriptive_only，**不构成处方**）\n- `report_message` - 文本摘要（如\"今日转圈 14 次，摆手 23 次，相比基线下降 30%，建议康复师评估当前干预方案\"）\n\n> 仅输出基于视觉的客观行为统计，**不提供自闭症诊断、量表打分、康复处方**；任何诊断与干预方案必须由专业医生/认证康复治疗师评估制定。\n\nFile v1.0.8:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.8:scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.8:skill-card.md\n\n## Description:\n\nAnalyzes fixed-camera child behavior videos to identify repetitive stereotyped behaviors such as spinning, hand flapping, and body rocking, then produces structured behavior statistics and report links.\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 therapists, caregivers, and rehabilitation teams use this skill to analyze uploaded or URL-based child behavior videos, generate structured event statistics, and retrieve prior cloud reports for longitudinal review. The output is descriptive support for professional review, not diagnosis or treatment prescription.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive child-behavior videos or video URLs may be sent to lifeemergence.com services.\n\nMitigation: Use only where guardian consent, backend trust, retention rules, and approved upload paths are clear; prefer privacy-preserving skeleton or contour modes when available.\n\nRisk: Cloud history and report retrieval may expose sensitive prior reports.\n\nMitigation: Confirm per-user workspace isolation, report access controls, and appropriate authorization before using history-list or report-export features.\n\nRisk: Identity and session data may be persisted locally for reuse.\n\nMitigation: Review local storage and token handling before deployment, and clear or segregate workspace data on shared systems.\n\nRisk: Behavior statistics may be mistaken for clinical diagnosis or intervention advice.\n\nMitigation: Treat outputs as descriptive observations for qualified professional review, and do not use them as a substitute for clinical assessment or therapy planning.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-autism-stereotyped-behavior-detect-analysis)\n- [Publisher profile](https://clawhub.ai/user/18072937735)\n- [API documentation](artifact/references/api_doc.md)\n- [Skill usage demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, guidance]\n\n**Output Format:** [Markdown and JSON-like structured reports with behavior events, summary metrics, trends, intervention hints, and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include cloud report-list results and exported report-image links; output detail can be basic, standard, or json.]\n\n## Skill Version(s):\n\n1.0.8 (source: server release evidence; artifact frontmatter reports 1.0.9)\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, 41872 bytes\n\nFiles: references/api_doc.md (3477b), scripts/__init__.py (65b), scripts/config.py (715b), scripts/config.yaml (3b), scripts/skill.py (601b), scripts/smyx_autism_stereotyped_behavior_detect_analysis.py (3687b), skill-card.md (3174b), SKILL.md (13287b), 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-autism-stereotyped-behavior-detect-analysis\"\ndescription: \"Using a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。\"\nversion: \"1.0.7\"\nlicense: \"MIT-0\"\n---\n\n# 🧩 Autism Stereotyped Behavior Detection (Spinning / Hand-Flapping) | 自闭症儿童刻板行为识别（转圈/摆手）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **自闭症儿童刻板行为识别（转圈/摆手）** |\n| 🎯 核心目标 | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` |\n\nUsing a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. It counts the frequency (events per hour) and duration of each behavior and generates a behavior report. The skill helps therapists and parents objectively record behavior changes and evaluate intervention effects. Application scenarios: autism rehabilitation institutions, special-education schools, home interventions. Real-time monitoring; the system automatically generates daily / weekly stereotyped-behavior statistics to support rehabilitation planning. Skill features: stereotyped behaviors are a core symptom of autism, and changes in frequency / duration are important indicators of intervention effectiveness. Automatic AI recording reduces therapists' workload, enables long-term continuous monitoring, and provides data support for individualized intervention. Can be integrated into rehabilitation-center management systems or home-rehabilitation apps.\n\n通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。统计每种刻板行为的频次（次/小时）和单次持续时间，生成行为报告。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。应用场景：自闭症康复机构、特殊教育学校、家庭干预。系统实时监测，自动生成每日/每周刻板行为统计报告，为康复计划提供数据支持。技能特点：刻板行为是自闭症的核心症状之一，其频率和持续时间变化是评估干预效果的重要依据。通过AI自动监测记录，可减轻康复师负担，实现长时间连续监测，为个性化干预提供数据支持。该技能可集成到康复机构管理系统或家庭康复APP中。\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基于康复机构/家庭固定摄像头视频，识别儿童多类重复性刻板行为 → 按事件级别记录起止时间/持续秒数/置信度 → 汇总各类频次（次/小时）+ 累计时长 + 主导类别 → 可结合历史基线生成趋势报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 2D/3D 姿态关键点估计 |\n| 3 | 时序动作分类（spinning / hand_flapping / body_rocking / head_banging / finger_flicking / toe_walking / repetitive_running / repetitive_object_play 等） |\n| 4 | 事件级起止时间检测与去重 |\n| 5 | 每小时/每日频次与累计时长统计 |\n| 6 | 主导刻板行为类别识别 |\n| 7 | 与个人 7-14 天基线对比（趋势变化百分比） |\n| 8 | 康复师/家长行为摘要文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供康复/家庭儿童行为视频 URL 或文件需要分析时，默认触发本技能进行刻板行为识别 |\n| 🔎 明确分析意图 | 当用户明确提及自闭症、谱系障碍、刻板行为、转圈、摆手、摇晃、撞头、踮脚走、康复评估、特殊教育、ABA 干预效果等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看刻板行为历史报告、自闭症儿童行为报告清单、刻板行为统计报告清单、查询历史康复评估记录、显示所有刻板行为分析报告、显示特殊教育诊断报告，查询刻板行为趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_analysis.py`](scripts/smyx_autism_stereotyped_behavior_detect_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；**关键**：必须能看到儿童全身，帧率 ≥ 10 FPS |\n| 🔎 使用提醒 | 部分日常动作（鼓掌、跳舞、追逐游戏等）可能被误识别为刻板行为，建议康复师/家长进行抽样复核 |\n| 🔎 使用提醒 | 多儿童在同一视野内、家庭成员同时出现等情形可能影响识别准确性 |\n| 🧑‍⚖️ 结果性质 | 本工具**不提供自闭症诊断**，也**不替代** ADOS-2 / ADI-R / CARS 等专业评估；任何康复方案应在认证的康复治疗师指导下进行 |\n| 🔏 隐私合规 | 隐私合规：自闭症儿童行为视频涉及未成年人高度敏感隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体骨架/轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input /path/to/rehab.mp4\n\n# 分析网络康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --url https://example.com/rehab.mp4\n\n# 显示历史自闭症儿童刻板行为识别报告（自动触发关键词：查看刻板行为历史报告、自闭症儿童行为报告清单等）\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-autism-stereotyped-behavior-detect-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1785857555855\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_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` - 自闭症儿童刻板行为识别（转圈/摆手）\n\n## 输入约束\n\n- 摄像头：康复机构 / 特殊教育学校 / 家庭固定摄像头，覆盖儿童主要活动区域，**能看到全身**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS）；分辨率 ≥ 480p；光照稳定\n- 多儿童场景下建议结合外观特征锁定主目标（如儿童穿着特定颜色衣物）\n- 视频时长建议 ≥ 5 分钟，时序动作识别窗口需要足够样本\n- 隐私敏感场景可启用人体骨架模式\n\n## 刻板行为类别（支持扩展）\n\n| behavior_class | 中文 | 识别要点 |\n|----------------|------|----------|\n| `spinning` | 转圈 | 身体围绕垂直轴连续旋转 ≥ 360° |\n| `hand_flapping` | 摆手 | 手臂/手腕非功能性高频重复摆动 |\n| `body_rocking` | 摇晃 | 躯干前后/左右有节律摆动 |\n| `head_banging` | 撞头 | 头部反复触碰墙/家具（高优先级） |\n| `finger_flicking` | 手指弹打 | 手指反复快速弹打 |\n| `toe_walking` | 踮脚走 | 持续脚尖着地走路 |\n| `repetitive_running` | 重复奔跑 | 沿固定路线反复短距离奔跑 |\n| `repetitive_object_play` | 重复操作物体 | 反复开关、拍打、排列固定物体 |\n\n## 关键观测指标\n\n- `subject_detected` - 是否检测到儿童\n- `pose_keypoints_visible` - 关键点是否充分可见\n- `behavior_events` - 行为事件列表（含 behavior_class / start_time / end_time / duration_sec / confidence）\n- `per_class_count_hourly` - 每类行为每小时频次（次/小时）\n- `per_class_total_duration_today_sec` - 每类行为当日累计持续时间\n- `total_stereotyped_duration_today_sec` - 当日累计所有刻板行为时长\n- `dominant_behavior_class` - 当日主导刻板行为类别\n\n## 历史基线字段（可选）\n\n- `baseline_window_days` - 基线窗口（默认 7-14 天）\n- `baseline_per_class_avg_hourly` - 各类行为每小时基线均值\n- `baseline_per_class_std_hourly` - 各类行为每小时标准差\n\n## 输出字段（参考）\n\n- `subject_detected` / `pose_keypoints_visible`\n- `behavior_events` - 完整事件序列\n- `summary_metrics` - 汇总指标（per_class_count_hourly / per_class_total_duration_today_sec / total_stereotyped_duration_today_sec / dominant_behavior_class）\n- `trend_vs_baseline` - 当前 vs 基线变化（per_class_delta_pct）\n- `intervention_hint` - 用于康复师/家长的方向性参考（descriptive_only，**不构成处方**）\n- `report_message` - 文本摘要（如\"今日转圈 14 次，摆手 23 次，相比基线下降 30%，建议康复师评估当前干预方案\"）\n\n> 仅输出基于视觉的客观行为统计，**不提供自闭症诊断、量表打分、康复处方**；任何诊断与干预方案必须由专业医生/认证康复治疗师评估制定。\n\nFile v1.0.7:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.7:scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.7:skill-card.md\n\n## Description: <br>\nAnalyzes fixed-camera child behavior videos to detect stereotyped behaviors such as spinning, hand flapping, and body rocking, then returns structured behavior statistics and report links. <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>\nExternal therapists, rehabilitation centers, special education programs, and caregivers use this skill to submit child behavior videos or video URLs to a cloud analysis service for visual behavior statistics, history lookup, and report generation. Results are intended to support objective monitoring and professional review, not diagnosis or treatment decisions. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill processes highly sensitive children's behavior videos or video URLs through a configured cloud service. <br>\nMitigation: Obtain explicit guardian consent, submit only necessary footage, verify the configured service endpoint and retention policy, and avoid using identifying content when a lower-risk representation is sufficient. <br>\nRisk: The skill can create or reuse a local identity and store service tokens locally. <br>\nMitigation: Run it only in a controlled workspace, restrict access to local data files, and rotate or remove local identity and token records when the skill is no longer needed. <br>\nRisk: Cloud-stored history reports may expose sensitive child behavior records if accessed by unauthorized users. <br>\nMitigation: Limit history-report access to authorized users, confirm cloud access controls before deployment, and avoid sharing generated report links outside the care or review workflow. <br>\nRisk: Behavior detection outputs may be mistaken for clinical diagnosis, assessment scores, or treatment recommendations. <br>\nMitigation: Use outputs only as descriptive monitoring support and require review by qualified clinicians or rehabilitation professionals for diagnosis, assessment, or intervention decisions. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-autism-stereotyped-behavior-detect-analysis) <br>\n- [Autism Stereotyped Behavior Detection API Documentation](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, Guidance] <br>\n**Output Format:** [JSON or Markdown report text with structured behavior metrics and report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May save output to a file when --output is supplied; history queries return cloud-stored report lists.] <br>\n\n## Skill Version(s): <br>\n1.0.7 (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.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, 41859 bytes\n\nFiles: references/api_doc.md (3477b), scripts/__init__.py (65b), scripts/config.py (715b), scripts/config.yaml (3b), scripts/skill.py (601b), scripts/smyx_autism_stereotyped_behavior_detect_analysis.py (3687b), skill-card.md (3125b), SKILL.md (13287b), 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-autism-stereotyped-behavior-detect-analysis\"\ndescription: \"Using a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。\"\nversion: \"1.0.6\"\nlicense: \"MIT-0\"\n---\n\n# 🧩 Autism Stereotyped Behavior Detection (Spinning / Hand-Flapping) | 自闭症儿童刻板行为识别（转圈/摆手）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **自闭症儿童刻板行为识别（转圈/摆手）** |\n| 🎯 核心目标 | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` |\n\nUsing a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. It counts the frequency (events per hour) and duration of each behavior and generates a behavior report. The skill helps therapists and parents objectively record behavior changes and evaluate intervention effects. Application scenarios: autism rehabilitation institutions, special-education schools, home interventions. Real-time monitoring; the system automatically generates daily / weekly stereotyped-behavior statistics to support rehabilitation planning. Skill features: stereotyped behaviors are a core symptom of autism, and changes in frequency / duration are important indicators of intervention effectiveness. Automatic AI recording reduces therapists' workload, enables long-term continuous monitoring, and provides data support for individualized intervention. Can be integrated into rehabilitation-center management systems or home-rehabilitation apps.\n\n通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。统计每种刻板行为的频次（次/小时）和单次持续时间，生成行为报告。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。应用场景：自闭症康复机构、特殊教育学校、家庭干预。系统实时监测，自动生成每日/每周刻板行为统计报告，为康复计划提供数据支持。技能特点：刻板行为是自闭症的核心症状之一，其频率和持续时间变化是评估干预效果的重要依据。通过AI自动监测记录，可减轻康复师负担，实现长时间连续监测，为个性化干预提供数据支持。该技能可集成到康复机构管理系统或家庭康复APP中。\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基于康复机构/家庭固定摄像头视频，识别儿童多类重复性刻板行为 → 按事件级别记录起止时间/持续秒数/置信度 → 汇总各类频次（次/小时）+ 累计时长 + 主导类别 → 可结合历史基线生成趋势报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 2D/3D 姿态关键点估计 |\n| 3 | 时序动作分类（spinning / hand_flapping / body_rocking / head_banging / finger_flicking / toe_walking / repetitive_running / repetitive_object_play 等） |\n| 4 | 事件级起止时间检测与去重 |\n| 5 | 每小时/每日频次与累计时长统计 |\n| 6 | 主导刻板行为类别识别 |\n| 7 | 与个人 7-14 天基线对比（趋势变化百分比） |\n| 8 | 康复师/家长行为摘要文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供康复/家庭儿童行为视频 URL 或文件需要分析时，默认触发本技能进行刻板行为识别 |\n| 🔎 明确分析意图 | 当用户明确提及自闭症、谱系障碍、刻板行为、转圈、摆手、摇晃、撞头、踮脚走、康复评估、特殊教育、ABA 干预效果等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看刻板行为历史报告、自闭症儿童行为报告清单、刻板行为统计报告清单、查询历史康复评估记录、显示所有刻板行为分析报告、显示特殊教育诊断报告，查询刻板行为趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_analysis.py`](scripts/smyx_autism_stereotyped_behavior_detect_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；**关键**：必须能看到儿童全身，帧率 ≥ 10 FPS |\n| 🔎 使用提醒 | 部分日常动作（鼓掌、跳舞、追逐游戏等）可能被误识别为刻板行为，建议康复师/家长进行抽样复核 |\n| 🔎 使用提醒 | 多儿童在同一视野内、家庭成员同时出现等情形可能影响识别准确性 |\n| 🧑‍⚖️ 结果性质 | 本工具**不提供自闭症诊断**，也**不替代** ADOS-2 / ADI-R / CARS 等专业评估；任何康复方案应在认证的康复治疗师指导下进行 |\n| 🔏 隐私合规 | 隐私合规：自闭症儿童行为视频涉及未成年人高度敏感隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体骨架/轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input /path/to/rehab.mp4\n\n# 分析网络康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --url https://example.com/rehab.mp4\n\n# 显示历史自闭症儿童刻板行为识别报告（自动触发关键词：查看刻板行为历史报告、自闭症儿童行为报告清单等）\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-autism-stereotyped-behavior-detect-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1785145767685\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_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` - 自闭症儿童刻板行为识别（转圈/摆手）\n\n## 输入约束\n\n- 摄像头：康复机构 / 特殊教育学校 / 家庭固定摄像头，覆盖儿童主要活动区域，**能看到全身**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS）；分辨率 ≥ 480p；光照稳定\n- 多儿童场景下建议结合外观特征锁定主目标（如儿童穿着特定颜色衣物）\n- 视频时长建议 ≥ 5 分钟，时序动作识别窗口需要足够样本\n- 隐私敏感场景可启用人体骨架模式\n\n## 刻板行为类别（支持扩展）\n\n| behavior_class | 中文 | 识别要点 |\n|----------------|------|----------|\n| `spinning` | 转圈 | 身体围绕垂直轴连续旋转 ≥ 360° |\n| `hand_flapping` | 摆手 | 手臂/手腕非功能性高频重复摆动 |\n| `body_rocking` | 摇晃 | 躯干前后/左右有节律摆动 |\n| `head_banging` | 撞头 | 头部反复触碰墙/家具（高优先级） |\n| `finger_flicking` | 手指弹打 | 手指反复快速弹打 |\n| `toe_walking` | 踮脚走 | 持续脚尖着地走路 |\n| `repetitive_running` | 重复奔跑 | 沿固定路线反复短距离奔跑 |\n| `repetitive_object_play` | 重复操作物体 | 反复开关、拍打、排列固定物体 |\n\n## 关键观测指标\n\n- `subject_detected` - 是否检测到儿童\n- `pose_keypoints_visible` - 关键点是否充分可见\n- `behavior_events` - 行为事件列表（含 behavior_class / start_time / end_time / duration_sec / confidence）\n- `per_class_count_hourly` - 每类行为每小时频次（次/小时）\n- `per_class_total_duration_today_sec` - 每类行为当日累计持续时间\n- `total_stereotyped_duration_today_sec` - 当日累计所有刻板行为时长\n- `dominant_behavior_class` - 当日主导刻板行为类别\n\n## 历史基线字段（可选）\n\n- `baseline_window_days` - 基线窗口（默认 7-14 天）\n- `baseline_per_class_avg_hourly` - 各类行为每小时基线均值\n- `baseline_per_class_std_hourly` - 各类行为每小时标准差\n\n## 输出字段（参考）\n\n- `subject_detected` / `pose_keypoints_visible`\n- `behavior_events` - 完整事件序列\n- `summary_metrics` - 汇总指标（per_class_count_hourly / per_class_total_duration_today_sec / total_stereotyped_duration_today_sec / dominant_behavior_class）\n- `trend_vs_baseline` - 当前 vs 基线变化（per_class_delta_pct）\n- `intervention_hint` - 用于康复师/家长的方向性参考（descriptive_only，**不构成处方**）\n- `report_message` - 文本摘要（如\"今日转圈 14 次，摆手 23 次，相比基线下降 30%，建议康复师评估当前干预方案\"）\n\n> 仅输出基于视觉的客观行为统计，**不提供自闭症诊断、量表打分、康复处方**；任何诊断与干预方案必须由专业医生/认证康复治疗师评估制定。\n\nFile v1.0.6:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.6:scripts/config.yaml\n\n{}\n\nFile v1.0.6:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.6:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.6:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.6:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.6:skill-card.md\n\n## Description: <br>\nAnalyzes fixed-camera child behavior videos to identify repetitive stereotyped behaviors such as spinning, hand flapping, and body rocking, then returns structured behavior statistics and report links. <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>\nTherapists, parents, rehabilitation teams, and developers use this skill to submit clear fixed-camera child behavior videos or video URLs and receive objective event-level statistics, summaries, and report links for professional review. It is descriptive support for behavior tracking, not a diagnostic tool or rehabilitation prescription. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Sensitive child-behavior videos and reports may be uploaded to or retrieved from a remote service. <br>\nMitigation: Use only with explicit guardian consent, a trusted backend, defined retention policies, and account isolation; avoid unnecessary uploads and prefer privacy-preserving inputs where available. <br>\nRisk: The skill can silently create or reuse an internal identity and query cloud history for reports tied to that identity. <br>\nMitigation: Run it in an isolated workspace and account context, restrict access to history-list workflows, and review or clear local identity files before sharing the workspace. <br>\nRisk: Service tokens may be stored in a local workspace database. <br>\nMitigation: Protect the workspace data directory, do not publish workspace archives containing runtime data, and rotate or revoke tokens after testing or transfer. <br>\nRisk: Visual behavior classification can misidentify everyday activity as stereotyped behavior and is not a diagnosis. <br>\nMitigation: Require professional review of sampled outputs and do not use reports as the sole basis for diagnosis, treatment, or rehabilitation planning. <br>\n\n\n## Reference(s): <br>\n- [API documentation](references/api_doc.md) <br>\n- [SMYX analysis API documentation](skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill usage introduction](https://lifeemergence.com/sample.html) <br>\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-autism-stereotyped-behavior-detect-analysis) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance] <br>\n**Output Format:** [Markdown and JSON-formatted structured report text] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include behavior event statistics, summary metrics, history-list output, report export links, and optional saved output files.] <br>\n\n## Skill Version(s): <br>\n1.0.6 (source: SKILL.md 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.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, 41725 bytes\n\nFiles: references/api_doc.md (3477b), scripts/__init__.py (65b), scripts/config.py (715b), scripts/config.yaml (3b), scripts/skill.py (601b), scripts/smyx_autism_stereotyped_behavior_detect_analysis.py (3687b), skill-card.md (2720b), SKILL.md (13287b), 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-autism-stereotyped-behavior-detect-analysis\"\ndescription: \"Using a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。\"\nversion: \"1.0.4\"\nlicense: \"MIT-0\"\n---\n\n# 🧩 Autism Stereotyped Behavior Detection (Spinning / Hand-Flapping) | 自闭症儿童刻板行为识别（转圈/摆手）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **自闭症儿童刻板行为识别（转圈/摆手）** |\n| 🎯 核心目标 | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` |\n\nUsing a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. It counts the frequency (events per hour) and duration of each behavior and generates a behavior report. The skill helps therapists and parents objectively record behavior changes and evaluate intervention effects. Application scenarios: autism rehabilitation institutions, special-education schools, home interventions. Real-time monitoring; the system automatically generates daily / weekly stereotyped-behavior statistics to support rehabilitation planning. Skill features: stereotyped behaviors are a core symptom of autism, and changes in frequency / duration are important indicators of intervention effectiveness. Automatic AI recording reduces therapists' workload, enables long-term continuous monitoring, and provides data support for individualized intervention. Can be integrated into rehabilitation-center management systems or home-rehabilitation apps.\n\n通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。统计每种刻板行为的频次（次/小时）和单次持续时间，生成行为报告。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。应用场景：自闭症康复机构、特殊教育学校、家庭干预。系统实时监测，自动生成每日/每周刻板行为统计报告，为康复计划提供数据支持。技能特点：刻板行为是自闭症的核心症状之一，其频率和持续时间变化是评估干预效果的重要依据。通过AI自动监测记录，可减轻康复师负担，实现长时间连续监测，为个性化干预提供数据支持。该技能可集成到康复机构管理系统或家庭康复APP中。\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基于康复机构/家庭固定摄像头视频，识别儿童多类重复性刻板行为 → 按事件级别记录起止时间/持续秒数/置信度 → 汇总各类频次（次/小时）+ 累计时长 + 主导类别 → 可结合历史基线生成趋势报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 2D/3D 姿态关键点估计 |\n| 3 | 时序动作分类（spinning / hand_flapping / body_rocking / head_banging / finger_flicking / toe_walking / repetitive_running / repetitive_object_play 等） |\n| 4 | 事件级起止时间检测与去重 |\n| 5 | 每小时/每日频次与累计时长统计 |\n| 6 | 主导刻板行为类别识别 |\n| 7 | 与个人 7-14 天基线对比（趋势变化百分比） |\n| 8 | 康复师/家长行为摘要文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供康复/家庭儿童行为视频 URL 或文件需要分析时，默认触发本技能进行刻板行为识别 |\n| 🔎 明确分析意图 | 当用户明确提及自闭症、谱系障碍、刻板行为、转圈、摆手、摇晃、撞头、踮脚走、康复评估、特殊教育、ABA 干预效果等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看刻板行为历史报告、自闭症儿童行为报告清单、刻板行为统计报告清单、查询历史康复评估记录、显示所有刻板行为分析报告、显示特殊教育诊断报告，查询刻板行为趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_analysis.py`](scripts/smyx_autism_stereotyped_behavior_detect_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；**关键**：必须能看到儿童全身，帧率 ≥ 10 FPS |\n| 🔎 使用提醒 | 部分日常动作（鼓掌、跳舞、追逐游戏等）可能被误识别为刻板行为，建议康复师/家长进行抽样复核 |\n| 🔎 使用提醒 | 多儿童在同一视野内、家庭成员同时出现等情形可能影响识别准确性 |\n| 🧑‍⚖️ 结果性质 | 本工具**不提供自闭症诊断**，也**不替代** ADOS-2 / ADI-R / CARS 等专业评估；任何康复方案应在认证的康复治疗师指导下进行 |\n| 🔏 隐私合规 | 隐私合规：自闭症儿童行为视频涉及未成年人高度敏感隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体骨架/轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input /path/to/rehab.mp4\n\n# 分析网络康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --url https://example.com/rehab.mp4\n\n# 显示历史自闭症儿童刻板行为识别报告（自动触发关键词：查看刻板行为历史报告、自闭症儿童行为报告清单等）\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --output result.json\n```\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-autism-stereotyped-behavior-detect-analysis\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1784124334307\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_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` - 自闭症儿童刻板行为识别（转圈/摆手）\n\n## 输入约束\n\n- 摄像头：康复机构 / 特殊教育学校 / 家庭固定摄像头，覆盖儿童主要活动区域，**能看到全身**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS）；分辨率 ≥ 480p；光照稳定\n- 多儿童场景下建议结合外观特征锁定主目标（如儿童穿着特定颜色衣物）\n- 视频时长建议 ≥ 5 分钟，时序动作识别窗口需要足够样本\n- 隐私敏感场景可启用人体骨架模式\n\n## 刻板行为类别（支持扩展）\n\n| behavior_class | 中文 | 识别要点 |\n|----------------|------|----------|\n| `spinning` | 转圈 | 身体围绕垂直轴连续旋转 ≥ 360° |\n| `hand_flapping` | 摆手 | 手臂/手腕非功能性高频重复摆动 |\n| `body_rocking` | 摇晃 | 躯干前后/左右有节律摆动 |\n| `head_banging` | 撞头 | 头部反复触碰墙/家具（高优先级） |\n| `finger_flicking` | 手指弹打 | 手指反复快速弹打 |\n| `toe_walking` | 踮脚走 | 持续脚尖着地走路 |\n| `repetitive_running` | 重复奔跑 | 沿固定路线反复短距离奔跑 |\n| `repetitive_object_play` | 重复操作物体 | 反复开关、拍打、排列固定物体 |\n\n## 关键观测指标\n\n- `subject_detected` - 是否检测到儿童\n- `pose_keypoints_visible` - 关键点是否充分可见\n- `behavior_events` - 行为事件列表（含 behavior_class / start_time / end_time / duration_sec / confidence）\n- `per_class_count_hourly` - 每类行为每小时频次（次/小时）\n- `per_class_total_duration_today_sec` - 每类行为当日累计持续时间\n- `total_stereotyped_duration_today_sec` - 当日累计所有刻板行为时长\n- `dominant_behavior_class` - 当日主导刻板行为类别\n\n## 历史基线字段（可选）\n\n- `baseline_window_days` - 基线窗口（默认 7-14 天）\n- `baseline_per_class_avg_hourly` - 各类行为每小时基线均值\n- `baseline_per_class_std_hourly` - 各类行为每小时标准差\n\n## 输出字段（参考）\n\n- `subject_detected` / `pose_keypoints_visible`\n- `behavior_events` - 完整事件序列\n- `summary_metrics` - 汇总指标（per_class_count_hourly / per_class_total_duration_today_sec / total_stereotyped_duration_today_sec / dominant_behavior_class）\n- `trend_vs_baseline` - 当前 vs 基线变化（per_class_delta_pct）\n- `intervention_hint` - 用于康复师/家长的方向性参考（descriptive_only，**不构成处方**）\n- `report_message` - 文本摘要（如\"今日转圈 14 次，摆手 23 次，相比基线下降 30%，建议康复师评估当前干预方案\"）\n\n> 仅输出基于视觉的客观行为统计，**不提供自闭症诊断、量表打分、康复处方**；任何诊断与干预方案必须由专业医生/认证康复治疗师评估制定。\n\nFile v1.0.5:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.5:scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.5:skill-card.md\n\n## Description: <br>\nAnalyzes fixed-camera child behavior videos to report repetitive stereotyped behaviors such as spinning, hand flapping, and body rocking; it does not provide autism diagnosis, scale scoring, or rehabilitation prescriptions. <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>\nTherapists, caregivers, special-education teams, and developers use this skill to submit child behavior videos or URLs to a cloud analysis service and receive objective behavior-event counts, durations, trend summaries, and report links for professional review. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Child behavior videos, report queries, and account-linked identifiers may be sent to the configured cloud service. <br>\nMitigation: Use only where guardian consent, data-retention expectations, and access controls are already established before uploading footage. <br>\nRisk: The skill may create a local shared SQLite database and store service tokens in the workspace data directory. <br>\nMitigation: Run it in a controlled workspace, restrict access to local data, and remove or protect generated identity and token files after use. <br>\nRisk: Computer-vision results may misclassify ordinary movements or be degraded by occlusion, multiple children, poor framing, low frame rate, or unstable lighting. <br>\nMitigation: Treat outputs as descriptive behavior statistics for review by qualified therapists or caregivers, not as diagnosis, scale scoring, or treatment prescription. <br>\n\n\n## Reference(s): <br>\n- [API Documentation](references/api_doc.md) <br>\n- [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, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown guidance with shell command examples and JSON or Markdown analysis reports from the API] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May write report output files when --output is supplied; historical report listings are rendered as Markdown tables.] <br>\n\n## Skill Version(s): <br>\n1.0.5 (source: server release metadata; artifact frontmatter says 1.0.4) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.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, 41858 bytes\n\nFiles: references/api_doc.md (3477b), scripts/__init__.py (65b), scripts/config.py (715b), scripts/config.yaml (3b), scripts/skill.py (601b), scripts/smyx_autism_stereotyped_behavior_detect_analysis.py (3687b), skill-card.md (3076b), SKILL.md (13287b), 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-autism-stereotyped-behavior-detect-analysis\"\ndescription: \"Using a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。\"\nversion: \"1.0.4\"\nlicense: \"MIT-0\"\n---\n\n# 🧩 Autism Stereotyped Behavior Detection (Spinning / Hand-Flapping) | 自闭症儿童刻板行为识别（转圈/摆手）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **自闭症儿童刻板行为识别（转圈/摆手）** |\n| 🎯 核心目标 | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` |\n\nUsing a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. It counts the frequency (events per hour) and duration of each behavior and generates a behavior report. The skill helps therapists and parents objectively record behavior changes and evaluate intervention effects. Application scenarios: autism rehabilitation institutions, special-education schools, home interventions. Real-time monitoring; the system automatically generates daily / weekly stereotyped-behavior statistics to support rehabilitation planning. Skill features: stereotyped behaviors are a core symptom of autism, and changes in frequency / duration are important indicators of intervention effectiveness. Automatic AI recording reduces therapists' workload, enables long-term continuous monitoring, and provides data support for individualized intervention. Can be integrated into rehabilitation-center management systems or home-rehabilitation apps.\n\n通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。统计每种刻板行为的频次（次/小时）和单次持续时间，生成行为报告。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。应用场景：自闭症康复机构、特殊教育学校、家庭干预。系统实时监测，自动生成每日/每周刻板行为统计报告，为康复计划提供数据支持。技能特点：刻板行为是自闭症的核心症状之一，其频率和持续时间变化是评估干预效果的重要依据。通过AI自动监测记录，可减轻康复师负担，实现长时间连续监测，为个性化干预提供数据支持。该技能可集成到康复机构管理系统或家庭康复APP中。\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基于康复机构/家庭固定摄像头视频，识别儿童多类重复性刻板行为 → 按事件级别记录起止时间/持续秒数/置信度 → 汇总各类频次（次/小时）+ 累计时长 + 主导类别 → 可结合历史基线生成趋势报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 2D/3D 姿态关键点估计 |\n| 3 | 时序动作分类（spinning / hand_flapping / body_rocking / head_banging / finger_flicking / toe_walking / repetitive_running / repetitive_object_play 等） |\n| 4 | 事件级起止时间检测与去重 |\n| 5 | 每小时/每日频次与累计时长统计 |\n| 6 | 主导刻板行为类别识别 |\n| 7 | 与个人 7-14 天基线对比（趋势变化百分比） |\n| 8 | 康复师/家长行为摘要文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供康复/家庭儿童行为视频 URL 或文件需要分析时，默认触发本技能进行刻板行为识别 |\n| 🔎 明确分析意图 | 当用户明确提及自闭症、谱系障碍、刻板行为、转圈、摆手、摇晃、撞头、踮脚走、康复评估、特殊教育、ABA 干预效果等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看刻板行为历史报告、自闭症儿童行为报告清单、刻板行为统计报告清单、查询历史康复评估记录、显示所有刻板行为分析报告、显示特殊教育诊断报告，查询刻板行为趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_analysis.py`](scripts/smyx_autism_stereotyped_behavior_detect_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；**关键**：必须能看到儿童全身，帧率 ≥ 10 FPS |\n| 🔎 使用提醒 | 部分日常动作（鼓掌、跳舞、追逐游戏等）可能被误识别为刻板行为，建议康复师/家长进行抽样复核 |\n| 🔎 使用提醒 | 多儿童在同一视野内、家庭成员同时出现等情形可能影响识别准确性 |\n| 🧑‍⚖️ 结果性质 | 本工具**不提供自闭症诊断**，也**不替代** ADOS-2 / ADI-R / CARS 等专业评估；任何康复方案应在认证的康复治疗师指导下进行 |\n| 🔏 隐私合规 | 隐私合规：自闭症儿童行为视频涉及未成年人高度敏感隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体骨架/轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input /path/to/rehab.mp4\n\n# 分析网络康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --url https://example.com/rehab.mp4\n\n# 显示历史自闭症儿童刻板行为识别报告（自动触发关键词：查看刻板行为历史报告、自闭症儿童行为报告清单等）\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --output result.json\n```\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-autism-stereotyped-behavior-detect-analysis\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1783862431367\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_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` - 自闭症儿童刻板行为识别（转圈/摆手）\n\n## 输入约束\n\n- 摄像头：康复机构 / 特殊教育学校 / 家庭固定摄像头，覆盖儿童主要活动区域，**能看到全身**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS）；分辨率 ≥ 480p；光照稳定\n- 多儿童场景下建议结合外观特征锁定主目标（如儿童穿着特定颜色衣物）\n- 视频时长建议 ≥ 5 分钟，时序动作识别窗口需要足够样本\n- 隐私敏感场景可启用人体骨架模式\n\n## 刻板行为类别（支持扩展）\n\n| behavior_class | 中文 | 识别要点 |\n|----------------|------|----------|\n| `spinning` | 转圈 | 身体围绕垂直轴连续旋转 ≥ 360° |\n| `hand_flapping` | 摆手 | 手臂/手腕非功能性高频重复摆动 |\n| `body_rocking` | 摇晃 | 躯干前后/左右有节律摆动 |\n| `head_banging` | 撞头 | 头部反复触碰墙/家具（高优先级） |\n| `finger_flicking` | 手指弹打 | 手指反复快速弹打 |\n| `toe_walking` | 踮脚走 | 持续脚尖着地走路 |\n| `repetitive_running` | 重复奔跑 | 沿固定路线反复短距离奔跑 |\n| `repetitive_object_play` | 重复操作物体 | 反复开关、拍打、排列固定物体 |\n\n## 关键观测指标\n\n- `subject_detected` - 是否检测到儿童\n- `pose_keypoints_visible` - 关键点是否充分可见\n- `behavior_events` - 行为事件列表（含 behavior_class / start_time / end_time / duration_sec / confidence）\n- `per_class_count_hourly` - 每类行为每小时频次（次/小时）\n- `per_class_total_duration_today_sec` - 每类行为当日累计持续时间\n- `total_stereotyped_duration_today_sec` - 当日累计所有刻板行为时长\n- `dominant_behavior_class` - 当日主导刻板行为类别\n\n## 历史基线字段（可选）\n\n- `baseline_window_days` - 基线窗口（默认 7-14 天）\n- `baseline_per_class_avg_hourly` - 各类行为每小时基线均值\n- `baseline_per_class_std_hourly` - 各类行为每小时标准差\n\n## 输出字段（参考）\n\n- `subject_detected` / `pose_keypoints_visible`\n- `behavior_events` - 完整事件序列\n- `summary_metrics` - 汇总指标（per_class_count_hourly / per_class_total_duration_today_sec / total_stereotyped_duration_today_sec / dominant_behavior_class）\n- `trend_vs_baseline` - 当前 vs 基线变化（per_class_delta_pct）\n- `intervention_hint` - 用于康复师/家长的方向性参考（descriptive_only，**不构成处方**）\n- `report_message` - 文本摘要（如\"今日转圈 14 次，摆手 23 次，相比基线下降 30%，建议康复师评估当前干预方案\"）\n\n> 仅输出基于视觉的客观行为统计，**不提供自闭症诊断、量表打分、康复处方**；任何诊断与干预方案必须由专业医生/认证康复治疗师评估制定。\n\nFile v1.0.4:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.4:scripts/config.yaml\n\n{}\n\nFile v1.0.4:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.4:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.4:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.4:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.4:skill-card.md\n\n## Description: <br>\nUses fixed-camera child behavior videos with pose estimation and temporal action detection to identify repetitive stereotyped behaviors such as spinning, hand flapping, and body rocking, then produce objective behavior statistics for therapist or caregiver 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>\nExternal rehabilitation staff, special-education teams, and caregivers use this skill to analyze fixed-camera child behavior videos or URLs and receive event-level counts, durations, trends, and report links. The outputs are observational aids and are not a diagnosis, clinical scale score, or rehabilitation prescription. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Sensitive child-behavior videos or video URLs may be sent to the publisher's cloud service. <br>\nMitigation: Use only with guardian consent, confirm endpoint, retention, and deletion controls before deployment, and prefer de-identified skeleton or contour workflows when available. <br>\nRisk: The skill may create or reuse a local service identity and store service tokens. <br>\nMitigation: Review token storage and rotation practices, isolate the runtime environment, and remove credentials and generated reports after use. <br>\nRisk: Everyday actions, multiple children in frame, poor visibility, or low frame rate may produce misleading behavior classifications. <br>\nMitigation: Require clear full-body video that meets the documented constraints and have qualified staff sample-review outputs before relying on trends. <br>\nRisk: Outputs concern autism-related behavior and could be misused as clinical diagnosis or treatment advice. <br>\nMitigation: Present results only as visual observation statistics and require professional evaluation for diagnosis, scale scoring, or intervention changes. <br>\n\n\n## Reference(s): <br>\n- [Autism stereotyped behavior API documentation](artifact/references/api_doc.md) <br>\n- [ClawHub skill release page](https://clawhub.ai/18072937735/skills/smyx-autism-stereotyped-behavior-detect-analysis) <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, guidance] <br>\n**Output Format:** [Markdown text with JSON-like structured analysis reports and report links.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May save analysis output to a user-specified file; list mode returns cloud-hosted historical report records.] <br>\n\n## Skill Version(s): <br>\n1.0.4 (source: server release metadata and SKILL.md frontmatter) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.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, 41446 bytes\n\nFiles: references/api_doc.md (3477b), scripts/__init__.py (65b), scripts/config.py (715b), scripts/config.yaml (3b), scripts/skill.py (601b), scripts/smyx_autism_stereotyped_behavior_detect_analysis.py (3687b), skill-card.md (2849b), SKILL.md (13287b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (22801b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28605b), _meta.json (167b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: \"smyx-autism-stereotyped-behavior-detect-analysis\"\ndescription: \"Using a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。\"\nversion: \"1.0.2\"\nlicense: \"MIT-0\"\n---\n\n# 🧩 Autism Stereotyped Behavior Detection (Spinning / Hand-Flapping) | 自闭症儿童刻板行为识别（转圈/摆手）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **自闭症儿童刻板行为识别（转圈/摆手）** |\n| 🎯 核心目标 | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` |\n\nUsing a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. It counts the frequency (events per hour) and duration of each behavior and generates a behavior report. The skill helps therapists and parents objectively record behavior changes and evaluate intervention effects. Application scenarios: autism rehabilitation institutions, special-education schools, home interventions. Real-time monitoring; the system automatically generates daily / weekly stereotyped-behavior statistics to support rehabilitation planning. Skill features: stereotyped behaviors are a core symptom of autism, and changes in frequency / duration are important indicators of intervention effectiveness. Automatic AI recording reduces therapists' workload, enables long-term continuous monitoring, and provides data support for individualized intervention. Can be integrated into rehabilitation-center management systems or home-rehabilitation apps.\n\n通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。统计每种刻板行为的频次（次/小时）和单次持续时间，生成行为报告。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。应用场景：自闭症康复机构、特殊教育学校、家庭干预。系统实时监测，自动生成每日/每周刻板行为统计报告，为康复计划提供数据支持。技能特点：刻板行为是自闭症的核心症状之一，其频率和持续时间变化是评估干预效果的重要依据。通过AI自动监测记录，可减轻康复师负担，实现长时间连续监测，为个性化干预提供数据支持。该技能可集成到康复机构管理系统或家庭康复APP中。\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基于康复机构/家庭固定摄像头视频，识别儿童多类重复性刻板行为 → 按事件级别记录起止时间/持续秒数/置信度 → 汇总各类频次（次/小时）+ 累计时长 + 主导类别 → 可结合历史基线生成趋势报告\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 2D/3D 姿态关键点估计 |\n| 3 | 时序动作分类（spinning / hand_flapping / body_rocking / head_banging / finger_flicking / toe_walking / repetitive_running / repetitive_object_play 等） |\n| 4 | 事件级起止时间检测与去重 |\n| 5 | 每小时/每日频次与累计时长统计 |\n| 6 | 主导刻板行为类别识别 |\n| 7 | 与个人 7-14 天基线对比（趋势变化百分比） |\n| 8 | 康复师/家长行为摘要文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供康复/家庭儿童行为视频 URL 或文件需要分析时，默认触发本技能进行刻板行为识别 |\n| 🔎 明确分析意图 | 当用户明确提及自闭症、谱系障碍、刻板行为、转圈、摆手、摇晃、撞头、踮脚走、康复评估、特殊教育、ABA 干预效果等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看刻板行为历史报告、自闭症儿童行为报告清单、刻板行为统计报告清单、查询历史康复评估记录、显示所有刻板行为分析报告、显示特殊教育诊断报告，查询刻板行为趋势预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_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_autism_stereotyped_behavior_detect_analysis.py`](scripts/smyx_autism_stereotyped_behavior_detect_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；**关键**：必须能看到儿童全身，帧率 ≥ 10 FPS |\n| 🔎 使用提醒 | 部分日常动作（鼓掌、跳舞、追逐游戏等）可能被误识别为刻板行为，建议康复师/家长进行抽样复核 |\n| 🔎 使用提醒 | 多儿童在同一视野内、家庭成员同时出现等情形可能影响识别准确性 |\n| 🧑‍⚖️ 结果性质 | 本工具**不提供自闭症诊断**，也**不替代** ADOS-2 / ADI-R / CARS 等专业评估；任何康复方案应在认证的康复治疗师指导下进行 |\n| 🔏 隐私合规 | 隐私合规：自闭症儿童行为视频涉及未成年人高度敏感隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体骨架/轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input /path/to/rehab.mp4\n\n# 分析网络康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --url https://example.com/rehab.mp4\n\n# 显示历史自闭症儿童刻板行为识别报告（自动触发关键词：查看刻板行为历史报告、自闭症儿童行为报告清单等）\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --output result.json\n```\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-autism-stereotyped-behavior-detect-analysis\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1782837511063\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_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` - 自闭症儿童刻板行为识别（转圈/摆手）\n\n## 输入约束\n\n- 摄像头：康复机构 / 特殊教育学校 / 家庭固定摄像头，覆盖儿童主要活动区域，**能看到全身**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS）；分辨率 ≥ 480p；光照稳定\n- 多儿童场景下建议结合外观特征锁定主目标（如儿童穿着特定颜色衣物）\n- 视频时长建议 ≥ 5 分钟，时序动作识别窗口需要足够样本\n- 隐私敏感场景可启用人体骨架模式\n\n## 刻板行为类别（支持扩展）\n\n| behavior_class | 中文 | 识别要点 |\n|----------------|------|----------|\n| `spinning` | 转圈 | 身体围绕垂直轴连续旋转 ≥ 360° |\n| `hand_flapping` | 摆手 | 手臂/手腕非功能性高频重复摆动 |\n| `body_rocking` | 摇晃 | 躯干前后/左右有节律摆动 |\n| `head_banging` | 撞头 | 头部反复触碰墙/家具（高优先级） |\n| `finger_flicking` | 手指弹打 | 手指反复快速弹打 |\n| `toe_walking` | 踮脚走 | 持续脚尖着地走路 |\n| `repetitive_running` | 重复奔跑 | 沿固定路线反复短距离奔跑 |\n| `repetitive_object_play` | 重复操作物体 | 反复开关、拍打、排列固定物体 |\n\n## 关键观测指标\n\n- `subject_detected` - 是否检测到儿童\n- `pose_keypoints_visible` - 关键点是否充分可见\n- `behavior_events` - 行为事件列表（含 behavior_class / start_time / end_time / duration_sec / confidence）\n- `per_class_count_hourly` - 每类行为每小时频次（次/小时）\n- `per_class_total_duration_today_sec` - 每类行为当日累计持续时间\n- `total_stereotyped_duration_today_sec` - 当日累计所有刻板行为时长\n- `dominant_behavior_class` - 当日主导刻板行为类别\n\n## 历史基线字段（可选）\n\n- `baseline_window_days` - 基线窗口（默认 7-14 天）\n- `baseline_per_class_avg_hourly` - 各类行为每小时基线均值\n- `baseline_per_class_std_hourly` - 各类行为每小时标准差\n\n## 输出字段（参考）\n\n- `subject_detected` / `pose_keypoints_visible`\n- `behavior_events` - 完整事件序列\n- `summary_metrics` - 汇总指标（per_class_count_hourly / per_class_total_duration_today_sec / total_stereotyped_duration_today_sec / dominant_behavior_class）\n- `trend_vs_baseline` - 当前 vs 基线变化（per_class_delta_pct）\n- `intervention_hint` - 用于康复师/家长的方向性参考（descriptive_only，**不构成处方**）\n- `report_message` - 文本摘要（如\"今日转圈 14 次，摆手 23 次，相比基线下降 30%，建议康复师评估当前干预方案\"）\n\n> 仅输出基于视觉的客观行为统计，**不提供自闭症诊断、量表打分、康复处方**；任何诊断与干预方案必须由专业医生/认证康复治疗师评估制定。\n\nFile v1.0.3:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.3:scripts/config.yaml\n\n{}\n\nFile v1.0.3:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.3:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.3:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  ba...","readmeExcerpt":"Skill: Autism Stereotyped Behavior Detection (Spinning / Hand-Flapping) | 自闭症儿童刻板行为识别（转圈/摆手） Owner: 18072937735 Summary: Using a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement)","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input /path/to/rehab.mp4\n\n# 分析网络康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --url https://example.com/rehab.mp4\n\n# 显示历史自闭症儿童刻板行为识别报告（自动触发关键词：查看刻板行为历史报告、自闭症儿童行为报告清单等）\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --output result.json"},{"language":"bash","snippet":"python -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input /path/to/rehab.mp4\n\n# 分析网络康复/家庭儿童行为视频\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --url https://example.com/rehab.mp4\n\n# 显示历史自闭症儿童刻板行为识别报告（自动触发关键词：查看刻板行为历史报告、自闭症儿童行为报告清单等）\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_autism_stereotyped_behavior_detect_analysis --input rehab.mp4 --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"smyx-autism-stereotyped-behavior-detect-analysis\"\ndescription: \"Using a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。\"\nversion: \"1.0.14\"\nlicense: \"MIT-0\"\n---\n\n# 🧩 Autism Stereotyped Behavior Detection (Spinning / Hand-Flapping) | 自闭症儿童刻板行为识别（转圈/摆手）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **自闭症儿童刻板行为识别（转圈/摆手）** |\n| 🎯 核心目标 | 通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` |\n\nUsing a fixed camera in rehabilitation centers or homes, the system analyzes children's behavior videos with pose estimation and temporal action detection to recognize repetitive stereotyped behaviors, including spinning (body rotation ≥ 360°), hand flapping (non-functional repetitive arm movement), body rocking (rhythmic forward-backward or side-to-side trunk motion), etc. It counts the frequency (events per hour) and duration of each behavior and generates a behavior report. The skill helps therapists and parents objectively record behavior changes and evaluate intervention effects. Application scenarios: autism rehabilitation institutions, special-education schools, home interventions. Real-time monitoring; the system automatically generates daily / weekly stereotyped-behavior statistics to support rehabilitation planning. Skill features: stereotyped behaviors are a core symptom of autism, and changes in frequency / duration are important indicators of intervention effectiveness. Automatic AI recording reduces therapists' workload, enables long-term continuous monitoring, and provides data support for individualized intervention. Can be integrated into rehabilitation-center management systems or home-rehabilitation apps.\n\n通过康复机构或家庭固定摄像头，分析儿童行为视频，利用姿态估计和时序动作检测技术识别重复性刻板动作，包括转圈（身体旋转360°以上）、摆手（手臂非功能性重复摆动）、摇晃（躯干前后或左右有节律摆动）等。统计每种刻板行为的频次（次/小时）和单次持续时间，生成行为报告。该技能可辅助康复师和家长客观记录行为变化，评估干预效果。应用场景：自闭症康复机构、特殊教育学校、家庭干预。系统实时监测，自动生成每日/每周刻板行为统计报告，为康复计划提供数据支持。技能特点：刻板行为是自闭症的核心症状之一，其频率和持续时间变化是评估干预效果的重要依据。通过AI自动监测记录，可减轻康复师负担，实现长时间连续监测，为个性化干预提供数据支持。该技能可集成到康复机构管理系统或家庭康复APP中。\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## 🎯 任务目标 "},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-autism-stereotyped-behavior-detect-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1790712873384\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_AUTISM_STEREOTYPED_BEHAVIOR_DETECT_ANALYSIS` - 自闭症儿童刻板行为识别（转圈/摆手）\n\n## 输入约束\n\n- 摄像头：康复机构 / 特殊教育学校 / 家庭固定摄像头，覆盖儿童主要活动区域，**能看到全身**\n- 帧率 ≥ 10 FPS（推荐 15-30 FPS）；分辨率 ≥ 480p；光照稳定\n- 多儿童场景下建议结合外观特征锁定主目标（如儿童穿着特定颜色衣物）\n- 视频时长建议 ≥ 5 分钟，时序动作识别窗口需要足够样本\n- 隐私敏感场景可启用人体骨架模式\n\n## 刻板行为类别（支持扩展）\n\n| behavior_class | 中文 | 识别要点 |\n|----------------|------|----------|\n| `spinning` | 转圈 | 身体围绕垂直轴连续旋转 ≥ 360° |\n| `hand_flapping` | 摆手 | 手臂/手腕非功能性高频重复摆动 |\n| `body_rocking` | 摇晃 | 躯干前后/左右有节律摆动 |\n| `head_banging` | 撞头 | 头部反复触碰墙/家具（高优先级） |\n| `finger_flicking` | 手指弹打 | 手指反复快速弹打 |\n| `toe_walking` | 踮脚走 | 持续脚尖着地走路 |\n| `repetitive_running` | 重复奔跑 | 沿固定路线反复短距离奔跑 |\n| `repetitive_object_play` | 重复操作物体 | 反复开关、拍打、排列固定物体 |\n\n## 关键观测指标\n\n- `subject_detected` - 是否检测到儿童\n- `pose_keypoints_visible` - 关键点是否充分可见\n- `behavior_events` - 行为事件列表（含 behavior_class / start_time / end_time / duration_sec / confidence）\n- `per_class_count_hourly` - 每类行为每小时频次（次/小时）\n- `per_class_total_duration_today_sec` - 每类行为当日累计持续时间\n- `total_stereotyped_duration_today_sec` - 当日累计所有刻板行为时长\n- `dominant_behavior_class` - 当日主导刻板行为类别\n\n## 历史基线字段（可选）\n\n- `baseline_window_days` - 基线窗口（默认 7-14 天）\n- `baseline_per_class_avg_hourly` - 各类行为每小时基线均值\n- `baseline_per_class_std_hourly` - 各类行为每小时标准差\n\n## 输出字段（参考）\n\n- `subject_detected` / `pose_keypoints_visible`\n- `behavior_events` - 完整事件序列\n- `summary_metrics` - 汇总指标（per_class_count_hourly / per_class_total_duration_today_sec / total_stereotyped_duration_today_sec / dominant_behavior_class）\n- `trend_vs_baseline` - 当前 vs 基线变化（per_class_delta_pct）\n- `intervention_hint` - 用于康复师/家长的方向性参考（descriptive_only，**不构成处方**）\n- `report_message` - 文本摘要（如\"今日转圈 14 次，摆手 23 次，相比基线下降 30%，建议康复师评估当前干预方案\"）\n\n> 仅输出基于视觉的客观行为统计，**不提供自闭症诊断、量表打分、康复处方**；任何诊断与干预方案必须由专业医生/认证康复治疗师评估制定。"},{"path":"skills/smyx_analysis/references/api_doc.md","content":"# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |"},{"path":"scripts/config.yaml","content":"{}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1128,"uniquenessScore":43,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T21:50:14.714Z","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-09T21:50:14.714Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T08:22:06.847Z","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"}]}}}