{"id":"683582c5-28cb-4faa-ba98-278c247b804d","entityType":"agent","slug":"clawhub-18072937735-smyx-turtle-pneumonia-symptom-detection-ana","name":"Turtle Pneumonia Symptom (Open-Mouth Breathing) Detection | 龟类张嘴呼吸（肺炎征兆）识别","canonicalUrl":"https://www.xpersona.co/agent/clawhub-18072937735-smyx-turtle-pneumonia-symptom-detection-ana","canonicalPath":"/agent/clawhub-18072937735-smyx-turtle-pneumonia-symptom-detection-ana","generatedAt":"2026-10-10T09:09:26.219Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T01:23:45.777Z","emptyReason":null},"description":"Through fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.8K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-turtle-pneumonia-symptom-detection-analysis","sourceUrl":"https://clawhub.ai/18072937735/smyx-turtle-pneumonia-symptom-detection-analysis","homepage":"https://clawhub.ai/18072937735/skills/smyx-turtle-pneumonia-symptom-detection-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/18072937735/smyx-turtle-pneumonia-symptom-detection-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/18072937735/skills/smyx-turtle-pneumonia-symptom-detection-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":65,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Turtle Pneumonia Symptom (Open-Mouth Breathing) Detection | 龟类张嘴呼吸（肺炎征兆）识别 technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust m"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T01:23:45.777Z","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-10T01:23:45.777Z","emptyReason":null},"stars":null,"forks":null,"downloads":1808,"packageName":null,"latestVersion":"1.0.12","tractionLabel":"1.8K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T01:23:45.777Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T01:23:45.777Z","lastCrawledAt":"2026-10-10T01:23:45.777Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T01:23:45.777Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.12","createdAt":"2026-10-04T04:59:25.416Z","changelog":"- Updated documentation (SKILL.md) with revised version and content. - Removed file: skill-card.md. - Made adjustments to configuration in skills/smyx_common/scripts/config.yaml.","fileCount":31,"zipByteSize":44920},{"version":"1.0.11","createdAt":"2026-09-13T13:12:35.914Z","changelog":"Version 1.0.11 Changelog: - Documentation updated: SKILL.md revised, including version metadata and potentially documentation improvements or minor content changes. - Removed skill-card.md file. - No changes to code or functional logic; update is documentation-only.","fileCount":31,"zipByteSize":45391},{"version":"1.0.10","createdAt":"2026-09-01T19:55:30.179Z","changelog":"- Updated version information in SKILL.md to 1.0.13. - Removed the file skill-card.md from the project. - No changes to code or functionality; documentation updated only.","fileCount":31,"zipByteSize":45183},{"version":"1.0.9","createdAt":"2026-08-16T20:58:27.648Z","changelog":"smyx-turtle-pneumonia-symptom-detection-analysis 1.0.9 changelog - Updated SKILL.md documentation for improved versioning and more detailed description. - Modified configuration file skills/smyx_common/scripts/config.yaml. - Removed the file skill-card.md.","fileCount":31,"zipByteSize":45077},{"version":"1.0.8","createdAt":"2026-08-10T14:45:34.072Z","changelog":"- Updated the SKILL.md documentation with minor version bump from 1.0.9 to 1.0.10. - Removed the skill-card.md file. - No changes to skill logic or code; documentation only. - Version and documentation now accurately reflect the latest state.","fileCount":31,"zipByteSize":45072},{"version":"1.0.7","createdAt":"2026-08-07T21:37:37.002Z","changelog":"Version 1.0.7 - Removed the file skill-card.md from the project. - No other user-facing features or code changes.","fileCount":31,"zipByteSize":45021},{"version":"1.0.6","createdAt":"2026-08-01T12:24:39.950Z","changelog":"smyx-turtle-pneumonia-symptom-detection-analysis 1.0.9 - Updated SKILL.md with new version (1.0.9) and minor content adjustments. - Removed the skill-card.md file. - No significant functional changes or new features added; documentation only.","fileCount":31,"zipByteSize":45038},{"version":"1.0.5","createdAt":"2026-07-13T18:30:27.314Z","changelog":"- Removed the file: skill-card.md - No other changes to core functionality or capabilities. - Version increased from 1.0.5 to 1.0.6.","fileCount":31,"zipByteSize":45199}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-turtle-pneumonia-symptom-detection-analysis","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-turtle-pneumonia-symptom-detection-analysis` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/18072937735/smyx-turtle-pneumonia-symptom-detection-analysis before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-turtle-pneumonia-symptom-detection-ana/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-turtle-pneumonia-symptom-detection-ana/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-turtle-pneumonia-symptom-detection-ana/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-turtle-pneumonia-symptom-detection-ana/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-turtle-pneumonia-symptom-detection-ana/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-turtle-pneumonia-symptom-detection-ana/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T09:09:26.211Z"}},"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-turtle-pneumonia-symptom-detection-ana/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-turtle-pneumonia-symptom-detection-ana/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-turtle-pneumonia-symptom-detection-ana/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-turtle-pneumonia-symptom-detection-ana/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T01:23:45.777Z","emptyReason":null},"readme":"Skill: Turtle Pneumonia Symptom (Open-Mouth Breathing) Detection | 龟类张嘴呼吸（肺炎征兆）识别\n\nOwner: 18072937735\n\nSummary: Through fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。\n\nTags: latest:1.0.12\n\nVersion history:\n\nv1.0.12 | 2026-10-04T04:59:25.416Z | auto\n\n- Updated documentation (SKILL.md) with revised version and content.\n- Removed file: skill-card.md.\n- Made adjustments to configuration in skills/smyx_common/scripts/config.yaml.\n\nv1.0.11 | 2026-09-13T13:12:35.914Z | auto\n\nVersion 1.0.11 Changelog:\n\n- Documentation updated: SKILL.md revised, including version metadata and potentially documentation improvements or minor content changes.\n- Removed skill-card.md file.\n- No changes to code or functional logic; update is documentation-only.\n\nv1.0.10 | 2026-09-01T19:55:30.179Z | auto\n\n- Updated version information in SKILL.md to 1.0.13.\n- Removed the file skill-card.md from the project.\n- No changes to code or functionality; documentation updated only.\n\nv1.0.9 | 2026-08-16T20:58:27.648Z | auto\n\nsmyx-turtle-pneumonia-symptom-detection-analysis 1.0.9 changelog\n\n- Updated SKILL.md documentation for improved versioning and more detailed description.\n- Modified configuration file skills/smyx_common/scripts/config.yaml.\n- Removed the file skill-card.md.\n\nv1.0.8 | 2026-08-10T14:45:34.072Z | auto\n\n- Updated the SKILL.md documentation with minor version bump from 1.0.9 to 1.0.10.\n- Removed the skill-card.md file.\n- No changes to skill logic or code; documentation only.\n- Version and documentation now accurately reflect the latest state.\n\nv1.0.7 | 2026-08-07T21:37:37.002Z | auto\n\nVersion 1.0.7\n\n- Removed the file skill-card.md from the project.\n- No other user-facing features or code changes.\n\nv1.0.6 | 2026-08-01T12:24:39.950Z | auto\n\nsmyx-turtle-pneumonia-symptom-detection-analysis 1.0.9\n\n- Updated SKILL.md with new version (1.0.9) and minor content adjustments.\n- Removed the skill-card.md file.\n- No significant functional changes or new features added; documentation only.\n\nv1.0.5 | 2026-07-13T18:30:27.314Z | auto\n\n- Removed the file: skill-card.md\n- No other changes to core functionality or capabilities.\n- Version increased from 1.0.5 to 1.0.6.\n\nv1.0.4 | 2026-07-11T17:13:47.869Z | auto\n\n- Version updated from 1.0.4 to 1.0.6.\n- Internal scripts updated: changes in skills/smyx_common/scripts/config.py and skills/smyx_common/scripts/util.py.\n- Documentation improved in SKILL.md with expanded or revised guidance.\n- Obsolete file skill-card.md has been removed.\n\nv1.0.3 | 2026-07-02T01:15:29.888Z | auto\n\n- Updated version to 1.0.4.\n- Documentation improvements: SKILL.md updated for clarity and workflow details.\n- Removed obsolete file (skill-card.md).\n- Internal scripts (dao.py, util.py) changed; see repository history for implementation details.\n- No changes to external API, parameters, or user-facing features.\n\nv1.0.2 | 2026-06-24T18:54:30.968Z | auto\n\n**Summary:**  \nThis update improves privacy/identity handling and streamlines cloud report querying.\n\n- Removed the requirement for users to input or provide open-id/identity identifiers directly; now handled automatically and invisibly by the system.\n- Strengthened privacy controls: identity parameters are never exposed or listed as user-facing inputs, nor shown in any outputs, prompts, or error messages.\n- Cloud-based historical report querying is further enforced: all queries must go through the cloud API; local or memory-based report reading is strictly prohibited.\n- Documentation is clarified and reorganized for easier understanding, with updated workflow and clearer parameter instructions.\n- Obsolete files removed and redundant content streamlined.\n\nv1.0.1 | 2026-06-17T06:33:33.030Z | auto\n\nVersion 1.0.2 – Maintenance and structure update.\n\n- Updated internal file structure; scripts and config files now located directly under a unified scripts/ directory.\n- Revised open-id lookup priority: skill-specific config now at scripts/config.yaml, workspace-common config remains unchanged.\n- SKILL.md updated for clarity and to match new directory structure, including open-id retrieval rules.\n- Removed obsolete documentation file (skill-card.md).\n- Minor requirement and script adjustments to align with structural changes.\n\nv1.0.0 | 2026-06-09T18:34:48.307Z | auto\n\nsmyx-turtle-pneumonia-symptom-detection-analysis 1.0.1\n\n- Improved description and clear documentation for pneumonia risk detection in turtles using enclosure cameras.\n- Expanded details on symptom detection (mouth opening frequency, mucus/secretions) and exclusion of normal behaviors (feeding, basking).\n- Added strict open-id acquisition and workflow constraints for data privacy and report querying.\n- Introduced multi-level alert strategy with defined thresholds and scenario-based response levels.\n- Clarified requirements for image quality, observation time, and metadata for accurate analysis and risk assessment.\n\nArchive index:\n\nArchive v1.0.12: 31 files, 44920 bytes\n\nFiles: references/api_doc.md (6346b), scripts/__init__.py (76b), scripts/config.py (705b), scripts/config.yaml (3b), scripts/skill.py (591b), scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py (3727b), skill-card.md (2141b), SKILL.md (19029b), 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-turtle-pneumonia-symptom-detection-analysis\"\ndescription: \"Through fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。\"\nversion: \"1.0.17\"\nlicense: \"MIT-0\"\n---\n\n# 🐢 Turtle Pneumonia Symptom (Open-Mouth Breathing) Detection | 龟类张嘴呼吸（肺炎征兆）识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **龟类张嘴呼吸（肺炎征兆）识别** |\n| 🎯 核心目标 | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` |\n\nThrough fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. When any of these symptoms appear alone or together, the system outputs a 'pneumonia risk warning', prompting the keeper to check environmental temperature and water quality and isolate/treat promptly. This skill helps early detection of respiratory infections in turtles and reduces mortality. Application scenarios: home turtle tanks, breeding ponds, animal hospitals. The system monitors in real time and pushes alerts when abnormal breathing behavior is detected. Skill features: turtle pneumonia has high mortality, and early symptoms (open-mouth breathing, mucus) are often overlooked. AI-based automatic monitoring helps keepers detect and intervene early, improving cure rate. This skill can be integrated into smart turtle-tank cameras or reptile health management apps.\n\n通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。该技能有助于早期发现龟类的呼吸道感染，降低死亡率。应用场景：家庭龟缸、养殖池、宠物医院。系统实时监测，当检测到异常呼吸行为时推送提醒。技能特点：龟类肺炎死亡率高，早期症状（张嘴呼吸、黏液）常被忽视。通过 AI 自动监测，可帮助饲养者及早发现并干预，提高治愈率。该技能可集成到智能龟缸摄像头或爬宠健康管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的爬行动物呼吸道健康监测 AI。你的任务是分析龟缸固定摄像头的视频（正对头颈部或侧前 30°，分辨率 ≥ 1080p——口鼻黏液为丝状/反光点细节需高清，帧率 ≥ 25 FPS——开合动作快需高帧率），围绕\"非进食状态下的呼吸征兆\"展开三组核心检测：① **口部开合频率**：每分钟开合次数 + 平均时长 + 开合幅度，**> 10 次/分钟触发风险门槛**；② **口鼻黏液与分泌物**：口腔内反光点 + 丝状物 + 鼻孔气泡 + 鼻分泌物（透明清涕 / 黄脓 / 血染）；③ **呼吸节律与姿态**：头颈持续伸展不缩 + **张嘴+头颈伸展典型肺炎姿态** + 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号） + 嗜睡评分。按 **species 适宜温度基线**（热带物种苏卡达/缅陆适温高、温带物种草龟/黄缘适温中等、深水龟 vs 浅水龟节律不同）匹配，按 7 类综合场景判定（respiration_normal / respiration_mild_anomaly / **pneumonia_risk_mild** / **pneumonia_risk_moderate** / **pneumonia_risk_severe** / respiration_within_basking_context / respiration_signal_unreliable），按 4 级提醒策略递进（Level 1 入库 → Level 2 复测水温气温+加强观察 24-48h → Level 3 立即升温至物种推荐高线+隔离温暖干燥箱+干养+联系兽医 → Level 4 **🚨 立即干养+升温保暖+联系兽医**——肺炎急症可短期致死）。**核心生理性上下文必须排除**：**进食时口部开合属正常**（必须排除进食窗口，由用户标注或自动识别）；**水栖龟水下口部开合为换气吐泡属正常**（必须等浮出水面或晒台时分析）；**晒背蒸发期可能开口属正常**；**消化期呼吸短促**。物种特异性硬约束：必须按物种适宜温度基线判定（**严禁通用阈值盲判**）。头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食时段未排除 / 分辨率 < 1080p → 必须返回 `respiration_signal_unreliable`。不提供任何疾病诊断，仅输出基于视觉的异常体征识别；**🚨 严禁输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量**；**🚨 严禁输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方**；**🚨 严禁输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法**（仅可提示\"水温/气温调至物种推荐高线，由用户根据物种手册设定\"）；严禁伪造夸大开合频率与黏液检测；严禁越权代用户启停加热棒/UVB/干养水养切换（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头**实时视频**（默认 ≥ 3 分钟连续观察，必须排除进食窗口），识别 7 类综合场景（respiration_normal / respiration_mild_anomaly / pneumonia_risk_mild / pneumonia_risk_moderate / pneumonia_risk_severe / respiration_within_basking_context / respiration_signal_unreliable）→ **四组指标**：口部开合 6 项（**每分钟开合次数** + 单次时长 + 开合幅度 + 置信度 + 进食窗口 + 水下状态）+ 口鼻黏液与分泌物 6 项（**口腔黏液** + 丝状物数量 + **鼻分泌物** + 颜色 + 鼻孔气泡 + 综合置信度）+ 呼吸节律与姿态 5 项（呼吸频率 + 头颈持续伸展 + **张嘴+头颈伸展典型肺炎姿态** + **水栖漂浮倾斜** + 嗜睡评分）+ 排除上下文 6 项（环境温度 + 水温适宜 + 进食 30min 内 + 晒背中 + 蜕皮期 + 繁殖期）→ 4 档提醒级别（info / important / urgent / critical）→ **4 级提醒策略递进**（入库 → 复测水温气温+观察 → 升温隔离干养+联系兽医 → 🚨 立即干养升温+紧急联系兽医）→ 单日提醒上限（Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限**）→ **肺炎风险预警报告**（按 enclosure_id + individual_id + 事件时间戳输出，含开合频率 + 黏液鼻分泌物 + 姿态评分 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 龟头部精准定位与跟踪 |\n| 2 | 口部张合事件检测（嘴角张开 + 喙缘距离 + 时间序列） |\n| 3 | 黏液丝状物检测（颗粒形态学 + 反光点过滤） |\n| 4 | 鼻分泌物检测（鼻孔局部色差 + 气泡检测） |\n| 5 | 头颈伸展度量 |\n| 6 | 水栖龟漂浮姿态识别（壳体倾斜角 + 肺部积液浮力不平衡推断） |\n| 7 | 嗜睡评分 |\n| 8 | 生理性上下文识别（进食 / 水下 / 晒背 / 消化 / 蜕皮 / 繁殖） |\n| 9 | 物种适宜温度门控 |\n| 10 | 图像质量门控（头部缩壳 / 全程水下 / 模糊 / 光照 → unreliable） |\n| 11 | 用户 APP 紧急推送 |\n| 12 | 4 级提醒递进 |\n| 13 | 单日提醒上限（**Level 4 不设上限**） |\n| 14 | 肺炎风险预警报告（按 enclosure_id + individual_id 输出） |\n| 15 | 连续 ≥ 2 次 Level 3+ → 强烈建议联系**专业爬宠兽医**（X 光 + 肺部听诊 + 鼻分泌物镜检/培养） |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供龟缸固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行龟类肺炎征兆识别 |\n| 🔎 明确分析意图 | 当用户明确提及龟张嘴呼吸、龟伸脖子、龟漂浮、龟鼻涕、龟黏液、龟呼吸困难、龟肺炎、URI 等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看龟类肺炎预警历史报告、肺炎风险事件清单、查询历史呼吸异常记录、显示所有龟肺炎报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备龟缸固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行龟类肺炎征兆识别 | 调用 `-m scripts.smyx_turtle_pneumonia_symptom_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地龟缸固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络龟缸固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，龟类肺炎征兆场景默认 `other` | 按需填写 |\n| `--list` | 显示龟类肺炎风险预警历史记录清单 | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py`](scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov，最大 10MB；摄像头需**正对头颈部清晰展示口鼻区域**；**分辨率 ≥ 1080p**（口鼻黏液细节）；帧率 ≥ 25 FPS；**默认 ≥ 3 分钟连续观察**；**必须排除进食时段**；**水栖龟必须浮出水面或晒台上** |\n| 🔎 使用提醒 | **核心采样窗口**：≥ 3 分钟连续观察 |\n| 🔎 使用提醒 | **核心预警门槛**：口部开合 **> 10 次/分钟**（非进食状态下）OR 黏液 OR 鼻分泌物 |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → critical），严重姿态（张嘴+头颈伸展 / 漂浮倾斜 / 黄脓血染鼻涕 / 鼻孔气泡）直接 Level 4 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症可短期致死）** |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册） |\n| 🔎 使用提醒 | **禁止**长期存储完整龟缸视频（≤ 14 天，留口部开合时间序列 + 肺炎关键征兆片段；养殖场/医院按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / UVB / 灯光 / 干养/水养切换；任何环境控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大开合频率、黏液检测、鼻分泌物等指标；所有数据必须基于真实视频帧分析 |\n| 🔎 使用提醒 | **必须**按 **species 适宜温度基线**判定（热带苏卡达/缅陆适温高 / 温带草龟/黄缘适温中等 / 深水龟 vs 浅水龟节律不同）；**严禁通用阈值** |\n| 📚 文档读取 | **必须**考虑生理性上下文（**进食时口部开合属正常 / 水栖龟水下开合为换气吐泡 / 晒背蒸发期可能开口 / 消化期呼吸短促**），必须排除 |\n| 🔎 使用提醒 | **必须**在头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食时段未排除 / 分辨率 < 1080p 时返回 `respiration_signal_unreliable` |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 次 Level 3+ → 强烈建议联系**专业爬宠兽医**（X 光 + 肺部听诊 + 鼻分泌物镜检/培养） |\n| 📜 报告输出 | **必须**：肺炎风险预警报告**按 enclosure_id + individual_id + 事件时间戳输出**，含开合频率 + 黏液鼻分泌物 + 姿态评分 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史肺炎风险预警记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input /path/to/turtle.mp4\n\n# 分析网络龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --url https://example.com/turtle.mp4\n\n# 显示历史肺炎风险预警记录清单（自动触发关键词：查看龟类肺炎预警历史报告等）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --output result.json\n```\n\nFile v1.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-turtle-pneumonia-symptom-detection-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1791089965416\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_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` - 龟类张嘴呼吸（肺炎征兆）识别\n\n## 输入约束\n\n- 摄像头：龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头\n- 分辨率 ≥ 1080p（**口鼻黏液为丝状/反光点细节，需高分辨率**）；帧率 ≥ 25 FPS（开合动作快，需高帧率）\n- 拍摄角度：**正对头颈部**或侧前 30°，必须**清晰展示口鼻区域**（头部缩入壳内时无法分析）\n- 光照：充足且均匀（避免反光过强误判为黏液 / 避免阴影遮挡口鼻）\n- **核心采样窗口**：默认 ≥ 3 分钟连续观察\n- **必须排除进食时段**（进食时口部开合属正常）\n- 水栖龟需在**完全浮出水面或晒台上**时分析（水下口部开合为换气吐泡）\n- 多缸场景按摄像头 ID + 个体 ID 双重绑定\n- **部署时必须录入**：物种、龟类型（水栖/半水栖/陆栖）、水温（水栖必填）、气温、UVB 状态、上次投喂时间戳\n\n## 关键观测信号\n\n### 口部开合\n- `mouth_opening_events_per_minute` - **每分钟口部开合次数**（核心指标，阈值 > 10 次/分钟触发风险）\n- `mouth_opening_duration_ms_avg` - 单次开合平均时长\n- `mouth_opening_amplitude_normalized` - 开合幅度归一化\n- `mouth_opening_confidence` - 开合检测置信度\n- `is_during_feeding_window` - 是否处于进食窗口\n- `is_underwater_aquatic` - 水栖龟是否处于水下\n\n### 口鼻黏液与分泌物\n- `mucus_detected_in_mouth` - **口腔内是否检测到黏液**（反光点 + 丝状物）\n- `mucus_strand_count` - 黏液丝状物数量\n- `nasal_discharge_detected` - **鼻腔是否有分泌物**\n- `nasal_discharge_color` - 分泌物颜色（clear_transparent / yellow_pus / blood_tinged）\n- `bubble_at_nostril` - 鼻孔气泡（肺炎强信号）\n- `mucus_nasal_confidence` - 综合置信度\n\n### 呼吸节律与姿态\n- `breathing_rate_per_minute` - 呼吸频率\n- `neck_extension_persistent` - 头颈持续伸展不缩（呼吸困难强信号）\n- `gaping_with_neck_extension` - **张嘴 + 头颈伸展**（典型肺炎姿态）\n- `floating_tilted_aquatic` - 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号）\n- `lethargy_score_0_5` - 嗜睡/活动减少评分\n\n### 上下文与排除信号\n- `ambient_temperature_c` - 环境温度\n- `water_temperature_appropriate` - 水温是否在物种适宜范围\n- `is_post_feeding_within_30min` - 是否刚进食 30 分钟内\n- `is_during_basking` - 是否处于晒背中\n- `is_during_shedding` - 是否蜕皮期\n- `is_breeding_season` - 是否繁殖期\n\n## 综合判定\n\n- `respiration_normal` - 呼吸行为正常\n- `respiration_mild_anomaly` - 轻度异常（开合 6-10 次/分钟，无黏液）\n- `pneumonia_risk_mild` - **肺炎风险轻度**（开合 > 10 次/分钟 OR 微量黏液）\n- `pneumonia_risk_moderate` - **肺炎风险中度**（开合 > 10 次/分钟 + 黏液 + 鼻清涕）\n- `pneumonia_risk_severe` - **肺炎风险严重**（张嘴+头颈持续伸展 / 黄脓血染鼻涕 / 鼻孔气泡 / 漂浮倾斜）\n- `respiration_within_basking_context` - 晒背上下文正常\n- `respiration_signal_unreliable` - 信号不可靠\n\n## 4 级提醒策略递进\n\n- Level 1：仅入库\n- Level 2（mild_anomaly）：复测水温/气温 + 加强观察 24-48 小时\n- Level 3（mild/moderate）：**立即将水温/气温调至物种推荐高线 + 隔离至温暖干燥养殖箱 + 观察食欲精神 + 立即联系爬宠兽医**\n- Level 4（severe）：**立即干养 + 升温保暖 + 立即联系爬宠兽医**（肺炎急症可短期致死）\n\n## 单日提醒上限\n\n- Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症）**\n\n## 红线约束\n\n- **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等**具体疾病诊断**\n- **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量\n- **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方\n- **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册）\n- **禁止**长期存储完整龟缸视频（≤ 14 天）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / UVB / 干养/水养切换\n- 所有指标必须基于真实视频帧分析；禁止伪造夸大\n- 物种特异性：热带物种适温高、温带物种适温中等、深水龟 vs 浅水龟节律不同 → 按物种基线判定\n- 生理性上下文：进食 / 水下换气 / 晒背蒸发 / 消化期短促 → 必须排除\n- 头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食未排除 / 分辨率 < 1080p → 必须返回 `respiration_signal_unreliable`\n- 必须告知用户：AI 视觉仅供参考，**肺炎确诊需 X 光 + 肺部听诊 + 鼻分泌物镜检/培养，由专业爬宠兽医执行**\n\n## 输出报告字段\n\n- `report_date`、`enclosure_id`、`individual_id`、`species`、`turtle_type`、`water_temperature_c`、`ambient_temperature_c`、`mouth_opening_events_per_minute`、`mucus_detected_in_mouth`、`nasal_discharge_detected`、`nasal_discharge_color`、`bubble_at_nostril`、`gaping_with_neck_extension`、`floating_tilted_aquatic`、`composite_scene`、`alert_level`、`recommended_actions`（不含具体药物剂量、抗生素品牌、精确升温温度数值）、`disclaimer`\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 turtle enclosure camera footage for open-mouth breathing and mouth or nasal discharge, then provides visual pneumonia-risk warnings.\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\nTurtle keepers, breeders, and reptile-care teams use camera footage to spot potentially concerning breathing or discharge and decide when to seek veterinary assessment.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Camera images, videos, and report history are processed by the configured cloud service.\n\nMitigation: Avoid sensitive footage unless the provider's retention and deletion practices are acceptable.\n\nRisk: The skill creates and reuses a persistent local identity and authentication tokens for report history without an explicit setup prompt.\n\nMitigation: Review or isolate the workspace data directory before use and manage access to saved credentials.\n\nRisk: Visual pneumonia-risk warnings may be mistaken for a veterinary diagnosis.\n\nMitigation: Treat reports as preliminary warnings and consult a qualified reptile veterinarian for diagnosis and care.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/18072937735/skills/smyx-turtle-pneumonia-symptom-detection-analysis)\n- [Skill API reference](artifact/references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Text, JSON, Guidance]\n\n**Output Format:** [Text with structured analysis results and risk guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include alert levels, suggested actions, and report access information.]\n\n## Skill Version(s):\n\n1.0.12 (source: server-resolved ClawHub release; artifact frontmatter lists 1.0.17)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 45391 bytes\n\nFiles: references/api_doc.md (6346b), scripts/__init__.py (76b), scripts/config.py (705b), scripts/config.yaml (3b), scripts/skill.py (591b), scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py (3727b), skill-card.md (3312b), SKILL.md (19029b), 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.11:SKILL.md\n\n---\nname: \"smyx-turtle-pneumonia-symptom-detection-analysis\"\ndescription: \"Through fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。\"\nversion: \"1.0.14\"\nlicense: \"MIT-0\"\n---\n\n# 🐢 Turtle Pneumonia Symptom (Open-Mouth Breathing) Detection | 龟类张嘴呼吸（肺炎征兆）识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **龟类张嘴呼吸（肺炎征兆）识别** |\n| 🎯 核心目标 | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` |\n\nThrough fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. When any of these symptoms appear alone or together, the system outputs a 'pneumonia risk warning', prompting the keeper to check environmental temperature and water quality and isolate/treat promptly. This skill helps early detection of respiratory infections in turtles and reduces mortality. Application scenarios: home turtle tanks, breeding ponds, animal hospitals. The system monitors in real time and pushes alerts when abnormal breathing behavior is detected. Skill features: turtle pneumonia has high mortality, and early symptoms (open-mouth breathing, mucus) are often overlooked. AI-based automatic monitoring helps keepers detect and intervene early, improving cure rate. This skill can be integrated into smart turtle-tank cameras or reptile health management apps.\n\n通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。该技能有助于早期发现龟类的呼吸道感染，降低死亡率。应用场景：家庭龟缸、养殖池、宠物医院。系统实时监测，当检测到异常呼吸行为时推送提醒。技能特点：龟类肺炎死亡率高，早期症状（张嘴呼吸、黏液）常被忽视。通过 AI 自动监测，可帮助饲养者及早发现并干预，提高治愈率。该技能可集成到智能龟缸摄像头或爬宠健康管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的爬行动物呼吸道健康监测 AI。你的任务是分析龟缸固定摄像头的视频（正对头颈部或侧前 30°，分辨率 ≥ 1080p——口鼻黏液为丝状/反光点细节需高清，帧率 ≥ 25 FPS——开合动作快需高帧率），围绕\"非进食状态下的呼吸征兆\"展开三组核心检测：① **口部开合频率**：每分钟开合次数 + 平均时长 + 开合幅度，**> 10 次/分钟触发风险门槛**；② **口鼻黏液与分泌物**：口腔内反光点 + 丝状物 + 鼻孔气泡 + 鼻分泌物（透明清涕 / 黄脓 / 血染）；③ **呼吸节律与姿态**：头颈持续伸展不缩 + **张嘴+头颈伸展典型肺炎姿态** + 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号） + 嗜睡评分。按 **species 适宜温度基线**（热带物种苏卡达/缅陆适温高、温带物种草龟/黄缘适温中等、深水龟 vs 浅水龟节律不同）匹配，按 7 类综合场景判定（respiration_normal / respiration_mild_anomaly / **pneumonia_risk_mild** / **pneumonia_risk_moderate** / **pneumonia_risk_severe** / respiration_within_basking_context / respiration_signal_unreliable），按 4 级提醒策略递进（Level 1 入库 → Level 2 复测水温气温+加强观察 24-48h → Level 3 立即升温至物种推荐高线+隔离温暖干燥箱+干养+联系兽医 → Level 4 **🚨 立即干养+升温保暖+联系兽医**——肺炎急症可短期致死）。**核心生理性上下文必须排除**：**进食时口部开合属正常**（必须排除进食窗口，由用户标注或自动识别）；**水栖龟水下口部开合为换气吐泡属正常**（必须等浮出水面或晒台时分析）；**晒背蒸发期可能开口属正常**；**消化期呼吸短促**。物种特异性硬约束：必须按物种适宜温度基线判定（**严禁通用阈值盲判**）。头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食时段未排除 / 分辨率 < 1080p → 必须返回 `respiration_signal_unreliable`。不提供任何疾病诊断，仅输出基于视觉的异常体征识别；**🚨 严禁输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量**；**🚨 严禁输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方**；**🚨 严禁输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法**（仅可提示\"水温/气温调至物种推荐高线，由用户根据物种手册设定\"）；严禁伪造夸大开合频率与黏液检测；严禁越权代用户启停加热棒/UVB/干养水养切换（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头**实时视频**（默认 ≥ 3 分钟连续观察，必须排除进食窗口），识别 7 类综合场景（respiration_normal / respiration_mild_anomaly / pneumonia_risk_mild / pneumonia_risk_moderate / pneumonia_risk_severe / respiration_within_basking_context / respiration_signal_unreliable）→ **四组指标**：口部开合 6 项（**每分钟开合次数** + 单次时长 + 开合幅度 + 置信度 + 进食窗口 + 水下状态）+ 口鼻黏液与分泌物 6 项（**口腔黏液** + 丝状物数量 + **鼻分泌物** + 颜色 + 鼻孔气泡 + 综合置信度）+ 呼吸节律与姿态 5 项（呼吸频率 + 头颈持续伸展 + **张嘴+头颈伸展典型肺炎姿态** + **水栖漂浮倾斜** + 嗜睡评分）+ 排除上下文 6 项（环境温度 + 水温适宜 + 进食 30min 内 + 晒背中 + 蜕皮期 + 繁殖期）→ 4 档提醒级别（info / important / urgent / critical）→ **4 级提醒策略递进**（入库 → 复测水温气温+观察 → 升温隔离干养+联系兽医 → 🚨 立即干养升温+紧急联系兽医）→ 单日提醒上限（Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限**）→ **肺炎风险预警报告**（按 enclosure_id + individual_id + 事件时间戳输出，含开合频率 + 黏液鼻分泌物 + 姿态评分 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 龟头部精准定位与跟踪 |\n| 2 | 口部张合事件检测（嘴角张开 + 喙缘距离 + 时间序列） |\n| 3 | 黏液丝状物检测（颗粒形态学 + 反光点过滤） |\n| 4 | 鼻分泌物检测（鼻孔局部色差 + 气泡检测） |\n| 5 | 头颈伸展度量 |\n| 6 | 水栖龟漂浮姿态识别（壳体倾斜角 + 肺部积液浮力不平衡推断） |\n| 7 | 嗜睡评分 |\n| 8 | 生理性上下文识别（进食 / 水下 / 晒背 / 消化 / 蜕皮 / 繁殖） |\n| 9 | 物种适宜温度门控 |\n| 10 | 图像质量门控（头部缩壳 / 全程水下 / 模糊 / 光照 → unreliable） |\n| 11 | 用户 APP 紧急推送 |\n| 12 | 4 级提醒递进 |\n| 13 | 单日提醒上限（**Level 4 不设上限**） |\n| 14 | 肺炎风险预警报告（按 enclosure_id + individual_id 输出） |\n| 15 | 连续 ≥ 2 次 Level 3+ → 强烈建议联系**专业爬宠兽医**（X 光 + 肺部听诊 + 鼻分泌物镜检/培养） |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供龟缸固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行龟类肺炎征兆识别 |\n| 🔎 明确分析意图 | 当用户明确提及龟张嘴呼吸、龟伸脖子、龟漂浮、龟鼻涕、龟黏液、龟呼吸困难、龟肺炎、URI 等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看龟类肺炎预警历史报告、肺炎风险事件清单、查询历史呼吸异常记录、显示所有龟肺炎报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备龟缸固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行龟类肺炎征兆识别 | 调用 `-m scripts.smyx_turtle_pneumonia_symptom_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地龟缸固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络龟缸固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，龟类肺炎征兆场景默认 `other` | 按需填写 |\n| `--list` | 显示龟类肺炎风险预警历史记录清单 | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py`](scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov，最大 10MB；摄像头需**正对头颈部清晰展示口鼻区域**；**分辨率 ≥ 1080p**（口鼻黏液细节）；帧率 ≥ 25 FPS；**默认 ≥ 3 分钟连续观察**；**必须排除进食时段**；**水栖龟必须浮出水面或晒台上** |\n| 🔎 使用提醒 | **核心采样窗口**：≥ 3 分钟连续观察 |\n| 🔎 使用提醒 | **核心预警门槛**：口部开合 **> 10 次/分钟**（非进食状态下）OR 黏液 OR 鼻分泌物 |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → critical），严重姿态（张嘴+头颈伸展 / 漂浮倾斜 / 黄脓血染鼻涕 / 鼻孔气泡）直接 Level 4 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症可短期致死）** |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册） |\n| 🔎 使用提醒 | **禁止**长期存储完整龟缸视频（≤ 14 天，留口部开合时间序列 + 肺炎关键征兆片段；养殖场/医院按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / UVB / 灯光 / 干养/水养切换；任何环境控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大开合频率、黏液检测、鼻分泌物等指标；所有数据必须基于真实视频帧分析 |\n| 🔎 使用提醒 | **必须**按 **species 适宜温度基线**判定（热带苏卡达/缅陆适温高 / 温带草龟/黄缘适温中等 / 深水龟 vs 浅水龟节律不同）；**严禁通用阈值** |\n| 📚 文档读取 | **必须**考虑生理性上下文（**进食时口部开合属正常 / 水栖龟水下开合为换气吐泡 / 晒背蒸发期可能开口 / 消化期呼吸短促**），必须排除 |\n| 🔎 使用提醒 | **必须**在头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食时段未排除 / 分辨率 < 1080p 时返回 `respiration_signal_unreliable` |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 次 Level 3+ → 强烈建议联系**专业爬宠兽医**（X 光 + 肺部听诊 + 鼻分泌物镜检/培养） |\n| 📜 报告输出 | **必须**：肺炎风险预警报告**按 enclosure_id + individual_id + 事件时间戳输出**，含开合频率 + 黏液鼻分泌物 + 姿态评分 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史肺炎风险预警记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input /path/to/turtle.mp4\n\n# 分析网络龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --url https://example.com/turtle.mp4\n\n# 显示历史肺炎风险预警记录清单（自动触发关键词：查看龟类肺炎预警历史报告等）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --output result.json\n```\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-turtle-pneumonia-symptom-detection-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1789305155914\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_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` - 龟类张嘴呼吸（肺炎征兆）识别\n\n## 输入约束\n\n- 摄像头：龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头\n- 分辨率 ≥ 1080p（**口鼻黏液为丝状/反光点细节，需高分辨率**）；帧率 ≥ 25 FPS（开合动作快，需高帧率）\n- 拍摄角度：**正对头颈部**或侧前 30°，必须**清晰展示口鼻区域**（头部缩入壳内时无法分析）\n- 光照：充足且均匀（避免反光过强误判为黏液 / 避免阴影遮挡口鼻）\n- **核心采样窗口**：默认 ≥ 3 分钟连续观察\n- **必须排除进食时段**（进食时口部开合属正常）\n- 水栖龟需在**完全浮出水面或晒台上**时分析（水下口部开合为换气吐泡）\n- 多缸场景按摄像头 ID + 个体 ID 双重绑定\n- **部署时必须录入**：物种、龟类型（水栖/半水栖/陆栖）、水温（水栖必填）、气温、UVB 状态、上次投喂时间戳\n\n## 关键观测信号\n\n### 口部开合\n- `mouth_opening_events_per_minute` - **每分钟口部开合次数**（核心指标，阈值 > 10 次/分钟触发风险）\n- `mouth_opening_duration_ms_avg` - 单次开合平均时长\n- `mouth_opening_amplitude_normalized` - 开合幅度归一化\n- `mouth_opening_confidence` - 开合检测置信度\n- `is_during_feeding_window` - 是否处于进食窗口\n- `is_underwater_aquatic` - 水栖龟是否处于水下\n\n### 口鼻黏液与分泌物\n- `mucus_detected_in_mouth` - **口腔内是否检测到黏液**（反光点 + 丝状物）\n- `mucus_strand_count` - 黏液丝状物数量\n- `nasal_discharge_detected` - **鼻腔是否有分泌物**\n- `nasal_discharge_color` - 分泌物颜色（clear_transparent / yellow_pus / blood_tinged）\n- `bubble_at_nostril` - 鼻孔气泡（肺炎强信号）\n- `mucus_nasal_confidence` - 综合置信度\n\n### 呼吸节律与姿态\n- `breathing_rate_per_minute` - 呼吸频率\n- `neck_extension_persistent` - 头颈持续伸展不缩（呼吸困难强信号）\n- `gaping_with_neck_extension` - **张嘴 + 头颈伸展**（典型肺炎姿态）\n- `floating_tilted_aquatic` - 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号）\n- `lethargy_score_0_5` - 嗜睡/活动减少评分\n\n### 上下文与排除信号\n- `ambient_temperature_c` - 环境温度\n- `water_temperature_appropriate` - 水温是否在物种适宜范围\n- `is_post_feeding_within_30min` - 是否刚进食 30 分钟内\n- `is_during_basking` - 是否处于晒背中\n- `is_during_shedding` - 是否蜕皮期\n- `is_breeding_season` - 是否繁殖期\n\n## 综合判定\n\n- `respiration_normal` - 呼吸行为正常\n- `respiration_mild_anomaly` - 轻度异常（开合 6-10 次/分钟，无黏液）\n- `pneumonia_risk_mild` - **肺炎风险轻度**（开合 > 10 次/分钟 OR 微量黏液）\n- `pneumonia_risk_moderate` - **肺炎风险中度**（开合 > 10 次/分钟 + 黏液 + 鼻清涕）\n- `pneumonia_risk_severe` - **肺炎风险严重**（张嘴+头颈持续伸展 / 黄脓血染鼻涕 / 鼻孔气泡 / 漂浮倾斜）\n- `respiration_within_basking_context` - 晒背上下文正常\n- `respiration_signal_unreliable` - 信号不可靠\n\n## 4 级提醒策略递进\n\n- Level 1：仅入库\n- Level 2（mild_anomaly）：复测水温/气温 + 加强观察 24-48 小时\n- Level 3（mild/moderate）：**立即将水温/气温调至物种推荐高线 + 隔离至温暖干燥养殖箱 + 观察食欲精神 + 立即联系爬宠兽医**\n- Level 4（severe）：**立即干养 + 升温保暖 + 立即联系爬宠兽医**（肺炎急症可短期致死）\n\n## 单日提醒上限\n\n- Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症）**\n\n## 红线约束\n\n- **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等**具体疾病诊断**\n- **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量\n- **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方\n- **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册）\n- **禁止**长期存储完整龟缸视频（≤ 14 天）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / UVB / 干养/水养切换\n- 所有指标必须基于真实视频帧分析；禁止伪造夸大\n- 物种特异性：热带物种适温高、温带物种适温中等、深水龟 vs 浅水龟节律不同 → 按物种基线判定\n- 生理性上下文：进食 / 水下换气 / 晒背蒸发 / 消化期短促 → 必须排除\n- 头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食未排除 / 分辨率 < 1080p → 必须返回 `respiration_signal_unreliable`\n- 必须告知用户：AI 视觉仅供参考，**肺炎确诊需 X 光 + 肺部听诊 + 鼻分泌物镜检/培养，由专业爬宠兽医执行**\n\n## 输出报告字段\n\n- `report_date`、`enclosure_id`、`individual_id`、`species`、`turtle_type`、`water_temperature_c`、`ambient_temperature_c`、`mouth_opening_events_per_minute`、`mucus_detected_in_mouth`、`nasal_discharge_detected`、`nasal_discharge_color`、`bubble_at_nostril`、`gaping_with_neck_extension`、`floating_tilted_aquatic`、`composite_scene`、`alert_level`、`recommended_actions`（不含具体药物剂量、抗生素品牌、精确升温温度数值）、`disclaimer`\n\nFile v1.0.11:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.11:scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.11:skill-card.md\n\n## Description:\n\nThis skill analyzes fixed-camera turtle mouth and nose videos or video URLs to identify visual signs associated with open-mouth breathing pneumonia risk, including frequent mouth opening, mucus, nasal discharge, breathing posture, and context filters.\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 turtle keepers, breeders, animal-hospital staff, and developers integrating reptile health monitoring use this skill to submit turtle tank media and receive structured visual risk alerts, suggested next steps, and report links. The output is a visual risk warning, not a veterinary diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill may transmit turtle videos, video URLs, and identity-linked credentials to cloud services, and the security evidence reports insecure development HTTP endpoint configuration.\n\nMitigation: Review configuration before installation, require HTTPS production endpoints, and avoid private media or real credentials until endpoint handling and consent scope are fixed.\n\nRisk: The security evidence reports reusable account tokens stored locally in plaintext and automatic creation or reuse of an internal identity.\n\nMitigation: Use an isolated workspace for evaluation, remove local token databases after use, scope identities to the minimum needed, and rotate credentials if exposed.\n\nRisk: Historical report queries can expose identity-linked analysis history and report links.\n\nMitigation: Confirm the user is authorized to access the linked reports before querying history, and avoid sharing report URLs outside the intended care or operations context.\n\nRisk: The skill produces health-related visual risk warnings that could be mistaken for veterinary diagnosis or treatment advice.\n\nMitigation: Treat outputs as visual triage only, preserve the no-diagnosis and no-medication constraints, and direct urgent or repeated high-risk results to a professional reptile veterinarian.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-turtle-pneumonia-symptom-detection-analysis)\n- [Turtle pneumonia symptom API documentation](artifact/references/api_doc.md)\n- [Shared analysis API documentation](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, guidance]\n\n**Output Format:** [Markdown text containing structured analysis results, JSON-formatted report data, recommended actions, disclaimers, and report links.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Can output a current analysis result or a historical report list; local media inputs are limited to supported video formats and a maximum file size of 10 MB.]\n\n## Skill Version(s):\n\n1.0.11 (source: server release evidence and target metadata; artifact frontmatter states 1.0.14)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.11:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.11:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.10: 31 files, 45183 bytes\n\nFiles: references/api_doc.md (6346b), scripts/__init__.py (76b), scripts/config.py (705b), scripts/config.yaml (3b), scripts/skill.py (591b), scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py (3727b), skill-card.md (2859b), SKILL.md (19029b), 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-turtle-pneumonia-symptom-detection-analysis\"\ndescription: \"Through fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。\"\nversion: \"1.0.13\"\nlicense: \"MIT-0\"\n---\n\n# 🐢 Turtle Pneumonia Symptom (Open-Mouth Breathing) Detection | 龟类张嘴呼吸（肺炎征兆）识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **龟类张嘴呼吸（肺炎征兆）识别** |\n| 🎯 核心目标 | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` |\n\nThrough fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. When any of these symptoms appear alone or together, the system outputs a 'pneumonia risk warning', prompting the keeper to check environmental temperature and water quality and isolate/treat promptly. This skill helps early detection of respiratory infections in turtles and reduces mortality. Application scenarios: home turtle tanks, breeding ponds, animal hospitals. The system monitors in real time and pushes alerts when abnormal breathing behavior is detected. Skill features: turtle pneumonia has high mortality, and early symptoms (open-mouth breathing, mucus) are often overlooked. AI-based automatic monitoring helps keepers detect and intervene early, improving cure rate. This skill can be integrated into smart turtle-tank cameras or reptile health management apps.\n\n通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。该技能有助于早期发现龟类的呼吸道感染，降低死亡率。应用场景：家庭龟缸、养殖池、宠物医院。系统实时监测，当检测到异常呼吸行为时推送提醒。技能特点：龟类肺炎死亡率高，早期症状（张嘴呼吸、黏液）常被忽视。通过 AI 自动监测，可帮助饲养者及早发现并干预，提高治愈率。该技能可集成到智能龟缸摄像头或爬宠健康管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的爬行动物呼吸道健康监测 AI。你的任务是分析龟缸固定摄像头的视频（正对头颈部或侧前 30°，分辨率 ≥ 1080p——口鼻黏液为丝状/反光点细节需高清，帧率 ≥ 25 FPS——开合动作快需高帧率），围绕\"非进食状态下的呼吸征兆\"展开三组核心检测：① **口部开合频率**：每分钟开合次数 + 平均时长 + 开合幅度，**> 10 次/分钟触发风险门槛**；② **口鼻黏液与分泌物**：口腔内反光点 + 丝状物 + 鼻孔气泡 + 鼻分泌物（透明清涕 / 黄脓 / 血染）；③ **呼吸节律与姿态**：头颈持续伸展不缩 + **张嘴+头颈伸展典型肺炎姿态** + 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号） + 嗜睡评分。按 **species 适宜温度基线**（热带物种苏卡达/缅陆适温高、温带物种草龟/黄缘适温中等、深水龟 vs 浅水龟节律不同）匹配，按 7 类综合场景判定（respiration_normal / respiration_mild_anomaly / **pneumonia_risk_mild** / **pneumonia_risk_moderate** / **pneumonia_risk_severe** / respiration_within_basking_context / respiration_signal_unreliable），按 4 级提醒策略递进（Level 1 入库 → Level 2 复测水温气温+加强观察 24-48h → Level 3 立即升温至物种推荐高线+隔离温暖干燥箱+干养+联系兽医 → Level 4 **🚨 立即干养+升温保暖+联系兽医**——肺炎急症可短期致死）。**核心生理性上下文必须排除**：**进食时口部开合属正常**（必须排除进食窗口，由用户标注或自动识别）；**水栖龟水下口部开合为换气吐泡属正常**（必须等浮出水面或晒台时分析）；**晒背蒸发期可能开口属正常**；**消化期呼吸短促**。物种特异性硬约束：必须按物种适宜温度基线判定（**严禁通用阈值盲判**）。头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食时段未排除 / 分辨率 < 1080p → 必须返回 `respiration_signal_unreliable`。不提供任何疾病诊断，仅输出基于视觉的异常体征识别；**🚨 严禁输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量**；**🚨 严禁输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方**；**🚨 严禁输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法**（仅可提示\"水温/气温调至物种推荐高线，由用户根据物种手册设定\"）；严禁伪造夸大开合频率与黏液检测；严禁越权代用户启停加热棒/UVB/干养水养切换（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头**实时视频**（默认 ≥ 3 分钟连续观察，必须排除进食窗口），识别 7 类综合场景（respiration_normal / respiration_mild_anomaly / pneumonia_risk_mild / pneumonia_risk_moderate / pneumonia_risk_severe / respiration_within_basking_context / respiration_signal_unreliable）→ **四组指标**：口部开合 6 项（**每分钟开合次数** + 单次时长 + 开合幅度 + 置信度 + 进食窗口 + 水下状态）+ 口鼻黏液与分泌物 6 项（**口腔黏液** + 丝状物数量 + **鼻分泌物** + 颜色 + 鼻孔气泡 + 综合置信度）+ 呼吸节律与姿态 5 项（呼吸频率 + 头颈持续伸展 + **张嘴+头颈伸展典型肺炎姿态** + **水栖漂浮倾斜** + 嗜睡评分）+ 排除上下文 6 项（环境温度 + 水温适宜 + 进食 30min 内 + 晒背中 + 蜕皮期 + 繁殖期）→ 4 档提醒级别（info / important / urgent / critical）→ **4 级提醒策略递进**（入库 → 复测水温气温+观察 → 升温隔离干养+联系兽医 → 🚨 立即干养升温+紧急联系兽医）→ 单日提醒上限（Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限**）→ **肺炎风险预警报告**（按 enclosure_id + individual_id + 事件时间戳输出，含开合频率 + 黏液鼻分泌物 + 姿态评分 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 龟头部精准定位与跟踪 |\n| 2 | 口部张合事件检测（嘴角张开 + 喙缘距离 + 时间序列） |\n| 3 | 黏液丝状物检测（颗粒形态学 + 反光点过滤） |\n| 4 | 鼻分泌物检测（鼻孔局部色差 + 气泡检测） |\n| 5 | 头颈伸展度量 |\n| 6 | 水栖龟漂浮姿态识别（壳体倾斜角 + 肺部积液浮力不平衡推断） |\n| 7 | 嗜睡评分 |\n| 8 | 生理性上下文识别（进食 / 水下 / 晒背 / 消化 / 蜕皮 / 繁殖） |\n| 9 | 物种适宜温度门控 |\n| 10 | 图像质量门控（头部缩壳 / 全程水下 / 模糊 / 光照 → unreliable） |\n| 11 | 用户 APP 紧急推送 |\n| 12 | 4 级提醒递进 |\n| 13 | 单日提醒上限（**Level 4 不设上限**） |\n| 14 | 肺炎风险预警报告（按 enclosure_id + individual_id 输出） |\n| 15 | 连续 ≥ 2 次 Level 3+ → 强烈建议联系**专业爬宠兽医**（X 光 + 肺部听诊 + 鼻分泌物镜检/培养） |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供龟缸固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行龟类肺炎征兆识别 |\n| 🔎 明确分析意图 | 当用户明确提及龟张嘴呼吸、龟伸脖子、龟漂浮、龟鼻涕、龟黏液、龟呼吸困难、龟肺炎、URI 等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看龟类肺炎预警历史报告、肺炎风险事件清单、查询历史呼吸异常记录、显示所有龟肺炎报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备龟缸固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行龟类肺炎征兆识别 | 调用 `-m scripts.smyx_turtle_pneumonia_symptom_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地龟缸固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络龟缸固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，龟类肺炎征兆场景默认 `other` | 按需填写 |\n| `--list` | 显示龟类肺炎风险预警历史记录清单 | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py`](scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov，最大 10MB；摄像头需**正对头颈部清晰展示口鼻区域**；**分辨率 ≥ 1080p**（口鼻黏液细节）；帧率 ≥ 25 FPS；**默认 ≥ 3 分钟连续观察**；**必须排除进食时段**；**水栖龟必须浮出水面或晒台上** |\n| 🔎 使用提醒 | **核心采样窗口**：≥ 3 分钟连续观察 |\n| 🔎 使用提醒 | **核心预警门槛**：口部开合 **> 10 次/分钟**（非进食状态下）OR 黏液 OR 鼻分泌物 |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → critical），严重姿态（张嘴+头颈伸展 / 漂浮倾斜 / 黄脓血染鼻涕 / 鼻孔气泡）直接 Level 4 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症可短期致死）** |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册） |\n| 🔎 使用提醒 | **禁止**长期存储完整龟缸视频（≤ 14 天，留口部开合时间序列 + 肺炎关键征兆片段；养殖场/医院按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / UVB / 灯光 / 干养/水养切换；任何环境控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大开合频率、黏液检测、鼻分泌物等指标；所有数据必须基于真实视频帧分析 |\n| 🔎 使用提醒 | **必须**按 **species 适宜温度基线**判定（热带苏卡达/缅陆适温高 / 温带草龟/黄缘适温中等 / 深水龟 vs 浅水龟节律不同）；**严禁通用阈值** |\n| 📚 文档读取 | **必须**考虑生理性上下文（**进食时口部开合属正常 / 水栖龟水下开合为换气吐泡 / 晒背蒸发期可能开口 / 消化期呼吸短促**），必须排除 |\n| 🔎 使用提醒 | **必须**在头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食时段未排除 / 分辨率 < 1080p 时返回 `respiration_signal_unreliable` |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 次 Level 3+ → 强烈建议联系**专业爬宠兽医**（X 光 + 肺部听诊 + 鼻分泌物镜检/培养） |\n| 📜 报告输出 | **必须**：肺炎风险预警报告**按 enclosure_id + individual_id + 事件时间戳输出**，含开合频率 + 黏液鼻分泌物 + 姿态评分 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史肺炎风险预警记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input /path/to/turtle.mp4\n\n# 分析网络龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --url https://example.com/turtle.mp4\n\n# 显示历史肺炎风险预警记录清单（自动触发关键词：查看龟类肺炎预警历史报告等）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-turtle-pneumonia-symptom-detection-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1788292530179\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_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` - 龟类张嘴呼吸（肺炎征兆）识别\n\n## 输入约束\n\n- 摄像头：龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头\n- 分辨率 ≥ 1080p（**口鼻黏液为丝状/反光点细节，需高分辨率**）；帧率 ≥ 25 FPS（开合动作快，需高帧率）\n- 拍摄角度：**正对头颈部**或侧前 30°，必须**清晰展示口鼻区域**（头部缩入壳内时无法分析）\n- 光照：充足且均匀（避免反光过强误判为黏液 / 避免阴影遮挡口鼻）\n- **核心采样窗口**：默认 ≥ 3 分钟连续观察\n- **必须排除进食时段**（进食时口部开合属正常）\n- 水栖龟需在**完全浮出水面或晒台上**时分析（水下口部开合为换气吐泡）\n- 多缸场景按摄像头 ID + 个体 ID 双重绑定\n- **部署时必须录入**：物种、龟类型（水栖/半水栖/陆栖）、水温（水栖必填）、气温、UVB 状态、上次投喂时间戳\n\n## 关键观测信号\n\n### 口部开合\n- `mouth_opening_events_per_minute` - **每分钟口部开合次数**（核心指标，阈值 > 10 次/分钟触发风险）\n- `mouth_opening_duration_ms_avg` - 单次开合平均时长\n- `mouth_opening_amplitude_normalized` - 开合幅度归一化\n- `mouth_opening_confidence` - 开合检测置信度\n- `is_during_feeding_window` - 是否处于进食窗口\n- `is_underwater_aquatic` - 水栖龟是否处于水下\n\n### 口鼻黏液与分泌物\n- `mucus_detected_in_mouth` - **口腔内是否检测到黏液**（反光点 + 丝状物）\n- `mucus_strand_count` - 黏液丝状物数量\n- `nasal_discharge_detected` - **鼻腔是否有分泌物**\n- `nasal_discharge_color` - 分泌物颜色（clear_transparent / yellow_pus / blood_tinged）\n- `bubble_at_nostril` - 鼻孔气泡（肺炎强信号）\n- `mucus_nasal_confidence` - 综合置信度\n\n### 呼吸节律与姿态\n- `breathing_rate_per_minute` - 呼吸频率\n- `neck_extension_persistent` - 头颈持续伸展不缩（呼吸困难强信号）\n- `gaping_with_neck_extension` - **张嘴 + 头颈伸展**（典型肺炎姿态）\n- `floating_tilted_aquatic` - 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号）\n- `lethargy_score_0_5` - 嗜睡/活动减少评分\n\n### 上下文与排除信号\n- `ambient_temperature_c` - 环境温度\n- `water_temperature_appropriate` - 水温是否在物种适宜范围\n- `is_post_feeding_within_30min` - 是否刚进食 30 分钟内\n- `is_during_basking` - 是否处于晒背中\n- `is_during_shedding` - 是否蜕皮期\n- `is_breeding_season` - 是否繁殖期\n\n## 综合判定\n\n- `respiration_normal` - 呼吸行为正常\n- `respiration_mild_anomaly` - 轻度异常（开合 6-10 次/分钟，无黏液）\n- `pneumonia_risk_mild` - **肺炎风险轻度**（开合 > 10 次/分钟 OR 微量黏液）\n- `pneumonia_risk_moderate` - **肺炎风险中度**（开合 > 10 次/分钟 + 黏液 + 鼻清涕）\n- `pneumonia_risk_severe` - **肺炎风险严重**（张嘴+头颈持续伸展 / 黄脓血染鼻涕 / 鼻孔气泡 / 漂浮倾斜）\n- `respiration_within_basking_context` - 晒背上下文正常\n- `respiration_signal_unreliable` - 信号不可靠\n\n## 4 级提醒策略递进\n\n- Level 1：仅入库\n- Level 2（mild_anomaly）：复测水温/气温 + 加强观察 24-48 小时\n- Level 3（mild/moderate）：**立即将水温/气温调至物种推荐高线 + 隔离至温暖干燥养殖箱 + 观察食欲精神 + 立即联系爬宠兽医**\n- Level 4（severe）：**立即干养 + 升温保暖 + 立即联系爬宠兽医**（肺炎急症可短期致死）\n\n## 单日提醒上限\n\n- Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症）**\n\n## 红线约束\n\n- **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等**具体疾病诊断**\n- **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量\n- **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方\n- **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册）\n- **禁止**长期存储完整龟缸视频（≤ 14 天）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / UVB / 干养/水养切换\n- 所有指标必须基于真实视频帧分析；禁止伪造夸大\n- 物种特异性：热带物种适温高、温带物种适温中等、深水龟 vs 浅水龟节律不同 → 按物种基线判定\n- 生理性上下文：进食 / 水下换气 / 晒背蒸发 / 消化期短促 → 必须排除\n- 头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食未排除 / 分辨率 < 1080p → 必须返回 `respiration_signal_unreliable`\n- 必须告知用户：AI 视觉仅供参考，**肺炎确诊需 X 光 + 肺部听诊 + 鼻分泌物镜检/培养，由专业爬宠兽医执行**\n\n## 输出报告字段\n\n- `report_date`、`enclosure_id`、`individual_id`、`species`、`turtle_type`、`water_temperature_c`、`ambient_temperature_c`、`mouth_opening_events_per_minute`、`mucus_detected_in_mouth`、`nasal_discharge_detected`、`nasal_discharge_color`、`bubble_at_nostril`、`gaping_with_neck_extension`、`floating_tilted_aquatic`、`composite_scene`、`alert_level`、`recommended_actions`（不含具体药物剂量、抗生素品牌、精确升温温度数值）、`disclaimer`\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\nThrough fixed enclosure cameras, the skill analyzes turtle mouth and nasal video to flag unusually frequent open-mouth breathing, mucus, or nasal discharge as visual pneumonia-risk indicators.\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\nKeepers, breeders, animal hospital staff, and developers can use this skill to review turtle enclosure videos or URLs for visual respiratory risk indicators and receive structured alerts, recommended non-prescriptive actions, report links, or historical report lists. It is intended to support monitoring and escalation to a professional reptile veterinarian, not to diagnose disease or prescribe treatment.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Enclosure videos, URLs, and report queries may be sent to a remote service.\n\nMitigation: Use only with content that is approved for remote processing, and review the configured service endpoints before deployment.\n\nRisk: The skill may silently create or reuse account identifiers and store tokens or user records in the workspace data directory.\n\nMitigation: Review local data storage behavior, isolate the workspace, and clear generated credentials or user records when they are no longer needed.\n\nRisk: A development configuration references private HTTP endpoints.\n\nMitigation: Correct or document endpoint configuration before trusted use, and prefer audited production HTTPS endpoints.\n\nRisk: The skill provides health-risk alerts that could be mistaken for diagnosis or treatment advice.\n\nMitigation: Keep outputs limited to visual indicators and non-prescriptive actions, and direct users to consult a professional reptile veterinarian for diagnosis or treatment.\n\n## Reference(s):\n\n- [API documentation](references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-turtle-pneumonia-symptom-detection-analysis)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Guidance]\n\n**Output Format:** [Markdown text with structured JSON-style analysis fields and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Outputs may include pneumonia-risk alert levels, visual symptom measurements, non-prescriptive recommended actions, disclaimers, exported report links, and historical report lists.]\n\n## Skill Version(s):\n\n1.0.10 (source: server release evidence; artifact frontmatter says 1.0.13)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.10:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.10:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.9: 31 files, 45077 bytes\n\nFiles: references/api_doc.md (6346b), scripts/__init__.py (76b), scripts/config.py (705b), scripts/config.yaml (3b), scripts/skill.py (591b), scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py (3727b), skill-card.md (2536b), SKILL.md (19029b), 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-turtle-pneumonia-symptom-detection-analysis\"\ndescription: \"Through fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🐢 Turtle Pneumonia Symptom (Open-Mouth Breathing) Detection | 龟类张嘴呼吸（肺炎征兆）识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **龟类张嘴呼吸（肺炎征兆）识别** |\n| 🎯 核心目标 | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` |\n\nThrough fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. When any of these symptoms appear alone or together, the system outputs a 'pneumonia risk warning', prompting the keeper to check environmental temperature and water quality and isolate/treat promptly. This skill helps early detection of respiratory infections in turtles and reduces mortality. Application scenarios: home turtle tanks, breeding ponds, animal hospitals. The system monitors in real time and pushes alerts when abnormal breathing behavior is detected. Skill features: turtle pneumonia has high mortality, and early symptoms (open-mouth breathing, mucus) are often overlooked. AI-based automatic monitoring helps keepers detect and intervene early, improving cure rate. This skill can be integrated into smart turtle-tank cameras or reptile health management apps.\n\n通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。该技能有助于早期发现龟类的呼吸道感染，降低死亡率。应用场景：家庭龟缸、养殖池、宠物医院。系统实时监测，当检测到异常呼吸行为时推送提醒。技能特点：龟类肺炎死亡率高，早期症状（张嘴呼吸、黏液）常被忽视。通过 AI 自动监测，可帮助饲养者及早发现并干预，提高治愈率。该技能可集成到智能龟缸摄像头或爬宠健康管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的爬行动物呼吸道健康监测 AI。你的任务是分析龟缸固定摄像头的视频（正对头颈部或侧前 30°，分辨率 ≥ 1080p——口鼻黏液为丝状/反光点细节需高清，帧率 ≥ 25 FPS——开合动作快需高帧率），围绕\"非进食状态下的呼吸征兆\"展开三组核心检测：① **口部开合频率**：每分钟开合次数 + 平均时长 + 开合幅度，**> 10 次/分钟触发风险门槛**；② **口鼻黏液与分泌物**：口腔内反光点 + 丝状物 + 鼻孔气泡 + 鼻分泌物（透明清涕 / 黄脓 / 血染）；③ **呼吸节律与姿态**：头颈持续伸展不缩 + **张嘴+头颈伸展典型肺炎姿态** + 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号） + 嗜睡评分。按 **species 适宜温度基线**（热带物种苏卡达/缅陆适温高、温带物种草龟/黄缘适温中等、深水龟 vs 浅水龟节律不同）匹配，按 7 类综合场景判定（respiration_normal / respiration_mild_anomaly / **pneumonia_risk_mild** / **pneumonia_risk_moderate** / **pneumonia_risk_severe** / respiration_within_basking_context / respiration_signal_unreliable），按 4 级提醒策略递进（Level 1 入库 → Level 2 复测水温气温+加强观察 24-48h → Level 3 立即升温至物种推荐高线+隔离温暖干燥箱+干养+联系兽医 → Level 4 **🚨 立即干养+升温保暖+联系兽医**——肺炎急症可短期致死）。**核心生理性上下文必须排除**：**进食时口部开合属正常**（必须排除进食窗口，由用户标注或自动识别）；**水栖龟水下口部开合为换气吐泡属正常**（必须等浮出水面或晒台时分析）；**晒背蒸发期可能开口属正常**；**消化期呼吸短促**。物种特异性硬约束：必须按物种适宜温度基线判定（**严禁通用阈值盲判**）。头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食时段未排除 / 分辨率 < 1080p → 必须返回 `respiration_signal_unreliable`。不提供任何疾病诊断，仅输出基于视觉的异常体征识别；**🚨 严禁输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量**；**🚨 严禁输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方**；**🚨 严禁输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法**（仅可提示\"水温/气温调至物种推荐高线，由用户根据物种手册设定\"）；严禁伪造夸大开合频率与黏液检测；严禁越权代用户启停加热棒/UVB/干养水养切换（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头**实时视频**（默认 ≥ 3 分钟连续观察，必须排除进食窗口），识别 7 类综合场景（respiration_normal / respiration_mild_anomaly / pneumonia_risk_mild / pneumonia_risk_moderate / pneumonia_risk_severe / respiration_within_basking_context / respiration_signal_unreliable）→ **四组指标**：口部开合 6 项（**每分钟开合次数** + 单次时长 + 开合幅度 + 置信度 + 进食窗口 + 水下状态）+ 口鼻黏液与分泌物 6 项（**口腔黏液** + 丝状物数量 + **鼻分泌物** + 颜色 + 鼻孔气泡 + 综合置信度）+ 呼吸节律与姿态 5 项（呼吸频率 + 头颈持续伸展 + **张嘴+头颈伸展典型肺炎姿态** + **水栖漂浮倾斜** + 嗜睡评分）+ 排除上下文 6 项（环境温度 + 水温适宜 + 进食 30min 内 + 晒背中 + 蜕皮期 + 繁殖期）→ 4 档提醒级别（info / important / urgent / critical）→ **4 级提醒策略递进**（入库 → 复测水温气温+观察 → 升温隔离干养+联系兽医 → 🚨 立即干养升温+紧急联系兽医）→ 单日提醒上限（Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限**）→ **肺炎风险预警报告**（按 enclosure_id + individual_id + 事件时间戳输出，含开合频率 + 黏液鼻分泌物 + 姿态评分 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 龟头部精准定位与跟踪 |\n| 2 | 口部张合事件检测（嘴角张开 + 喙缘距离 + 时间序列） |\n| 3 | 黏液丝状物检测（颗粒形态学 + 反光点过滤） |\n| 4 | 鼻分泌物检测（鼻孔局部色差 + 气泡检测） |\n| 5 | 头颈伸展度量 |\n| 6 | 水栖龟漂浮姿态识别（壳体倾斜角 + 肺部积液浮力不平衡推断） |\n| 7 | 嗜睡评分 |\n| 8 | 生理性上下文识别（进食 / 水下 / 晒背 / 消化 / 蜕皮 / 繁殖） |\n| 9 | 物种适宜温度门控 |\n| 10 | 图像质量门控（头部缩壳 / 全程水下 / 模糊 / 光照 → unreliable） |\n| 11 | 用户 APP 紧急推送 |\n| 12 | 4 级提醒递进 |\n| 13 | 单日提醒上限（**Level 4 不设上限**） |\n| 14 | 肺炎风险预警报告（按 enclosure_id + individual_id 输出） |\n| 15 | 连续 ≥ 2 次 Level 3+ → 强烈建议联系**专业爬宠兽医**（X 光 + 肺部听诊 + 鼻分泌物镜检/培养） |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供龟缸固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行龟类肺炎征兆识别 |\n| 🔎 明确分析意图 | 当用户明确提及龟张嘴呼吸、龟伸脖子、龟漂浮、龟鼻涕、龟黏液、龟呼吸困难、龟肺炎、URI 等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看龟类肺炎预警历史报告、肺炎风险事件清单、查询历史呼吸异常记录、显示所有龟肺炎报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备龟缸固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行龟类肺炎征兆识别 | 调用 `-m scripts.smyx_turtle_pneumonia_symptom_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地龟缸固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络龟缸固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，龟类肺炎征兆场景默认 `other` | 按需填写 |\n| `--list` | 显示龟类肺炎风险预警历史记录清单 | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py`](scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov，最大 10MB；摄像头需**正对头颈部清晰展示口鼻区域**；**分辨率 ≥ 1080p**（口鼻黏液细节）；帧率 ≥ 25 FPS；**默认 ≥ 3 分钟连续观察**；**必须排除进食时段**；**水栖龟必须浮出水面或晒台上** |\n| 🔎 使用提醒 | **核心采样窗口**：≥ 3 分钟连续观察 |\n| 🔎 使用提醒 | **核心预警门槛**：口部开合 **> 10 次/分钟**（非进食状态下）OR 黏液 OR 鼻分泌物 |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → critical），严重姿态（张嘴+头颈伸展 / 漂浮倾斜 / 黄脓血染鼻涕 / 鼻孔气泡）直接 Level 4 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症可短期致死）** |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册） |\n| 🔎 使用提醒 | **禁止**长期存储完整龟缸视频（≤ 14 天，留口部开合时间序列 + 肺炎关键征兆片段；养殖场/医院按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / UVB / 灯光 / 干养/水养切换；任何环境控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大开合频率、黏液检测、鼻分泌物等指标；所有数据必须基于真实视频帧分析 |\n| 🔎 使用提醒 | **必须**按 **species 适宜温度基线**判定（热带苏卡达/缅陆适温高 / 温带草龟/黄缘适温中等 / 深水龟 vs 浅水龟节律不同）；**严禁通用阈值** |\n| 📚 文档读取 | **必须**考虑生理性上下文（**进食时口部开合属正常 / 水栖龟水下开合为换气吐泡 / 晒背蒸发期可能开口 / 消化期呼吸短促**），必须排除 |\n| 🔎 使用提醒 | **必须**在头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食时段未排除 / 分辨率 < 1080p 时返回 `respiration_signal_unreliable` |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 次 Level 3+ → 强烈建议联系**专业爬宠兽医**（X 光 + 肺部听诊 + 鼻分泌物镜检/培养） |\n| 📜 报告输出 | **必须**：肺炎风险预警报告**按 enclosure_id + individual_id + 事件时间戳输出**，含开合频率 + 黏液鼻分泌物 + 姿态评分 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史肺炎风险预警记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input /path/to/turtle.mp4\n\n# 分析网络龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --url https://example.com/turtle.mp4\n\n# 显示历史肺炎风险预警记录清单（自动触发关键词：查看龟类肺炎预警历史报告等）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-turtle-pneumonia-symptom-detection-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1786913907648\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_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` - 龟类张嘴呼吸（肺炎征兆）识别\n\n## 输入约束\n\n- 摄像头：龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头\n- 分辨率 ≥ 1080p（**口鼻黏液为丝状/反光点细节，需高分辨率**）；帧率 ≥ 25 FPS（开合动作快，需高帧率）\n- 拍摄角度：**正对头颈部**或侧前 30°，必须**清晰展示口鼻区域**（头部缩入壳内时无法分析）\n- 光照：充足且均匀（避免反光过强误判为黏液 / 避免阴影遮挡口鼻）\n- **核心采样窗口**：默认 ≥ 3 分钟连续观察\n- **必须排除进食时段**（进食时口部开合属正常）\n- 水栖龟需在**完全浮出水面或晒台上**时分析（水下口部开合为换气吐泡）\n- 多缸场景按摄像头 ID + 个体 ID 双重绑定\n- **部署时必须录入**：物种、龟类型（水栖/半水栖/陆栖）、水温（水栖必填）、气温、UVB 状态、上次投喂时间戳\n\n## 关键观测信号\n\n### 口部开合\n- `mouth_opening_events_per_minute` - **每分钟口部开合次数**（核心指标，阈值 > 10 次/分钟触发风险）\n- `mouth_opening_duration_ms_avg` - 单次开合平均时长\n- `mouth_opening_amplitude_normalized` - 开合幅度归一化\n- `mouth_opening_confidence` - 开合检测置信度\n- `is_during_feeding_window` - 是否处于进食窗口\n- `is_underwater_aquatic` - 水栖龟是否处于水下\n\n### 口鼻黏液与分泌物\n- `mucus_detected_in_mouth` - **口腔内是否检测到黏液**（反光点 + 丝状物）\n- `mucus_strand_count` - 黏液丝状物数量\n- `nasal_discharge_detected` - **鼻腔是否有分泌物**\n- `nasal_discharge_color` - 分泌物颜色（clear_transparent / yellow_pus / blood_tinged）\n- `bubble_at_nostril` - 鼻孔气泡（肺炎强信号）\n- `mucus_nasal_confidence` - 综合置信度\n\n### 呼吸节律与姿态\n- `breathing_rate_per_minute` - 呼吸频率\n- `neck_extension_persistent` - 头颈持续伸展不缩（呼吸困难强信号）\n- `gaping_with_neck_extension` - **张嘴 + 头颈伸展**（典型肺炎姿态）\n- `floating_tilted_aquatic` - 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号）\n- `lethargy_score_0_5` - 嗜睡/活动减少评分\n\n### 上下文与排除信号\n- `ambient_temperature_c` - 环境温度\n- `water_temperature_appropriate` - 水温是否在物种适宜范围\n- `is_post_feeding_within_30min` - 是否刚进食 30 分钟内\n- `is_during_basking` - 是否处于晒背中\n- `is_during_shedding` - 是否蜕皮期\n- `is_breeding_season` - 是否繁殖期\n\n## 综合判定\n\n- `respiration_normal` - 呼吸行为正常\n- `respiration_mild_anomaly` - 轻度异常（开合 6-10 次/分钟，无黏液）\n- `pneumonia_risk_mild` - **肺炎风险轻度**（开合 > 10 次/分钟 OR 微量黏液）\n- `pneumonia_risk_moderate` - **肺炎风险中度**（开合 > 10 次/分钟 + 黏液 + 鼻清涕）\n- `pneumonia_risk_severe` - **肺炎风险严重**（张嘴+头颈持续伸展 / 黄脓血染鼻涕 / 鼻孔气泡 / 漂浮倾斜）\n- `respiration_within_basking_context` - 晒背上下文正常\n- `respiration_signal_unreliable` - 信号不可靠\n\n## 4 级提醒策略递进\n\n- Level 1：仅入库\n- Level 2（mild_anomaly）：复测水温/气温 + 加强观察 24-48 小时\n- Level 3（mild/moderate）：**立即将水温/气温调至物种推荐高线 + 隔离至温暖干燥养殖箱 + 观察食欲精神 + 立即联系爬宠兽医**\n- Level 4（severe）：**立即干养 + 升温保暖 + 立即联系爬宠兽医**（肺炎急症可短期致死）\n\n## 单日提醒上限\n\n- Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症）**\n\n## 红线约束\n\n- **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等**具体疾病诊断**\n- **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量\n- **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方\n- **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册）\n- **禁止**长期存储完整龟缸视频（≤ 14 天）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / UVB / 干养/水养切换\n- 所有指标必须基于真实视频帧分析；禁止伪造夸大\n- 物种特异性：热带物种适温高、温带物种适温中等、深水龟 vs 浅水龟节律不同 → 按物种基线判定\n- 生理性上下文：进食 / 水下换气 / 晒背蒸发 / 消化期短促 → 必须排除\n- 头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食未排除 / 分辨率 < 1080p → 必须返回 `respiration_signal_unreliable`\n- 必须告知用户：AI 视觉仅供参考，**肺炎确诊需 X 光 + 肺部听诊 + 鼻分泌物镜检/培养，由专业爬宠兽医执行**\n\n## 输出报告字段\n\n- `report_date`、`enclosure_id`、`individual_id`、`species`、`turtle_type`、`water_temperature_c`、`ambient_temperature_c`、`mouth_opening_events_per_minute`、`mucus_detected_in_mouth`、`nasal_discharge_detected`、`nasal_discharge_color`、`bubble_at_nostril`、`gaping_with_neck_extension`、`floating_tilted_aquatic`、`composite_scene`、`alert_level`、`recommended_actions`（不含具体药物剂量、抗生素品牌、精确升温温度数值）、`disclaimer`\n\nFile v1.0.9:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.9:scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.9:skill-card.md\n\n## Description:\n\nAnalyzes turtle enclosure camera images or videos for visual signs associated with abnormal open-mouth breathing, mucus, nasal discharge, posture changes, and related respiratory risk warnings.\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 users, developers, and turtle-care operators use this skill to submit clear turtle enclosure media for structured visual screening of respiratory warning signs and to retrieve cloud-stored report history. It is a visual risk-warning aid, not a veterinary diagnosis or treatment plan.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Turtle tank media and report history may be sent to the publisher's backend.\n\nMitigation: Submit only videos or URLs intended for cloud analysis, and avoid broad history-query prompts unless account-linked records should be retrieved.\n\nRisk: The skill automatically links users to cloud accounts and persists session tokens locally with limited user control.\n\nMitigation: Review how to delete or revoke local SQLite tokens and any cloud account data created by the skill before installation or after use.\n\nRisk: Respiratory risk warnings could be mistaken for veterinary diagnosis or treatment guidance.\n\nMitigation: Treat outputs as visual screening only, avoid drug or dosage recommendations, and confirm concerning results with a professional reptile veterinarian.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-turtle-pneumonia-symptom-detection-analysis)\n- [Skill usage demo](https://lifeemergence.com/sample.html)\n- [API documentation](references/api_doc.md)\n- [Shared analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, guidance]\n\n**Output Format:** [JSON or Markdown text with structured report fields and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include symptom indicators, alert level, non-prescriptive recommended actions, disclaimers, and cloud report export links.]\n\n## Skill Version(s):\n\n1.0.9 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 45072 bytes\n\nFiles: references/api_doc.md (6346b), scripts/__init__.py (76b), scripts/config.py (705b), scripts/config.yaml (3b), scripts/skill.py (591b), scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py (3727b), skill-card.md (2503b), SKILL.md (19029b), 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-turtle-pneumonia-symptom-detection-analysis\"\ndescription: \"Through fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 🐢 Turtle Pneumonia Symptom (Open-Mouth Breathing) Detection | 龟类张嘴呼吸（肺炎征兆）识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **龟类张嘴呼吸（肺炎征兆）识别** |\n| 🎯 核心目标 | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` |\n\nThrough fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. When any of these symptoms appear alone or together, the system outputs a 'pneumonia risk warning', prompting the keeper to check environmental temperature and water quality and isolate/treat promptly. This skill helps early detection of respiratory infections in turtles and reduces mortality. Application scenarios: home turtle tanks, breeding ponds, animal hospitals. The system monitors in real time and pushes alerts when abnormal breathing behavior is detected. Skill features: turtle pneumonia has high mortality, and early symptoms (open-mouth breathing, mucus) are often overlooked. AI-based automatic monitoring helps keepers detect and intervene early, improving cure rate. This skill can be integrated into smart turtle-tank cameras or reptile health management apps.\n\n通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。该技能有助于早期发现龟类的呼吸道感染，降低死亡率。应用场景：家庭龟缸、养殖池、宠物医院。系统实时监测，当检测到异常呼吸行为时推送提醒。技能特点：龟类肺炎死亡率高，早期症状（张嘴呼吸、黏液）常被忽视。通过 AI 自动监测，可帮助饲养者及早发现并干预，提高治愈率。该技能可集成到智能龟缸摄像头或爬宠健康管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的爬行动物呼吸道健康监测 AI。你的任务是分析龟缸固定摄像头的视频（正对头颈部或侧前 30°，分辨率 ≥ 1080p——口鼻黏液为丝状/反光点细节需高清，帧率 ≥ 25 FPS——开合动作快需高帧率），围绕\"非进食状态下的呼吸征兆\"展开三组核心检测：① **口部开合频率**：每分钟开合次数 + 平均时长 + 开合幅度，**> 10 次/分钟触发风险门槛**；② **口鼻黏液与分泌物**：口腔内反光点 + 丝状物 + 鼻孔气泡 + 鼻分泌物（透明清涕 / 黄脓 / 血染）；③ **呼吸节律与姿态**：头颈持续伸展不缩 + **张嘴+头颈伸展典型肺炎姿态** + 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号） + 嗜睡评分。按 **species 适宜温度基线**（热带物种苏卡达/缅陆适温高、温带物种草龟/黄缘适温中等、深水龟 vs 浅水龟节律不同）匹配，按 7 类综合场景判定（respiration_normal / respiration_mild_anomaly / **pneumonia_risk_mild** / **pneumonia_risk_moderate** / **pneumonia_risk_severe** / respiration_within_basking_context / respiration_signal_unreliable），按 4 级提醒策略递进（Level 1 入库 → Level 2 复测水温气温+加强观察 24-48h → Level 3 立即升温至物种推荐高线+隔离温暖干燥箱+干养+联系兽医 → Level 4 **🚨 立即干养+升温保暖+联系兽医**——肺炎急症可短期致死）。**核心生理性上下文必须排除**：**进食时口部开合属正常**（必须排除进食窗口，由用户标注或自动识别）；**水栖龟水下口部开合为换气吐泡属正常**（必须等浮出水面或晒台时分析）；**晒背蒸发期可能开口属正常**；**消化期呼吸短促**。物种特异性硬约束：必须按物种适宜温度基线判定（**严禁通用阈值盲判**）。头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食时段未排除 / 分辨率 < 1080p → 必须返回 `respiration_signal_unreliable`。不提供任何疾病诊断，仅输出基于视觉的异常体征识别；**🚨 严禁输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量**；**🚨 严禁输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方**；**🚨 严禁输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法**（仅可提示\"水温/气温调至物种推荐高线，由用户根据物种手册设定\"）；严禁伪造夸大开合频率与黏液检测；严禁越权代用户启停加热棒/UVB/干养水养切换（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头**实时视频**（默认 ≥ 3 分钟连续观察，必须排除进食窗口），识别 7 类综合场景（respiration_normal / respiration_mild_anomaly / pneumonia_risk_mild / pneumonia_risk_moderate / pneumonia_risk_severe / respiration_within_basking_context / respiration_signal_unreliable）→ **四组指标**：口部开合 6 项（**每分钟开合次数** + 单次时长 + 开合幅度 + 置信度 + 进食窗口 + 水下状态）+ 口鼻黏液与分泌物 6 项（**口腔黏液** + 丝状物数量 + **鼻分泌物** + 颜色 + 鼻孔气泡 + 综合置信度）+ 呼吸节律与姿态 5 项（呼吸频率 + 头颈持续伸展 + **张嘴+头颈伸展典型肺炎姿态** + **水栖漂浮倾斜** + 嗜睡评分）+ 排除上下文 6 项（环境温度 + 水温适宜 + 进食 30min 内 + 晒背中 + 蜕皮期 + 繁殖期）→ 4 档提醒级别（info / important / urgent / critical）→ **4 级提醒策略递进**（入库 → 复测水温气温+观察 → 升温隔离干养+联系兽医 → 🚨 立即干养升温+紧急联系兽医）→ 单日提醒上限（Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限**）→ **肺炎风险预警报告**（按 enclosure_id + individual_id + 事件时间戳输出，含开合频率 + 黏液鼻分泌物 + 姿态评分 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 龟头部精准定位与跟踪 |\n| 2 | 口部张合事件检测（嘴角张开 + 喙缘距离 + 时间序列） |\n| 3 | 黏液丝状物检测（颗粒形态学 + 反光点过滤） |\n| 4 | 鼻分泌物检测（鼻孔局部色差 + 气泡检测） |\n| 5 | 头颈伸展度量 |\n| 6 | 水栖龟漂浮姿态识别（壳体倾斜角 + 肺部积液浮力不平衡推断） |\n| 7 | 嗜睡评分 |\n| 8 | 生理性上下文识别（进食 / 水下 / 晒背 / 消化 / 蜕皮 / 繁殖） |\n| 9 | 物种适宜温度门控 |\n| 10 | 图像质量门控（头部缩壳 / 全程水下 / 模糊 / 光照 → unreliable） |\n| 11 | 用户 APP 紧急推送 |\n| 12 | 4 级提醒递进 |\n| 13 | 单日提醒上限（**Level 4 不设上限**） |\n| 14 | 肺炎风险预警报告（按 enclosure_id + individual_id 输出） |\n| 15 | 连续 ≥ 2 次 Level 3+ → 强烈建议联系**专业爬宠兽医**（X 光 + 肺部听诊 + 鼻分泌物镜检/培养） |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供龟缸固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行龟类肺炎征兆识别 |\n| 🔎 明确分析意图 | 当用户明确提及龟张嘴呼吸、龟伸脖子、龟漂浮、龟鼻涕、龟黏液、龟呼吸困难、龟肺炎、URI 等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看龟类肺炎预警历史报告、肺炎风险事件清单、查询历史呼吸异常记录、显示所有龟肺炎报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备龟缸固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行龟类肺炎征兆识别 | 调用 `-m scripts.smyx_turtle_pneumonia_symptom_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地龟缸固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络龟缸固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，龟类肺炎征兆场景默认 `other` | 按需填写 |\n| `--list` | 显示龟类肺炎风险预警历史记录清单 | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py`](scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov，最大 10MB；摄像头需**正对头颈部清晰展示口鼻区域**；**分辨率 ≥ 1080p**（口鼻黏液细节）；帧率 ≥ 25 FPS；**默认 ≥ 3 分钟连续观察**；**必须排除进食时段**；**水栖龟必须浮出水面或晒台上** |\n| 🔎 使用提醒 | **核心采样窗口**：≥ 3 分钟连续观察 |\n| 🔎 使用提醒 | **核心预警门槛**：口部开合 **> 10 次/分钟**（非进食状态下）OR 黏液 OR 鼻分泌物 |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → critical），严重姿态（张嘴+头颈伸展 / 漂浮倾斜 / 黄脓血染鼻涕 / 鼻孔气泡）直接 Level 4 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症可短期致死）** |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册） |\n| 🔎 使用提醒 | **禁止**长期存储完整龟缸视频（≤ 14 天，留口部开合时间序列 + 肺炎关键征兆片段；养殖场/医院按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / UVB / 灯光 / 干养/水养切换；任何环境控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大开合频率、黏液检测、鼻分泌物等指标；所有数据必须基于真实视频帧分析 |\n| 🔎 使用提醒 | **必须**按 **species 适宜温度基线**判定（热带苏卡达/缅陆适温高 / 温带草龟/黄缘适温中等 / 深水龟 vs 浅水龟节律不同）；**严禁通用阈值** |\n| 📚 文档读取 | **必须**考虑生理性上下文（**进食时口部开合属正常 / 水栖龟水下开合为换气吐泡 / 晒背蒸发期可能开口 / 消化期呼吸短促**），必须排除 |\n| 🔎 使用提醒 | **必须**在头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食时段未排除 / 分辨率 < 1080p 时返回 `respiration_signal_unreliable` |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 次 Level 3+ → 强烈建议联系**专业爬宠兽医**（X 光 + 肺部听诊 + 鼻分泌物镜检/培养） |\n| 📜 报告输出 | **必须**：肺炎风险预警报告**按 enclosure_id + individual_id + 事件时间戳输出**，含开合频率 + 黏液鼻分泌物 + 姿态评分 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史肺炎风险预警记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input /path/to/turtle.mp4\n\n# 分析网络龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --url https://example.com/turtle.mp4\n\n# 显示历史肺炎风险预警记录清单（自动触发关键词：查看龟类肺炎预警历史报告等）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-turtle-pneumonia-symptom-detection-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1786373134072\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_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` - 龟类张嘴呼吸（肺炎征兆）识别\n\n## 输入约束\n\n- 摄像头：龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头\n- 分辨率 ≥ 1080p（**口鼻黏液为丝状/反光点细节，需高分辨率**）；帧率 ≥ 25 FPS（开合动作快，需高帧率）\n- 拍摄角度：**正对头颈部**或侧前 30°，必须**清晰展示口鼻区域**（头部缩入壳内时无法分析）\n- 光照：充足且均匀（避免反光过强误判为黏液 / 避免阴影遮挡口鼻）\n- **核心采样窗口**：默认 ≥ 3 分钟连续观察\n- **必须排除进食时段**（进食时口部开合属正常）\n- 水栖龟需在**完全浮出水面或晒台上**时分析（水下口部开合为换气吐泡）\n- 多缸场景按摄像头 ID + 个体 ID 双重绑定\n- **部署时必须录入**：物种、龟类型（水栖/半水栖/陆栖）、水温（水栖必填）、气温、UVB 状态、上次投喂时间戳\n\n## 关键观测信号\n\n### 口部开合\n- `mouth_opening_events_per_minute` - **每分钟口部开合次数**（核心指标，阈值 > 10 次/分钟触发风险）\n- `mouth_opening_duration_ms_avg` - 单次开合平均时长\n- `mouth_opening_amplitude_normalized` - 开合幅度归一化\n- `mouth_opening_confidence` - 开合检测置信度\n- `is_during_feeding_window` - 是否处于进食窗口\n- `is_underwater_aquatic` - 水栖龟是否处于水下\n\n### 口鼻黏液与分泌物\n- `mucus_detected_in_mouth` - **口腔内是否检测到黏液**（反光点 + 丝状物）\n- `mucus_strand_count` - 黏液丝状物数量\n- `nasal_discharge_detected` - **鼻腔是否有分泌物**\n- `nasal_discharge_color` - 分泌物颜色（clear_transparent / yellow_pus / blood_tinged）\n- `bubble_at_nostril` - 鼻孔气泡（肺炎强信号）\n- `mucus_nasal_confidence` - 综合置信度\n\n### 呼吸节律与姿态\n- `breathing_rate_per_minute` - 呼吸频率\n- `neck_extension_persistent` - 头颈持续伸展不缩（呼吸困难强信号）\n- `gaping_with_neck_extension` - **张嘴 + 头颈伸展**（典型肺炎姿态）\n- `floating_tilted_aquatic` - 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号）\n- `lethargy_score_0_5` - 嗜睡/活动减少评分\n\n### 上下文与排除信号\n- `ambient_temperature_c` - 环境温度\n- `water_temperature_appropriate` - 水温是否在物种适宜范围\n- `is_post_feeding_within_30min` - 是否刚进食 30 分钟内\n- `is_during_basking` - 是否处于晒背中\n- `is_during_shedding` - 是否蜕皮期\n- `is_breeding_season` - 是否繁殖期\n\n## 综合判定\n\n- `respiration_normal` - 呼吸行为正常\n- `respiration_mild_anomaly` - 轻度异常（开合 6-10 次/分钟，无黏液）\n- `pneumonia_risk_mild` - **肺炎风险轻度**（开合 > 10 次/分钟 OR 微量黏液）\n- `pneumonia_risk_moderate` - **肺炎风险中度**（开合 > 10 次/分钟 + 黏液 + 鼻清涕）\n- `pneumonia_risk_severe` - **肺炎风险严重**（张嘴+头颈持续伸展 / 黄脓血染鼻涕 / 鼻孔气泡 / 漂浮倾斜）\n- `respiration_within_basking_context` - 晒背上下文正常\n- `respiration_signal_unreliable` - 信号不可靠\n\n## 4 级提醒策略递进\n\n- Level 1：仅入库\n- Level 2（mild_anomaly）：复测水温/气温 + 加强观察 24-48 小时\n- Level 3（mild/moderate）：**立即将水温/气温调至物种推荐高线 + 隔离至温暖干燥养殖箱 + 观察食欲精神 + 立即联系爬宠兽医**\n- Level 4（severe）：**立即干养 + 升温保暖 + 立即联系爬宠兽医**（肺炎急症可短期致死）\n\n## 单日提醒上限\n\n- Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症）**\n\n## 红线约束\n\n- **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等**具体疾病诊断**\n- **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量\n- **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方\n- **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册）\n- **禁止**长期存储完整龟缸视频（≤ 14 天）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / UVB / 干养/水养切换\n- 所有指标必须基于真实视频帧分析；禁止伪造夸大\n- 物种特异性：热带物种适温高、温带物种适温中等、深水龟 vs 浅水龟节律不同 → 按物种基线判定\n- 生理性上下文：进食 / 水下换气 / 晒背蒸发 / 消化期短促 → 必须排除\n- 头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食未排除 / 分辨率 < 1080p → 必须返回 `respiration_signal_unreliable`\n- 必须告知用户：AI 视觉仅供参考，**肺炎确诊需 X 光 + 肺部听诊 + 鼻分泌物镜检/培养，由专业爬宠兽医执行**\n\n## 输出报告字段\n\n- `report_date`、`enclosure_id`、`individual_id`、`species`、`turtle_type`、`water_temperature_c`、`ambient_temperature_c`、`mouth_opening_events_per_minute`、`mucus_detected_in_mouth`、`nasal_discharge_detected`、`nasal_discharge_color`、`bubble_at_nostril`、`gaping_with_neck_extension`、`floating_tilted_aquatic`、`composite_scene`、`alert_level`、`recommended_actions`（不含具体药物剂量、抗生素品牌、精确升温温度数值）、`disclaimer`\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 turtle enclosure camera images or videos to identify visual signs associated with abnormal open-mouth breathing, mucus, nasal discharge, and related pneumonia-risk warnings.\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 turtle keepers, breeders, veterinary staff, and developers use this skill to submit turtle camera media or URLs for respiratory-sign analysis, risk-level reporting, care guidance, and cloud history lookup.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Turtle videos, images, or URLs may be sent to remote Life Emergence endpoints for analysis.\n\nMitigation: Submit only media you are permitted to share, and avoid private enclosure footage unless remote processing is acceptable.\n\nRisk: The skill can create or reuse a local identity and store service tokens in the workspace data directory.\n\nMitigation: Review or clear `data/smyx-api-key.txt` and the local SQLite database when identity linkage or token reuse is not desired.\n\nRisk: The skill can query cloud report history tied to the local identity.\n\nMitigation: Use an isolated workspace or identity when report history should not be linked to another user or session.\n\nRisk: The output is a visual respiratory-risk warning and not a veterinary diagnosis.\n\nMitigation: Treat results as screening guidance and consult a professional reptile veterinarian for diagnosis or treatment decisions.\n\n## Reference(s):\n\n- [Turtle pneumonia symptom API documentation](references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-turtle-pneumonia-symptom-detection-analysis)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance]\n\n**Output Format:** [Markdown and JSON structured analysis reports, with optional saved text output.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include report links and historical report tables returned by the remote service.]\n\n## Skill Version(s):\n\n1.0.8 (source: ClawHub server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 45021 bytes\n\nFiles: references/api_doc.md (6346b), scripts/__init__.py (76b), scripts/config.py (705b), scripts/config.yaml (3b), scripts/skill.py (591b), scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py (3727b), skill-card.md (2384b), SKILL.md (19028b), 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-turtle-pneumonia-symptom-detection-analysis\"\ndescription: \"Through fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 🐢 Turtle Pneumonia Symptom (Open-Mouth Breathing) Detection | 龟类张嘴呼吸（肺炎征兆）识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **龟类张嘴呼吸（肺炎征兆）识别** |\n| 🎯 核心目标 | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` |\n\nThrough fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. When any of these symptoms appear alone or together, the system outputs a 'pneumonia risk warning', prompting the keeper to check environmental temperature and water quality and isolate/treat promptly. This skill helps early detection of respiratory infections in turtles and reduces mortality. Application scenarios: home turtle tanks, breeding ponds, animal hospitals. The system monitors in real time and pushes alerts when abnormal breathing behavior is detected. Skill features: turtle pneumonia has high mortality, and early symptoms (open-mouth breathing, mucus) are often overlooked. AI-based automatic monitoring helps keepers detect and intervene early, improving cure rate. This skill can be integrated into smart turtle-tank cameras or reptile health management apps.\n\n通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。该技能有助于早期发现龟类的呼吸道感染，降低死亡率。应用场景：家庭龟缸、养殖池、宠物医院。系统实时监测，当检测到异常呼吸行为时推送提醒。技能特点：龟类肺炎死亡率高，早期症状（张嘴呼吸、黏液）常被忽视。通过 AI 自动监测，可帮助饲养者及早发现并干预，提高治愈率。该技能可集成到智能龟缸摄像头或爬宠健康管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的爬行动物呼吸道健康监测 AI。你的任务是分析龟缸固定摄像头的视频（正对头颈部或侧前 30°，分辨率 ≥ 1080p——口鼻黏液为丝状/反光点细节需高清，帧率 ≥ 25 FPS——开合动作快需高帧率），围绕\"非进食状态下的呼吸征兆\"展开三组核心检测：① **口部开合频率**：每分钟开合次数 + 平均时长 + 开合幅度，**> 10 次/分钟触发风险门槛**；② **口鼻黏液与分泌物**：口腔内反光点 + 丝状物 + 鼻孔气泡 + 鼻分泌物（透明清涕 / 黄脓 / 血染）；③ **呼吸节律与姿态**：头颈持续伸展不缩 + **张嘴+头颈伸展典型肺炎姿态** + 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号） + 嗜睡评分。按 **species 适宜温度基线**（热带物种苏卡达/缅陆适温高、温带物种草龟/黄缘适温中等、深水龟 vs 浅水龟节律不同）匹配，按 7 类综合场景判定（respiration_normal / respiration_mild_anomaly / **pneumonia_risk_mild** / **pneumonia_risk_moderate** / **pneumonia_risk_severe** / respiration_within_basking_context / respiration_signal_unreliable），按 4 级提醒策略递进（Level 1 入库 → Level 2 复测水温气温+加强观察 24-48h → Level 3 立即升温至物种推荐高线+隔离温暖干燥箱+干养+联系兽医 → Level 4 **🚨 立即干养+升温保暖+联系兽医**——肺炎急症可短期致死）。**核心生理性上下文必须排除**：**进食时口部开合属正常**（必须排除进食窗口，由用户标注或自动识别）；**水栖龟水下口部开合为换气吐泡属正常**（必须等浮出水面或晒台时分析）；**晒背蒸发期可能开口属正常**；**消化期呼吸短促**。物种特异性硬约束：必须按物种适宜温度基线判定（**严禁通用阈值盲判**）。头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食时段未排除 / 分辨率 < 1080p → 必须返回 `respiration_signal_unreliable`。不提供任何疾病诊断，仅输出基于视觉的异常体征识别；**🚨 严禁输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量**；**🚨 严禁输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方**；**🚨 严禁输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法**（仅可提示\"水温/气温调至物种推荐高线，由用户根据物种手册设定\"）；严禁伪造夸大开合频率与黏液检测；严禁越权代用户启停加热棒/UVB/干养水养切换（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头**实时视频**（默认 ≥ 3 分钟连续观察，必须排除进食窗口），识别 7 类综合场景（respiration_normal / respiration_mild_anomaly / pneumonia_risk_mild / pneumonia_risk_moderate / pneumonia_risk_severe / respiration_within_basking_context / respiration_signal_unreliable）→ **四组指标**：口部开合 6 项（**每分钟开合次数** + 单次时长 + 开合幅度 + 置信度 + 进食窗口 + 水下状态）+ 口鼻黏液与分泌物 6 项（**口腔黏液** + 丝状物数量 + **鼻分泌物** + 颜色 + 鼻孔气泡 + 综合置信度）+ 呼吸节律与姿态 5 项（呼吸频率 + 头颈持续伸展 + **张嘴+头颈伸展典型肺炎姿态** + **水栖漂浮倾斜** + 嗜睡评分）+ 排除上下文 6 项（环境温度 + 水温适宜 + 进食 30min 内 + 晒背中 + 蜕皮期 + 繁殖期）→ 4 档提醒级别（info / important / urgent / critical）→ **4 级提醒策略递进**（入库 → 复测水温气温+观察 → 升温隔离干养+联系兽医 → 🚨 立即干养升温+紧急联系兽医）→ 单日提醒上限（Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限**）→ **肺炎风险预警报告**（按 enclosure_id + individual_id + 事件时间戳输出，含开合频率 + 黏液鼻分泌物 + 姿态评分 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 龟头部精准定位与跟踪 |\n| 2 | 口部张合事件检测（嘴角张开 + 喙缘距离 + 时间序列） |\n| 3 | 黏液丝状物检测（颗粒形态学 + 反光点过滤） |\n| 4 | 鼻分泌物检测（鼻孔局部色差 + 气泡检测） |\n| 5 | 头颈伸展度量 |\n| 6 | 水栖龟漂浮姿态识别（壳体倾斜角 + 肺部积液浮力不平衡推断） |\n| 7 | 嗜睡评分 |\n| 8 | 生理性上下文识别（进食 / 水下 / 晒背 / 消化 / 蜕皮 / 繁殖） |\n| 9 | 物种适宜温度门控 |\n| 10 | 图像质量门控（头部缩壳 / 全程水下 / 模糊 / 光照 → unreliable） |\n| 11 | 用户 APP 紧急推送 |\n| 12 | 4 级提醒递进 |\n| 13 | 单日提醒上限（**Level 4 不设上限**） |\n| 14 | 肺炎风险预警报告（按 enclosure_id + individual_id 输出） |\n| 15 | 连续 ≥ 2 次 Level 3+ → 强烈建议联系**专业爬宠兽医**（X 光 + 肺部听诊 + 鼻分泌物镜检/培养） |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供龟缸固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行龟类肺炎征兆识别 |\n| 🔎 明确分析意图 | 当用户明确提及龟张嘴呼吸、龟伸脖子、龟漂浮、龟鼻涕、龟黏液、龟呼吸困难、龟肺炎、URI 等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看龟类肺炎预警历史报告、肺炎风险事件清单、查询历史呼吸异常记录、显示所有龟肺炎报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备龟缸固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行龟类肺炎征兆识别 | 调用 `-m scripts.smyx_turtle_pneumonia_symptom_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地龟缸固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络龟缸固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，龟类肺炎征兆场景默认 `other` | 按需填写 |\n| `--list` | 显示龟类肺炎风险预警历史记录清单 | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py`](scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov，最大 10MB；摄像头需**正对头颈部清晰展示口鼻区域**；**分辨率 ≥ 1080p**（口鼻黏液细节）；帧率 ≥ 25 FPS；**默认 ≥ 3 分钟连续观察**；**必须排除进食时段**；**水栖龟必须浮出水面或晒台上** |\n| 🔎 使用提醒 | **核心采样窗口**：≥ 3 分钟连续观察 |\n| 🔎 使用提醒 | **核心预警门槛**：口部开合 **> 10 次/分钟**（非进食状态下）OR 黏液 OR 鼻分泌物 |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → critical），严重姿态（张嘴+头颈伸展 / 漂浮倾斜 / 黄脓血染鼻涕 / 鼻孔气泡）直接 Level 4 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症可短期致死）** |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册） |\n| 🔎 使用提醒 | **禁止**长期存储完整龟缸视频（≤ 14 天，留口部开合时间序列 + 肺炎关键征兆片段；养殖场/医院按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / UVB / 灯光 / 干养/水养切换；任何环境控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大开合频率、黏液检测、鼻分泌物等指标；所有数据必须基于真实视频帧分析 |\n| 🔎 使用提醒 | **必须**按 **species 适宜温度基线**判定（热带苏卡达/缅陆适温高 / 温带草龟/黄缘适温中等 / 深水龟 vs 浅水龟节律不同）；**严禁通用阈值** |\n| 📚 文档读取 | **必须**考虑生理性上下文（**进食时口部开合属正常 / 水栖龟水下开合为换气吐泡 / 晒背蒸发期可能开口 / 消化期呼吸短促**），必须排除 |\n| 🔎 使用提醒 | **必须**在头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食时段未排除 / 分辨率 < 1080p 时返回 `respiration_signal_unreliable` |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 次 Level 3+ → 强烈建议联系**专业爬宠兽医**（X 光 + 肺部听诊 + 鼻分泌物镜检/培养） |\n| 📜 报告输出 | **必须**：肺炎风险预警报告**按 enclosure_id + individual_id + 事件时间戳输出**，含开合频率 + 黏液鼻分泌物 + 姿态评分 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史肺炎风险预警记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input /path/to/turtle.mp4\n\n# 分析网络龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --url https://example.com/turtle.mp4\n\n# 显示历史肺炎风险预警记录清单（自动触发关键词：查看龟类肺炎预警历史报告等）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-turtle-pneumonia-symptom-detection-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1786138657002\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_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` - 龟类张嘴呼吸（肺炎征兆）识别\n\n## 输入约束\n\n- 摄像头：龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头\n- 分辨率 ≥ 1080p（**口鼻黏液为丝状/反光点细节，需高分辨率**）；帧率 ≥ 25 FPS（开合动作快，需高帧率）\n- 拍摄角度：**正对头颈部**或侧前 30°，必须**清晰展示口鼻区域**（头部缩入壳内时无法分析）\n- 光照：充足且均匀（避免反光过强误判为黏液 / 避免阴影遮挡口鼻）\n- **核心采样窗口**：默认 ≥ 3 分钟连续观察\n- **必须排除进食时段**（进食时口部开合属正常）\n- 水栖龟需在**完全浮出水面或晒台上**时分析（水下口部开合为换气吐泡）\n- 多缸场景按摄像头 ID + 个体 ID 双重绑定\n- **部署时必须录入**：物种、龟类型（水栖/半水栖/陆栖）、水温（水栖必填）、气温、UVB 状态、上次投喂时间戳\n\n## 关键观测信号\n\n### 口部开合\n- `mouth_opening_events_per_minute` - **每分钟口部开合次数**（核心指标，阈值 > 10 次/分钟触发风险）\n- `mouth_opening_duration_ms_avg` - 单次开合平均时长\n- `mouth_opening_amplitude_normalized` - 开合幅度归一化\n- `mouth_opening_confidence` - 开合检测置信度\n- `is_during_feeding_window` - 是否处于进食窗口\n- `is_underwater_aquatic` - 水栖龟是否处于水下\n\n### 口鼻黏液与分泌物\n- `mucus_detected_in_mouth` - **口腔内是否检测到黏液**（反光点 + 丝状物）\n- `mucus_strand_count` - 黏液丝状物数量\n- `nasal_discharge_detected` - **鼻腔是否有分泌物**\n- `nasal_discharge_color` - 分泌物颜色（clear_transparent / yellow_pus / blood_tinged）\n- `bubble_at_nostril` - 鼻孔气泡（肺炎强信号）\n- `mucus_nasal_confidence` - 综合置信度\n\n### 呼吸节律与姿态\n- `breathing_rate_per_minute` - 呼吸频率\n- `neck_extension_persistent` - 头颈持续伸展不缩（呼吸困难强信号）\n- `gaping_with_neck_extension` - **张嘴 + 头颈伸展**（典型肺炎姿态）\n- `floating_tilted_aquatic` - 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号）\n- `lethargy_score_0_5` - 嗜睡/活动减少评分\n\n### 上下文与排除信号\n- `ambient_temperature_c` - 环境温度\n- `water_temperature_appropriate` - 水温是否在物种适宜范围\n- `is_post_feeding_within_30min` - 是否刚进食 30 分钟内\n- `is_during_basking` - 是否处于晒背中\n- `is_during_shedding` - 是否蜕皮期\n- `is_breeding_season` - 是否繁殖期\n\n## 综合判定\n\n- `respiration_normal` - 呼吸行为正常\n- `respiration_mild_anomaly` - 轻度异常（开合 6-10 次/分钟，无黏液）\n- `pneumonia_risk_mild` - **肺炎风险轻度**（开合 > 10 次/分钟 OR 微量黏液）\n- `pneumonia_risk_moderate` - **肺炎风险中度**（开合 > 10 次/分钟 + 黏液 + 鼻清涕）\n- `pneumonia_risk_severe` - **肺炎风险严重**（张嘴+头颈持续伸展 / 黄脓血染鼻涕 / 鼻孔气泡 / 漂浮倾斜）\n- `respiration_within_basking_context` - 晒背上下文正常\n- `respiration_signal_unreliable` - 信号不可靠\n\n## 4 级提醒策略递进\n\n- Level 1：仅入库\n- Level 2（mild_anomaly）：复测水温/气温 + 加强观察 24-48 小时\n- Level 3（mild/moderate）：**立即将水温/气温调至物种推荐高线 + 隔离至温暖干燥养殖箱 + 观察食欲精神 + 立即联系爬宠兽医**\n- Level 4（severe）：**立即干养 + 升温保暖 + 立即联系爬宠兽医**（肺炎急症可短期致死）\n\n## 单日提醒上限\n\n- Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症）**\n\n## 红线约束\n\n- **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等**具体疾病诊断**\n- **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量\n- **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方\n- **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册）\n- **禁止**长期存储完整龟缸视频（≤ 14 天）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / UVB / 干养/水养切换\n- 所有指标必须基于真实视频帧分析；禁止伪造夸大\n- 物种特异性：热带物种适温高、温带物种适温中等、深水龟 vs 浅水龟节律不同 → 按物种基线判定\n- 生理性上下文：进食 / 水下换气 / 晒背蒸发 / 消化期短促 → 必须排除\n- 头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食未排除 / 分辨率 < 1080p → 必须返回 `respiration_signal_unreliable`\n- 必须告知用户：AI 视觉仅供参考，**肺炎确诊需 X 光 + 肺部听诊 + 鼻分泌物镜检/培养，由专业爬宠兽医执行**\n\n## 输出报告字段\n\n- `report_date`、`enclosure_id`、`individual_id`、`species`、`turtle_type`、`water_temperature_c`、`ambient_temperature_c`、`mouth_opening_events_per_minute`、`mucus_detected_in_mouth`、`nasal_discharge_detected`、`nasal_discharge_color`、`bubble_at_nostril`、`gaping_with_neck_extension`、`floating_tilted_aquatic`、`composite_scene`、`alert_level`、`recommended_actions`（不含具体药物剂量、抗生素品牌、精确升温温度数值）、`disclaimer`\n\nFile v1.0.7:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.7:scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.7:skill-card.md\n\n## Description:\n\nAnalyzes fixed-camera turtle mouth and nasal video to flag visual pneumonia-risk signs such as unusually frequent open-mouth breathing, mucus, or nasal discharge in non-feeding contexts.\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 users, developers, and reptile-care operators use this skill to submit turtle enclosure video or URLs for cloud-backed visual screening, alert generation, and historical report lookup. It supports risk warnings and care guidance, not veterinary diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Turtle videos or URLs are sent to a configured cloud service for analysis.\n\nMitigation: Install and use only when cloud processing of the submitted media fits the user's privacy expectations.\n\nRisk: The skill can silently create or reuse a local identity and retrieve cloud report history.\n\nMitigation: Review identity and history-access behavior before deployment, especially in shared workspaces.\n\nRisk: Service tokens may be stored in the workspace data database.\n\nMitigation: Protect the workspace data store and rotate or revoke tokens if the workspace is shared or exposed.\n\nRisk: Visual screening output could be mistaken for a veterinary diagnosis.\n\nMitigation: Present results as risk warnings only and direct users to a professional reptile veterinarian for diagnosis and treatment decisions.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-turtle-pneumonia-symptom-detection-analysis)\n- [API documentation](references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, guidance]\n\n**Output Format:** [Markdown reports and JSON from cloud-backed analysis or history queries]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Can write an optional output file when requested.]\n\n## Skill Version(s):\n\n1.0.7 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.7:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.7:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.6: 31 files, 45038 bytes\n\nFiles: references/api_doc.md (6346b), scripts/__init__.py (76b), scripts/config.py (705b), scripts/config.yaml (3b), scripts/skill.py (591b), scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py (3727b), skill-card.md (2522b), SKILL.md (19028b), 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-turtle-pneumonia-symptom-detection-analysis\"\ndescription: \"Through fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 🐢 Turtle Pneumonia Symptom (Open-Mouth Breathing) Detection | 龟类张嘴呼吸（肺炎征兆）识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **龟类张嘴呼吸（肺炎征兆）识别** |\n| 🎯 核心目标 | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` |\n\nThrough fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. When any of these symptoms appear alone or together, the system outputs a 'pneumonia risk warning', prompting the keeper to check environmental temperature and water quality and isolate/treat promptly. This skill helps early detection of respiratory infections in turtles and reduces mortality. Application scenarios: home turtle tanks, breeding ponds, animal hospitals. The system monitors in real time and pushes alerts when abnormal breathing behavior is detected. Skill features: turtle pneumonia has high mortality, and early symptoms (open-mouth breathing, mucus) are often overlooked. AI-based automatic monitoring helps keepers detect and intervene early, improving cure rate. This skill can be integrated into smart turtle-tank cameras or reptile health management apps.\n\n通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。该技能有助于早期发现龟类的呼吸道感染，降低死亡率。应用场景：家庭龟缸、养殖池、宠物医院。系统实时监测，当检测到异常呼吸行为时推送提醒。技能特点：龟类肺炎死亡率高，早期症状（张嘴呼吸、黏液）常被忽视。通过 AI 自动监测，可帮助饲养者及早发现并干预，提高治愈率。该技能可集成到智能龟缸摄像头或爬宠健康管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的爬行动物呼吸道健康监测 AI。你的任务是分析龟缸固定摄像头的视频（正对头颈部或侧前 30°，分辨率 ≥ 1080p——口鼻黏液为丝状/反光点细节需高清，帧率 ≥ 25 FPS——开合动作快需高帧率），围绕\"非进食状态下的呼吸征兆\"展开三组核心检测：① **口部开合频率**：每分钟开合次数 + 平均时长 + 开合幅度，**> 10 次/分钟触发风险门槛**；② **口鼻黏液与分泌物**：口腔内反光点 + 丝状物 + 鼻孔气泡 + 鼻分泌物（透明清涕 / 黄脓 / 血染）；③ **呼吸节律与姿态**：头颈持续伸展不缩 + **张嘴+头颈伸展典型肺炎姿态** + 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号） + 嗜睡评分。按 **species 适宜温度基线**（热带物种苏卡达/缅陆适温高、温带物种草龟/黄缘适温中等、深水龟 vs 浅水龟节律不同）匹配，按 7 类综合场景判定（respiration_normal / respiration_mild_anomaly / **pneumonia_risk_mild** / **pneumonia_risk_moderate** / **pneumonia_risk_severe** / respiration_within_basking_context / respiration_signal_unreliable），按 4 级提醒策略递进（Level 1 入库 → Level 2 复测水温气温+加强观察 24-48h → Level 3 立即升温至物种推荐高线+隔离温暖干燥箱+干养+联系兽医 → Level 4 **🚨 立即干养+升温保暖+联系兽医**——肺炎急症可短期致死）。**核心生理性上下文必须排除**：**进食时口部开合属正常**（必须排除进食窗口，由用户标注或自动识别）；**水栖龟水下口部开合为换气吐泡属正常**（必须等浮出水面或晒台时分析）；**晒背蒸发期可能开口属正常**；**消化期呼吸短促**。物种特异性硬约束：必须按物种适宜温度基线判定（**严禁通用阈值盲判**）。头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食时段未排除 / 分辨率 < 1080p → 必须返回 `respiration_signal_unreliable`。不提供任何疾病诊断，仅输出基于视觉的异常体征识别；**🚨 严禁输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量**；**🚨 严禁输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方**；**🚨 严禁输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法**（仅可提示\"水温/气温调至物种推荐高线，由用户根据物种手册设定\"）；严禁伪造夸大开合频率与黏液检测；严禁越权代用户启停加热棒/UVB/干养水养切换（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头**实时视频**（默认 ≥ 3 分钟连续观察，必须排除进食窗口），识别 7 类综合场景（respiration_normal / respiration_mild_anomaly / pneumonia_risk_mild / pneumonia_risk_moderate / pneumonia_risk_severe / respiration_within_basking_context / respiration_signal_unreliable）→ **四组指标**：口部开合 6 项（**每分钟开合次数** + 单次时长 + 开合幅度 + 置信度 + 进食窗口 + 水下状态）+ 口鼻黏液与分泌物 6 项（**口腔黏液** + 丝状物数量 + **鼻分泌物** + 颜色 + 鼻孔气泡 + 综合置信度）+ 呼吸节律与姿态 5 项（呼吸频率 + 头颈持续伸展 + **张嘴+头颈伸展典型肺炎姿态** + **水栖漂浮倾斜** + 嗜睡评分）+ 排除上下文 6 项（环境温度 + 水温适宜 + 进食 30min 内 + 晒背中 + 蜕皮期 + 繁殖期）→ 4 档提醒级别（info / important / urgent / critical）→ **4 级提醒策略递进**（入库 → 复测水温气温+观察 → 升温隔离干养+联系兽医 → 🚨 立即干养升温+紧急联系兽医）→ 单日提醒上限（Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限**）→ **肺炎风险预警报告**（按 enclosure_id + individual_id + 事件时间戳输出，含开合频率 + 黏液鼻分泌物 + 姿态评分 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 龟头部精准定位与跟踪 |\n| 2 | 口部张合事件检测（嘴角张开 + 喙缘距离 + 时间序列） |\n| 3 | 黏液丝状物检测（颗粒形态学 + 反光点过滤） |\n| 4 | 鼻分泌物检测（鼻孔局部色差 + 气泡检测） |\n| 5 | 头颈伸展度量 |\n| 6 | 水栖龟漂浮姿态识别（壳体倾斜角 + 肺部积液浮力不平衡推断） |\n| 7 | 嗜睡评分 |\n| 8 | 生理性上下文识别（进食 / 水下 / 晒背 / 消化 / 蜕皮 / 繁殖） |\n| 9 | 物种适宜温度门控 |\n| 10 | 图像质量门控（头部缩壳 / 全程水下 / 模糊 / 光照 → unreliable） |\n| 11 | 用户 APP 紧急推送 |\n| 12 | 4 级提醒递进 |\n| 13 | 单日提醒上限（**Level 4 不设上限**） |\n| 14 | 肺炎风险预警报告（按 enclosure_id + individual_id 输出） |\n| 15 | 连续 ≥ 2 次 Level 3+ → 强烈建议联系**专业爬宠兽医**（X 光 + 肺部听诊 + 鼻分泌物镜检/培养） |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供龟缸固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行龟类肺炎征兆识别 |\n| 🔎 明确分析意图 | 当用户明确提及龟张嘴呼吸、龟伸脖子、龟漂浮、龟鼻涕、龟黏液、龟呼吸困难、龟肺炎、URI 等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看龟类肺炎预警历史报告、肺炎风险事件清单、查询历史呼吸异常记录、显示所有龟肺炎报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备龟缸固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行龟类肺炎征兆识别 | 调用 `-m scripts.smyx_turtle_pneumonia_symptom_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地龟缸固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络龟缸固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，龟类肺炎征兆场景默认 `other` | 按需填写 |\n| `--list` | 显示龟类肺炎风险预警历史记录清单 | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py`](scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov，最大 10MB；摄像头需**正对头颈部清晰展示口鼻区域**；**分辨率 ≥ 1080p**（口鼻黏液细节）；帧率 ≥ 25 FPS；**默认 ≥ 3 分钟连续观察**；**必须排除进食时段**；**水栖龟必须浮出水面或晒台上** |\n| 🔎 使用提醒 | **核心采样窗口**：≥ 3 分钟连续观察 |\n| 🔎 使用提醒 | **核心预警门槛**：口部开合 **> 10 次/分钟**（非进食状态下）OR 黏液 OR 鼻分泌物 |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → critical），严重姿态（张嘴+头颈伸展 / 漂浮倾斜 / 黄脓血染鼻涕 / 鼻孔气泡）直接 Level 4 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症可短期致死）** |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册） |\n| 🔎 使用提醒 | **禁止**长期存储完整龟缸视频（≤ 14 天，留口部开合时间序列 + 肺炎关键征兆片段；养殖场/医院按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / UVB / 灯光 / 干养/水养切换；任何环境控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大开合频率、黏液检测、鼻分泌物等指标；所有数据必须基于真实视频帧分析 |\n| 🔎 使用提醒 | **必须**按 **species 适宜温度基线**判定（热带苏卡达/缅陆适温高 / 温带草龟/黄缘适温中等 / 深水龟 vs 浅水龟节律不同）；**严禁通用阈值** |\n| 📚 文档读取 | **必须**考虑生理性上下文（**进食时口部开合属正常 / 水栖龟水下开合为换气吐泡 / 晒背蒸发期可能开口 / 消化期呼吸短促**），必须排除 |\n| 🔎 使用提醒 | **必须**在头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食时段未排除 / 分辨率 < 1080p 时返回 `respiration_signal_unreliable` |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 次 Level 3+ → 强烈建议联系**专业爬宠兽医**（X 光 + 肺部听诊 + 鼻分泌物镜检/培养） |\n| 📜 报告输出 | **必须**：肺炎风险预警报告**按 enclosure_id + individual_id + 事件时间戳输出**，含开合频率 + 黏液鼻分泌物 + 姿态评分 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史肺炎风险预警记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input /path/to/turtle.mp4\n\n# 分析网络龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --url https://example.com/turtle.mp4\n\n# 显示历史肺炎风险预警记录清单（自动触发关键词：查看龟类肺炎预警历史报告等）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-turtle-pneumonia-symptom-detection-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1785587079950\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_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` - 龟类张嘴呼吸（肺炎征兆）识别\n\n## 输入约束\n\n- 摄像头：龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头\n- 分辨率 ≥ 1080p（**口鼻黏液为丝状/反光点细节，需高分辨率**）；帧率 ≥ 25 FPS（开合动作快，需高帧率）\n- 拍摄角度：**正对头颈部**或侧前 30°，必须**清晰展示口鼻区域**（头部缩入壳内时无法分析）\n- 光照：充足且均匀（避免反光过强误判为黏液 / 避免阴影遮挡口鼻）\n- **核心采样窗口**：默认 ≥ 3 分钟连续观察\n- **必须排除进食时段**（进食时口部开合属正常）\n- 水栖龟需在**完全浮出水面或晒台上**时分析（水下口部开合为换气吐泡）\n- 多缸场景按摄像头 ID + 个体 ID 双重绑定\n- **部署时必须录入**：物种、龟类型（水栖/半水栖/陆栖）、水温（水栖必填）、气温、UVB 状态、上次投喂时间戳\n\n## 关键观测信号\n\n### 口部开合\n- `mouth_opening_events_per_minute` - **每分钟口部开合次数**（核心指标，阈值 > 10 次/分钟触发风险）\n- `mouth_opening_duration_ms_avg` - 单次开合平均时长\n- `mouth_opening_amplitude_normalized` - 开合幅度归一化\n- `mouth_opening_confidence` - 开合检测置信度\n- `is_during_feeding_window` - 是否处于进食窗口\n- `is_underwater_aquatic` - 水栖龟是否处于水下\n\n### 口鼻黏液与分泌物\n- `mucus_detected_in_mouth` - **口腔内是否检测到黏液**（反光点 + 丝状物）\n- `mucus_strand_count` - 黏液丝状物数量\n- `nasal_discharge_detected` - **鼻腔是否有分泌物**\n- `nasal_discharge_color` - 分泌物颜色（clear_transparent / yellow_pus / blood_tinged）\n- `bubble_at_nostril` - 鼻孔气泡（肺炎强信号）\n- `mucus_nasal_confidence` - 综合置信度\n\n### 呼吸节律与姿态\n- `breathing_rate_per_minute` - 呼吸频率\n- `neck_extension_persistent` - 头颈持续伸展不缩（呼吸困难强信号）\n- `gaping_with_neck_extension` - **张嘴 + 头颈伸展**（典型肺炎姿态）\n- `floating_tilted_aquatic` - 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号）\n- `lethargy_score_0_5` - 嗜睡/活动减少评分\n\n### 上下文与排除信号\n- `ambient_temperature_c` - 环境温度\n- `water_temperature_appropriate` - 水温是否在物种适宜范围\n- `is_post_feeding_within_30min` - 是否刚进食 30 分钟内\n- `is_during_basking` - 是否处于晒背中\n- `is_during_shedding` - 是否蜕皮期\n- `is_breeding_season` - 是否繁殖期\n\n## 综合判定\n\n- `respiration_normal` - 呼吸行为正常\n- `respiration_mild_anomaly` - 轻度异常（开合 6-10 次/分钟，无黏液）\n- `pneumonia_risk_mild` - **肺炎风险轻度**（开合 > 10 次/分钟 OR 微量黏液）\n- `pneumonia_risk_moderate` - **肺炎风险中度**（开合 > 10 次/分钟 + 黏液 + 鼻清涕）\n- `pneumonia_risk_severe` - **肺炎风险严重**（张嘴+头颈持续伸展 / 黄脓血染鼻涕 / 鼻孔气泡 / 漂浮倾斜）\n- `respiration_within_basking_context` - 晒背上下文正常\n- `respiration_signal_unreliable` - 信号不可靠\n\n## 4 级提醒策略递进\n\n- Level 1：仅入库\n- Level 2（mild_anomaly）：复测水温/气温 + 加强观察 24-48 小时\n- Level 3（mild/moderate）：**立即将水温/气温调至物种推荐高线 + 隔离至温暖干燥养殖箱 + 观察食欲精神 + 立即联系爬宠兽医**\n- Level 4（severe）：**立即干养 + 升温保暖 + 立即联系爬宠兽医**（肺炎急症可短期致死）\n\n## 单日提醒上限\n\n- Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症）**\n\n## 红线约束\n\n- **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等**具体疾病诊断**\n- **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量\n- **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方\n- **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册）\n- **禁止**长期存储完整龟缸视频（≤ 14 天）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / UVB / 干养/水养切换\n- 所有指标必须基于真实视频帧分析；禁止伪造夸大\n- 物种特异性：热带物种适温高、温带物种适温中等、深水龟 vs 浅水龟节律不同 → 按物种基线判定\n- 生理性上下文：进食 / 水下换气 / 晒背蒸发 / 消化期短促 → 必须排除\n- 头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食未排除 / 分辨率 < 1080p → 必须返回 `respiration_signal_unreliable`\n- 必须告知用户：AI 视觉仅供参考，**肺炎确诊需 X 光 + 肺部听诊 + 鼻分泌物镜检/培养，由专业爬宠兽医执行**\n\n## 输出报告字段\n\n- `report_date`、`enclosure_id`、`individual_id`、`species`、`turtle_type`、`water_temperature_c`、`ambient_temperature_c`、`mouth_opening_events_per_minute`、`mucus_detected_in_mouth`、`nasal_discharge_detected`、`nasal_discharge_color`、`bubble_at_nostril`、`gaping_with_neck_extension`、`floating_tilted_aquatic`、`composite_scene`、`alert_level`、`recommended_actions`（不含具体药物剂量、抗生素品牌、精确升温温度数值）、`disclaimer`\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>\nThis skill analyzes turtle enclosure video inputs to identify visual respiratory warning signs such as frequent open-mouth breathing, mouth or nasal mucus, nasal discharge, abnormal posture, and related pneumonia-risk alerts. <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 users, reptile keepers, breeders, animal-care staff, and developers can use this skill to submit turtle enclosure footage for visual respiratory-sign analysis and to review generated pneumonia-risk warning reports. It supports analysis of current footage and retrieval of cloud-hosted historical warning reports. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill sends turtle videos or URLs to the lifeemergence.com cloud service for processing. <br>\nMitigation: Use it only with footage that may be processed by that cloud service, and avoid sensitive footage unless local policies allow that processing. <br>\nRisk: The skill silently creates or reuses a local identity, registers or logs into the remote service, and stores returned tokens in the workspace data database. <br>\nMitigation: Review workspace access, local data retention, and token deletion practices before use in shared or sensitive environments. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-turtle-pneumonia-symptom-detection-analysis) <br>\n- [API Documentation](references/api_doc.md) <br>\n- [Skill Usage Demo](https://lifeemergence.com/sample.html) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance] <br>\n**Output Format:** [JSON or Markdown text report with report links and optional file output] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Outputs include visual analysis results, warning levels, recommended next actions, disclaimers, and report export links when returned by the service.] <br>\n\n## Skill Version(s): <br>\n1.0.6 (source: server release metadata; artifact frontmatter reports 1.0.9) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.6:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.6:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.5: 31 files, 45199 bytes\n\nFiles: references/api_doc.md (6346b), scripts/__init__.py (76b), scripts/config.py (705b), scripts/config.yaml (3b), scripts/skill.py (591b), scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py (3727b), skill-card.md (2939b), SKILL.md (19028b), 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-turtle-pneumonia-symptom-detection-analysis\"\ndescription: \"Through fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。\"\nversion: \"1.0.6\"\nlicense: \"MIT-0\"\n---\n\n# 🐢 Turtle Pneumonia Symptom (Open-Mouth Breathing) Detection | 龟类张嘴呼吸（肺炎征兆）识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **龟类张嘴呼吸（肺炎征兆）识别** |\n| 🎯 核心目标 | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` |\n\nThrough fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. When any of these symptoms appear alone or together, the system outputs a 'pneumonia risk warning', prompting the keeper to check environmental temperature and water quality and isolate/treat promptly. This skill helps early detection of respiratory infections in turtles and reduces mortality. Application scenarios: home turtle tanks, breeding ponds, animal hospitals. The system monitors in real time and pushes alerts when abnormal breathing behavior is detected. Skill features: turtle pneumonia has high mortality, and early symptoms (open-mouth breathing, mucus) are often overlooked. AI-based automatic monitoring helps keepers detect and intervene early, improving cure rate. This skill can be integrated into smart turtle-tank cameras or reptile health management apps.\n\n通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。该技能有助于早期发现龟类的呼吸道感染，降低死亡率。应用场景：家庭龟缸、养殖池、宠物医院。系统实时监测，当检测到异常呼吸行为时推送提醒。技能特点：龟类肺炎死亡率高，早期症状（张嘴呼吸、黏液）常被忽视。通过 AI 自动监测，可帮助饲养者及早发现并干预，提高治愈率。该技能可集成到智能龟缸摄像头或爬宠健康管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的爬行动物呼吸道健康监测 AI。你的任务是分析龟缸固定摄像头的视频（正对头颈部或侧前 30°，分辨率 ≥ 1080p——口鼻黏液为丝状/反光点细节需高清，帧率 ≥ 25 FPS——开合动作快需高帧率），围绕\"非进食状态下的呼吸征兆\"展开三组核心检测：① **口部开合频率**：每分钟开合次数 + 平均时长 + 开合幅度，**> 10 次/分钟触发风险门槛**；② **口鼻黏液与分泌物**：口腔内反光点 + 丝状物 + 鼻孔气泡 + 鼻分泌物（透明清涕 / 黄脓 / 血染）；③ **呼吸节律与姿态**：头颈持续伸展不缩 + **张嘴+头颈伸展典型肺炎姿态** + 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号） + 嗜睡评分。按 **species 适宜温度基线**（热带物种苏卡达/缅陆适温高、温带物种草龟/黄缘适温中等、深水龟 vs 浅水龟节律不同）匹配，按 7 类综合场景判定（respiration_normal / respiration_mild_anomaly / **pneumonia_risk_mild** / **pneumonia_risk_moderate** / **pneumonia_risk_severe** / respiration_within_basking_context / respiration_signal_unreliable），按 4 级提醒策略递进（Level 1 入库 → Level 2 复测水温气温+加强观察 24-48h → Level 3 立即升温至物种推荐高线+隔离温暖干燥箱+干养+联系兽医 → Level 4 **🚨 立即干养+升温保暖+联系兽医**——肺炎急症可短期致死）。**核心生理性上下文必须排除**：**进食时口部开合属正常**（必须排除进食窗口，由用户标注或自动识别）；**水栖龟水下口部开合为换气吐泡属正常**（必须等浮出水面或晒台时分析）；**晒背蒸发期可能开口属正常**；**消化期呼吸短促**。物种特异性硬约束：必须按物种适宜温度基线判定（**严禁通用阈值盲判**）。头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食时段未排除 / 分辨率 < 1080p → 必须返回 `respiration_signal_unreliable`。不提供任何疾病诊断，仅输出基于视觉的异常体征识别；**🚨 严禁输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量**；**🚨 严禁输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方**；**🚨 严禁输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法**（仅可提示\"水温/气温调至物种推荐高线，由用户根据物种手册设定\"）；严禁伪造夸大开合频率与黏液检测；严禁越权代用户启停加热棒/UVB/干养水养切换（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头**实时视频**（默认 ≥ 3 分钟连续观察，必须排除进食窗口），识别 7 类综合场景（respiration_normal / respiration_mild_anomaly / pneumonia_risk_mild / pneumonia_risk_moderate / pneumonia_risk_severe / respiration_within_basking_context / respiration_signal_unreliable）→ **四组指标**：口部开合 6 项（**每分钟开合次数** + 单次时长 + 开合幅度 + 置信度 + 进食窗口 + 水下状态）+ 口鼻黏液与分泌物 6 项（**口腔黏液** + 丝状物数量 + **鼻分泌物** + 颜色 + 鼻孔气泡 + 综合置信度）+ 呼吸节律与姿态 5 项（呼吸频率 + 头颈持续伸展 + **张嘴+头颈伸展典型肺炎姿态** + **水栖漂浮倾斜** + 嗜睡评分）+ 排除上下文 6 项（环境温度 + 水温适宜 + 进食 30min 内 + 晒背中 + 蜕皮期 + 繁殖期）→ 4 档提醒级别（info / important / urgent / critical）→ **4 级提醒策略递进**（入库 → 复测水温气温+观察 → 升温隔离干养+联系兽医 → 🚨 立即干养升温+紧急联系兽医）→ 单日提醒上限（Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限**）→ **肺炎风险预警报告**（按 enclosure_id + individual_id + 事件时间戳输出，含开合频率 + 黏液鼻分泌物 + 姿态评分 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 龟头部精准定位与跟踪 |\n| 2 | 口部张合事件检测（嘴角张开 + 喙缘距离 + 时间序列） |\n| 3 | 黏液丝状物检测（颗粒形态学 + 反光点过滤） |\n| 4 | 鼻分泌物检测（鼻孔局部色差 + 气泡检测） |\n| 5 | 头颈伸展度量 |\n| 6 | 水栖龟漂浮姿态识别（壳体倾斜角 + 肺部积液浮力不平衡推断） |\n| 7 | 嗜睡评分 |\n| 8 | 生理性上下文识别（进食 / 水下 / 晒背 / 消化 / 蜕皮 / 繁殖） |\n| 9 | 物种适宜温度门控 |\n| 10 | 图像质量门控（头部缩壳 / 全程水下 / 模糊 / 光照 → unreliable） |\n| 11 | 用户 APP 紧急推送 |\n| 12 | 4 级提醒递进 |\n| 13 | 单日提醒上限（**Level 4 不设上限**） |\n| 14 | 肺炎风险预警报告（按 enclosure_id + individual_id 输出） |\n| 15 | 连续 ≥ 2 次 Level 3+ → 强烈建议联系**专业爬宠兽医**（X 光 + 肺部听诊 + 鼻分泌物镜检/培养） |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供龟缸固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行龟类肺炎征兆识别 |\n| 🔎 明确分析意图 | 当用户明确提及龟张嘴呼吸、龟伸脖子、龟漂浮、龟鼻涕、龟黏液、龟呼吸困难、龟肺炎、URI 等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看龟类肺炎预警历史报告、肺炎风险事件清单、查询历史呼吸异常记录、显示所有龟肺炎报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备龟缸固定摄像头视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行龟类肺炎征兆识别 | 调用 `-m scripts.smyx_turtle_pneumonia_symptom_detection_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地龟缸固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络龟缸固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，龟类肺炎征兆场景默认 `other` | 按需填写 |\n| `--list` | 显示龟类肺炎风险预警历史记录清单 | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py`](scripts/smyx_turtle_pneumonia_symptom_detection_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 输入要求：支持 mp4/avi/mov，最大 10MB；摄像头需**正对头颈部清晰展示口鼻区域**；**分辨率 ≥ 1080p**（口鼻黏液细节）；帧率 ≥ 25 FPS；**默认 ≥ 3 分钟连续观察**；**必须排除进食时段**；**水栖龟必须浮出水面或晒台上** |\n| 🔎 使用提醒 | **核心采样窗口**：≥ 3 分钟连续观察 |\n| 🔎 使用提醒 | **核心预警门槛**：口部开合 **> 10 次/分钟**（非进食状态下）OR 黏液 OR 鼻分泌物 |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → critical），严重姿态（张嘴+头颈伸展 / 漂浮倾斜 / 黄脓血染鼻涕 / 鼻孔气泡）直接 Level 4 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症可短期致死）** |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册） |\n| 🔎 使用提醒 | **禁止**长期存储完整龟缸视频（≤ 14 天，留口部开合时间序列 + 肺炎关键征兆片段；养殖场/医院按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / UVB / 灯光 / 干养/水养切换；任何环境控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大开合频率、黏液检测、鼻分泌物等指标；所有数据必须基于真实视频帧分析 |\n| 🔎 使用提醒 | **必须**按 **species 适宜温度基线**判定（热带苏卡达/缅陆适温高 / 温带草龟/黄缘适温中等 / 深水龟 vs 浅水龟节律不同）；**严禁通用阈值** |\n| 📚 文档读取 | **必须**考虑生理性上下文（**进食时口部开合属正常 / 水栖龟水下开合为换气吐泡 / 晒背蒸发期可能开口 / 消化期呼吸短促**），必须排除 |\n| 🔎 使用提醒 | **必须**在头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食时段未排除 / 分辨率 < 1080p 时返回 `respiration_signal_unreliable` |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 次 Level 3+ → 强烈建议联系**专业爬宠兽医**（X 光 + 肺部听诊 + 鼻分泌物镜检/培养） |\n| 📜 报告输出 | **必须**：肺炎风险预警报告**按 enclosure_id + individual_id + 事件时间戳输出**，含开合频率 + 黏液鼻分泌物 + 姿态评分 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史肺炎风险预警记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input /path/to/turtle.mp4\n\n# 分析网络龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --url https://example.com/turtle.mp4\n\n# 显示历史肺炎风险预警记录清单（自动触发关键词：查看龟类肺炎预警历史报告等）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --output result.json\n```\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-turtle-pneumonia-symptom-detection-analysis\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1783967427314\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_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` - 龟类张嘴呼吸（肺炎征兆）识别\n\n## 输入约束\n\n- 摄像头：龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头\n- 分辨率 ≥ 1080p（**口鼻黏液为丝状/反光点细节，需高分辨率**）；帧率 ≥ 25 FPS（开合动作快，需高帧率）\n- 拍摄角度：**正对头颈部**或侧前 30°，必须**清晰展示口鼻区域**（头部缩入壳内时无法分析）\n- 光照：充足且均匀（避免反光过强误判为黏液 / 避免阴影遮挡口鼻）\n- **核心采样窗口**：默认 ≥ 3 分钟连续观察\n- **必须排除进食时段**（进食时口部开合属正常）\n- 水栖龟需在**完全浮出水面或晒台上**时分析（水下口部开合为换气吐泡）\n- 多缸场景按摄像头 ID + 个体 ID 双重绑定\n- **部署时必须录入**：物种、龟类型（水栖/半水栖/陆栖）、水温（水栖必填）、气温、UVB 状态、上次投喂时间戳\n\n## 关键观测信号\n\n### 口部开合\n- `mouth_opening_events_per_minute` - **每分钟口部开合次数**（核心指标，阈值 > 10 次/分钟触发风险）\n- `mouth_opening_duration_ms_avg` - 单次开合平均时长\n- `mouth_opening_amplitude_normalized` - 开合幅度归一化\n- `mouth_opening_confidence` - 开合检测置信度\n- `is_during_feeding_window` - 是否处于进食窗口\n- `is_underwater_aquatic` - 水栖龟是否处于水下\n\n### 口鼻黏液与分泌物\n- `mucus_detected_in_mouth` - **口腔内是否检测到黏液**（反光点 + 丝状物）\n- `mucus_strand_count` - 黏液丝状物数量\n- `nasal_discharge_detected` - **鼻腔是否有分泌物**\n- `nasal_discharge_color` - 分泌物颜色（clear_transparent / yellow_pus / blood_tinged）\n- `bubble_at_nostril` - 鼻孔气泡（肺炎强信号）\n- `mucus_nasal_confidence` - 综合置信度\n\n### 呼吸节律与姿态\n- `breathing_rate_per_minute` - 呼吸频率\n- `neck_extension_persistent` - 头颈持续伸展不缩（呼吸困难强信号）\n- `gaping_with_neck_extension` - **张嘴 + 头颈伸展**（典型肺炎姿态）\n- `floating_tilted_aquatic` - 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号）\n- `lethargy_score_0_5` - 嗜睡/活动减少评分\n\n### 上下文与排除信号\n- `ambient_temperature_c` - 环境温度\n- `water_temperature_appropriate` - 水温是否在物种适宜范围\n- `is_post_feeding_within_30min` - 是否刚进食 30 分钟内\n- `is_during_basking` - 是否处于晒背中\n- `is_during_shedding` - 是否蜕皮期\n- `is_breeding_season` - 是否繁殖期\n\n## 综合判定\n\n- `respiration_normal` - 呼吸行为正常\n- `respiration_mild_anomaly` - 轻度异常（开合 6-10 次/分钟，无黏液）\n- `pneumonia_risk_mild` - **肺炎风险轻度**（开合 > 10 次/分钟 OR 微量黏液）\n- `pneumonia_risk_moderate` - **肺炎风险中度**（开合 > 10 次/分钟 + 黏液 + 鼻清涕）\n- `pneumonia_risk_severe` - **肺炎风险严重**（张嘴+头颈持续伸展 / 黄脓血染鼻涕 / 鼻孔气泡 / 漂浮倾斜）\n- `respiration_within_basking_context` - 晒背上下文正常\n- `respiration_signal_unreliable` - 信号不可靠\n\n## 4 级提醒策略递进\n\n- Level 1：仅入库\n- Level 2（mild_anomaly）：复测水温/气温 + 加强观察 24-48 小时\n- Level 3（mild/moderate）：**立即将水温/气温调至物种推荐高线 + 隔离至温暖干燥养殖箱 + 观察食欲精神 + 立即联系爬宠兽医**\n- Level 4（severe）：**立即干养 + 升温保暖 + 立即联系爬宠兽医**（肺炎急症可短期致死）\n\n## 单日提醒上限\n\n- Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症）**\n\n## 红线约束\n\n- **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等**具体疾病诊断**\n- **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量\n- **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方\n- **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册）\n- **禁止**长期存储完整龟缸视频（≤ 14 天）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / UVB / 干养/水养切换\n- 所有指标必须基于真实视频帧分析；禁止伪造夸大\n- 物种特异性：热带物种适温高、温带物种适温中等、深水龟 vs 浅水龟节律不同 → 按物种基线判定\n- 生理性上下文：进食 / 水下换气 / 晒背蒸发 / 消化期短促 → 必须排除\n- 头部缩入壳内 / 水栖全程水下 / 图像模糊 / 光照不足 / 进食未排除 / 分辨率 < 1080p → 必须返回 `respiration_signal_unreliable`\n- 必须告知用户：AI 视觉仅供参考，**肺炎确诊需 X 光 + 肺部听诊 + 鼻分泌物镜检/培养，由专业爬宠兽医执行**\n\n## 输出报告字段\n\n- `re\n\nArchive v1.0.4: 31 files, 45141 ...","readmeExcerpt":"Skill: Turtle Pneumonia Symptom (Open-Mouth Breathing) Detection | 龟类张嘴呼吸（肺炎征兆）识别 Owner: 18072937735 Summary: Through fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and n","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input /path/to/turtle.mp4\n\n# 分析网络龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --url https://example.com/turtle.mp4\n\n# 显示历史肺炎风险预警记录清单（自动触发关键词：查看龟类肺炎预警历史报告等）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --output result.json"},{"language":"bash","snippet":"python -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input /path/to/turtle.mp4\n\n# 分析网络龟缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --url https://example.com/turtle.mp4\n\n# 显示历史肺炎风险预警记录清单（自动触发关键词：查看龟类肺炎预警历史报告等）\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_turtle_pneumonia_symptom_detection_analysis --input turtle.mp4 --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"smyx-turtle-pneumonia-symptom-detection-analysis\"\ndescription: \"Through fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。\"\nversion: \"1.0.17\"\nlicense: \"MIT-0\"\n---\n\n# 🐢 Turtle Pneumonia Symptom (Open-Mouth Breathing) Detection | 龟类张嘴呼吸（肺炎征兆）识别\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **龟类张嘴呼吸（肺炎征兆）识别** |\n| 🎯 核心目标 | 通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` |\n\nThrough fixed enclosure cameras, the system analyzes mouth and nasal videos of turtles to detect abnormally frequent open-mouth breathing in non-feeding states (mouth opening frequency unusually elevated), as well as the presence of mucus (reflective spots or strands) or nasal discharge around the mouth and nose. When any of these symptoms appear alone or together, the system outputs a 'pneumonia risk warning', prompting the keeper to check environmental temperature and water quality and isolate/treat promptly. This skill helps early detection of respiratory infections in turtles and reduces mortality. Application scenarios: home turtle tanks, breeding ponds, animal hospitals. The system monitors in real time and pushes alerts when abnormal breathing behavior is detected. Skill features: turtle pneumonia has high mortality, and early symptoms (open-mouth breathing, mucus) are often overlooked. AI-based automatic monitoring helps keepers detect and intervene early, improving cure rate. This skill can be integrated into smart turtle-tank cameras or reptile health management apps.\n\n通过龟缸固定摄像头，分析龟类的口鼻部视频，检测龟在非进食状态下（未摄食时）口部频繁开合（张嘴呼吸，频率异常增高），以及口鼻区域是否有黏液（反光点或丝状物）或鼻腔分泌物。当同时或单独出现上述症状时，输出'肺炎风险提示'，提醒饲养者检查环境温度、水质，并及时隔离治疗。该技能有助于早期发现龟类的呼吸道感染，降低死亡率。应用场景：家庭龟缸、养殖池、宠物医院。系统实时监测，当检测到异常呼吸行为时推送提醒。技能特点：龟类肺炎死亡率高，早期症状（张嘴呼吸、黏液）常被忽视。通过 AI 自动监测，可帮助饲养者及早发现并干预，提高治愈率。该技能可集成到智能龟缸摄像头或爬宠健康管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的爬行动物呼吸道健康监测 AI。你的任务是分析龟缸固定摄像头的视频（正对头颈部或侧前 30°，分辨率 ≥ 1080p——口鼻黏液为丝状/反光点细节需高清，帧率 ≥ 25 FPS——开合动作快需高帧率），围绕\"非进食状态下的呼吸征兆\"展开三组核心检测：① **口部开合频率**：每分钟开合次数 + 平均时长 + 开合幅度，**> 10 次/分钟触发风险门槛**；② **口鼻黏液与分泌物**：口腔内反光点 + 丝状物 + 鼻孔气泡 + 鼻分泌物（透明清涕 / 黄脓 / 血染）；③ **呼吸节律与姿态**：头颈持续伸展不缩 + **张嘴+头颈伸展典型肺炎姿态** + 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号） + 嗜睡评分。按 **species 适宜温度基线**（热带物种苏卡达/缅陆适温高、温带物种草龟/黄缘适温中等、深水龟 vs 浅水龟节律不同）匹配，按 7 类综合场景判定（respiration_normal / respiration_mild_anomaly / **pneumonia_risk_mild** / **pneumonia_risk_mo"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-turtle-pneumonia-symptom-detection-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1791089965416\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_TURTLE_PNEUMONIA_SYMPTOM_DETECTION_ANALYSIS` - 龟类张嘴呼吸（肺炎征兆）识别\n\n## 输入约束\n\n- 摄像头：龟缸固定摄像头 / 智能龟缸内置摄像头 / 养殖池水面摄像头 / 宠物医院诊查摄像头\n- 分辨率 ≥ 1080p（**口鼻黏液为丝状/反光点细节，需高分辨率**）；帧率 ≥ 25 FPS（开合动作快，需高帧率）\n- 拍摄角度：**正对头颈部**或侧前 30°，必须**清晰展示口鼻区域**（头部缩入壳内时无法分析）\n- 光照：充足且均匀（避免反光过强误判为黏液 / 避免阴影遮挡口鼻）\n- **核心采样窗口**：默认 ≥ 3 分钟连续观察\n- **必须排除进食时段**（进食时口部开合属正常）\n- 水栖龟需在**完全浮出水面或晒台上**时分析（水下口部开合为换气吐泡）\n- 多缸场景按摄像头 ID + 个体 ID 双重绑定\n- **部署时必须录入**：物种、龟类型（水栖/半水栖/陆栖）、水温（水栖必填）、气温、UVB 状态、上次投喂时间戳\n\n## 关键观测信号\n\n### 口部开合\n- `mouth_opening_events_per_minute` - **每分钟口部开合次数**（核心指标，阈值 > 10 次/分钟触发风险）\n- `mouth_opening_duration_ms_avg` - 单次开合平均时长\n- `mouth_opening_amplitude_normalized` - 开合幅度归一化\n- `mouth_opening_confidence` - 开合检测置信度\n- `is_during_feeding_window` - 是否处于进食窗口\n- `is_underwater_aquatic` - 水栖龟是否处于水下\n\n### 口鼻黏液与分泌物\n- `mucus_detected_in_mouth` - **口腔内是否检测到黏液**（反光点 + 丝状物）\n- `mucus_strand_count` - 黏液丝状物数量\n- `nasal_discharge_detected` - **鼻腔是否有分泌物**\n- `nasal_discharge_color` - 分泌物颜色（clear_transparent / yellow_pus / blood_tinged）\n- `bubble_at_nostril` - 鼻孔气泡（肺炎强信号）\n- `mucus_nasal_confidence` - 综合置信度\n\n### 呼吸节律与姿态\n- `breathing_rate_per_minute` - 呼吸频率\n- `neck_extension_persistent` - 头颈持续伸展不缩（呼吸困难强信号）\n- `gaping_with_neck_extension` - **张嘴 + 头颈伸展**（典型肺炎姿态）\n- `floating_tilted_aquatic` - 水栖龟漂浮倾斜（肺部积液浮力不平衡，肺炎晚期强信号）\n- `lethargy_score_0_5` - 嗜睡/活动减少评分\n\n### 上下文与排除信号\n- `ambient_temperature_c` - 环境温度\n- `water_temperature_appropriate` - 水温是否在物种适宜范围\n- `is_post_feeding_within_30min` - 是否刚进食 30 分钟内\n- `is_during_basking` - 是否处于晒背中\n- `is_during_shedding` - 是否蜕皮期\n- `is_breeding_season` - 是否繁殖期\n\n## 综合判定\n\n- `respiration_normal` - 呼吸行为正常\n- `respiration_mild_anomaly` - 轻度异常（开合 6-10 次/分钟，无黏液）\n- `pneumonia_risk_mild` - **肺炎风险轻度**（开合 > 10 次/分钟 OR 微量黏液）\n- `pneumonia_risk_moderate` - **肺炎风险中度**（开合 > 10 次/分钟 + 黏液 + 鼻清涕）\n- `pneumonia_risk_severe` - **肺炎风险严重**（张嘴+头颈持续伸展 / 黄脓血染鼻涕 / 鼻孔气泡 / 漂浮倾斜）\n- `respiration_within_basking_context` - 晒背上下文正常\n- `respiration_signal_unreliable` - 信号不可靠\n\n## 4 级提醒策略递进\n\n- Level 1：仅入库\n- Level 2（mild_anomaly）：复测水温/气温 + 加强观察 24-48 小时\n- Level 3（mild/moderate）：**立即将水温/气温调至物种推荐高线 + 隔离至温暖干燥养殖箱 + 观察食欲精神 + 立即联系爬宠兽医**\n- Level 4（severe）：**立即干养 + 升温保暖 + 立即联系爬宠兽医**（肺炎急症可短期致死）\n\n## 单日提醒上限\n\n- Level 1 不限 / Level 2 × 3 / Level 3 × 5 / **Level 4 不设上限（肺炎急症）**\n\n## 红线约束\n\n- **🚨 禁止**做\"细菌性肺炎 / 病毒性肺炎 / 真菌性肺炎 / 呼吸道支原体感染 / RNTV / 上呼吸道感染 URI\"等**具体疾病诊断**\n- **🚨 绝对禁止**输出具体药物名称、剂量、抗生素品牌、抗真菌药品牌、肌注剂量、口服剂量\n- **🚨 绝对禁止**输出\"打恩诺沙星 X mg/kg\"\"口服阿莫西林\"\"注射头孢拉定\"\"灌服板蓝根\"等具体处方\n- **🚨 绝对禁止**输出\"具体升温到 N℃ 持续 N 天\"等精确温度疗法（仅可\"水温/气温调至物种推荐高线\"由用户根据物种手册）\n- **禁止**长期存储完整龟缸视频（≤ 14 天）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / UVB /"},{"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":1164,"uniquenessScore":44,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T01:23:45.777Z","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-10T01:23:45.777Z","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-10T09:09:26.219Z","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"}]}}}