{"id":"61b9105e-b6d2-44bf-afe4-4161451b1c43","entityType":"agent","slug":"clawhub-18072937735-smyx-fish-flashing-scraping-detection-analy","name":"Fish Flashing & Scraping Detection (Ectoparasite Warning) | 鱼类擦缸/蹭底行为识别（外寄）","canonicalUrl":"https://www.xpersona.co/agent/clawhub-18072937735-smyx-fish-flashing-scraping-detection-analy","canonicalPath":"/agent/clawhub-18072937735-smyx-fish-flashing-scraping-detection-analy","generatedAt":"2026-10-10T09:04:16.820Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-09T21:50:47.057Z","emptyReason":null},"description":"Through fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。 Skill: Fish Flashing & Scraping Detection (Ectoparasite Warning) | 鱼类擦缸/蹭底行为识别（外寄） Owner: 18072937735 Summary: Through fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-fish-flashing-scraping-detection-analysis","sourceUrl":"https://clawhub.ai/18072937735/smyx-fish-flashing-scraping-detection-analysis","homepage":"https://clawhub.ai/18072937735/skills/smyx-fish-flashing-scraping-detection-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/18072937735/smyx-fish-flashing-scraping-detection-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/18072937735/skills/smyx-fish-flashing-scraping-detection-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":66,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Through fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, "},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T21:50:47.057Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T21:50:47.057Z","emptyReason":null},"stars":null,"forks":null,"downloads":1961,"packageName":null,"latestVersion":"1.0.13","tractionLabel":"2K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T21:50:47.056Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T21:50:47.057Z","lastCrawledAt":"2026-10-09T21:50:47.056Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T21:50:47.056Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.13","createdAt":"2026-09-28T06:47:36.052Z","changelog":"- Removed the file: skill-card.md. - No feature or functional changes in this version. - Documentation content and core logic remain unchanged.","fileCount":31,"zipByteSize":45569},{"version":"1.0.12","createdAt":"2026-09-25T03:45:31.183Z","changelog":"- Updated version to 1.0.15, reflecting current documentation and configuration. - SKILL.md revised with improved formatting and updated content; no changes to core logic described. - Obsolete file skill-card.md removed as part of documentation cleanup. - No user-facing functional changes; documentation and configuration only.","fileCount":31,"zipByteSize":45519},{"version":"1.0.11","createdAt":"2026-09-08T22:22:29.724Z","changelog":"- Version updated from 1.0.11 to 1.0.13. - Minor documentation updates in SKILL.md. - skill-card.md file removed.","fileCount":31,"zipByteSize":45911},{"version":"1.0.10","createdAt":"2026-08-29T20:44:28.796Z","changelog":"- Updated SKILL.md documentation with content or version changes. - Bumped version from 1.0.10 to 1.0.11. - Removed the file skill-card.md. - No changes to core logic or features; changes focus on documentation and metadata cleanup.","fileCount":31,"zipByteSize":45904},{"version":"1.0.9","createdAt":"2026-08-21T20:57:28.983Z","changelog":"- Updated skill version to 1.0.10. - SKILL.md content updated; mostly internal version bump and documentation changes. - Removed outdated file: skill-card.md. - No changes to code, features, or functionality.","fileCount":31,"zipByteSize":45672},{"version":"1.0.8","createdAt":"2026-08-15T09:25:31.271Z","changelog":"smyx-fish-flashing-scraping-detection-analysis 1.0.8 - Updated documentation in SKILL.md. - Removed redundant skill-card.md file. - Modified configuration in skills/smyx_common/scripts/config.yaml.","fileCount":31,"zipByteSize":45763},{"version":"1.0.7","createdAt":"2026-08-06T10:07:32.785Z","changelog":"- skill-card.md has been removed from the project. - SKILL.md updated version metadata to 1.0.7. - No functional or logic changes to the detection or workflow, only documentation changes and file cleanup. - All usage instructions, capability scopes, and technical details in SKILL.md remain unchanged.","fileCount":31,"zipByteSize":45779},{"version":"1.0.6","createdAt":"2026-07-29T23:48:27.574Z","changelog":"- Brought documentation up to date in SKILL.md for version 1.0.6. - Removed the file skill-card.md. - No changes to functionality or code; documentation only.","fileCount":31,"zipByteSize":45814}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-fish-flashing-scraping-detection-analysis","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-flashing-scraping-detection-analy/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-flashing-scraping-detection-analy/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-flashing-scraping-detection-analy/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-flashing-scraping-detection-analy/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-flashing-scraping-detection-analy/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-flashing-scraping-detection-analy/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:04:16.816Z"}},"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-fish-flashing-scraping-detection-analy/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-flashing-scraping-detection-analy/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-flashing-scraping-detection-analy/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-flashing-scraping-detection-analy/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-09T21:50:47.057Z","emptyReason":null},"readme":"Skill: Fish Flashing & Scraping Detection (Ectoparasite Warning) | 鱼类擦缸/蹭底行为识别（外寄）\n\nOwner: 18072937735\n\nSummary: Through fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。\n\nTags: latest:1.0.13\n\nVersion history:\n\nv1.0.13 | 2026-09-28T06:47:36.052Z | auto\n\n- Removed the file: skill-card.md.\n- No feature or functional changes in this version.\n- Documentation content and core logic remain unchanged.\n\nv1.0.12 | 2026-09-25T03:45:31.183Z | auto\n\n- Updated version to 1.0.15, reflecting current documentation and configuration.\n- SKILL.md revised with improved formatting and updated content; no changes to core logic described.\n- Obsolete file skill-card.md removed as part of documentation cleanup.\n- No user-facing functional changes; documentation and configuration only.\n\nv1.0.11 | 2026-09-08T22:22:29.724Z | auto\n\n- Version updated from 1.0.11 to 1.0.13.\n- Minor documentation updates in SKILL.md.\n- skill-card.md file removed.\n\nv1.0.10 | 2026-08-29T20:44:28.796Z | auto\n\n- Updated SKILL.md documentation with content or version changes.\n- Bumped version from 1.0.10 to 1.0.11.\n- Removed the file skill-card.md.\n- No changes to core logic or features; changes focus on documentation and metadata cleanup.\n\nv1.0.9 | 2026-08-21T20:57:28.983Z | auto\n\n- Updated skill version to 1.0.10.\n- SKILL.md content updated; mostly internal version bump and documentation changes.\n- Removed outdated file: skill-card.md.\n- No changes to code, features, or functionality.\n\nv1.0.8 | 2026-08-15T09:25:31.271Z | auto\n\nsmyx-fish-flashing-scraping-detection-analysis 1.0.8\n\n- Updated documentation in SKILL.md.\n- Removed redundant skill-card.md file.\n- Modified configuration in skills/smyx_common/scripts/config.yaml.\n\nv1.0.7 | 2026-08-06T10:07:32.785Z | auto\n\n- skill-card.md has been removed from the project.\n- SKILL.md updated version metadata to 1.0.7.\n- No functional or logic changes to the detection or workflow, only documentation changes and file cleanup.\n- All usage instructions, capability scopes, and technical details in SKILL.md remain unchanged.\n\nv1.0.6 | 2026-07-29T23:48:27.574Z | auto\n\n- Brought documentation up to date in SKILL.md for version 1.0.6.\n- Removed the file skill-card.md.\n- No changes to functionality or code; documentation only.\n\nv1.0.5 | 2026-07-14T22:20:27.887Z | auto\n\n- Documentation updated in SKILL.md; content and structure refined.\n- Removed skill-card.md file.\n- No changes to core logic or functionality.\n- No updates to scripts, APIs, or user-facing commands.\n\nv1.0.4 | 2026-07-10T13:20:33.472Z | auto\n\n- Updated version to 1.0.4.\n- Removed the redundant skill-card.md file.\n- Documentation cleanup and adjustments in SKILL.md; no user-facing functional changes.\n\nv1.0.3 | 2026-07-03T15:32:29.014Z | auto\n\n**Changelog for smyx-fish-flashing-scraping-detection-analysis v1.0.3:**\n\n- Updated and expanded SKILL.md with clearer structure, refined feature descriptions, and improved Chinese/English parallel documentation.\n- Revised user identity handling: identity parameters are now managed internally and never requested directly from users.\n- Enhanced operational workflow and parameter documentation for clearer usage guidance.\n- Enforced strict API historical report querying from the cloud, disallowing local/manual history retrieval.\n- Removed deprecated files and reorganized resource references for better maintainability.\n\nv1.0.2 | 2026-06-21T23:44:24.559Z | auto\n\nVersion 1.0.2\n\n- Removed the file `skill-card.md` from the project.\n- No functional or behavioral changes to the skill logic or features.\n\nv1.0.1 | 2026-06-19T02:05:30.221Z | auto\n\nVersion 1.0.1 of smyx-fish-flashing-scraping-detection-analysis\n\n- Updated license information to MIT-0.\n- Restructured the configuration file path for open-id retrieval—now checks scripts/config.yaml directly under the skill root first.\n- Adjusted open-id lookup logic and documentation to reflect the new configuration path and usage order.\n- Clarified and streamlined the skill description for readability and brevity in the manifest.\n- Removed the redundant skill-card.md.\n- Updated documentation in SKILL.md to reflect changes, including new parameters in usage instructions.\n\nv1.0.0 | 2026-05-28T12:10:13.322Z | auto\n\nsmyx-fish-flashing-scraping-detection-analysis 1.0.0 – Initial Release\n\n- Detects abnormal fish friction behaviors (\"flashing\" and \"scraping\") via fixed aquarium cameras.\n- Counts abnormal contact frequency per minute; triggers an ectoparasite risk warning if thresholds are exceeded.\n- Issues real-time alerts when excessive flashing/scraping is detected, prompting early intervention.\n- Integrates with smart aquarium cameras or fish disease early-warning systems.\n- Considers fish species, physiological context, and avoids false alarms for bottom-dwelling or breeding behaviors.\n- Implements strict user data handling and open-id verification processes for historical report access.\n\nArchive index:\n\nArchive v1.0.13: 31 files, 45569 bytes\n\nFiles: references/api_doc.md (8183b), scripts/__init__.py (68b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/skill.py (592b), scripts/smyx_fish_flashing_scraping_detection_analysis.py (3752b), skill-card.md (2350b), SKILL.md (19020b), 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 (166b)\n\nFile v1.0.13:SKILL.md\n\n---\nname: \"smyx-fish-flashing-scraping-detection-analysis\"\ndescription: \"Through fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。\"\nversion: \"1.0.15\"\nlicense: \"MIT-0\"\n---\n\n# 🐟 Fish Flashing & Scraping Detection (Ectoparasite Warning) | 鱼类擦缸/蹭底行为识别（外寄）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类擦缸/蹭底行为识别（外寄）** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. When the frequency exceeds a threshold (default 5/min) AND persists for over 10 seconds, the system outputs an 'ectoparasite risk warning', prompting the user to check for parasitic infections (such as ich, trichodina, gyrodactylus) or skin irritation. Application scenarios: home aquariums, public aquariums, quarantine tanks, aquaculture ponds. The system monitors in real time and pushes alerts when frequent flashing/scraping is detected. Skill features: white-spot disease, trichodiniasis and other ectoparasitic conditions only show flashing/scraping in their EARLIEST stage. Timely intervention can avoid mass mortality. AI-based real-time monitoring helps aquarists discover and treat early, reducing losses. This skill can be integrated into smart aquarium cameras or fish disease early-warning systems.\n\n通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。应用场景：家庭鱼缸、水族馆、检疫缸、养殖池。系统实时监测，当发现频繁擦缸/蹭底时推送预警。技能特点：白点病、车轮虫病等外寄疾病在早期仅表现为擦缸、蹭底，若及时干预可避免大规模死亡。通过 AI 实时监测并提醒，可帮助养鱼者早发现、早治疗，降低损失。该技能可集成到智能鱼缸摄像头或鱼病预警系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族寄生虫预警 AI。你的任务是分析鱼缸固定摄像头的视频（覆盖缸壁 + 底砂 + 造景石全景，分辨率 ≥ 720p，帧率 ≥ 25 FPS——擦缸是瞬时高速动作 < 0.5s 必须高帧率），检测两类异常摩擦行为：① **擦缸（Flashing）**：鱼体侧身翻转 60-90 度快速蹭过缸壁，爆发速度高于游动 2-3 倍；② **蹭底（Scraping）**：鱼体腹部 / 侧面 / 鳃盖贴底砂或造景石摩擦，常在同一位置反复蹭。统计**每分钟摩擦事件数**（擦缸 + 蹭底）+ **持续时长**：当 ≥ 5 次/分钟且持续 ≥ 10 秒时触发预警门槛。按 7 类综合场景判定（friction_normal / friction_low_baseline / friction_warning_mild / friction_warning_severe / friction_whole_tank_outbreak / friction_courtship_or_substrate_species / friction_signal_unreliable），按 4 级告警策略递进（Level 1 不提示 → Level 2 立即近距离观察体表+鳃部+食欲 → Level 3 紧急体表+鳃部+鳍条全面观察+测水质+准备隔离检疫缸+联系兽医 → Level 4 **🚨 最高紧急+所有联系人+全缸隔离+测水质五项+联系专业兽医现场镜检**）。鱼种特异性必须按基线判定：**底栖鱼种**（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼）天然贴底觅食、**繁殖期慈鲷类**（七彩 / 鹦鹉 / 神仙鱼）贴底/蹭石产卵预备 → **严禁通用阈值盲判底栖鱼为外寄**。必须考虑生理性上下文（投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期），避免误报。光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS → 必须返回 `friction_signal_unreliable`。**🚨 严禁做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等具体寄生虫病确诊**（外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"）；**🚨 严禁输出具体药物名称、剂量、给药方案**（特别严禁推荐**甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝**等任何抗寄生虫药剂）；**🚨 严禁输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3%\"等具体疗法**（剂量必须由兽医现场判断）；严禁伪造夸大摩擦频次/持续时长；严禁越权代用户启停加热棒/换水/投药/灯光/喂食器（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼缸固定摄像头 / 检疫缸专用摄像头 / 养殖池水下摄像头**实时视频**（默认 1 分钟滚动窗口统计频次，触发预警需 ≥ 10 秒持续观察），识别 7 类综合场景（friction_normal / friction_low_baseline / friction_warning_mild / friction_warning_severe / friction_whole_tank_outbreak / friction_courtship_or_substrate_species / friction_signal_unreliable）→ **四组指标**：擦缸 5 项（每分钟事件数 / 单次时长 ms / 翻身角度 / 接触缸壁面 / 爆发速度）+ 蹭底 5 项（每分钟事件数 / 单次时长 / 接触部位 / 接触底材 / 同位置反复）+ 综合摩擦统计 5 项（**总频次/分钟 + 持续时长秒** + 涉及鱼数 + 涉及比例 + 多鱼同步评分）+ 排除上下文 5 项（投喂期 / 繁殖期 / 底栖鱼种 / 近期惊吓 / 水温骤变）→ 4 档告警级别（none → important → urgent → critical）→ **4 级告警策略递进**（不提示 → 近距离观察体表+鳃部+食欲 → 紧急全面观察+测水质+隔离检疫缸+联系兽医 → 🚨 最高紧急+所有联系人+全缸隔离+联系专业兽医现场镜检）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**）→ **预警报告**（按 tank_id 输出，含擦缸/蹭底频次 + 持续时长 + 涉及鱼数 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 鱼缸视野分割（缸壁 / 底砂 / 造景石 / 中段水体） |\n| 2 | 多目标鱼体跟踪 |\n| 3 | **擦缸事件检测**（侧身翻转角度 + 缸壁接触 + 爆发速度三条件联合） |\n| 4 | **蹭底事件检测**（腹部/侧面贴底砂 + 同位置反复） |\n| 5 | 每分钟事件计数（滑动窗口） |\n| 6 | 持续时长累计（跨分钟累加） |\n| 7 | 多鱼并发同步评分 |\n| 8 | 鱼种基线（底栖 vs 中上层） |\n| 9 | 生理性上下文识别（投喂 / 繁殖 / 应激 / 新鱼适应） |\n| 10 | 光照与跟踪率门控（unreliable） |\n| 11 | 用户 APP 紧急推送 |\n| 12 | 4 级告警递进 |\n| 13 | 单日告警上限（**Level 4 不设上限**） |\n| 14 | 预警报告（按 tank_id + 事件时间戳输出） |\n| 15 | 连续 ≥ 2 次 Level 3+ → 强烈建议联系**当地观赏鱼兽医现场镜检**（**AI 视觉无法替代显微镜镜检鉴定虫体**） |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供鱼缸固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行鱼类擦缸/蹭底外寄风险识别 |\n| 🔎 明确分析意图 | 当用户明确提及鱼擦缸、鱼蹭底、鱼蹭石、鱼侧身闪、鱼疑似白点、鱼疑似车轮虫、鱼疑似三代虫、外寄、寄生虫预警等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼缸擦缸历史报告、外寄预警日志清单、寄生虫风险事件清单、查询历史外寄预警记录、显示所有鱼缸外寄报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_flashing_scraping_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_fish_flashing_scraping_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_fish_flashing_scraping_detection_analysis.py`](scripts/smyx_fish_flashing_scraping_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；摄像头需**同时覆盖缸壁+底砂+造景石全景**；**帧率 ≥ 25 FPS**；1 分钟滚动窗口统计 + 10 秒持续观察 |\n| 🔎 使用提醒 | **核心采样窗口**：1 分钟滚动窗口（频次统计单位），触发预警需 ≥ 10 秒持续观察 |\n| 🔎 使用提醒 | **核心预警门槛**：总摩擦频次 **≥ 5 次/分钟 且 持续 ≥ 10 秒** 触发 Level 2+ 告警 |\n| 🔎 使用提醒 | **4 级告警策略递进**（none → important → urgent → critical），多鱼/全缸/持续超长进入更高级别 |\n| 🔎 使用提醒 | 单日告警上限：Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**（外寄爆发可几天内全军覆没） |\n| 🔎 使用提醒 | 红线约束 |\n| 🔎 使用提醒 | **🚨 禁止**做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等具体寄生虫病确诊（**外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"**） |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案（特别**严禁推荐甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝**等任何抗寄生虫药剂） |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3% 治疗\"\"下黄粉\"等具体疗法剂量（任何疗法必须由兽医现场判断） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸视频（≤ 7 天，仅入库摩擦事件片段；公共水族馆/养殖场按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 投药 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大摩擦频次、持续时长、涉及鱼数等指标；所有数据必须基于真实视频帧分析 |\n| 🔎 使用提醒 | **必须**按**鱼种基线**判定：**底栖鱼种（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼）天然贴底觅食** + **繁殖期慈鲷类（七彩 / 鹦鹉 / 神仙鱼）贴底/蹭石产卵预备** → 严禁通用阈值盲判 |\n| 📚 文档读取 | **必须**考虑生理性上下文（**投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期**），避免误报 |\n| 🔎 使用提醒 | **必须**在光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS 时返回 `friction_signal_unreliable` 并建议补光/调整摄像头，**禁止给出不可靠的预警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 次 Level 3+ → 强烈建议联系**当地观赏鱼兽医现场镜检**（**AI 视觉无法替代显微镜镜检鉴定虫体**） |\n| 📜 报告输出 | **必须**：预警报告**按 tank_id + 事件时间戳输出**，含擦缸/蹭底频次 + 持续时长 + 涉及鱼数 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史外寄预警记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地鱼缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input /path/to/tank.mp4\n\n# 分析网络鱼缸固定摄像头视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --url https://example.com/tank.mp4\n\n# 显示历史外寄预警记录清单（自动触发关键词：查看鱼缸擦缸历史报告、外寄预警日志清单等）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --output result.json\n```\n\nFile v1.0.13:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-flashing-scraping-detection-analysis\",\n  \"version\": \"1.0.13\",\n  \"publishedAt\": 1790578056052\n}\n\nFile v1.0.13:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放鱼类擦缸/蹭底行为识别（外寄）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：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}` - 导出预警报告\n5. （可选）`/web/companion/v2/trigger-soothing-action` - 触发联动告警（用户 APP 推送 / 建议立即体表+鳃部检查 / 准备隔离检疫缸）\n\n## 场景代码\n\n- `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` - 鱼类擦缸/蹭底行为识别（外寄）\n\n## 输入约束\n\n- 摄像头：鱼缸固定摄像头 / 检疫缸专用摄像头 / 养殖池水下摄像头，**必须同时覆盖缸壁、底砂、造景石全景**（任何盲区可能漏判）\n- 分辨率 ≥ 720p；**帧率 ≥ 25 FPS**（擦缸是高速瞬时动作，鱼体侧身闪动 < 0.5s）\n- 光照：建议鱼缸照明常开 + 无强反光；底砂区域光线足够（暗区漏检率高）\n- **核心采样窗口**：默认 1 分钟滚动窗口（频次统计单位），触发预警需 ≥ 10 秒持续观察\n- 视野约束：必须覆盖**缸壁侧面 + 底砂全面 + 主要造景石**\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID\n- **部署时必须录入**：鱼种、缸内总鱼数 N、缸底材质（裸缸 / 细砂 / 粗砂 / 火山石 / 水草泥）、造景石位置\n- 用户必须授权部署；公共水族馆 / 养殖场需公示告知\n\n## 关键观测信号\n\n### 擦缸（Flashing - 侧身蹭缸壁）信号\n- `flashing_events_count_per_minute` - **每分钟擦缸事件数**（核心指标）\n- `flashing_event_duration_ms_avg` - 单次擦缸动作平均时长（毫秒，典型 100-500ms）\n- `flashing_body_axis_tilt_deg_avg` - 鱼体翻身角度均值（侧身擦缸通常 60-90 度）\n- `flashing_contact_surface` - 接触面（front_glass / side_glass / back_glass）\n- `flashing_burst_speed_normalized` - 爆发速度归一化（典型加速度高于游动 2-3 倍）\n\n### 蹭底（Scraping - 腹部/侧面蹭底砂）信号\n- `scraping_events_count_per_minute` - **每分钟蹭底事件数**（核心指标）\n- `scraping_event_duration_ms_avg` - 单次蹭底动作平均时长\n- `scraping_body_contact_area` - 接触部位（abdomen / lateral_left / lateral_right / gill_cover）\n- `scraping_substrate_type` - 接触底材类型（sand / gravel / decorative_rock / aquatic_plant）\n- `scraping_repeated_at_same_spot` - 是否在同一位置反复蹭（强信号）\n\n### 综合摩擦统计\n- `total_friction_events_per_minute` - **总摩擦事件数（擦缸 + 蹭底）/ 分钟**（核心阈值 ≥ 5 次/分钟）\n- `friction_persistent_duration_seconds` - **频繁摩擦持续时长**（核心阈值 ≥ 10 秒）\n- `affected_fish_count` - 涉及摩擦行为的鱼数\n- `affected_fish_ratio` - 涉及鱼数占总鱼数比例\n- `cross_fish_synchronicity_score` - 多鱼同步异常评分（多鱼同时擦缸 → 全缸寄生虫怀疑度高）\n\n### 上下文与排除信号（避免误报）\n- `is_during_feeding` - 是否在投喂窗口内（争食可能短暂撞缸）\n- `is_during_courtship_or_spawning` - 是否在繁殖期（求偶/产卵时鱼可能贴底/蹭石）\n- `is_substrate_cleaning_species` - 是否食底栖型鱼种（鼠鱼/异型鱼/底栖鱼天然贴底觅食）\n- `tank_recently_disturbed` - 鱼缸是否近期受外部惊吓（换水/搬家短暂应激）\n- `water_temperature_change_detected` - 水温是否近期突变（应激）\n\n## 综合判定\n\n- `friction_normal` - 摩擦行为正常（≤ 2 次/分钟，零星活动）\n- `friction_low_baseline` - 低频摩擦（3-4 次/分钟，可能为底栖鱼正常或轻度不适）\n- `friction_warning_mild` - **摩擦预警轻度**（5-7 次/分钟，持续 ≥ 10s，触发预警门槛）\n- `friction_warning_severe` - **摩擦预警严重**（≥ 8 次/分钟，持续 ≥ 30s，**强烈外寄怀疑**）\n- `friction_whole_tank_outbreak` - **全缸爆发**（≥ 50% 鱼同时频繁摩擦，**全缸寄生虫爆发风险**）\n- `friction_courtship_or_substrate_species` - 繁殖期/底栖鱼正常行为（不告警）\n- `friction_signal_unreliable` - 信号不可靠（光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS）\n\n## 4 级告警策略递进\n\n- Level 1（normal / low_baseline / courtship_or_substrate_species）：仅入库或不提示\n- Level 2（warning_mild）：重要提示，建议**立即近距离观察鱼体表（白点 / 充血 / 黏液增多）+ 鳃部颜色 + 食欲变化**\n- Level 3（warning_severe，单次）：紧急告警，建议**立即体表 + 鳃部 + 鳍条全面观察 + 测水质 NH3/NO2-/pH/温度 + 准备隔离检疫缸 + 联系当地观赏鱼兽医**（**禁止推荐具体寄生虫药品**）\n- Level 4（whole_tank_outbreak / warning_severe 持续 ≥ 24 小时）：**🚨 最高紧急告警 + 推送所有管理人员** + 强烈建议**立即隔离全缸 + 测水质五项 + 联系专业兽医现场检疫（外寄虫体鉴定需镜检，AI 视觉无法替代）**\n\n## 单日告警上限\n\n- Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**（外寄爆发可几天内全军覆没）\n\n## 红线约束\n\n- **🚨 禁止**做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等**具体寄生虫病确诊**（外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"）\n- **🚨 绝对禁止**输出具体药物名称、剂量、给药方案（**严禁推荐甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝等任何抗寄生虫药剂**）\n- **🚨 绝对禁止**输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3% 治疗\"等具体疗法（任何疗法剂量必须由兽医现场判断）\n- **禁止**长期存储完整鱼缸视频（≤ 7 天，仅入库摩擦事件片段；公共水族馆/养殖场按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 投药 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议）\n- 摩擦频次 / 持续时长 / 涉及鱼数等指标必须基于真实视频帧分析；**禁止伪造或夸大指标**\n- 鱼种特异性：**底栖鱼种**（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼） 天然贴底觅食、**繁殖期**（七彩 / 鹦鹉 / 慈鲷类）贴底/蹭石产卵预备 → 必须按鱼种和生理周期基线判定；**严禁通用阈值盲判底栖鱼为外寄**\n- 必须考虑生理性上下文：**投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期** → 不可直接告警\n- 光照不足 / 跟踪率 < 80% / 视野盲区（缸壁背面 / 底砂死角）/ 帧率 < 25 FPS → 必须返回 `friction_signal_unreliable` 并建议补光/调整摄像头\n- 必须告知用户：AI 视觉识别仅供参考，**外寄虫体最终确诊与处理需用户立即观察体表并由专业兽医镜检**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸/养殖池 ID\n- `species` - 鱼种\n- `total_fish_count_baseline` - 注册总鱼数\n- `substrate_type` - 缸底材质\n- `flashing_events_count_per_minute` - 擦缸频次\n- `scraping_events_count_per_minute` - 蹭底频次\n- `total_friction_events_per_minute` - 总摩擦频次\n- `friction_persistent_duration_seconds` - 频繁摩擦持续时长\n- `affected_fish_count` - 涉及鱼数\n- `cross_fish_synchronicity_score` - 多鱼同步评分\n- `composite_scene` - 综合判定\n- `alert_level` - 告警等级\n- `recommended_actions` - 建议动作（体表观察 / 鳃部观察 / 测水质 / 准备隔离检疫缸 / 联系兽医镜检，**绝不含具体药物、剂量、品牌、温度疗法、加盐剂量**）\n- `disclaimer` - 免责声明\n\nFile v1.0.13:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.13:scripts/config.yaml\n\n{}\n\nFile v1.0.13:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.13:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.13:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.13:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.13:skill-card.md\n\n## Description:\n\nAnalyzes aquarium camera footage for fish flashing and scraping, counts abnormal contacts, and provides ectoparasite risk warnings and reports.\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\nAquarium keepers, aquaculture operators, and developers use the skill to review fish behavior footage for frequent rubbing against tank surfaces and receive early warnings, suggested checks, and historical reports. Warnings are not a parasite diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Aquarium media or URLs are sent to a cloud-backed analysis service.\n\nMitigation: Use only media you are comfortable uploading, and obtain appropriate authorization before submitting shared aquarium footage.\n\nRisk: The skill silently creates or reuses a cloud-linked identity and stores authentication tokens locally.\n\nMitigation: Review this behavior before installation, run in a separate workspace, and remove local data files when you stop using the skill.\n\nRisk: Visual behavior warnings can be unreliable or mistaken for a confirmed parasite diagnosis.\n\nMitigation: Check camera visibility and lighting, treat warnings as prompts for further inspection, and seek a qualified aquatic veterinarian for diagnosis.\n\n## Reference(s):\n\n- [ClawHub skill listing](https://clawhub.ai/18072937735/skills/smyx-fish-flashing-scraping-detection-analysis)\n- [Fish flashing and scraping API reference](references/api_doc.md)\n- [Analysis API reference](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [Analysis, Guidance, Reports]\n\n**Output Format:** [Markdown summaries and structured JSON reports]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Warnings may include event frequency, duration, affected fish, recommended actions, and report links; historical reports can be listed.]\n\n## Skill Version(s):\n\n1.0.13 (source: server-resolved ClawHub 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.13:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.13:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.12: 31 files, 45519 bytes\n\nFiles: references/api_doc.md (8183b), scripts/__init__.py (68b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/skill.py (592b), scripts/smyx_fish_flashing_scraping_detection_analysis.py (3752b), skill-card.md (2200b), SKILL.md (19020b), 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 (166b)\n\nFile v1.0.12:SKILL.md\n\n---\nname: \"smyx-fish-flashing-scraping-detection-analysis\"\ndescription: \"Through fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。\"\nversion: \"1.0.15\"\nlicense: \"MIT-0\"\n---\n\n# 🐟 Fish Flashing & Scraping Detection (Ectoparasite Warning) | 鱼类擦缸/蹭底行为识别（外寄）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类擦缸/蹭底行为识别（外寄）** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. When the frequency exceeds a threshold (default 5/min) AND persists for over 10 seconds, the system outputs an 'ectoparasite risk warning', prompting the user to check for parasitic infections (such as ich, trichodina, gyrodactylus) or skin irritation. Application scenarios: home aquariums, public aquariums, quarantine tanks, aquaculture ponds. The system monitors in real time and pushes alerts when frequent flashing/scraping is detected. Skill features: white-spot disease, trichodiniasis and other ectoparasitic conditions only show flashing/scraping in their EARLIEST stage. Timely intervention can avoid mass mortality. AI-based real-time monitoring helps aquarists discover and treat early, reducing losses. This skill can be integrated into smart aquarium cameras or fish disease early-warning systems.\n\n通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。应用场景：家庭鱼缸、水族馆、检疫缸、养殖池。系统实时监测，当发现频繁擦缸/蹭底时推送预警。技能特点：白点病、车轮虫病等外寄疾病在早期仅表现为擦缸、蹭底，若及时干预可避免大规模死亡。通过 AI 实时监测并提醒，可帮助养鱼者早发现、早治疗，降低损失。该技能可集成到智能鱼缸摄像头或鱼病预警系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族寄生虫预警 AI。你的任务是分析鱼缸固定摄像头的视频（覆盖缸壁 + 底砂 + 造景石全景，分辨率 ≥ 720p，帧率 ≥ 25 FPS——擦缸是瞬时高速动作 < 0.5s 必须高帧率），检测两类异常摩擦行为：① **擦缸（Flashing）**：鱼体侧身翻转 60-90 度快速蹭过缸壁，爆发速度高于游动 2-3 倍；② **蹭底（Scraping）**：鱼体腹部 / 侧面 / 鳃盖贴底砂或造景石摩擦，常在同一位置反复蹭。统计**每分钟摩擦事件数**（擦缸 + 蹭底）+ **持续时长**：当 ≥ 5 次/分钟且持续 ≥ 10 秒时触发预警门槛。按 7 类综合场景判定（friction_normal / friction_low_baseline / friction_warning_mild / friction_warning_severe / friction_whole_tank_outbreak / friction_courtship_or_substrate_species / friction_signal_unreliable），按 4 级告警策略递进（Level 1 不提示 → Level 2 立即近距离观察体表+鳃部+食欲 → Level 3 紧急体表+鳃部+鳍条全面观察+测水质+准备隔离检疫缸+联系兽医 → Level 4 **🚨 最高紧急+所有联系人+全缸隔离+测水质五项+联系专业兽医现场镜检**）。鱼种特异性必须按基线判定：**底栖鱼种**（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼）天然贴底觅食、**繁殖期慈鲷类**（七彩 / 鹦鹉 / 神仙鱼）贴底/蹭石产卵预备 → **严禁通用阈值盲判底栖鱼为外寄**。必须考虑生理性上下文（投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期），避免误报。光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS → 必须返回 `friction_signal_unreliable`。**🚨 严禁做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等具体寄生虫病确诊**（外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"）；**🚨 严禁输出具体药物名称、剂量、给药方案**（特别严禁推荐**甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝**等任何抗寄生虫药剂）；**🚨 严禁输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3%\"等具体疗法**（剂量必须由兽医现场判断）；严禁伪造夸大摩擦频次/持续时长；严禁越权代用户启停加热棒/换水/投药/灯光/喂食器（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼缸固定摄像头 / 检疫缸专用摄像头 / 养殖池水下摄像头**实时视频**（默认 1 分钟滚动窗口统计频次，触发预警需 ≥ 10 秒持续观察），识别 7 类综合场景（friction_normal / friction_low_baseline / friction_warning_mild / friction_warning_severe / friction_whole_tank_outbreak / friction_courtship_or_substrate_species / friction_signal_unreliable）→ **四组指标**：擦缸 5 项（每分钟事件数 / 单次时长 ms / 翻身角度 / 接触缸壁面 / 爆发速度）+ 蹭底 5 项（每分钟事件数 / 单次时长 / 接触部位 / 接触底材 / 同位置反复）+ 综合摩擦统计 5 项（**总频次/分钟 + 持续时长秒** + 涉及鱼数 + 涉及比例 + 多鱼同步评分）+ 排除上下文 5 项（投喂期 / 繁殖期 / 底栖鱼种 / 近期惊吓 / 水温骤变）→ 4 档告警级别（none → important → urgent → critical）→ **4 级告警策略递进**（不提示 → 近距离观察体表+鳃部+食欲 → 紧急全面观察+测水质+隔离检疫缸+联系兽医 → 🚨 最高紧急+所有联系人+全缸隔离+联系专业兽医现场镜检）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**）→ **预警报告**（按 tank_id 输出，含擦缸/蹭底频次 + 持续时长 + 涉及鱼数 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 鱼缸视野分割（缸壁 / 底砂 / 造景石 / 中段水体） |\n| 2 | 多目标鱼体跟踪 |\n| 3 | **擦缸事件检测**（侧身翻转角度 + 缸壁接触 + 爆发速度三条件联合） |\n| 4 | **蹭底事件检测**（腹部/侧面贴底砂 + 同位置反复） |\n| 5 | 每分钟事件计数（滑动窗口） |\n| 6 | 持续时长累计（跨分钟累加） |\n| 7 | 多鱼并发同步评分 |\n| 8 | 鱼种基线（底栖 vs 中上层） |\n| 9 | 生理性上下文识别（投喂 / 繁殖 / 应激 / 新鱼适应） |\n| 10 | 光照与跟踪率门控（unreliable） |\n| 11 | 用户 APP 紧急推送 |\n| 12 | 4 级告警递进 |\n| 13 | 单日告警上限（**Level 4 不设上限**） |\n| 14 | 预警报告（按 tank_id + 事件时间戳输出） |\n| 15 | 连续 ≥ 2 次 Level 3+ → 强烈建议联系**当地观赏鱼兽医现场镜检**（**AI 视觉无法替代显微镜镜检鉴定虫体**） |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供鱼缸固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行鱼类擦缸/蹭底外寄风险识别 |\n| 🔎 明确分析意图 | 当用户明确提及鱼擦缸、鱼蹭底、鱼蹭石、鱼侧身闪、鱼疑似白点、鱼疑似车轮虫、鱼疑似三代虫、外寄、寄生虫预警等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼缸擦缸历史报告、外寄预警日志清单、寄生虫风险事件清单、查询历史外寄预警记录、显示所有鱼缸外寄报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_flashing_scraping_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_fish_flashing_scraping_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_fish_flashing_scraping_detection_analysis.py`](scripts/smyx_fish_flashing_scraping_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；摄像头需**同时覆盖缸壁+底砂+造景石全景**；**帧率 ≥ 25 FPS**；1 分钟滚动窗口统计 + 10 秒持续观察 |\n| 🔎 使用提醒 | **核心采样窗口**：1 分钟滚动窗口（频次统计单位），触发预警需 ≥ 10 秒持续观察 |\n| 🔎 使用提醒 | **核心预警门槛**：总摩擦频次 **≥ 5 次/分钟 且 持续 ≥ 10 秒** 触发 Level 2+ 告警 |\n| 🔎 使用提醒 | **4 级告警策略递进**（none → important → urgent → critical），多鱼/全缸/持续超长进入更高级别 |\n| 🔎 使用提醒 | 单日告警上限：Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**（外寄爆发可几天内全军覆没） |\n| 🔎 使用提醒 | 红线约束 |\n| 🔎 使用提醒 | **🚨 禁止**做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等具体寄生虫病确诊（**外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"**） |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案（特别**严禁推荐甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝**等任何抗寄生虫药剂） |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3% 治疗\"\"下黄粉\"等具体疗法剂量（任何疗法必须由兽医现场判断） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸视频（≤ 7 天，仅入库摩擦事件片段；公共水族馆/养殖场按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 投药 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大摩擦频次、持续时长、涉及鱼数等指标；所有数据必须基于真实视频帧分析 |\n| 🔎 使用提醒 | **必须**按**鱼种基线**判定：**底栖鱼种（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼）天然贴底觅食** + **繁殖期慈鲷类（七彩 / 鹦鹉 / 神仙鱼）贴底/蹭石产卵预备** → 严禁通用阈值盲判 |\n| 📚 文档读取 | **必须**考虑生理性上下文（**投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期**），避免误报 |\n| 🔎 使用提醒 | **必须**在光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS 时返回 `friction_signal_unreliable` 并建议补光/调整摄像头，**禁止给出不可靠的预警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 次 Level 3+ → 强烈建议联系**当地观赏鱼兽医现场镜检**（**AI 视觉无法替代显微镜镜检鉴定虫体**） |\n| 📜 报告输出 | **必须**：预警报告**按 tank_id + 事件时间戳输出**，含擦缸/蹭底频次 + 持续时长 + 涉及鱼数 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史外寄预警记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地鱼缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input /path/to/tank.mp4\n\n# 分析网络鱼缸固定摄像头视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --url https://example.com/tank.mp4\n\n# 显示历史外寄预警记录清单（自动触发关键词：查看鱼缸擦缸历史报告、外寄预警日志清单等）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --output result.json\n```\n\nFile v1.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-flashing-scraping-detection-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1790307931183\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}` - 导出预警报告\n5. （可选）`/web/companion/v2/trigger-soothing-action` - 触发联动告警（用户 APP 推送 / 建议立即体表+鳃部检查 / 准备隔离检疫缸）\n\n## 场景代码\n\n- `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` - 鱼类擦缸/蹭底行为识别（外寄）\n\n## 输入约束\n\n- 摄像头：鱼缸固定摄像头 / 检疫缸专用摄像头 / 养殖池水下摄像头，**必须同时覆盖缸壁、底砂、造景石全景**（任何盲区可能漏判）\n- 分辨率 ≥ 720p；**帧率 ≥ 25 FPS**（擦缸是高速瞬时动作，鱼体侧身闪动 < 0.5s）\n- 光照：建议鱼缸照明常开 + 无强反光；底砂区域光线足够（暗区漏检率高）\n- **核心采样窗口**：默认 1 分钟滚动窗口（频次统计单位），触发预警需 ≥ 10 秒持续观察\n- 视野约束：必须覆盖**缸壁侧面 + 底砂全面 + 主要造景石**\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID\n- **部署时必须录入**：鱼种、缸内总鱼数 N、缸底材质（裸缸 / 细砂 / 粗砂 / 火山石 / 水草泥）、造景石位置\n- 用户必须授权部署；公共水族馆 / 养殖场需公示告知\n\n## 关键观测信号\n\n### 擦缸（Flashing - 侧身蹭缸壁）信号\n- `flashing_events_count_per_minute` - **每分钟擦缸事件数**（核心指标）\n- `flashing_event_duration_ms_avg` - 单次擦缸动作平均时长（毫秒，典型 100-500ms）\n- `flashing_body_axis_tilt_deg_avg` - 鱼体翻身角度均值（侧身擦缸通常 60-90 度）\n- `flashing_contact_surface` - 接触面（front_glass / side_glass / back_glass）\n- `flashing_burst_speed_normalized` - 爆发速度归一化（典型加速度高于游动 2-3 倍）\n\n### 蹭底（Scraping - 腹部/侧面蹭底砂）信号\n- `scraping_events_count_per_minute` - **每分钟蹭底事件数**（核心指标）\n- `scraping_event_duration_ms_avg` - 单次蹭底动作平均时长\n- `scraping_body_contact_area` - 接触部位（abdomen / lateral_left / lateral_right / gill_cover）\n- `scraping_substrate_type` - 接触底材类型（sand / gravel / decorative_rock / aquatic_plant）\n- `scraping_repeated_at_same_spot` - 是否在同一位置反复蹭（强信号）\n\n### 综合摩擦统计\n- `total_friction_events_per_minute` - **总摩擦事件数（擦缸 + 蹭底）/ 分钟**（核心阈值 ≥ 5 次/分钟）\n- `friction_persistent_duration_seconds` - **频繁摩擦持续时长**（核心阈值 ≥ 10 秒）\n- `affected_fish_count` - 涉及摩擦行为的鱼数\n- `affected_fish_ratio` - 涉及鱼数占总鱼数比例\n- `cross_fish_synchronicity_score` - 多鱼同步异常评分（多鱼同时擦缸 → 全缸寄生虫怀疑度高）\n\n### 上下文与排除信号（避免误报）\n- `is_during_feeding` - 是否在投喂窗口内（争食可能短暂撞缸）\n- `is_during_courtship_or_spawning` - 是否在繁殖期（求偶/产卵时鱼可能贴底/蹭石）\n- `is_substrate_cleaning_species` - 是否食底栖型鱼种（鼠鱼/异型鱼/底栖鱼天然贴底觅食）\n- `tank_recently_disturbed` - 鱼缸是否近期受外部惊吓（换水/搬家短暂应激）\n- `water_temperature_change_detected` - 水温是否近期突变（应激）\n\n## 综合判定\n\n- `friction_normal` - 摩擦行为正常（≤ 2 次/分钟，零星活动）\n- `friction_low_baseline` - 低频摩擦（3-4 次/分钟，可能为底栖鱼正常或轻度不适）\n- `friction_warning_mild` - **摩擦预警轻度**（5-7 次/分钟，持续 ≥ 10s，触发预警门槛）\n- `friction_warning_severe` - **摩擦预警严重**（≥ 8 次/分钟，持续 ≥ 30s，**强烈外寄怀疑**）\n- `friction_whole_tank_outbreak` - **全缸爆发**（≥ 50% 鱼同时频繁摩擦，**全缸寄生虫爆发风险**）\n- `friction_courtship_or_substrate_species` - 繁殖期/底栖鱼正常行为（不告警）\n- `friction_signal_unreliable` - 信号不可靠（光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS）\n\n## 4 级告警策略递进\n\n- Level 1（normal / low_baseline / courtship_or_substrate_species）：仅入库或不提示\n- Level 2（warning_mild）：重要提示，建议**立即近距离观察鱼体表（白点 / 充血 / 黏液增多）+ 鳃部颜色 + 食欲变化**\n- Level 3（warning_severe，单次）：紧急告警，建议**立即体表 + 鳃部 + 鳍条全面观察 + 测水质 NH3/NO2-/pH/温度 + 准备隔离检疫缸 + 联系当地观赏鱼兽医**（**禁止推荐具体寄生虫药品**）\n- Level 4（whole_tank_outbreak / warning_severe 持续 ≥ 24 小时）：**🚨 最高紧急告警 + 推送所有管理人员** + 强烈建议**立即隔离全缸 + 测水质五项 + 联系专业兽医现场检疫（外寄虫体鉴定需镜检，AI 视觉无法替代）**\n\n## 单日告警上限\n\n- Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**（外寄爆发可几天内全军覆没）\n\n## 红线约束\n\n- **🚨 禁止**做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等**具体寄生虫病确诊**（外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"）\n- **🚨 绝对禁止**输出具体药物名称、剂量、给药方案（**严禁推荐甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝等任何抗寄生虫药剂**）\n- **🚨 绝对禁止**输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3% 治疗\"等具体疗法（任何疗法剂量必须由兽医现场判断）\n- **禁止**长期存储完整鱼缸视频（≤ 7 天，仅入库摩擦事件片段；公共水族馆/养殖场按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 投药 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议）\n- 摩擦频次 / 持续时长 / 涉及鱼数等指标必须基于真实视频帧分析；**禁止伪造或夸大指标**\n- 鱼种特异性：**底栖鱼种**（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼） 天然贴底觅食、**繁殖期**（七彩 / 鹦鹉 / 慈鲷类）贴底/蹭石产卵预备 → 必须按鱼种和生理周期基线判定；**严禁通用阈值盲判底栖鱼为外寄**\n- 必须考虑生理性上下文：**投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期** → 不可直接告警\n- 光照不足 / 跟踪率 < 80% / 视野盲区（缸壁背面 / 底砂死角）/ 帧率 < 25 FPS → 必须返回 `friction_signal_unreliable` 并建议补光/调整摄像头\n- 必须告知用户：AI 视觉识别仅供参考，**外寄虫体最终确诊与处理需用户立即观察体表并由专业兽医镜检**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸/养殖池 ID\n- `species` - 鱼种\n- `total_fish_count_baseline` - 注册总鱼数\n- `substrate_type` - 缸底材质\n- `flashing_events_count_per_minute` - 擦缸频次\n- `scraping_events_count_per_minute` - 蹭底频次\n- `total_friction_events_per_minute` - 总摩擦频次\n- `friction_persistent_duration_seconds` - 频繁摩擦持续时长\n- `affected_fish_count` - 涉及鱼数\n- `cross_fish_synchronicity_score` - 多鱼同步评分\n- `composite_scene` - 综合判定\n- `alert_level` - 告警等级\n- `recommended_actions` - 建议动作（体表观察 / 鳃部观察 / 测水质 / 准备隔离检疫缸 / 联系兽医镜检，**绝不含具体药物、剂量、品牌、温度疗法、加盐剂量**）\n- `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 aquarium media for fish flashing and scraping, reporting behavior-based ectoparasite risk warnings and suggested follow-up observations.\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\nAquarium keepers and aquaculture operators use this skill to review fish rubbing behavior in camera footage, receive possible ectoparasite warnings, and consult historical reports. Warnings are not a diagnosis and should be followed by direct observation and veterinary assessment when warranted.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Aquarium media or media URLs are sent to external cloud services.\n\nMitigation: Share media only when acceptable under your privacy and data-handling requirements.\n\nRisk: The skill can create or reuse local account state and persist identity tokens while retrieving report history.\n\nMitigation: Review or clear the workspace data database if persistent identity tokens are unacceptable, and check cloud history access before use.\n\nRisk: Behavior-based warnings may be mistaken for a definitive parasite diagnosis.\n\nMitigation: Treat alerts as preliminary; inspect fish and seek veterinary microscopy for diagnosis and treatment decisions.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/18072937735/skills/smyx-fish-flashing-scraping-detection-analysis)\n- [Skill API documentation](references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Guidance]\n\n**Output Format:** [Structured analysis reports and Markdown history tables]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include event counts, risk levels, recommended actions, and report links.]\n\n## Skill Version(s):\n\n1.0.12 (source: server-resolved ClawHub release; bundled SKILL.md states 1.0.15)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.12:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.12:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.11: 31 files, 45911 bytes\n\nFiles: references/api_doc.md (8183b), scripts/__init__.py (68b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/skill.py (592b), scripts/smyx_fish_flashing_scraping_detection_analysis.py (3752b), skill-card.md (3105b), SKILL.md (19020b), 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 (166b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: \"smyx-fish-flashing-scraping-detection-analysis\"\ndescription: \"Through fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。\"\nversion: \"1.0.13\"\nlicense: \"MIT-0\"\n---\n\n# 🐟 Fish Flashing & Scraping Detection (Ectoparasite Warning) | 鱼类擦缸/蹭底行为识别（外寄）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类擦缸/蹭底行为识别（外寄）** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. When the frequency exceeds a threshold (default 5/min) AND persists for over 10 seconds, the system outputs an 'ectoparasite risk warning', prompting the user to check for parasitic infections (such as ich, trichodina, gyrodactylus) or skin irritation. Application scenarios: home aquariums, public aquariums, quarantine tanks, aquaculture ponds. The system monitors in real time and pushes alerts when frequent flashing/scraping is detected. Skill features: white-spot disease, trichodiniasis and other ectoparasitic conditions only show flashing/scraping in their EARLIEST stage. Timely intervention can avoid mass mortality. AI-based real-time monitoring helps aquarists discover and treat early, reducing losses. This skill can be integrated into smart aquarium cameras or fish disease early-warning systems.\n\n通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。应用场景：家庭鱼缸、水族馆、检疫缸、养殖池。系统实时监测，当发现频繁擦缸/蹭底时推送预警。技能特点：白点病、车轮虫病等外寄疾病在早期仅表现为擦缸、蹭底，若及时干预可避免大规模死亡。通过 AI 实时监测并提醒，可帮助养鱼者早发现、早治疗，降低损失。该技能可集成到智能鱼缸摄像头或鱼病预警系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族寄生虫预警 AI。你的任务是分析鱼缸固定摄像头的视频（覆盖缸壁 + 底砂 + 造景石全景，分辨率 ≥ 720p，帧率 ≥ 25 FPS——擦缸是瞬时高速动作 < 0.5s 必须高帧率），检测两类异常摩擦行为：① **擦缸（Flashing）**：鱼体侧身翻转 60-90 度快速蹭过缸壁，爆发速度高于游动 2-3 倍；② **蹭底（Scraping）**：鱼体腹部 / 侧面 / 鳃盖贴底砂或造景石摩擦，常在同一位置反复蹭。统计**每分钟摩擦事件数**（擦缸 + 蹭底）+ **持续时长**：当 ≥ 5 次/分钟且持续 ≥ 10 秒时触发预警门槛。按 7 类综合场景判定（friction_normal / friction_low_baseline / friction_warning_mild / friction_warning_severe / friction_whole_tank_outbreak / friction_courtship_or_substrate_species / friction_signal_unreliable），按 4 级告警策略递进（Level 1 不提示 → Level 2 立即近距离观察体表+鳃部+食欲 → Level 3 紧急体表+鳃部+鳍条全面观察+测水质+准备隔离检疫缸+联系兽医 → Level 4 **🚨 最高紧急+所有联系人+全缸隔离+测水质五项+联系专业兽医现场镜检**）。鱼种特异性必须按基线判定：**底栖鱼种**（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼）天然贴底觅食、**繁殖期慈鲷类**（七彩 / 鹦鹉 / 神仙鱼）贴底/蹭石产卵预备 → **严禁通用阈值盲判底栖鱼为外寄**。必须考虑生理性上下文（投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期），避免误报。光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS → 必须返回 `friction_signal_unreliable`。**🚨 严禁做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等具体寄生虫病确诊**（外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"）；**🚨 严禁输出具体药物名称、剂量、给药方案**（特别严禁推荐**甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝**等任何抗寄生虫药剂）；**🚨 严禁输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3%\"等具体疗法**（剂量必须由兽医现场判断）；严禁伪造夸大摩擦频次/持续时长；严禁越权代用户启停加热棒/换水/投药/灯光/喂食器（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼缸固定摄像头 / 检疫缸专用摄像头 / 养殖池水下摄像头**实时视频**（默认 1 分钟滚动窗口统计频次，触发预警需 ≥ 10 秒持续观察），识别 7 类综合场景（friction_normal / friction_low_baseline / friction_warning_mild / friction_warning_severe / friction_whole_tank_outbreak / friction_courtship_or_substrate_species / friction_signal_unreliable）→ **四组指标**：擦缸 5 项（每分钟事件数 / 单次时长 ms / 翻身角度 / 接触缸壁面 / 爆发速度）+ 蹭底 5 项（每分钟事件数 / 单次时长 / 接触部位 / 接触底材 / 同位置反复）+ 综合摩擦统计 5 项（**总频次/分钟 + 持续时长秒** + 涉及鱼数 + 涉及比例 + 多鱼同步评分）+ 排除上下文 5 项（投喂期 / 繁殖期 / 底栖鱼种 / 近期惊吓 / 水温骤变）→ 4 档告警级别（none → important → urgent → critical）→ **4 级告警策略递进**（不提示 → 近距离观察体表+鳃部+食欲 → 紧急全面观察+测水质+隔离检疫缸+联系兽医 → 🚨 最高紧急+所有联系人+全缸隔离+联系专业兽医现场镜检）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**）→ **预警报告**（按 tank_id 输出，含擦缸/蹭底频次 + 持续时长 + 涉及鱼数 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 鱼缸视野分割（缸壁 / 底砂 / 造景石 / 中段水体） |\n| 2 | 多目标鱼体跟踪 |\n| 3 | **擦缸事件检测**（侧身翻转角度 + 缸壁接触 + 爆发速度三条件联合） |\n| 4 | **蹭底事件检测**（腹部/侧面贴底砂 + 同位置反复） |\n| 5 | 每分钟事件计数（滑动窗口） |\n| 6 | 持续时长累计（跨分钟累加） |\n| 7 | 多鱼并发同步评分 |\n| 8 | 鱼种基线（底栖 vs 中上层） |\n| 9 | 生理性上下文识别（投喂 / 繁殖 / 应激 / 新鱼适应） |\n| 10 | 光照与跟踪率门控（unreliable） |\n| 11 | 用户 APP 紧急推送 |\n| 12 | 4 级告警递进 |\n| 13 | 单日告警上限（**Level 4 不设上限**） |\n| 14 | 预警报告（按 tank_id + 事件时间戳输出） |\n| 15 | 连续 ≥ 2 次 Level 3+ → 强烈建议联系**当地观赏鱼兽医现场镜检**（**AI 视觉无法替代显微镜镜检鉴定虫体**） |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供鱼缸固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行鱼类擦缸/蹭底外寄风险识别 |\n| 🔎 明确分析意图 | 当用户明确提及鱼擦缸、鱼蹭底、鱼蹭石、鱼侧身闪、鱼疑似白点、鱼疑似车轮虫、鱼疑似三代虫、外寄、寄生虫预警等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼缸擦缸历史报告、外寄预警日志清单、寄生虫风险事件清单、查询历史外寄预警记录、显示所有鱼缸外寄报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_flashing_scraping_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_fish_flashing_scraping_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_fish_flashing_scraping_detection_analysis.py`](scripts/smyx_fish_flashing_scraping_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；摄像头需**同时覆盖缸壁+底砂+造景石全景**；**帧率 ≥ 25 FPS**；1 分钟滚动窗口统计 + 10 秒持续观察 |\n| 🔎 使用提醒 | **核心采样窗口**：1 分钟滚动窗口（频次统计单位），触发预警需 ≥ 10 秒持续观察 |\n| 🔎 使用提醒 | **核心预警门槛**：总摩擦频次 **≥ 5 次/分钟 且 持续 ≥ 10 秒** 触发 Level 2+ 告警 |\n| 🔎 使用提醒 | **4 级告警策略递进**（none → important → urgent → critical），多鱼/全缸/持续超长进入更高级别 |\n| 🔎 使用提醒 | 单日告警上限：Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**（外寄爆发可几天内全军覆没） |\n| 🔎 使用提醒 | 红线约束 |\n| 🔎 使用提醒 | **🚨 禁止**做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等具体寄生虫病确诊（**外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"**） |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案（特别**严禁推荐甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝**等任何抗寄生虫药剂） |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3% 治疗\"\"下黄粉\"等具体疗法剂量（任何疗法必须由兽医现场判断） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸视频（≤ 7 天，仅入库摩擦事件片段；公共水族馆/养殖场按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 投药 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大摩擦频次、持续时长、涉及鱼数等指标；所有数据必须基于真实视频帧分析 |\n| 🔎 使用提醒 | **必须**按**鱼种基线**判定：**底栖鱼种（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼）天然贴底觅食** + **繁殖期慈鲷类（七彩 / 鹦鹉 / 神仙鱼）贴底/蹭石产卵预备** → 严禁通用阈值盲判 |\n| 📚 文档读取 | **必须**考虑生理性上下文（**投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期**），避免误报 |\n| 🔎 使用提醒 | **必须**在光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS 时返回 `friction_signal_unreliable` 并建议补光/调整摄像头，**禁止给出不可靠的预警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 次 Level 3+ → 强烈建议联系**当地观赏鱼兽医现场镜检**（**AI 视觉无法替代显微镜镜检鉴定虫体**） |\n| 📜 报告输出 | **必须**：预警报告**按 tank_id + 事件时间戳输出**，含擦缸/蹭底频次 + 持续时长 + 涉及鱼数 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史外寄预警记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地鱼缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input /path/to/tank.mp4\n\n# 分析网络鱼缸固定摄像头视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --url https://example.com/tank.mp4\n\n# 显示历史外寄预警记录清单（自动触发关键词：查看鱼缸擦缸历史报告、外寄预警日志清单等）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --output result.json\n```\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-flashing-scraping-detection-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1788906149724\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}` - 导出预警报告\n5. （可选）`/web/companion/v2/trigger-soothing-action` - 触发联动告警（用户 APP 推送 / 建议立即体表+鳃部检查 / 准备隔离检疫缸）\n\n## 场景代码\n\n- `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` - 鱼类擦缸/蹭底行为识别（外寄）\n\n## 输入约束\n\n- 摄像头：鱼缸固定摄像头 / 检疫缸专用摄像头 / 养殖池水下摄像头，**必须同时覆盖缸壁、底砂、造景石全景**（任何盲区可能漏判）\n- 分辨率 ≥ 720p；**帧率 ≥ 25 FPS**（擦缸是高速瞬时动作，鱼体侧身闪动 < 0.5s）\n- 光照：建议鱼缸照明常开 + 无强反光；底砂区域光线足够（暗区漏检率高）\n- **核心采样窗口**：默认 1 分钟滚动窗口（频次统计单位），触发预警需 ≥ 10 秒持续观察\n- 视野约束：必须覆盖**缸壁侧面 + 底砂全面 + 主要造景石**\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID\n- **部署时必须录入**：鱼种、缸内总鱼数 N、缸底材质（裸缸 / 细砂 / 粗砂 / 火山石 / 水草泥）、造景石位置\n- 用户必须授权部署；公共水族馆 / 养殖场需公示告知\n\n## 关键观测信号\n\n### 擦缸（Flashing - 侧身蹭缸壁）信号\n- `flashing_events_count_per_minute` - **每分钟擦缸事件数**（核心指标）\n- `flashing_event_duration_ms_avg` - 单次擦缸动作平均时长（毫秒，典型 100-500ms）\n- `flashing_body_axis_tilt_deg_avg` - 鱼体翻身角度均值（侧身擦缸通常 60-90 度）\n- `flashing_contact_surface` - 接触面（front_glass / side_glass / back_glass）\n- `flashing_burst_speed_normalized` - 爆发速度归一化（典型加速度高于游动 2-3 倍）\n\n### 蹭底（Scraping - 腹部/侧面蹭底砂）信号\n- `scraping_events_count_per_minute` - **每分钟蹭底事件数**（核心指标）\n- `scraping_event_duration_ms_avg` - 单次蹭底动作平均时长\n- `scraping_body_contact_area` - 接触部位（abdomen / lateral_left / lateral_right / gill_cover）\n- `scraping_substrate_type` - 接触底材类型（sand / gravel / decorative_rock / aquatic_plant）\n- `scraping_repeated_at_same_spot` - 是否在同一位置反复蹭（强信号）\n\n### 综合摩擦统计\n- `total_friction_events_per_minute` - **总摩擦事件数（擦缸 + 蹭底）/ 分钟**（核心阈值 ≥ 5 次/分钟）\n- `friction_persistent_duration_seconds` - **频繁摩擦持续时长**（核心阈值 ≥ 10 秒）\n- `affected_fish_count` - 涉及摩擦行为的鱼数\n- `affected_fish_ratio` - 涉及鱼数占总鱼数比例\n- `cross_fish_synchronicity_score` - 多鱼同步异常评分（多鱼同时擦缸 → 全缸寄生虫怀疑度高）\n\n### 上下文与排除信号（避免误报）\n- `is_during_feeding` - 是否在投喂窗口内（争食可能短暂撞缸）\n- `is_during_courtship_or_spawning` - 是否在繁殖期（求偶/产卵时鱼可能贴底/蹭石）\n- `is_substrate_cleaning_species` - 是否食底栖型鱼种（鼠鱼/异型鱼/底栖鱼天然贴底觅食）\n- `tank_recently_disturbed` - 鱼缸是否近期受外部惊吓（换水/搬家短暂应激）\n- `water_temperature_change_detected` - 水温是否近期突变（应激）\n\n## 综合判定\n\n- `friction_normal` - 摩擦行为正常（≤ 2 次/分钟，零星活动）\n- `friction_low_baseline` - 低频摩擦（3-4 次/分钟，可能为底栖鱼正常或轻度不适）\n- `friction_warning_mild` - **摩擦预警轻度**（5-7 次/分钟，持续 ≥ 10s，触发预警门槛）\n- `friction_warning_severe` - **摩擦预警严重**（≥ 8 次/分钟，持续 ≥ 30s，**强烈外寄怀疑**）\n- `friction_whole_tank_outbreak` - **全缸爆发**（≥ 50% 鱼同时频繁摩擦，**全缸寄生虫爆发风险**）\n- `friction_courtship_or_substrate_species` - 繁殖期/底栖鱼正常行为（不告警）\n- `friction_signal_unreliable` - 信号不可靠（光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS）\n\n## 4 级告警策略递进\n\n- Level 1（normal / low_baseline / courtship_or_substrate_species）：仅入库或不提示\n- Level 2（warning_mild）：重要提示，建议**立即近距离观察鱼体表（白点 / 充血 / 黏液增多）+ 鳃部颜色 + 食欲变化**\n- Level 3（warning_severe，单次）：紧急告警，建议**立即体表 + 鳃部 + 鳍条全面观察 + 测水质 NH3/NO2-/pH/温度 + 准备隔离检疫缸 + 联系当地观赏鱼兽医**（**禁止推荐具体寄生虫药品**）\n- Level 4（whole_tank_outbreak / warning_severe 持续 ≥ 24 小时）：**🚨 最高紧急告警 + 推送所有管理人员** + 强烈建议**立即隔离全缸 + 测水质五项 + 联系专业兽医现场检疫（外寄虫体鉴定需镜检，AI 视觉无法替代）**\n\n## 单日告警上限\n\n- Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**（外寄爆发可几天内全军覆没）\n\n## 红线约束\n\n- **🚨 禁止**做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等**具体寄生虫病确诊**（外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"）\n- **🚨 绝对禁止**输出具体药物名称、剂量、给药方案（**严禁推荐甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝等任何抗寄生虫药剂**）\n- **🚨 绝对禁止**输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3% 治疗\"等具体疗法（任何疗法剂量必须由兽医现场判断）\n- **禁止**长期存储完整鱼缸视频（≤ 7 天，仅入库摩擦事件片段；公共水族馆/养殖场按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 投药 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议）\n- 摩擦频次 / 持续时长 / 涉及鱼数等指标必须基于真实视频帧分析；**禁止伪造或夸大指标**\n- 鱼种特异性：**底栖鱼种**（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼） 天然贴底觅食、**繁殖期**（七彩 / 鹦鹉 / 慈鲷类）贴底/蹭石产卵预备 → 必须按鱼种和生理周期基线判定；**严禁通用阈值盲判底栖鱼为外寄**\n- 必须考虑生理性上下文：**投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期** → 不可直接告警\n- 光照不足 / 跟踪率 < 80% / 视野盲区（缸壁背面 / 底砂死角）/ 帧率 < 25 FPS → 必须返回 `friction_signal_unreliable` 并建议补光/调整摄像头\n- 必须告知用户：AI 视觉识别仅供参考，**外寄虫体最终确诊与处理需用户立即观察体表并由专业兽医镜检**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸/养殖池 ID\n- `species` - 鱼种\n- `total_fish_count_baseline` - 注册总鱼数\n- `substrate_type` - 缸底材质\n- `flashing_events_count_per_minute` - 擦缸频次\n- `scraping_events_count_per_minute` - 蹭底频次\n- `total_friction_events_per_minute` - 总摩擦频次\n- `friction_persistent_duration_seconds` - 频繁摩擦持续时长\n- `affected_fish_count` - 涉及鱼数\n- `cross_fish_synchronicity_score` - 多鱼同步评分\n- `composite_scene` - 综合判定\n- `alert_level` - 告警等级\n- `recommended_actions` - 建议动作（体表观察 / 鳃部观察 / 测水质 / 准备隔离检疫缸 / 联系兽医镜检，**绝不含具体药物、剂量、品牌、温度疗法、加盐剂量**）\n- `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\nAnalyzes fixed aquarium camera videos to detect fish flashing or scraping behavior and produce ectoparasite-risk warnings with event counts, alert levels, report links, and observation guidance.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and aquarium operators use this skill to submit fixed-camera aquarium video or a video URL for fish flashing and scraping analysis. The skill returns a structured warning report with frequency, duration, affected-fish metrics, alert level, and non-diagnostic next-step guidance.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Aquarium media, report requests, and account tokens are handled by an external service, and the security evidence flags unsafe development HTTP endpoints plus local token storage.\n\nMitigation: Review network configuration and token handling before use; avoid sensitive footage or real credentials until the publisher provides HTTPS-only production configuration and documented storage and history-query controls.\n\nRisk: Low frame rate, poor lighting, incomplete tank coverage, tracking gaps, feeding, stress, breeding behavior, or bottom-dwelling species can make flashing or scraping alerts unreliable.\n\nMitigation: Use clear fixed-camera footage with full tank-wall, substrate, and rockwork coverage at 25 FPS or higher; return an unreliable result instead of a warning when signal quality or species context is insufficient.\n\nRisk: The skill provides ectoparasite risk warnings and could be misused as a diagnosis or treatment recommendation.\n\nMitigation: Treat outputs as observation prompts only; do not diagnose parasite species or recommend medication, dosage, temperature, or salt treatment from this skill output, and seek professional veterinary microscopy for severe or repeated alerts.\n\n## Reference(s):\n\n- [ClawHub skill listing](https://clawhub.ai/18072937735/skills/smyx-fish-flashing-scraping-detection-analysis)\n- [Publisher profile](https://clawhub.ai/user/18072937735)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [Fish flashing and scraping API documentation](references/api_doc.md)\n- [Shared analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance]\n\n**Output Format:** [Markdown summaries and JSON-style analysis fields from command output.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May write an optional output file when invoked with --output; analysis and history queries depend on remote service responses.]\n\n## Skill Version(s):\n\n1.0.11 (source: server release metadata; artifact frontmatter reports 1.0.13)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 45904 bytes\n\nFiles: references/api_doc.md (8183b), scripts/__init__.py (68b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/skill.py (592b), scripts/smyx_fish_flashing_scraping_detection_analysis.py (3752b), skill-card.md (3129b), SKILL.md (19020b), 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 (166b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: \"smyx-fish-flashing-scraping-detection-analysis\"\ndescription: \"Through fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🐟 Fish Flashing & Scraping Detection (Ectoparasite Warning) | 鱼类擦缸/蹭底行为识别（外寄）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类擦缸/蹭底行为识别（外寄）** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. When the frequency exceeds a threshold (default 5/min) AND persists for over 10 seconds, the system outputs an 'ectoparasite risk warning', prompting the user to check for parasitic infections (such as ich, trichodina, gyrodactylus) or skin irritation. Application scenarios: home aquariums, public aquariums, quarantine tanks, aquaculture ponds. The system monitors in real time and pushes alerts when frequent flashing/scraping is detected. Skill features: white-spot disease, trichodiniasis and other ectoparasitic conditions only show flashing/scraping in their EARLIEST stage. Timely intervention can avoid mass mortality. AI-based real-time monitoring helps aquarists discover and treat early, reducing losses. This skill can be integrated into smart aquarium cameras or fish disease early-warning systems.\n\n通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。应用场景：家庭鱼缸、水族馆、检疫缸、养殖池。系统实时监测，当发现频繁擦缸/蹭底时推送预警。技能特点：白点病、车轮虫病等外寄疾病在早期仅表现为擦缸、蹭底，若及时干预可避免大规模死亡。通过 AI 实时监测并提醒，可帮助养鱼者早发现、早治疗，降低损失。该技能可集成到智能鱼缸摄像头或鱼病预警系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族寄生虫预警 AI。你的任务是分析鱼缸固定摄像头的视频（覆盖缸壁 + 底砂 + 造景石全景，分辨率 ≥ 720p，帧率 ≥ 25 FPS——擦缸是瞬时高速动作 < 0.5s 必须高帧率），检测两类异常摩擦行为：① **擦缸（Flashing）**：鱼体侧身翻转 60-90 度快速蹭过缸壁，爆发速度高于游动 2-3 倍；② **蹭底（Scraping）**：鱼体腹部 / 侧面 / 鳃盖贴底砂或造景石摩擦，常在同一位置反复蹭。统计**每分钟摩擦事件数**（擦缸 + 蹭底）+ **持续时长**：当 ≥ 5 次/分钟且持续 ≥ 10 秒时触发预警门槛。按 7 类综合场景判定（friction_normal / friction_low_baseline / friction_warning_mild / friction_warning_severe / friction_whole_tank_outbreak / friction_courtship_or_substrate_species / friction_signal_unreliable），按 4 级告警策略递进（Level 1 不提示 → Level 2 立即近距离观察体表+鳃部+食欲 → Level 3 紧急体表+鳃部+鳍条全面观察+测水质+准备隔离检疫缸+联系兽医 → Level 4 **🚨 最高紧急+所有联系人+全缸隔离+测水质五项+联系专业兽医现场镜检**）。鱼种特异性必须按基线判定：**底栖鱼种**（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼）天然贴底觅食、**繁殖期慈鲷类**（七彩 / 鹦鹉 / 神仙鱼）贴底/蹭石产卵预备 → **严禁通用阈值盲判底栖鱼为外寄**。必须考虑生理性上下文（投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期），避免误报。光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS → 必须返回 `friction_signal_unreliable`。**🚨 严禁做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等具体寄生虫病确诊**（外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"）；**🚨 严禁输出具体药物名称、剂量、给药方案**（特别严禁推荐**甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝**等任何抗寄生虫药剂）；**🚨 严禁输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3%\"等具体疗法**（剂量必须由兽医现场判断）；严禁伪造夸大摩擦频次/持续时长；严禁越权代用户启停加热棒/换水/投药/灯光/喂食器（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼缸固定摄像头 / 检疫缸专用摄像头 / 养殖池水下摄像头**实时视频**（默认 1 分钟滚动窗口统计频次，触发预警需 ≥ 10 秒持续观察），识别 7 类综合场景（friction_normal / friction_low_baseline / friction_warning_mild / friction_warning_severe / friction_whole_tank_outbreak / friction_courtship_or_substrate_species / friction_signal_unreliable）→ **四组指标**：擦缸 5 项（每分钟事件数 / 单次时长 ms / 翻身角度 / 接触缸壁面 / 爆发速度）+ 蹭底 5 项（每分钟事件数 / 单次时长 / 接触部位 / 接触底材 / 同位置反复）+ 综合摩擦统计 5 项（**总频次/分钟 + 持续时长秒** + 涉及鱼数 + 涉及比例 + 多鱼同步评分）+ 排除上下文 5 项（投喂期 / 繁殖期 / 底栖鱼种 / 近期惊吓 / 水温骤变）→ 4 档告警级别（none → important → urgent → critical）→ **4 级告警策略递进**（不提示 → 近距离观察体表+鳃部+食欲 → 紧急全面观察+测水质+隔离检疫缸+联系兽医 → 🚨 最高紧急+所有联系人+全缸隔离+联系专业兽医现场镜检）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**）→ **预警报告**（按 tank_id 输出，含擦缸/蹭底频次 + 持续时长 + 涉及鱼数 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 鱼缸视野分割（缸壁 / 底砂 / 造景石 / 中段水体） |\n| 2 | 多目标鱼体跟踪 |\n| 3 | **擦缸事件检测**（侧身翻转角度 + 缸壁接触 + 爆发速度三条件联合） |\n| 4 | **蹭底事件检测**（腹部/侧面贴底砂 + 同位置反复） |\n| 5 | 每分钟事件计数（滑动窗口） |\n| 6 | 持续时长累计（跨分钟累加） |\n| 7 | 多鱼并发同步评分 |\n| 8 | 鱼种基线（底栖 vs 中上层） |\n| 9 | 生理性上下文识别（投喂 / 繁殖 / 应激 / 新鱼适应） |\n| 10 | 光照与跟踪率门控（unreliable） |\n| 11 | 用户 APP 紧急推送 |\n| 12 | 4 级告警递进 |\n| 13 | 单日告警上限（**Level 4 不设上限**） |\n| 14 | 预警报告（按 tank_id + 事件时间戳输出） |\n| 15 | 连续 ≥ 2 次 Level 3+ → 强烈建议联系**当地观赏鱼兽医现场镜检**（**AI 视觉无法替代显微镜镜检鉴定虫体**） |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供鱼缸固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行鱼类擦缸/蹭底外寄风险识别 |\n| 🔎 明确分析意图 | 当用户明确提及鱼擦缸、鱼蹭底、鱼蹭石、鱼侧身闪、鱼疑似白点、鱼疑似车轮虫、鱼疑似三代虫、外寄、寄生虫预警等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼缸擦缸历史报告、外寄预警日志清单、寄生虫风险事件清单、查询历史外寄预警记录、显示所有鱼缸外寄报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_flashing_scraping_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_fish_flashing_scraping_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_fish_flashing_scraping_detection_analysis.py`](scripts/smyx_fish_flashing_scraping_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；摄像头需**同时覆盖缸壁+底砂+造景石全景**；**帧率 ≥ 25 FPS**；1 分钟滚动窗口统计 + 10 秒持续观察 |\n| 🔎 使用提醒 | **核心采样窗口**：1 分钟滚动窗口（频次统计单位），触发预警需 ≥ 10 秒持续观察 |\n| 🔎 使用提醒 | **核心预警门槛**：总摩擦频次 **≥ 5 次/分钟 且 持续 ≥ 10 秒** 触发 Level 2+ 告警 |\n| 🔎 使用提醒 | **4 级告警策略递进**（none → important → urgent → critical），多鱼/全缸/持续超长进入更高级别 |\n| 🔎 使用提醒 | 单日告警上限：Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**（外寄爆发可几天内全军覆没） |\n| 🔎 使用提醒 | 红线约束 |\n| 🔎 使用提醒 | **🚨 禁止**做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等具体寄生虫病确诊（**外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"**） |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案（特别**严禁推荐甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝**等任何抗寄生虫药剂） |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3% 治疗\"\"下黄粉\"等具体疗法剂量（任何疗法必须由兽医现场判断） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸视频（≤ 7 天，仅入库摩擦事件片段；公共水族馆/养殖场按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 投药 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大摩擦频次、持续时长、涉及鱼数等指标；所有数据必须基于真实视频帧分析 |\n| 🔎 使用提醒 | **必须**按**鱼种基线**判定：**底栖鱼种（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼）天然贴底觅食** + **繁殖期慈鲷类（七彩 / 鹦鹉 / 神仙鱼）贴底/蹭石产卵预备** → 严禁通用阈值盲判 |\n| 📚 文档读取 | **必须**考虑生理性上下文（**投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期**），避免误报 |\n| 🔎 使用提醒 | **必须**在光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS 时返回 `friction_signal_unreliable` 并建议补光/调整摄像头，**禁止给出不可靠的预警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 次 Level 3+ → 强烈建议联系**当地观赏鱼兽医现场镜检**（**AI 视觉无法替代显微镜镜检鉴定虫体**） |\n| 📜 报告输出 | **必须**：预警报告**按 tank_id + 事件时间戳输出**，含擦缸/蹭底频次 + 持续时长 + 涉及鱼数 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史外寄预警记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地鱼缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input /path/to/tank.mp4\n\n# 分析网络鱼缸固定摄像头视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --url https://example.com/tank.mp4\n\n# 显示历史外寄预警记录清单（自动触发关键词：查看鱼缸擦缸历史报告、外寄预警日志清单等）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-flashing-scraping-detection-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1788036268796\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}` - 导出预警报告\n5. （可选）`/web/companion/v2/trigger-soothing-action` - 触发联动告警（用户 APP 推送 / 建议立即体表+鳃部检查 / 准备隔离检疫缸）\n\n## 场景代码\n\n- `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` - 鱼类擦缸/蹭底行为识别（外寄）\n\n## 输入约束\n\n- 摄像头：鱼缸固定摄像头 / 检疫缸专用摄像头 / 养殖池水下摄像头，**必须同时覆盖缸壁、底砂、造景石全景**（任何盲区可能漏判）\n- 分辨率 ≥ 720p；**帧率 ≥ 25 FPS**（擦缸是高速瞬时动作，鱼体侧身闪动 < 0.5s）\n- 光照：建议鱼缸照明常开 + 无强反光；底砂区域光线足够（暗区漏检率高）\n- **核心采样窗口**：默认 1 分钟滚动窗口（频次统计单位），触发预警需 ≥ 10 秒持续观察\n- 视野约束：必须覆盖**缸壁侧面 + 底砂全面 + 主要造景石**\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID\n- **部署时必须录入**：鱼种、缸内总鱼数 N、缸底材质（裸缸 / 细砂 / 粗砂 / 火山石 / 水草泥）、造景石位置\n- 用户必须授权部署；公共水族馆 / 养殖场需公示告知\n\n## 关键观测信号\n\n### 擦缸（Flashing - 侧身蹭缸壁）信号\n- `flashing_events_count_per_minute` - **每分钟擦缸事件数**（核心指标）\n- `flashing_event_duration_ms_avg` - 单次擦缸动作平均时长（毫秒，典型 100-500ms）\n- `flashing_body_axis_tilt_deg_avg` - 鱼体翻身角度均值（侧身擦缸通常 60-90 度）\n- `flashing_contact_surface` - 接触面（front_glass / side_glass / back_glass）\n- `flashing_burst_speed_normalized` - 爆发速度归一化（典型加速度高于游动 2-3 倍）\n\n### 蹭底（Scraping - 腹部/侧面蹭底砂）信号\n- `scraping_events_count_per_minute` - **每分钟蹭底事件数**（核心指标）\n- `scraping_event_duration_ms_avg` - 单次蹭底动作平均时长\n- `scraping_body_contact_area` - 接触部位（abdomen / lateral_left / lateral_right / gill_cover）\n- `scraping_substrate_type` - 接触底材类型（sand / gravel / decorative_rock / aquatic_plant）\n- `scraping_repeated_at_same_spot` - 是否在同一位置反复蹭（强信号）\n\n### 综合摩擦统计\n- `total_friction_events_per_minute` - **总摩擦事件数（擦缸 + 蹭底）/ 分钟**（核心阈值 ≥ 5 次/分钟）\n- `friction_persistent_duration_seconds` - **频繁摩擦持续时长**（核心阈值 ≥ 10 秒）\n- `affected_fish_count` - 涉及摩擦行为的鱼数\n- `affected_fish_ratio` - 涉及鱼数占总鱼数比例\n- `cross_fish_synchronicity_score` - 多鱼同步异常评分（多鱼同时擦缸 → 全缸寄生虫怀疑度高）\n\n### 上下文与排除信号（避免误报）\n- `is_during_feeding` - 是否在投喂窗口内（争食可能短暂撞缸）\n- `is_during_courtship_or_spawning` - 是否在繁殖期（求偶/产卵时鱼可能贴底/蹭石）\n- `is_substrate_cleaning_species` - 是否食底栖型鱼种（鼠鱼/异型鱼/底栖鱼天然贴底觅食）\n- `tank_recently_disturbed` - 鱼缸是否近期受外部惊吓（换水/搬家短暂应激）\n- `water_temperature_change_detected` - 水温是否近期突变（应激）\n\n## 综合判定\n\n- `friction_normal` - 摩擦行为正常（≤ 2 次/分钟，零星活动）\n- `friction_low_baseline` - 低频摩擦（3-4 次/分钟，可能为底栖鱼正常或轻度不适）\n- `friction_warning_mild` - **摩擦预警轻度**（5-7 次/分钟，持续 ≥ 10s，触发预警门槛）\n- `friction_warning_severe` - **摩擦预警严重**（≥ 8 次/分钟，持续 ≥ 30s，**强烈外寄怀疑**）\n- `friction_whole_tank_outbreak` - **全缸爆发**（≥ 50% 鱼同时频繁摩擦，**全缸寄生虫爆发风险**）\n- `friction_courtship_or_substrate_species` - 繁殖期/底栖鱼正常行为（不告警）\n- `friction_signal_unreliable` - 信号不可靠（光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS）\n\n## 4 级告警策略递进\n\n- Level 1（normal / low_baseline / courtship_or_substrate_species）：仅入库或不提示\n- Level 2（warning_mild）：重要提示，建议**立即近距离观察鱼体表（白点 / 充血 / 黏液增多）+ 鳃部颜色 + 食欲变化**\n- Level 3（warning_severe，单次）：紧急告警，建议**立即体表 + 鳃部 + 鳍条全面观察 + 测水质 NH3/NO2-/pH/温度 + 准备隔离检疫缸 + 联系当地观赏鱼兽医**（**禁止推荐具体寄生虫药品**）\n- Level 4（whole_tank_outbreak / warning_severe 持续 ≥ 24 小时）：**🚨 最高紧急告警 + 推送所有管理人员** + 强烈建议**立即隔离全缸 + 测水质五项 + 联系专业兽医现场检疫（外寄虫体鉴定需镜检，AI 视觉无法替代）**\n\n## 单日告警上限\n\n- Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**（外寄爆发可几天内全军覆没）\n\n## 红线约束\n\n- **🚨 禁止**做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等**具体寄生虫病确诊**（外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"）\n- **🚨 绝对禁止**输出具体药物名称、剂量、给药方案（**严禁推荐甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝等任何抗寄生虫药剂**）\n- **🚨 绝对禁止**输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3% 治疗\"等具体疗法（任何疗法剂量必须由兽医现场判断）\n- **禁止**长期存储完整鱼缸视频（≤ 7 天，仅入库摩擦事件片段；公共水族馆/养殖场按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 投药 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议）\n- 摩擦频次 / 持续时长 / 涉及鱼数等指标必须基于真实视频帧分析；**禁止伪造或夸大指标**\n- 鱼种特异性：**底栖鱼种**（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼） 天然贴底觅食、**繁殖期**（七彩 / 鹦鹉 / 慈鲷类）贴底/蹭石产卵预备 → 必须按鱼种和生理周期基线判定；**严禁通用阈值盲判底栖鱼为外寄**\n- 必须考虑生理性上下文：**投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期** → 不可直接告警\n- 光照不足 / 跟踪率 < 80% / 视野盲区（缸壁背面 / 底砂死角）/ 帧率 < 25 FPS → 必须返回 `friction_signal_unreliable` 并建议补光/调整摄像头\n- 必须告知用户：AI 视觉识别仅供参考，**外寄虫体最终确诊与处理需用户立即观察体表并由专业兽医镜检**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸/养殖池 ID\n- `species` - 鱼种\n- `total_fish_count_baseline` - 注册总鱼数\n- `substrate_type` - 缸底材质\n- `flashing_events_count_per_minute` - 擦缸频次\n- `scraping_events_count_per_minute` - 蹭底频次\n- `total_friction_events_per_minute` - 总摩擦频次\n- `friction_persistent_duration_seconds` - 频繁摩擦持续时长\n- `affected_fish_count` - 涉及鱼数\n- `cross_fish_synchronicity_score` - 多鱼同步评分\n- `composite_scene` - 综合判定\n- `alert_level` - 告警等级\n- `recommended_actions` - 建议动作（体表观察 / 鳃部观察 / 测水质 / 准备隔离检疫缸 / 联系兽医镜检，**绝不含具体药物、剂量、品牌、温度疗法、加盐剂量**）\n- `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\nDetects fish flashing and scraping behavior from fixed aquarium video, counts abnormal contact frequency, and produces ectoparasite risk warnings with observation guidance rather than a diagnosis.\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 aquarists, aquarium operators, aquaculture teams, and agents use this skill to analyze fixed-camera fish videos for repeated flashing or scraping behavior and to generate structured warning reports. The skill supports early risk triage, history lookup, and user-facing recommendations to observe fish condition and seek professional veterinary microscopy when needed.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Aquarium videos or URLs are sent to the Life Emergence backend for analysis.\n\nMitigation: Install only when that data sharing is acceptable and review backend permissions, retention, and user consent requirements before deployment.\n\nRisk: The skill silently creates or reuses an internal account identity, queries cloud report history, and stores account tokens locally.\n\nMitigation: Prefer an updated release that makes cloud history lookup opt-in, documents permissions and retention, and provides a way to clear stored identity and tokens.\n\nRisk: Behavioral warnings could be mistaken for a specific parasite diagnosis or treatment plan.\n\nMitigation: Keep outputs framed as ectoparasite risk signals, avoid medication or dosage guidance, and direct users to close observation and professional veterinary microscopy for confirmation.\n\nRisk: Poor video quality, blind spots, low frame rate, species baseline differences, feeding, breeding, stress, or water-temperature changes can cause false alerts.\n\nMitigation: Require adequate camera coverage, lighting, frame rate, and tracking quality; return an unreliable-signal result when those conditions are not met and account for species and context baselines.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-fish-flashing-scraping-detection-analysis)\n- [Publisher profile](https://clawhub.ai/user/18072937735)\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, configuration, guidance]\n\n**Output Format:** [Markdown and JSON-style structured analysis reports with status messages and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include friction event counts, duration, affected fish counts, alert level, recommended observation actions, and history-report links.]\n\n## Skill Version(s):\n\n1.0.10 (source: server release metadata; artifact frontmatter reports 1.0.11)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 45672 bytes\n\nFiles: references/api_doc.md (8183b), scripts/__init__.py (68b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/skill.py (592b), scripts/smyx_fish_flashing_scraping_detection_analysis.py (3752b), skill-card.md (2561b), SKILL.md (19020b), 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 (165b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: \"smyx-fish-flashing-scraping-detection-analysis\"\ndescription: \"Through fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 🐟 Fish Flashing & Scraping Detection (Ectoparasite Warning) | 鱼类擦缸/蹭底行为识别（外寄）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类擦缸/蹭底行为识别（外寄）** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. When the frequency exceeds a threshold (default 5/min) AND persists for over 10 seconds, the system outputs an 'ectoparasite risk warning', prompting the user to check for parasitic infections (such as ich, trichodina, gyrodactylus) or skin irritation. Application scenarios: home aquariums, public aquariums, quarantine tanks, aquaculture ponds. The system monitors in real time and pushes alerts when frequent flashing/scraping is detected. Skill features: white-spot disease, trichodiniasis and other ectoparasitic conditions only show flashing/scraping in their EARLIEST stage. Timely intervention can avoid mass mortality. AI-based real-time monitoring helps aquarists discover and treat early, reducing losses. This skill can be integrated into smart aquarium cameras or fish disease early-warning systems.\n\n通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。应用场景：家庭鱼缸、水族馆、检疫缸、养殖池。系统实时监测，当发现频繁擦缸/蹭底时推送预警。技能特点：白点病、车轮虫病等外寄疾病在早期仅表现为擦缸、蹭底，若及时干预可避免大规模死亡。通过 AI 实时监测并提醒，可帮助养鱼者早发现、早治疗，降低损失。该技能可集成到智能鱼缸摄像头或鱼病预警系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族寄生虫预警 AI。你的任务是分析鱼缸固定摄像头的视频（覆盖缸壁 + 底砂 + 造景石全景，分辨率 ≥ 720p，帧率 ≥ 25 FPS——擦缸是瞬时高速动作 < 0.5s 必须高帧率），检测两类异常摩擦行为：① **擦缸（Flashing）**：鱼体侧身翻转 60-90 度快速蹭过缸壁，爆发速度高于游动 2-3 倍；② **蹭底（Scraping）**：鱼体腹部 / 侧面 / 鳃盖贴底砂或造景石摩擦，常在同一位置反复蹭。统计**每分钟摩擦事件数**（擦缸 + 蹭底）+ **持续时长**：当 ≥ 5 次/分钟且持续 ≥ 10 秒时触发预警门槛。按 7 类综合场景判定（friction_normal / friction_low_baseline / friction_warning_mild / friction_warning_severe / friction_whole_tank_outbreak / friction_courtship_or_substrate_species / friction_signal_unreliable），按 4 级告警策略递进（Level 1 不提示 → Level 2 立即近距离观察体表+鳃部+食欲 → Level 3 紧急体表+鳃部+鳍条全面观察+测水质+准备隔离检疫缸+联系兽医 → Level 4 **🚨 最高紧急+所有联系人+全缸隔离+测水质五项+联系专业兽医现场镜检**）。鱼种特异性必须按基线判定：**底栖鱼种**（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼）天然贴底觅食、**繁殖期慈鲷类**（七彩 / 鹦鹉 / 神仙鱼）贴底/蹭石产卵预备 → **严禁通用阈值盲判底栖鱼为外寄**。必须考虑生理性上下文（投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期），避免误报。光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS → 必须返回 `friction_signal_unreliable`。**🚨 严禁做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等具体寄生虫病确诊**（外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"）；**🚨 严禁输出具体药物名称、剂量、给药方案**（特别严禁推荐**甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝**等任何抗寄生虫药剂）；**🚨 严禁输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3%\"等具体疗法**（剂量必须由兽医现场判断）；严禁伪造夸大摩擦频次/持续时长；严禁越权代用户启停加热棒/换水/投药/灯光/喂食器（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼缸固定摄像头 / 检疫缸专用摄像头 / 养殖池水下摄像头**实时视频**（默认 1 分钟滚动窗口统计频次，触发预警需 ≥ 10 秒持续观察），识别 7 类综合场景（friction_normal / friction_low_baseline / friction_warning_mild / friction_warning_severe / friction_whole_tank_outbreak / friction_courtship_or_substrate_species / friction_signal_unreliable）→ **四组指标**：擦缸 5 项（每分钟事件数 / 单次时长 ms / 翻身角度 / 接触缸壁面 / 爆发速度）+ 蹭底 5 项（每分钟事件数 / 单次时长 / 接触部位 / 接触底材 / 同位置反复）+ 综合摩擦统计 5 项（**总频次/分钟 + 持续时长秒** + 涉及鱼数 + 涉及比例 + 多鱼同步评分）+ 排除上下文 5 项（投喂期 / 繁殖期 / 底栖鱼种 / 近期惊吓 / 水温骤变）→ 4 档告警级别（none → important → urgent → critical）→ **4 级告警策略递进**（不提示 → 近距离观察体表+鳃部+食欲 → 紧急全面观察+测水质+隔离检疫缸+联系兽医 → 🚨 最高紧急+所有联系人+全缸隔离+联系专业兽医现场镜检）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**）→ **预警报告**（按 tank_id 输出，含擦缸/蹭底频次 + 持续时长 + 涉及鱼数 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 鱼缸视野分割（缸壁 / 底砂 / 造景石 / 中段水体） |\n| 2 | 多目标鱼体跟踪 |\n| 3 | **擦缸事件检测**（侧身翻转角度 + 缸壁接触 + 爆发速度三条件联合） |\n| 4 | **蹭底事件检测**（腹部/侧面贴底砂 + 同位置反复） |\n| 5 | 每分钟事件计数（滑动窗口） |\n| 6 | 持续时长累计（跨分钟累加） |\n| 7 | 多鱼并发同步评分 |\n| 8 | 鱼种基线（底栖 vs 中上层） |\n| 9 | 生理性上下文识别（投喂 / 繁殖 / 应激 / 新鱼适应） |\n| 10 | 光照与跟踪率门控（unreliable） |\n| 11 | 用户 APP 紧急推送 |\n| 12 | 4 级告警递进 |\n| 13 | 单日告警上限（**Level 4 不设上限**） |\n| 14 | 预警报告（按 tank_id + 事件时间戳输出） |\n| 15 | 连续 ≥ 2 次 Level 3+ → 强烈建议联系**当地观赏鱼兽医现场镜检**（**AI 视觉无法替代显微镜镜检鉴定虫体**） |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供鱼缸固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行鱼类擦缸/蹭底外寄风险识别 |\n| 🔎 明确分析意图 | 当用户明确提及鱼擦缸、鱼蹭底、鱼蹭石、鱼侧身闪、鱼疑似白点、鱼疑似车轮虫、鱼疑似三代虫、外寄、寄生虫预警等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼缸擦缸历史报告、外寄预警日志清单、寄生虫风险事件清单、查询历史外寄预警记录、显示所有鱼缸外寄报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_flashing_scraping_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_fish_flashing_scraping_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_fish_flashing_scraping_detection_analysis.py`](scripts/smyx_fish_flashing_scraping_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；摄像头需**同时覆盖缸壁+底砂+造景石全景**；**帧率 ≥ 25 FPS**；1 分钟滚动窗口统计 + 10 秒持续观察 |\n| 🔎 使用提醒 | **核心采样窗口**：1 分钟滚动窗口（频次统计单位），触发预警需 ≥ 10 秒持续观察 |\n| 🔎 使用提醒 | **核心预警门槛**：总摩擦频次 **≥ 5 次/分钟 且 持续 ≥ 10 秒** 触发 Level 2+ 告警 |\n| 🔎 使用提醒 | **4 级告警策略递进**（none → important → urgent → critical），多鱼/全缸/持续超长进入更高级别 |\n| 🔎 使用提醒 | 单日告警上限：Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**（外寄爆发可几天内全军覆没） |\n| 🔎 使用提醒 | 红线约束 |\n| 🔎 使用提醒 | **🚨 禁止**做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等具体寄生虫病确诊（**外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"**） |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案（特别**严禁推荐甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝**等任何抗寄生虫药剂） |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3% 治疗\"\"下黄粉\"等具体疗法剂量（任何疗法必须由兽医现场判断） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸视频（≤ 7 天，仅入库摩擦事件片段；公共水族馆/养殖场按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 投药 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大摩擦频次、持续时长、涉及鱼数等指标；所有数据必须基于真实视频帧分析 |\n| 🔎 使用提醒 | **必须**按**鱼种基线**判定：**底栖鱼种（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼）天然贴底觅食** + **繁殖期慈鲷类（七彩 / 鹦鹉 / 神仙鱼）贴底/蹭石产卵预备** → 严禁通用阈值盲判 |\n| 📚 文档读取 | **必须**考虑生理性上下文（**投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期**），避免误报 |\n| 🔎 使用提醒 | **必须**在光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS 时返回 `friction_signal_unreliable` 并建议补光/调整摄像头，**禁止给出不可靠的预警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 次 Level 3+ → 强烈建议联系**当地观赏鱼兽医现场镜检**（**AI 视觉无法替代显微镜镜检鉴定虫体**） |\n| 📜 报告输出 | **必须**：预警报告**按 tank_id + 事件时间戳输出**，含擦缸/蹭底频次 + 持续时长 + 涉及鱼数 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史外寄预警记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地鱼缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input /path/to/tank.mp4\n\n# 分析网络鱼缸固定摄像头视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --url https://example.com/tank.mp4\n\n# 显示历史外寄预警记录清单（自动触发关键词：查看鱼缸擦缸历史报告、外寄预警日志清单等）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-flashing-scraping-detection-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1787345848983\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}` - 导出预警报告\n5. （可选）`/web/companion/v2/trigger-soothing-action` - 触发联动告警（用户 APP 推送 / 建议立即体表+鳃部检查 / 准备隔离检疫缸）\n\n## 场景代码\n\n- `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` - 鱼类擦缸/蹭底行为识别（外寄）\n\n## 输入约束\n\n- 摄像头：鱼缸固定摄像头 / 检疫缸专用摄像头 / 养殖池水下摄像头，**必须同时覆盖缸壁、底砂、造景石全景**（任何盲区可能漏判）\n- 分辨率 ≥ 720p；**帧率 ≥ 25 FPS**（擦缸是高速瞬时动作，鱼体侧身闪动 < 0.5s）\n- 光照：建议鱼缸照明常开 + 无强反光；底砂区域光线足够（暗区漏检率高）\n- **核心采样窗口**：默认 1 分钟滚动窗口（频次统计单位），触发预警需 ≥ 10 秒持续观察\n- 视野约束：必须覆盖**缸壁侧面 + 底砂全面 + 主要造景石**\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID\n- **部署时必须录入**：鱼种、缸内总鱼数 N、缸底材质（裸缸 / 细砂 / 粗砂 / 火山石 / 水草泥）、造景石位置\n- 用户必须授权部署；公共水族馆 / 养殖场需公示告知\n\n## 关键观测信号\n\n### 擦缸（Flashing - 侧身蹭缸壁）信号\n- `flashing_events_count_per_minute` - **每分钟擦缸事件数**（核心指标）\n- `flashing_event_duration_ms_avg` - 单次擦缸动作平均时长（毫秒，典型 100-500ms）\n- `flashing_body_axis_tilt_deg_avg` - 鱼体翻身角度均值（侧身擦缸通常 60-90 度）\n- `flashing_contact_surface` - 接触面（front_glass / side_glass / back_glass）\n- `flashing_burst_speed_normalized` - 爆发速度归一化（典型加速度高于游动 2-3 倍）\n\n### 蹭底（Scraping - 腹部/侧面蹭底砂）信号\n- `scraping_events_count_per_minute` - **每分钟蹭底事件数**（核心指标）\n- `scraping_event_duration_ms_avg` - 单次蹭底动作平均时长\n- `scraping_body_contact_area` - 接触部位（abdomen / lateral_left / lateral_right / gill_cover）\n- `scraping_substrate_type` - 接触底材类型（sand / gravel / decorative_rock / aquatic_plant）\n- `scraping_repeated_at_same_spot` - 是否在同一位置反复蹭（强信号）\n\n### 综合摩擦统计\n- `total_friction_events_per_minute` - **总摩擦事件数（擦缸 + 蹭底）/ 分钟**（核心阈值 ≥ 5 次/分钟）\n- `friction_persistent_duration_seconds` - **频繁摩擦持续时长**（核心阈值 ≥ 10 秒）\n- `affected_fish_count` - 涉及摩擦行为的鱼数\n- `affected_fish_ratio` - 涉及鱼数占总鱼数比例\n- `cross_fish_synchronicity_score` - 多鱼同步异常评分（多鱼同时擦缸 → 全缸寄生虫怀疑度高）\n\n### 上下文与排除信号（避免误报）\n- `is_during_feeding` - 是否在投喂窗口内（争食可能短暂撞缸）\n- `is_during_courtship_or_spawning` - 是否在繁殖期（求偶/产卵时鱼可能贴底/蹭石）\n- `is_substrate_cleaning_species` - 是否食底栖型鱼种（鼠鱼/异型鱼/底栖鱼天然贴底觅食）\n- `tank_recently_disturbed` - 鱼缸是否近期受外部惊吓（换水/搬家短暂应激）\n- `water_temperature_change_detected` - 水温是否近期突变（应激）\n\n## 综合判定\n\n- `friction_normal` - 摩擦行为正常（≤ 2 次/分钟，零星活动）\n- `friction_low_baseline` - 低频摩擦（3-4 次/分钟，可能为底栖鱼正常或轻度不适）\n- `friction_warning_mild` - **摩擦预警轻度**（5-7 次/分钟，持续 ≥ 10s，触发预警门槛）\n- `friction_warning_severe` - **摩擦预警严重**（≥ 8 次/分钟，持续 ≥ 30s，**强烈外寄怀疑**）\n- `friction_whole_tank_outbreak` - **全缸爆发**（≥ 50% 鱼同时频繁摩擦，**全缸寄生虫爆发风险**）\n- `friction_courtship_or_substrate_species` - 繁殖期/底栖鱼正常行为（不告警）\n- `friction_signal_unreliable` - 信号不可靠（光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS）\n\n## 4 级告警策略递进\n\n- Level 1（normal / low_baseline / courtship_or_substrate_species）：仅入库或不提示\n- Level 2（warning_mild）：重要提示，建议**立即近距离观察鱼体表（白点 / 充血 / 黏液增多）+ 鳃部颜色 + 食欲变化**\n- Level 3（warning_severe，单次）：紧急告警，建议**立即体表 + 鳃部 + 鳍条全面观察 + 测水质 NH3/NO2-/pH/温度 + 准备隔离检疫缸 + 联系当地观赏鱼兽医**（**禁止推荐具体寄生虫药品**）\n- Level 4（whole_tank_outbreak / warning_severe 持续 ≥ 24 小时）：**🚨 最高紧急告警 + 推送所有管理人员** + 强烈建议**立即隔离全缸 + 测水质五项 + 联系专业兽医现场检疫（外寄虫体鉴定需镜检，AI 视觉无法替代）**\n\n## 单日告警上限\n\n- Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**（外寄爆发可几天内全军覆没）\n\n## 红线约束\n\n- **🚨 禁止**做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等**具体寄生虫病确诊**（外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"）\n- **🚨 绝对禁止**输出具体药物名称、剂量、给药方案（**严禁推荐甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝等任何抗寄生虫药剂**）\n- **🚨 绝对禁止**输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3% 治疗\"等具体疗法（任何疗法剂量必须由兽医现场判断）\n- **禁止**长期存储完整鱼缸视频（≤ 7 天，仅入库摩擦事件片段；公共水族馆/养殖场按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 投药 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议）\n- 摩擦频次 / 持续时长 / 涉及鱼数等指标必须基于真实视频帧分析；**禁止伪造或夸大指标**\n- 鱼种特异性：**底栖鱼种**（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼） 天然贴底觅食、**繁殖期**（七彩 / 鹦鹉 / 慈鲷类）贴底/蹭石产卵预备 → 必须按鱼种和生理周期基线判定；**严禁通用阈值盲判底栖鱼为外寄**\n- 必须考虑生理性上下文：**投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期** → 不可直接告警\n- 光照不足 / 跟踪率 < 80% / 视野盲区（缸壁背面 / 底砂死角）/ 帧率 < 25 FPS → 必须返回 `friction_signal_unreliable` 并建议补光/调整摄像头\n- 必须告知用户：AI 视觉识别仅供参考，**外寄虫体最终确诊与处理需用户立即观察体表并由专业兽医镜检**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸/养殖池 ID\n- `species` - 鱼种\n- `total_fish_count_baseline` - 注册总鱼数\n- `substrate_type` - 缸底材质\n- `flashing_events_count_per_minute` - 擦缸频次\n- `scraping_events_count_per_minute` - 蹭底频次\n- `total_friction_events_per_minute` - 总摩擦频次\n- `friction_persistent_duration_seconds` - 频繁摩擦持续时长\n- `affected_fish_count` - 涉及鱼数\n- `cross_fish_synchronicity_score` - 多鱼同步评分\n- `composite_scene` - 综合判定\n- `alert_level` - 告警等级\n- `recommended_actions` - 建议动作（体表观察 / 鳃部观察 / 测水质 / 准备隔离检疫缸 / 联系兽医镜检，**绝不含具体药物、剂量、品牌、温度疗法、加盐剂量**）\n- `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 fixed aquarium camera video to detect fish flashing or scraping behavior, count abnormal friction events, and produce an ectoparasite risk warning report.\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 and aquarium operators use this skill to analyze aquarium, quarantine tank, or aquaculture video for flashing and scraping patterns that may indicate ectoparasite risk. It returns risk-oriented observations and recommended next steps, not a veterinary diagnosis or medication plan.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Aquarium videos, video URLs, report history requests, and identity-linked metadata may be sent to the configured cloud service.\n\nMitigation: Use only non-sensitive, authorized footage and review the configured service endpoints, identity behavior, and retention expectations before deployment.\n\nRisk: The skill may create or reuse local account and token state in the workspace data directory.\n\nMitigation: Avoid shared workspaces for sensitive use, and clear or isolate the workspace data directory when changing users or deployment contexts.\n\nRisk: Behavioral warnings can be mistaken for veterinary diagnosis or treatment guidance.\n\nMitigation: Treat outputs as risk signals only; confirm ectoparasites through appropriate observation or veterinary microscopy and avoid medication, dose, or equipment changes unless confirmed by qualified personnel.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-fish-flashing-scraping-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, configuration, guidance]\n\n**Output Format:** [Markdown and structured JSON-like analysis text with report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include cloud analysis status, event counts, alert level, recommended observation actions, and historical report listings.]\n\n## Skill Version(s):\n\n1.0.9 (source: server release metadata; artifact frontmatter says 1.0.10)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.9:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.9:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.8: 31 files, 45763 bytes\n\nFiles: references/api_doc.md (8183b), scripts/__init__.py (68b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/skill.py (592b), scripts/smyx_fish_flashing_scraping_detection_analysis.py (3752b), skill-card.md (2864b), SKILL.md (19019b), 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 (165b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"smyx-fish-flashing-scraping-detection-analysis\"\ndescription: \"Through fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 🐟 Fish Flashing & Scraping Detection (Ectoparasite Warning) | 鱼类擦缸/蹭底行为识别（外寄）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类擦缸/蹭底行为识别（外寄）** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. When the frequency exceeds a threshold (default 5/min) AND persists for over 10 seconds, the system outputs an 'ectoparasite risk warning', prompting the user to check for parasitic infections (such as ich, trichodina, gyrodactylus) or skin irritation. Application scenarios: home aquariums, public aquariums, quarantine tanks, aquaculture ponds. The system monitors in real time and pushes alerts when frequent flashing/scraping is detected. Skill features: white-spot disease, trichodiniasis and other ectoparasitic conditions only show flashing/scraping in their EARLIEST stage. Timely intervention can avoid mass mortality. AI-based real-time monitoring helps aquarists discover and treat early, reducing losses. This skill can be integrated into smart aquarium cameras or fish disease early-warning systems.\n\n通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。应用场景：家庭鱼缸、水族馆、检疫缸、养殖池。系统实时监测，当发现频繁擦缸/蹭底时推送预警。技能特点：白点病、车轮虫病等外寄疾病在早期仅表现为擦缸、蹭底，若及时干预可避免大规模死亡。通过 AI 实时监测并提醒，可帮助养鱼者早发现、早治疗，降低损失。该技能可集成到智能鱼缸摄像头或鱼病预警系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族寄生虫预警 AI。你的任务是分析鱼缸固定摄像头的视频（覆盖缸壁 + 底砂 + 造景石全景，分辨率 ≥ 720p，帧率 ≥ 25 FPS——擦缸是瞬时高速动作 < 0.5s 必须高帧率），检测两类异常摩擦行为：① **擦缸（Flashing）**：鱼体侧身翻转 60-90 度快速蹭过缸壁，爆发速度高于游动 2-3 倍；② **蹭底（Scraping）**：鱼体腹部 / 侧面 / 鳃盖贴底砂或造景石摩擦，常在同一位置反复蹭。统计**每分钟摩擦事件数**（擦缸 + 蹭底）+ **持续时长**：当 ≥ 5 次/分钟且持续 ≥ 10 秒时触发预警门槛。按 7 类综合场景判定（friction_normal / friction_low_baseline / friction_warning_mild / friction_warning_severe / friction_whole_tank_outbreak / friction_courtship_or_substrate_species / friction_signal_unreliable），按 4 级告警策略递进（Level 1 不提示 → Level 2 立即近距离观察体表+鳃部+食欲 → Level 3 紧急体表+鳃部+鳍条全面观察+测水质+准备隔离检疫缸+联系兽医 → Level 4 **🚨 最高紧急+所有联系人+全缸隔离+测水质五项+联系专业兽医现场镜检**）。鱼种特异性必须按基线判定：**底栖鱼种**（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼）天然贴底觅食、**繁殖期慈鲷类**（七彩 / 鹦鹉 / 神仙鱼）贴底/蹭石产卵预备 → **严禁通用阈值盲判底栖鱼为外寄**。必须考虑生理性上下文（投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期），避免误报。光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS → 必须返回 `friction_signal_unreliable`。**🚨 严禁做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等具体寄生虫病确诊**（外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"）；**🚨 严禁输出具体药物名称、剂量、给药方案**（特别严禁推荐**甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝**等任何抗寄生虫药剂）；**🚨 严禁输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3%\"等具体疗法**（剂量必须由兽医现场判断）；严禁伪造夸大摩擦频次/持续时长；严禁越权代用户启停加热棒/换水/投药/灯光/喂食器（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼缸固定摄像头 / 检疫缸专用摄像头 / 养殖池水下摄像头**实时视频**（默认 1 分钟滚动窗口统计频次，触发预警需 ≥ 10 秒持续观察），识别 7 类综合场景（friction_normal / friction_low_baseline / friction_warning_mild / friction_warning_severe / friction_whole_tank_outbreak / friction_courtship_or_substrate_species / friction_signal_unreliable）→ **四组指标**：擦缸 5 项（每分钟事件数 / 单次时长 ms / 翻身角度 / 接触缸壁面 / 爆发速度）+ 蹭底 5 项（每分钟事件数 / 单次时长 / 接触部位 / 接触底材 / 同位置反复）+ 综合摩擦统计 5 项（**总频次/分钟 + 持续时长秒** + 涉及鱼数 + 涉及比例 + 多鱼同步评分）+ 排除上下文 5 项（投喂期 / 繁殖期 / 底栖鱼种 / 近期惊吓 / 水温骤变）→ 4 档告警级别（none → important → urgent → critical）→ **4 级告警策略递进**（不提示 → 近距离观察体表+鳃部+食欲 → 紧急全面观察+测水质+隔离检疫缸+联系兽医 → 🚨 最高紧急+所有联系人+全缸隔离+联系专业兽医现场镜检）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**）→ **预警报告**（按 tank_id 输出，含擦缸/蹭底频次 + 持续时长 + 涉及鱼数 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 鱼缸视野分割（缸壁 / 底砂 / 造景石 / 中段水体） |\n| 2 | 多目标鱼体跟踪 |\n| 3 | **擦缸事件检测**（侧身翻转角度 + 缸壁接触 + 爆发速度三条件联合） |\n| 4 | **蹭底事件检测**（腹部/侧面贴底砂 + 同位置反复） |\n| 5 | 每分钟事件计数（滑动窗口） |\n| 6 | 持续时长累计（跨分钟累加） |\n| 7 | 多鱼并发同步评分 |\n| 8 | 鱼种基线（底栖 vs 中上层） |\n| 9 | 生理性上下文识别（投喂 / 繁殖 / 应激 / 新鱼适应） |\n| 10 | 光照与跟踪率门控（unreliable） |\n| 11 | 用户 APP 紧急推送 |\n| 12 | 4 级告警递进 |\n| 13 | 单日告警上限（**Level 4 不设上限**） |\n| 14 | 预警报告（按 tank_id + 事件时间戳输出） |\n| 15 | 连续 ≥ 2 次 Level 3+ → 强烈建议联系**当地观赏鱼兽医现场镜检**（**AI 视觉无法替代显微镜镜检鉴定虫体**） |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供鱼缸固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行鱼类擦缸/蹭底外寄风险识别 |\n| 🔎 明确分析意图 | 当用户明确提及鱼擦缸、鱼蹭底、鱼蹭石、鱼侧身闪、鱼疑似白点、鱼疑似车轮虫、鱼疑似三代虫、外寄、寄生虫预警等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼缸擦缸历史报告、外寄预警日志清单、寄生虫风险事件清单、查询历史外寄预警记录、显示所有鱼缸外寄报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_flashing_scraping_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_fish_flashing_scraping_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_fish_flashing_scraping_detection_analysis.py`](scripts/smyx_fish_flashing_scraping_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；摄像头需**同时覆盖缸壁+底砂+造景石全景**；**帧率 ≥ 25 FPS**；1 分钟滚动窗口统计 + 10 秒持续观察 |\n| 🔎 使用提醒 | **核心采样窗口**：1 分钟滚动窗口（频次统计单位），触发预警需 ≥ 10 秒持续观察 |\n| 🔎 使用提醒 | **核心预警门槛**：总摩擦频次 **≥ 5 次/分钟 且 持续 ≥ 10 秒** 触发 Level 2+ 告警 |\n| 🔎 使用提醒 | **4 级告警策略递进**（none → important → urgent → critical），多鱼/全缸/持续超长进入更高级别 |\n| 🔎 使用提醒 | 单日告警上限：Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**（外寄爆发可几天内全军覆没） |\n| 🔎 使用提醒 | 红线约束 |\n| 🔎 使用提醒 | **🚨 禁止**做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等具体寄生虫病确诊（**外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"**） |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案（特别**严禁推荐甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝**等任何抗寄生虫药剂） |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3% 治疗\"\"下黄粉\"等具体疗法剂量（任何疗法必须由兽医现场判断） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸视频（≤ 7 天，仅入库摩擦事件片段；公共水族馆/养殖场按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 投药 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大摩擦频次、持续时长、涉及鱼数等指标；所有数据必须基于真实视频帧分析 |\n| 🔎 使用提醒 | **必须**按**鱼种基线**判定：**底栖鱼种（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼）天然贴底觅食** + **繁殖期慈鲷类（七彩 / 鹦鹉 / 神仙鱼）贴底/蹭石产卵预备** → 严禁通用阈值盲判 |\n| 📚 文档读取 | **必须**考虑生理性上下文（**投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期**），避免误报 |\n| 🔎 使用提醒 | **必须**在光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS 时返回 `friction_signal_unreliable` 并建议补光/调整摄像头，**禁止给出不可靠的预警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 次 Level 3+ → 强烈建议联系**当地观赏鱼兽医现场镜检**（**AI 视觉无法替代显微镜镜检鉴定虫体**） |\n| 📜 报告输出 | **必须**：预警报告**按 tank_id + 事件时间戳输出**，含擦缸/蹭底频次 + 持续时长 + 涉及鱼数 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史外寄预警记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地鱼缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input /path/to/tank.mp4\n\n# 分析网络鱼缸固定摄像头视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --url https://example.com/tank.mp4\n\n# 显示历史外寄预警记录清单（自动触发关键词：查看鱼缸擦缸历史报告、外寄预警日志清单等）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-flashing-scraping-detection-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1786785931271\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}` - 导出预警报告\n5. （可选）`/web/companion/v2/trigger-soothing-action` - 触发联动告警（用户 APP 推送 / 建议立即体表+鳃部检查 / 准备隔离检疫缸）\n\n## 场景代码\n\n- `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` - 鱼类擦缸/蹭底行为识别（外寄）\n\n## 输入约束\n\n- 摄像头：鱼缸固定摄像头 / 检疫缸专用摄像头 / 养殖池水下摄像头，**必须同时覆盖缸壁、底砂、造景石全景**（任何盲区可能漏判）\n- 分辨率 ≥ 720p；**帧率 ≥ 25 FPS**（擦缸是高速瞬时动作，鱼体侧身闪动 < 0.5s）\n- 光照：建议鱼缸照明常开 + 无强反光；底砂区域光线足够（暗区漏检率高）\n- **核心采样窗口**：默认 1 分钟滚动窗口（频次统计单位），触发预警需 ≥ 10 秒持续观察\n- 视野约束：必须覆盖**缸壁侧面 + 底砂全面 + 主要造景石**\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID\n- **部署时必须录入**：鱼种、缸内总鱼数 N、缸底材质（裸缸 / 细砂 / 粗砂 / 火山石 / 水草泥）、造景石位置\n- 用户必须授权部署；公共水族馆 / 养殖场需公示告知\n\n## 关键观测信号\n\n### 擦缸（Flashing - 侧身蹭缸壁）信号\n- `flashing_events_count_per_minute` - **每分钟擦缸事件数**（核心指标）\n- `flashing_event_duration_ms_avg` - 单次擦缸动作平均时长（毫秒，典型 100-500ms）\n- `flashing_body_axis_tilt_deg_avg` - 鱼体翻身角度均值（侧身擦缸通常 60-90 度）\n- `flashing_contact_surface` - 接触面（front_glass / side_glass / back_glass）\n- `flashing_burst_speed_normalized` - 爆发速度归一化（典型加速度高于游动 2-3 倍）\n\n### 蹭底（Scraping - 腹部/侧面蹭底砂）信号\n- `scraping_events_count_per_minute` - **每分钟蹭底事件数**（核心指标）\n- `scraping_event_duration_ms_avg` - 单次蹭底动作平均时长\n- `scraping_body_contact_area` - 接触部位（abdomen / lateral_left / lateral_right / gill_cover）\n- `scraping_substrate_type` - 接触底材类型（sand / gravel / decorative_rock / aquatic_plant）\n- `scraping_repeated_at_same_spot` - 是否在同一位置反复蹭（强信号）\n\n### 综合摩擦统计\n- `total_friction_events_per_minute` - **总摩擦事件数（擦缸 + 蹭底）/ 分钟**（核心阈值 ≥ 5 次/分钟）\n- `friction_persistent_duration_seconds` - **频繁摩擦持续时长**（核心阈值 ≥ 10 秒）\n- `affected_fish_count` - 涉及摩擦行为的鱼数\n- `affected_fish_ratio` - 涉及鱼数占总鱼数比例\n- `cross_fish_synchronicity_score` - 多鱼同步异常评分（多鱼同时擦缸 → 全缸寄生虫怀疑度高）\n\n### 上下文与排除信号（避免误报）\n- `is_during_feeding` - 是否在投喂窗口内（争食可能短暂撞缸）\n- `is_during_courtship_or_spawning` - 是否在繁殖期（求偶/产卵时鱼可能贴底/蹭石）\n- `is_substrate_cleaning_species` - 是否食底栖型鱼种（鼠鱼/异型鱼/底栖鱼天然贴底觅食）\n- `tank_recently_disturbed` - 鱼缸是否近期受外部惊吓（换水/搬家短暂应激）\n- `water_temperature_change_detected` - 水温是否近期突变（应激）\n\n## 综合判定\n\n- `friction_normal` - 摩擦行为正常（≤ 2 次/分钟，零星活动）\n- `friction_low_baseline` - 低频摩擦（3-4 次/分钟，可能为底栖鱼正常或轻度不适）\n- `friction_warning_mild` - **摩擦预警轻度**（5-7 次/分钟，持续 ≥ 10s，触发预警门槛）\n- `friction_warning_severe` - **摩擦预警严重**（≥ 8 次/分钟，持续 ≥ 30s，**强烈外寄怀疑**）\n- `friction_whole_tank_outbreak` - **全缸爆发**（≥ 50% 鱼同时频繁摩擦，**全缸寄生虫爆发风险**）\n- `friction_courtship_or_substrate_species` - 繁殖期/底栖鱼正常行为（不告警）\n- `friction_signal_unreliable` - 信号不可靠（光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS）\n\n## 4 级告警策略递进\n\n- Level 1（normal / low_baseline / courtship_or_substrate_species）：仅入库或不提示\n- Level 2（warning_mild）：重要提示，建议**立即近距离观察鱼体表（白点 / 充血 / 黏液增多）+ 鳃部颜色 + 食欲变化**\n- Level 3（warning_severe，单次）：紧急告警，建议**立即体表 + 鳃部 + 鳍条全面观察 + 测水质 NH3/NO2-/pH/温度 + 准备隔离检疫缸 + 联系当地观赏鱼兽医**（**禁止推荐具体寄生虫药品**）\n- Level 4（whole_tank_outbreak / warning_severe 持续 ≥ 24 小时）：**🚨 最高紧急告警 + 推送所有管理人员** + 强烈建议**立即隔离全缸 + 测水质五项 + 联系专业兽医现场检疫（外寄虫体鉴定需镜检，AI 视觉无法替代）**\n\n## 单日告警上限\n\n- Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**（外寄爆发可几天内全军覆没）\n\n## 红线约束\n\n- **🚨 禁止**做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等**具体寄生虫病确诊**（外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"）\n- **🚨 绝对禁止**输出具体药物名称、剂量、给药方案（**严禁推荐甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝等任何抗寄生虫药剂**）\n- **🚨 绝对禁止**输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3% 治疗\"等具体疗法（任何疗法剂量必须由兽医现场判断）\n- **禁止**长期存储完整鱼缸视频（≤ 7 天，仅入库摩擦事件片段；公共水族馆/养殖场按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 投药 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议）\n- 摩擦频次 / 持续时长 / 涉及鱼数等指标必须基于真实视频帧分析；**禁止伪造或夸大指标**\n- 鱼种特异性：**底栖鱼种**（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼） 天然贴底觅食、**繁殖期**（七彩 / 鹦鹉 / 慈鲷类）贴底/蹭石产卵预备 → 必须按鱼种和生理周期基线判定；**严禁通用阈值盲判底栖鱼为外寄**\n- 必须考虑生理性上下文：**投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期** → 不可直接告警\n- 光照不足 / 跟踪率 < 80% / 视野盲区（缸壁背面 / 底砂死角）/ 帧率 < 25 FPS → 必须返回 `friction_signal_unreliable` 并建议补光/调整摄像头\n- 必须告知用户：AI 视觉识别仅供参考，**外寄虫体最终确诊与处理需用户立即观察体表并由专业兽医镜检**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸/养殖池 ID\n- `species` - 鱼种\n- `total_fish_count_baseline` - 注册总鱼数\n- `substrate_type` - 缸底材质\n- `flashing_events_count_per_minute` - 擦缸频次\n- `scraping_events_count_per_minute` - 蹭底频次\n- `total_friction_events_per_minute` - 总摩擦频次\n- `friction_persistent_duration_seconds` - 频繁摩擦持续时长\n- `affected_fish_count` - 涉及鱼数\n- `cross_fish_synchronicity_score` - 多鱼同步评分\n- `composite_scene` - 综合判定\n- `alert_level` - 告警等级\n- `recommended_actions` - 建议动作（体表观察 / 鳃部观察 / 测水质 / 准备隔离检疫缸 / 联系兽医镜检，**绝不含具体药物、剂量、品牌、温度疗法、加盐剂量**）\n- `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: dev\n\nFile v1.0.8:skill-card.md\n\n## Description:\n\nAnalyzes fixed aquarium camera media to detect flashing and scraping behavior, count abnormal friction events, and produce ectoparasite risk warnings without diagnosing a specific disease.\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\nAquarium owners, aquaculture operators, public aquarium staff, and developers can use this skill to submit fish tank video or image inputs for structured flashing/scraping risk reports and history lookup. The skill is intended to warn about behavior patterns that may require closer observation or veterinary microscopy, not to provide medical diagnosis or treatment.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Aquarium media and report metadata are sent to a third-party vendor service for analysis and history retrieval.\n\nMitigation: Use only with media the user is comfortable uploading, disclose the vendor service path, and require explicit consent before analysis or history lookup.\n\nRisk: The skill can create or reuse local account identity state and store service tokens in a workspace SQLite database.\n\nMitigation: Run in an isolated workspace, review local data storage before deployment, and clear stored identity or token state when the skill is no longer needed.\n\nRisk: The behavior analysis may be mistaken for a veterinary diagnosis or treatment recommendation.\n\nMitigation: Keep outputs framed as risk warnings, avoid specific disease diagnosis or drug/dose instructions, and direct users to qualified veterinary microscopy for confirmation.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-fish-flashing-scraping-detection-analysis)\n- [Publisher profile](https://clawhub.ai/user/18072937735)\n- [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, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown or JSON-formatted structured analysis reports with optional shell commands for running the skill scripts.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Reports may include friction event counts, alert level, recommended observation actions, disclaimers, and report links.]\n\n## Skill Version(s):\n\n1.0.8 (source: server release metadata; artifact SKILL.md frontmatter reports 1.0.9)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.8:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.8:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.7: 31 files, 45779 bytes\n\nFiles: references/api_doc.md (8183b), scripts/__init__.py (68b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/skill.py (592b), scripts/smyx_fish_flashing_scraping_detection_analysis.py (3752b), skill-card.md (2779b), SKILL.md (19019b), 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 (165b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"smyx-fish-flashing-scraping-detection-analysis\"\ndescription: \"Through fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。\"\nversion: \"1.0.7\"\nlicense: \"MIT-0\"\n---\n\n# 🐟 Fish Flashing & Scraping Detection (Ectoparasite Warning) | 鱼类擦缸/蹭底行为识别（外寄）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类擦缸/蹭底行为识别（外寄）** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. When the frequency exceeds a threshold (default 5/min) AND persists for over 10 seconds, the system outputs an 'ectoparasite risk warning', prompting the user to check for parasitic infections (such as ich, trichodina, gyrodactylus) or skin irritation. Application scenarios: home aquariums, public aquariums, quarantine tanks, aquaculture ponds. The system monitors in real time and pushes alerts when frequent flashing/scraping is detected. Skill features: white-spot disease, trichodiniasis and other ectoparasitic conditions only show flashing/scraping in their EARLIEST stage. Timely intervention can avoid mass mortality. AI-based real-time monitoring helps aquarists discover and treat early, reducing losses. This skill can be integrated into smart aquarium cameras or fish disease early-warning systems.\n\n通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。应用场景：家庭鱼缸、水族馆、检疫缸、养殖池。系统实时监测，当发现频繁擦缸/蹭底时推送预警。技能特点：白点病、车轮虫病等外寄疾病在早期仅表现为擦缸、蹭底，若及时干预可避免大规模死亡。通过 AI 实时监测并提醒，可帮助养鱼者早发现、早治疗，降低损失。该技能可集成到智能鱼缸摄像头或鱼病预警系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族寄生虫预警 AI。你的任务是分析鱼缸固定摄像头的视频（覆盖缸壁 + 底砂 + 造景石全景，分辨率 ≥ 720p，帧率 ≥ 25 FPS——擦缸是瞬时高速动作 < 0.5s 必须高帧率），检测两类异常摩擦行为：① **擦缸（Flashing）**：鱼体侧身翻转 60-90 度快速蹭过缸壁，爆发速度高于游动 2-3 倍；② **蹭底（Scraping）**：鱼体腹部 / 侧面 / 鳃盖贴底砂或造景石摩擦，常在同一位置反复蹭。统计**每分钟摩擦事件数**（擦缸 + 蹭底）+ **持续时长**：当 ≥ 5 次/分钟且持续 ≥ 10 秒时触发预警门槛。按 7 类综合场景判定（friction_normal / friction_low_baseline / friction_warning_mild / friction_warning_severe / friction_whole_tank_outbreak / friction_courtship_or_substrate_species / friction_signal_unreliable），按 4 级告警策略递进（Level 1 不提示 → Level 2 立即近距离观察体表+鳃部+食欲 → Level 3 紧急体表+鳃部+鳍条全面观察+测水质+准备隔离检疫缸+联系兽医 → Level 4 **🚨 最高紧急+所有联系人+全缸隔离+测水质五项+联系专业兽医现场镜检**）。鱼种特异性必须按基线判定：**底栖鱼种**（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼）天然贴底觅食、**繁殖期慈鲷类**（七彩 / 鹦鹉 / 神仙鱼）贴底/蹭石产卵预备 → **严禁通用阈值盲判底栖鱼为外寄**。必须考虑生理性上下文（投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期），避免误报。光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS → 必须返回 `friction_signal_unreliable`。**🚨 严禁做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等具体寄生虫病确诊**（外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"）；**🚨 严禁输出具体药物名称、剂量、给药方案**（特别严禁推荐**甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝**等任何抗寄生虫药剂）；**🚨 严禁输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3%\"等具体疗法**（剂量必须由兽医现场判断）；严禁伪造夸大摩擦频次/持续时长；严禁越权代用户启停加热棒/换水/投药/灯光/喂食器（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼缸固定摄像头 / 检疫缸专用摄像头 / 养殖池水下摄像头**实时视频**（默认 1 分钟滚动窗口统计频次，触发预警需 ≥ 10 秒持续观察），识别 7 类综合场景（friction_normal / friction_low_baseline / friction_warning_mild / friction_warning_severe / friction_whole_tank_outbreak / friction_courtship_or_substrate_species / friction_signal_unreliable）→ **四组指标**：擦缸 5 项（每分钟事件数 / 单次时长 ms / 翻身角度 / 接触缸壁面 / 爆发速度）+ 蹭底 5 项（每分钟事件数 / 单次时长 / 接触部位 / 接触底材 / 同位置反复）+ 综合摩擦统计 5 项（**总频次/分钟 + 持续时长秒** + 涉及鱼数 + 涉及比例 + 多鱼同步评分）+ 排除上下文 5 项（投喂期 / 繁殖期 / 底栖鱼种 / 近期惊吓 / 水温骤变）→ 4 档告警级别（none → important → urgent → critical）→ **4 级告警策略递进**（不提示 → 近距离观察体表+鳃部+食欲 → 紧急全面观察+测水质+隔离检疫缸+联系兽医 → 🚨 最高紧急+所有联系人+全缸隔离+联系专业兽医现场镜检）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**）→ **预警报告**（按 tank_id 输出，含擦缸/蹭底频次 + 持续时长 + 涉及鱼数 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 鱼缸视野分割（缸壁 / 底砂 / 造景石 / 中段水体） |\n| 2 | 多目标鱼体跟踪 |\n| 3 | **擦缸事件检测**（侧身翻转角度 + 缸壁接触 + 爆发速度三条件联合） |\n| 4 | **蹭底事件检测**（腹部/侧面贴底砂 + 同位置反复） |\n| 5 | 每分钟事件计数（滑动窗口） |\n| 6 | 持续时长累计（跨分钟累加） |\n| 7 | 多鱼并发同步评分 |\n| 8 | 鱼种基线（底栖 vs 中上层） |\n| 9 | 生理性上下文识别（投喂 / 繁殖 / 应激 / 新鱼适应） |\n| 10 | 光照与跟踪率门控（unreliable） |\n| 11 | 用户 APP 紧急推送 |\n| 12 | 4 级告警递进 |\n| 13 | 单日告警上限（**Level 4 不设上限**） |\n| 14 | 预警报告（按 tank_id + 事件时间戳输出） |\n| 15 | 连续 ≥ 2 次 Level 3+ → 强烈建议联系**当地观赏鱼兽医现场镜检**（**AI 视觉无法替代显微镜镜检鉴定虫体**） |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供鱼缸固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行鱼类擦缸/蹭底外寄风险识别 |\n| 🔎 明确分析意图 | 当用户明确提及鱼擦缸、鱼蹭底、鱼蹭石、鱼侧身闪、鱼疑似白点、鱼疑似车轮虫、鱼疑似三代虫、外寄、寄生虫预警等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼缸擦缸历史报告、外寄预警日志清单、寄生虫风险事件清单、查询历史外寄预警记录、显示所有鱼缸外寄报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_flashing_scraping_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_fish_flashing_scraping_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_fish_flashing_scraping_detection_analysis.py`](scripts/smyx_fish_flashing_scraping_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；摄像头需**同时覆盖缸壁+底砂+造景石全景**；**帧率 ≥ 25 FPS**；1 分钟滚动窗口统计 + 10 秒持续观察 |\n| 🔎 使用提醒 | **核心采样窗口**：1 分钟滚动窗口（频次统计单位），触发预警需 ≥ 10 秒持续观察 |\n| 🔎 使用提醒 | **核心预警门槛**：总摩擦频次 **≥ 5 次/分钟 且 持续 ≥ 10 秒** 触发 Level 2+ 告警 |\n| 🔎 使用提醒 | **4 级告警策略递进**（none → important → urgent → critical），多鱼/全缸/持续超长进入更高级别 |\n| 🔎 使用提醒 | 单日告警上限：Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**（外寄爆发可几天内全军覆没） |\n| 🔎 使用提醒 | 红线约束 |\n| 🔎 使用提醒 | **🚨 禁止**做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等具体寄生虫病确诊（**外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"**） |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案（特别**严禁推荐甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝**等任何抗寄生虫药剂） |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3% 治疗\"\"下黄粉\"等具体疗法剂量（任何疗法必须由兽医现场判断） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸视频（≤ 7 天，仅入库摩擦事件片段；公共水族馆/养殖场按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 投药 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大摩擦频次、持续时长、涉及鱼数等指标；所有数据必须基于真实视频帧分析 |\n| 🔎 使用提醒 | **必须**按**鱼种基线**判定：**底栖鱼种（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼）天然贴底觅食** + **繁殖期慈鲷类（七彩 / 鹦鹉 / 神仙鱼）贴底/蹭石产卵预备** → 严禁通用阈值盲判 |\n| 📚 文档读取 | **必须**考虑生理性上下文（**投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期**），避免误报 |\n| 🔎 使用提醒 | **必须**在光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS 时返回 `friction_signal_unreliable` 并建议补光/调整摄像头，**禁止给出不可靠的预警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 次 Level 3+ → 强烈建议联系**当地观赏鱼兽医现场镜检**（**AI 视觉无法替代显微镜镜检鉴定虫体**） |\n| 📜 报告输出 | **必须**：预警报告**按 tank_id + 事件时间戳输出**，含擦缸/蹭底频次 + 持续时长 + 涉及鱼数 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史外寄预警记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地鱼缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input /path/to/tank.mp4\n\n# 分析网络鱼缸固定摄像头视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --url https://example.com/tank.mp4\n\n# 显示历史外寄预警记录清单（自动触发关键词：查看鱼缸擦缸历史报告、外寄预警日志清单等）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-flashing-scraping-detection-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1786010852785\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}` - 导出预警报告\n5. （可选）`/web/companion/v2/trigger-soothing-action` - 触发联动告警（用户 APP 推送 / 建议立即体表+鳃部检查 / 准备隔离检疫缸）\n\n## 场景代码\n\n- `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` - 鱼类擦缸/蹭底行为识别（外寄）\n\n## 输入约束\n\n- 摄像头：鱼缸固定摄像头 / 检疫缸专用摄像头 / 养殖池水下摄像头，**必须同时覆盖缸壁、底砂、造景石全景**（任何盲区可能漏判）\n- 分辨率 ≥ 720p；**帧率 ≥ 25 FPS**（擦缸是高速瞬时动作，鱼体侧身闪动 < 0.5s）\n- 光照：建议鱼缸照明常开 + 无强反光；底砂区域光线足够（暗区漏检率高）\n- **核心采样窗口**：默认 1 分钟滚动窗口（频次统计单位），触发预警需 ≥ 10 秒持续观察\n- 视野约束：必须覆盖**缸壁侧面 + 底砂全面 + 主要造景石**\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID\n- **部署时必须录入**：鱼种、缸内总鱼数 N、缸底材质（裸缸 / 细砂 / 粗砂 / 火山石 / 水草泥）、造景石位置\n- 用户必须授权部署；公共水族馆 / 养殖场需公示告知\n\n## 关键观测信号\n\n### 擦缸（Flashing - 侧身蹭缸壁）信号\n- `flashing_events_count_per_minute` - **每分钟擦缸事件数**（核心指标）\n- `flashing_event_duration_ms_avg` - 单次擦缸动作平均时长（毫秒，典型 100-500ms）\n- `flashing_body_axis_tilt_deg_avg` - 鱼体翻身角度均值（侧身擦缸通常 60-90 度）\n- `flashing_contact_surface` - 接触面（front_glass / side_glass / back_glass）\n- `flashing_burst_speed_normalized` - 爆发速度归一化（典型加速度高于游动 2-3 倍）\n\n### 蹭底（Scraping - 腹部/侧面蹭底砂）信号\n- `scraping_events_count_per_minute` - **每分钟蹭底事件数**（核心指标）\n- `scraping_event_duration_ms_avg` - 单次蹭底动作平均时长\n- `scraping_body_contact_area` - 接触部位（abdomen / lateral_left / lateral_right / gill_cover）\n- `scraping_substrate_type` - 接触底材类型（sand / gravel / decorative_rock / aquatic_plant）\n- `scraping_repeated_at_same_spot` - 是否在同一位置反复蹭（强信号）\n\n### 综合摩擦统计\n- `total_friction_events_per_minute` - **总摩擦事件数（擦缸 + 蹭底）/ 分钟**（核心阈值 ≥ 5 次/分钟）\n- `friction_persistent_duration_seconds` - **频繁摩擦持续时长**（核心阈值 ≥ 10 秒）\n- `affected_fish_count` - 涉及摩擦行为的鱼数\n- `affected_fish_ratio` - 涉及鱼数占总鱼数比例\n- `cross_fish_synchronicity_score` - 多鱼同步异常评分（多鱼同时擦缸 → 全缸寄生虫怀疑度高）\n\n### 上下文与排除信号（避免误报）\n- `is_during_feeding` - 是否在投喂窗口内（争食可能短暂撞缸）\n- `is_during_courtship_or_spawning` - 是否在繁殖期（求偶/产卵时鱼可能贴底/蹭石）\n- `is_substrate_cleaning_species` - 是否食底栖型鱼种（鼠鱼/异型鱼/底栖鱼天然贴底觅食）\n- `tank_recently_disturbed` - 鱼缸是否近期受外部惊吓（换水/搬家短暂应激）\n- `water_temperature_change_detected` - 水温是否近期突变（应激）\n\n## 综合判定\n\n- `friction_normal` - 摩擦行为正常（≤ 2 次/分钟，零星活动）\n- `friction_low_baseline` - 低频摩擦（3-4 次/分钟，可能为底栖鱼正常或轻度不适）\n- `friction_warning_mild` - **摩擦预警轻度**（5-7 次/分钟，持续 ≥ 10s，触发预警门槛）\n- `friction_warning_severe` - **摩擦预警严重**（≥ 8 次/分钟，持续 ≥ 30s，**强烈外寄怀疑**）\n- `friction_whole_tank_outbreak` - **全缸爆发**（≥ 50% 鱼同时频繁摩擦，**全缸寄生虫爆发风险**）\n- `friction_courtship_or_substrate_species` - 繁殖期/底栖鱼正常行为（不告警）\n- `friction_signal_unreliable` - 信号不可靠（光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS）\n\n## 4 级告警策略递进\n\n- Level 1（normal / low_baseline / courtship_or_substrate_species）：仅入库或不提示\n- Level 2（warning_mild）：重要提示，建议**立即近距离观察鱼体表（白点 / 充血 / 黏液增多）+ 鳃部颜色 + 食欲变化**\n- Level 3（warning_severe，单次）：紧急告警，建议**立即体表 + 鳃部 + 鳍条全面观察 + 测水质 NH3/NO2-/pH/温度 + 准备隔离检疫缸 + 联系当地观赏鱼兽医**（**禁止推荐具体寄生虫药品**）\n- Level 4（whole_tank_outbreak / warning_severe 持续 ≥ 24 小时）：**🚨 最高紧急告警 + 推送所有管理人员** + 强烈建议**立即隔离全缸 + 测水质五项 + 联系专业兽医现场检疫（外寄虫体鉴定需镜检，AI 视觉无法替代）**\n\n## 单日告警上限\n\n- Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**（外寄爆发可几天内全军覆没）\n\n## 红线约束\n\n- **🚨 禁止**做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等**具体寄生虫病确诊**（外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"）\n- **🚨 绝对禁止**输出具体药物名称、剂量、给药方案（**严禁推荐甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝等任何抗寄生虫药剂**）\n- **🚨 绝对禁止**输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3% 治疗\"等具体疗法（任何疗法剂量必须由兽医现场判断）\n- **禁止**长期存储完整鱼缸视频（≤ 7 天，仅入库摩擦事件片段；公共水族馆/养殖场按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 投药 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议）\n- 摩擦频次 / 持续时长 / 涉及鱼数等指标必须基于真实视频帧分析；**禁止伪造或夸大指标**\n- 鱼种特异性：**底栖鱼种**（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼） 天然贴底觅食、**繁殖期**（七彩 / 鹦鹉 / 慈鲷类）贴底/蹭石产卵预备 → 必须按鱼种和生理周期基线判定；**严禁通用阈值盲判底栖鱼为外寄**\n- 必须考虑生理性上下文：**投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期** → 不可直接告警\n- 光照不足 / 跟踪率 < 80% / 视野盲区（缸壁背面 / 底砂死角）/ 帧率 < 25 FPS → 必须返回 `friction_signal_unreliable` 并建议补光/调整摄像头\n- 必须告知用户：AI 视觉识别仅供参考，**外寄虫体最终确诊与处理需用户立即观察体表并由专业兽医镜检**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸/养殖池 ID\n- `species` - 鱼种\n- `total_fish_count_baseline` - 注册总鱼数\n- `substrate_type` - 缸底材质\n- `flashing_events_count_per_minute` - 擦缸频次\n- `scraping_events_count_per_minute` - 蹭底频次\n- `total_friction_events_per_minute` - 总摩擦频次\n- `friction_persistent_duration_seconds` - 频繁摩擦持续时长\n- `affected_fish_count` - 涉及鱼数\n- `cross_fish_synchronicity_score` - 多鱼同步评分\n- `composite_scene` - 综合判定\n- `alert_level` - 告警等级\n- `recommended_actions` - 建议动作（体表观察 / 鳃部观察 / 测水质 / 准备隔离检疫缸 / 联系兽医镜检，**绝不含具体药物、剂量、品牌、温度疗法、加盐剂量**）\n- `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 aquarium camera images or videos to detect fish flashing or scraping behavior, count abnormal friction frequency, and produce ectoparasite risk warnings when configured thresholds persist.\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 aquarists, aquarium operators, aquaculture teams, and developers use this skill to analyze aquarium or pond media for flashing and scraping behavior, review structured warning reports, and query prior cloud-hosted reports. It supports early risk screening and escalation guidance, not veterinary diagnosis or treatment.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Aquarium media and history queries are processed through lifeemergence/open.lifeemergence cloud APIs.\n\nMitigation: Get explicit user confirmation before uploading media or querying history, and avoid submitting sensitive footage unless the user accepts the cloud-processing exposure.\n\nRisk: The skill may silently create or reuse a local service identity and store returned service tokens in a workspace SQLite database.\n\nMitigation: Review identity and token storage behavior before installation, restrict workspace access, and verify how to delete local identity, token, and remote report data.\n\nRisk: Behavior-based ectoparasite warnings could be mistaken for a diagnosis or treatment plan.\n\nMitigation: Present results as screening guidance only, avoid medication or dosing instructions, and direct users to inspect fish and consult a qualified aquatic veterinarian for microscopy-based diagnosis.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-fish-flashing-scraping-detection-analysis)\n- [API interface documentation](references/api_doc.md)\n- [SMYX analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n- [Skill usage demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Shell commands, Guidance]\n\n**Output Format:** [Markdown or JSON analysis reports with warning status, observed friction metrics, recommended actions, history tables, and report links.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May write the analysis output to a user-selected file path when requested.]\n\n## Skill Version(s):\n\n1.0.7 (source: server release metadata and SKILL.md frontmatter)\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, 45814 bytes\n\nFiles: references/api_doc.md (8183b), scripts/__init__.py (68b), scripts/config.py (704b), scripts/config.yaml (3b), scripts/skill.py (592b), scripts/smyx_fish_flashing_scraping_detection_analysis.py (3752b), skill-card.md (2983b), SKILL.md (19019b), 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 (165b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"smyx-fish-flashing-scraping-detection-analysis\"\ndescription: \"Through fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。\"\nversion: \"1.0.6\"\nlicense: \"MIT-0\"\n---\n\n# 🐟 Fish Flashing & Scraping Detection (Ectoparasite Warning) | 鱼类擦缸/蹭底行为识别（外寄）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类擦缸/蹭底行为识别（外寄）** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. When the frequency exceeds a threshold (default 5/min) AND persists for over 10 seconds, the system outputs an 'ectoparasite risk warning', prompting the user to check for parasitic infections (such as ich, trichodina, gyrodactylus) or skin irritation. Application scenarios: home aquariums, public aquariums, quarantine tanks, aquaculture ponds. The system monitors in real time and pushes alerts when frequent flashing/scraping is detected. Skill features: white-spot disease, trichodiniasis and other ectoparasitic conditions only show flashing/scraping in their EARLIEST stage. Timely intervention can avoid mass mortality. AI-based real-time monitoring helps aquarists discover and treat early, reducing losses. This skill can be integrated into smart aquarium cameras or fish disease early-warning systems.\n\n通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。应用场景：家庭鱼缸、水族馆、检疫缸、养殖池。系统实时监测，当发现频繁擦缸/蹭底时推送预警。技能特点：白点病、车轮虫病等外寄疾病在早期仅表现为擦缸、蹭底，若及时干预可避免大规模死亡。通过 AI 实时监测并提醒，可帮助养鱼者早发现、早治疗，降低损失。该技能可集成到智能鱼缸摄像头或鱼病预警系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族寄生虫预警 AI。你的任务是分析鱼缸固定摄像头的视频（覆盖缸壁 + 底砂 + 造景石全景，分辨率 ≥ 720p，帧率 ≥ 25 FPS——擦缸是瞬时高速动作 < 0.5s 必须高帧率），检测两类异常摩擦行为：① **擦缸（Flashing）**：鱼体侧身翻转 60-90 度快速蹭过缸壁，爆发速度高于游动 2-3 倍；② **蹭底（Scraping）**：鱼体腹部 / 侧面 / 鳃盖贴底砂或造景石摩擦，常在同一位置反复蹭。统计**每分钟摩擦事件数**（擦缸 + 蹭底）+ **持续时长**：当 ≥ 5 次/分钟且持续 ≥ 10 秒时触发预警门槛。按 7 类综合场景判定（friction_normal / friction_low_baseline / friction_warning_mild / friction_warning_severe / friction_whole_tank_outbreak / friction_courtship_or_substrate_species / friction_signal_unreliable），按 4 级告警策略递进（Level 1 不提示 → Level 2 立即近距离观察体表+鳃部+食欲 → Level 3 紧急体表+鳃部+鳍条全面观察+测水质+准备隔离检疫缸+联系兽医 → Level 4 **🚨 最高紧急+所有联系人+全缸隔离+测水质五项+联系专业兽医现场镜检**）。鱼种特异性必须按基线判定：**底栖鱼种**（鼠鱼 / 异型鱼 / 清道夫 / 部分鳉鱼）天然贴底觅食、**繁殖期慈鲷类**（七彩 / 鹦鹉 / 神仙鱼）贴底/蹭石产卵预备 → **严禁通用阈值盲判底栖鱼为外寄**。必须考虑生理性上下文（投喂窗口争食撞缸 / 换水后短暂应激 / 水温骤变 / 新鱼入缸适应期），避免误报。光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS → 必须返回 `friction_signal_unreliable`。**🚨 严禁做\"小瓜虫病 / 白点病 / 车轮虫病 / 三代虫病 / 指环虫病 / 锚头蚤病\"等具体寄生虫病确诊**（外寄虫体鉴定必须显微镜镜检，AI 视觉仅可输出\"行为预兆/外寄风险\"）；**🚨 严禁输出具体药物名称、剂量、给药方案**（特别严禁推荐**甲硝唑、敌百虫、硫酸铜、孔雀石绿、戊二醛、福尔马林、亚甲基蓝**等任何抗寄生虫药剂）；**🚨 严禁输出\"升温至 30℃ 治疗白点病\"\"加盐 0.3%\"等具体疗法**（剂量必须由兽医现场判断）；严禁伪造夸大摩擦频次/持续时长；严禁越权代用户启停加热棒/换水/投药/灯光/喂食器（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼缸固定摄像头 / 检疫缸专用摄像头 / 养殖池水下摄像头**实时视频**（默认 1 分钟滚动窗口统计频次，触发预警需 ≥ 10 秒持续观察），识别 7 类综合场景（friction_normal / friction_low_baseline / friction_warning_mild / friction_warning_severe / friction_whole_tank_outbreak / friction_courtship_or_substrate_species / friction_signal_unreliable）→ **四组指标**：擦缸 5 项（每分钟事件数 / 单次时长 ms / 翻身角度 / 接触缸壁面 / 爆发速度）+ 蹭底 5 项（每分钟事件数 / 单次时长 / 接触部位 / 接触底材 / 同位置反复）+ 综合摩擦统计 5 项（**总频次/分钟 + 持续时长秒** + 涉及鱼数 + 涉及比例 + 多鱼同步评分）+ 排除上下文 5 项（投喂期 / 繁殖期 / 底栖鱼种 / 近期惊吓 / 水温骤变）→ 4 档告警级别（none → important → urgent → critical）→ **4 级告警策略递进**（不提示 → 近距离观察体表+鳃部+食欲 → 紧急全面观察+测水质+隔离检疫缸+联系兽医 → 🚨 最高紧急+所有联系人+全缸隔离+联系专业兽医现场镜检）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 6 / Level 4 **不设上限**）→ **预警报告**（按 tank_id 输出，含擦缸/蹭底频次 + 持续时长 + 涉及鱼数 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 鱼缸视野分割（缸壁 / 底砂 / 造景石 / 中段水体） |\n| 2 | 多目标鱼体跟踪 |\n| 3 | **擦缸事件检测**（侧身翻转角度 + 缸壁接触 + 爆发速度三条件联合） |\n| 4 | **蹭底事件检测**（腹部/侧面贴底砂 + 同位置反复） |\n| 5 | 每分钟事件计数（滑动窗口） |\n| 6 | 持续时长累计（跨分钟累加） |\n| 7 | 多鱼并发同步评分 |\n| 8 | 鱼种基线（底栖 vs 中上层） |\n| 9 | 生理性上下文识别（投喂 / 繁殖 / 应激 / 新鱼适应） |\n| 10 | 光照与跟踪率门控（unreliable） |\n| 11 | 用户 APP 紧急推送 |\n| 12 | 4 级告警递进 |\n| 13 | 单日告警上限（**Level 4 不设上限**） |\n| 14 | 预警报告（按 tank_id + 事件时间戳输出） |\n| 15 | 连续 ≥ 2 次 Level 3+ → 强烈建议联系**当地观赏鱼兽医现场镜检**（**AI 视觉无法替代显微镜镜检鉴定虫体**） |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供鱼缸固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行鱼类擦缸/蹭底外寄风险识别 |\n| 🔎 明确分析意图 | 当用户明确提及鱼擦缸、鱼蹭底、鱼蹭石、鱼侧身闪、鱼疑似白点、鱼疑似车轮虫、鱼疑似三代虫、外寄、寄生虫预警等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼缸擦缸历史报告、外寄预警日志清单、寄生虫风险事件清单、查询历史外寄预警记录、显示所有鱼缸外寄报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_flashing_scraping_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\nArchive v1.0.5: 31 fi...","readmeExcerpt":"Skill: Fish Flashing & Scraping Detection (Ectoparasite Warning) | 鱼类擦缸/蹭底行为识别（外寄） Owner: 18072937735 Summary: Through fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system ","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.smyx_fish_flashing_scraping_detection_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地鱼缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input /path/to/tank.mp4\n\n# 分析网络鱼缸固定摄像头视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --url https://example.com/tank.mp4\n\n# 显示历史外寄预警记录清单（自动触发关键词：查看鱼缸擦缸历史报告、外寄预警日志清单等）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --output result.json"},{"language":"bash","snippet":"python -m scripts.smyx_fish_flashing_scraping_detection_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地鱼缸固定摄像头视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input /path/to/tank.mp4\n\n# 分析网络鱼缸固定摄像头视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --url https://example.com/tank.mp4\n\n# 显示历史外寄预警记录清单（自动触发关键词：查看鱼缸擦缸历史报告、外寄预警日志清单等）\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_flashing_scraping_detection_analysis --input tank.mp4 --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"smyx-fish-flashing-scraping-detection-analysis\"\ndescription: \"Through fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。\"\nversion: \"1.0.15\"\nlicense: \"MIT-0\"\n---\n\n# 🐟 Fish Flashing & Scraping Detection (Ectoparasite Warning) | 鱼类擦缸/蹭底行为识别（外寄）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类擦缸/蹭底行为识别（外寄）** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. When the frequency exceeds a threshold (default 5/min) AND persists for over 10 seconds, the system outputs an 'ectoparasite risk warning', prompting the user to check for parasitic infections (such as ich, trichodina, gyrodactylus) or skin irritation. Application scenarios: home aquariums, public aquariums, quarantine tanks, aquaculture ponds. The system monitors in real time and pushes alerts when frequent flashing/scraping is detected. Skill features: white-spot disease, trichodiniasis and other ectoparasitic conditions only show flashing/scraping in their EARLIEST stage. Timely intervention can avoid mass mortality. AI-based real-time monitoring helps aquarists discover and treat early, reducing losses. This skill can be integrated into smart aquarium cameras or fish disease early-warning systems.\n\n通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。应用场景：家庭鱼缸、水族馆、检疫缸、养殖池。系统实时监测，当发现频繁擦缸/蹭底时推送预警。技能特点：白点病、车轮虫病等外寄疾病在早期仅表现为擦缸、蹭底，若及时干预可避免大规模死亡。通过 AI 实时监测并提醒，可帮助养鱼者早发现、早治疗，降低损失。该技能可集成到智能鱼缸摄像头或鱼病预警系统中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族寄生虫预警 AI。你的任务是分析鱼缸固定摄像头的视频（覆盖缸壁 + 底砂 + 造景石全景，分辨率 ≥ 720p，帧率 ≥ 25 FPS——擦缸是瞬时高速动作 < 0.5s 必须高帧率），检测两类异常摩擦行为：① **擦缸（Flashing）**：鱼体侧身翻转 60-90 度快速蹭过缸壁，爆发速度高于游动 2-3 倍；② **蹭底（Scraping）**：鱼体腹部 / 侧面 / 鳃盖贴底砂或造景石摩擦，常在同一位置反复蹭。统计**每分钟摩擦事件数**（擦缸 + 蹭底）+ **持续时长**：当 ≥ 5 次/分钟且持续 ≥ 10 秒时触发预警门槛。按 7 类综合场景判定"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-flashing-scraping-detection-analysis\",\n  \"version\": \"1.0.13\",\n  \"publishedAt\": 1790578056052\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}` - 导出预警报告\n5. （可选）`/web/companion/v2/trigger-soothing-action` - 触发联动告警（用户 APP 推送 / 建议立即体表+鳃部检查 / 准备隔离检疫缸）\n\n## 场景代码\n\n- `SMYX_FISH_FLASHING_SCRAPING_DETECTION_ANALYSIS` - 鱼类擦缸/蹭底行为识别（外寄）\n\n## 输入约束\n\n- 摄像头：鱼缸固定摄像头 / 检疫缸专用摄像头 / 养殖池水下摄像头，**必须同时覆盖缸壁、底砂、造景石全景**（任何盲区可能漏判）\n- 分辨率 ≥ 720p；**帧率 ≥ 25 FPS**（擦缸是高速瞬时动作，鱼体侧身闪动 < 0.5s）\n- 光照：建议鱼缸照明常开 + 无强反光；底砂区域光线足够（暗区漏检率高）\n- **核心采样窗口**：默认 1 分钟滚动窗口（频次统计单位），触发预警需 ≥ 10 秒持续观察\n- 视野约束：必须覆盖**缸壁侧面 + 底砂全面 + 主要造景石**\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID\n- **部署时必须录入**：鱼种、缸内总鱼数 N、缸底材质（裸缸 / 细砂 / 粗砂 / 火山石 / 水草泥）、造景石位置\n- 用户必须授权部署；公共水族馆 / 养殖场需公示告知\n\n## 关键观测信号\n\n### 擦缸（Flashing - 侧身蹭缸壁）信号\n- `flashing_events_count_per_minute` - **每分钟擦缸事件数**（核心指标）\n- `flashing_event_duration_ms_avg` - 单次擦缸动作平均时长（毫秒，典型 100-500ms）\n- `flashing_body_axis_tilt_deg_avg` - 鱼体翻身角度均值（侧身擦缸通常 60-90 度）\n- `flashing_contact_surface` - 接触面（front_glass / side_glass / back_glass）\n- `flashing_burst_speed_normalized` - 爆发速度归一化（典型加速度高于游动 2-3 倍）\n\n### 蹭底（Scraping - 腹部/侧面蹭底砂）信号\n- `scraping_events_count_per_minute` - **每分钟蹭底事件数**（核心指标）\n- `scraping_event_duration_ms_avg` - 单次蹭底动作平均时长\n- `scraping_body_contact_area` - 接触部位（abdomen / lateral_left / lateral_right / gill_cover）\n- `scraping_substrate_type` - 接触底材类型（sand / gravel / decorative_rock / aquatic_plant）\n- `scraping_repeated_at_same_spot` - 是否在同一位置反复蹭（强信号）\n\n### 综合摩擦统计\n- `total_friction_events_per_minute` - **总摩擦事件数（擦缸 + 蹭底）/ 分钟**（核心阈值 ≥ 5 次/分钟）\n- `friction_persistent_duration_seconds` - **频繁摩擦持续时长**（核心阈值 ≥ 10 秒）\n- `affected_fish_count` - 涉及摩擦行为的鱼数\n- `affected_fish_ratio` - 涉及鱼数占总鱼数比例\n- `cross_fish_synchronicity_score` - 多鱼同步异常评分（多鱼同时擦缸 → 全缸寄生虫怀疑度高）\n\n### 上下文与排除信号（避免误报）\n- `is_during_feeding` - 是否在投喂窗口内（争食可能短暂撞缸）\n- `is_during_courtship_or_spawning` - 是否在繁殖期（求偶/产卵时鱼可能贴底/蹭石）\n- `is_substrate_cleaning_species` - 是否食底栖型鱼种（鼠鱼/异型鱼/底栖鱼天然贴底觅食）\n- `tank_recently_disturbed` - 鱼缸是否近期受外部惊吓（换水/搬家短暂应激）\n- `water_temperature_change_detected` - 水温是否近期突变（应激）\n\n## 综合判定\n\n- `friction_normal` - 摩擦行为正常（≤ 2 次/分钟，零星活动）\n- `friction_low_baseline` - 低频摩擦（3-4 次/分钟，可能为底栖鱼正常或轻度不适）\n- `friction_warning_mild` - **摩擦预警轻度**（5-7 次/分钟，持续 ≥ 10s，触发预警门槛）\n- `friction_warning_severe` - **摩擦预警严重**（≥ 8 次/分钟，持续 ≥ 30s，**强烈外寄怀疑**）\n- `friction_whole_tank_outbreak` - **全缸爆发**（≥ 50% 鱼同时频繁摩擦，**全缸寄生虫爆发风险**）\n- `friction_courtship_or_substrate_species` - 繁殖期/底栖鱼正常行为（不告警）\n- `friction_signal_unreliable` - 信号不可靠（光照不足 / 跟踪率 < 80% / 视野盲区 / 帧率 < 25 FPS）\n\n## 4 级告警策略递进\n\n- Level 1（normal / low_baseline / courtship_or_substrate_species）：仅入库或不提示\n- Level 2（warning_mild）：重要提示，建议**立即近距离观察鱼体表（白点 / 充血 / 黏液增多）+ 鳃部颜色 + 食欲变化**\n- Level 3（warning_severe，单次）：紧急告警，建议**立即体表 + 鳃部 + 鳍条全面观察 + 测水质 NH3/NO2-/pH/温度 + 准备隔离检疫缸 "},{"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":"Through fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system counts abnormal contact frequency per minute. | 通过鱼缸固定摄像头，分析鱼类的行为视频，检测鱼体与缸壁、底砂、造景石等物体的异常摩擦动作（擦缸：鱼体侧身快速蹭过缸壁；蹭底：鱼体腹部或侧面贴底砂摩擦）。统计每分钟的异常接触频次，当频次超过阈值（默认 5 次/分钟）且持续时间超过 10 秒时，输出'外寄风险提示'，提醒用户检查是否有寄生虫（如小瓜虫、车轮虫、三代虫）感染或皮肤不适。 Skill: Fish Flashing & Scraping Detection (Ectoparasite Warning) | 鱼类擦缸/蹭底行为识别（外寄） Owner: 18072937735 Summary: Through fixed aquarium cameras, the system analyzes fish behavior videos and detects abnormal frictional actions between fish bodies and tank walls, substrate, or rockwork — 'flashing' (fish flipping sideways and brushing tank walls rapidly) and 'scraping' (fish belly/flank rubbing on substrate). The system","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1193,"uniquenessScore":46,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T21:50:47.057Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T21:50:47.057Z","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:04:16.820Z","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"}]}}}