{"id":"7143a610-505c-45f0-b782-26222d6da6a4","entityType":"agent","slug":"clawhub-18072937735-smyx-fish-feeding-activity-analysis","name":"Fish Feeding Behavior Activity Analysis | 鱼类摄食行为活跃度分析","canonicalUrl":"https://www.xpersona.co/agent/clawhub-18072937735-smyx-fish-feeding-activity-analysis","canonicalPath":"/agent/clawhub-18072937735-smyx-fish-feeding-activity-analysis","generatedAt":"2026-10-10T08:06:52.164Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T21:18:38.802Z","emptyReason":null},"description":"Through built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-fish-feeding-activity-analysis","sourceUrl":"https://clawhub.ai/18072937735/smyx-fish-feeding-activity-analysis","homepage":"https://clawhub.ai/18072937735/skills/smyx-fish-feeding-activity-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/18072937735/smyx-fish-feeding-activity-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/18072937735/skills/smyx-fish-feeding-activity-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":66,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Fish Feeding Behavior Activity Analysis | 鱼类摄食行为活跃度分析 technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T21:18:38.802Z","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:18:38.802Z","emptyReason":null},"stars":null,"forks":null,"downloads":1986,"packageName":null,"latestVersion":"1.0.16","tractionLabel":"2K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T21:18:38.802Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T21:18:38.802Z","lastCrawledAt":"2026-10-09T21:18:38.802Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T21:18:38.802Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.16","createdAt":"2026-09-27T17:47:27.969Z","changelog":"- Updated version number in SKILL.md from 1.0.12 to 1.0.13. - Removed the file skill-card.md. - No functional or conceptual changes to the skill itself. - Documentation maintenance only; main skill usage, API, and workflows remain unchanged.","fileCount":31,"zipByteSize":43616},{"version":"1.0.15","createdAt":"2026-09-22T20:02:44.716Z","changelog":"smyx-fish-feeding-activity-analysis v1.0.15 - Updated documentation in SKILL.md to reflect the new version and recent API/script changes. - skills/smyx_common/scripts/config.yaml was modified (details not specified). - Removed redundant or deprecated file skill-card.md to streamline documentation. - Minor cleanup and consistency improvements across project resource files.","fileCount":31,"zipByteSize":44097},{"version":"1.0.14","createdAt":"2026-09-07T22:57:29.682Z","changelog":"# smyx-fish-feeding-activity-analysis v1.0.14 - Removed the file `skill-card.md`. - No other functional or logic changes. - Documentation and core workflow remain unchanged.","fileCount":31,"zipByteSize":43939},{"version":"1.0.13","createdAt":"2026-08-24T15:33:35.649Z","changelog":"- Updated documentation in SKILL.md; internal details, descriptions, and sample flows revised. - Removed the redundant file skill-card.md. - No changes to code or functional behavior. - Version metadata updated in SKILL.md.","fileCount":31,"zipByteSize":43979},{"version":"1.0.12","createdAt":"2026-08-18T06:55:32.653Z","changelog":"- Updated SKILL.md with minor revisions and bumped the version to 1.0.10. - Removed obsolete file: skill-card.md. - Adjusted configuration details in skills/smyx_common/scripts/config.yaml. - General maintenance and documentation cleanup.","fileCount":31,"zipByteSize":43939},{"version":"1.0.11","createdAt":"2026-08-13T23:02:49.753Z","changelog":"## smyx-fish-feeding-activity-analysis v1.0.11 Changelog - Removed the `skill-card.md` documentation file. - No code or feature changes; function and API usage remain the same. - All skill functionality and operations are unaffected by this release.","fileCount":31,"zipByteSize":43863},{"version":"1.0.10","createdAt":"2026-08-08T17:14:35.043Z","changelog":"- Updated version number from 1.0.7 to 1.0.8 in SKILL.md. - Removed the file skill-card.md from the project. - No functional changes to code or features; documentation only was updated. - SKILL.md is now the primary documentation file.","fileCount":31,"zipByteSize":44127},{"version":"1.0.9","createdAt":"2026-07-30T03:39:27.548Z","changelog":"- Updated SKILL.md version information and documentation content. - Removed the file skill-card.md. - No core logic or interface changes; documentation and metadata only.","fileCount":31,"zipByteSize":43995}]},"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-feeding-activity-analysis","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-fish-feeding-activity-analysis` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/18072937735/smyx-fish-feeding-activity-analysis before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-feeding-activity-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-feeding-activity-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-feeding-activity-analysis/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-feeding-activity-analysis/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-feeding-activity-analysis/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-feeding-activity-analysis/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T08:06:52.158Z"}},"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-feeding-activity-analysis/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-feeding-activity-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-feeding-activity-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-fish-feeding-activity-analysis/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T21:18:38.802Z","emptyReason":null},"readme":"Skill: Fish Feeding Behavior Activity Analysis | 鱼类摄食行为活跃度分析\n\nOwner: 18072937735\n\nSummary: Through built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。\n\nTags: latest:1.0.16\n\nVersion history:\n\nv1.0.16 | 2026-09-27T17:47:27.969Z | auto\n\n- Updated version number in SKILL.md from 1.0.12 to 1.0.13.\n- Removed the file skill-card.md.\n- No functional or conceptual changes to the skill itself.\n- Documentation maintenance only; main skill usage, API, and workflows remain unchanged.\n\nv1.0.15 | 2026-09-22T20:02:44.716Z | auto\n\nsmyx-fish-feeding-activity-analysis v1.0.15\n\n- Updated documentation in SKILL.md to reflect the new version and recent API/script changes.\n- skills/smyx_common/scripts/config.yaml was modified (details not specified).\n- Removed redundant or deprecated file skill-card.md to streamline documentation.\n- Minor cleanup and consistency improvements across project resource files.\n\nv1.0.14 | 2026-09-07T22:57:29.682Z | auto\n\n# smyx-fish-feeding-activity-analysis v1.0.14\n\n- Removed the file `skill-card.md`.\n- No other functional or logic changes. \n- Documentation and core workflow remain unchanged.\n\nv1.0.13 | 2026-08-24T15:33:35.649Z | auto\n\n- Updated documentation in SKILL.md; internal details, descriptions, and sample flows revised.\n- Removed the redundant file skill-card.md.\n- No changes to code or functional behavior.\n- Version metadata updated in SKILL.md.\n\nv1.0.12 | 2026-08-18T06:55:32.653Z | auto\n\n- Updated SKILL.md with minor revisions and bumped the version to 1.0.10.\n- Removed obsolete file: skill-card.md.\n- Adjusted configuration details in skills/smyx_common/scripts/config.yaml.\n- General maintenance and documentation cleanup.\n\nv1.0.11 | 2026-08-13T23:02:49.753Z | auto\n\n## smyx-fish-feeding-activity-analysis v1.0.11 Changelog\n\n- Removed the `skill-card.md` documentation file.\n- No code or feature changes; function and API usage remain the same.\n- All skill functionality and operations are unaffected by this release.\n\nv1.0.10 | 2026-08-08T17:14:35.043Z | auto\n\n- Updated version number from 1.0.7 to 1.0.8 in SKILL.md.\n- Removed the file skill-card.md from the project.\n- No functional changes to code or features; documentation only was updated.\n- SKILL.md is now the primary documentation file.\n\nv1.0.9 | 2026-07-30T03:39:27.548Z | auto\n\n- Updated SKILL.md version information and documentation content.\n- Removed the file skill-card.md.\n- No core logic or interface changes; documentation and metadata only.\n\nv1.0.8 | 2026-07-12T17:44:29.218Z | auto\n\nsmyx-fish-feeding-activity-analysis 1.0.8\n\n- Updated documentation: SKILL.md revised and version number incremented.\n- Removed deprecated documentation file (skill-card.md).\n- Code update in util.py under skills/smyx_common/scripts.\n- Minor metadata/version updates to reflect recent changes.\n\nv1.0.7 | 2026-07-06T19:55:25.284Z | auto\n\nsmyx-fish-feeding-activity-analysis 1.0.7\n\n- Removed the skill-card.md file from the project.\n- Updated skills/smyx_common/scripts/config.py (details not specified).\n- No changes made to SKILL.md or core user-facing functionality.\n\nv1.0.6 | 2026-06-30T19:47:28.824Z | auto\n\n## smyx-fish-feeding-activity-analysis v1.0.6 – Changelog\n\n- Major update: Simplified user identity handling and improved documentation structure for easier integration and user privacy.\n- User identity (open-id) is now handled internally and automatically by the system; user interaction for open-id is no longer required or allowed.\n- Updated documentation for clearer separation between internal logic and user-facing guidance, including concise resource indexing and workflows.\n- Script arguments and workflow were reorganized for improved clarity and usability.\n- Removed legacy scripts and files to streamline deployment and maintenance.\n- Strict output, privacy, and workflow guidelines reinforced throughout documentation and codebase.\n\nv1.0.5 | 2026-06-22T09:43:30.593Z | auto\n\n- Updated version number from 1.0.1 to 1.0.2 in SKILL.md.\n- Removed the file skill-card.md.\n- No changes to skill logic—documentation only.\n- No new features or bug fixes included.\n\nv1.0.4 | 2026-06-18T12:50:43.651Z | auto\n\n- Refactored the open-id retrieval logic: now prioritizes reading api-key from the skill's own scripts/config.yaml before falling back to the workspace common config.\n- Updated SKILL.md documentation to match the new open-id config file path and sequence.\n- Improved internal structure and logic in scripts/api_service.py, dao.py, and util.py for better configuration handling and code maintainability.\n- Removed legacy file skill-card.md.\n- No changes to user-facing feature set or API usage instructions.\n\nv1.0.3 | 2026-06-14T14:27:22.622Z | auto\n\n# smyx-fish-feeding-activity-analysis v1.0.3 Changelog\n\n- Updated SKILL.md with more concise descriptions and added a license field.\n- Revised and refactored skill documentation to enhance clarity; removed some duplicate or unnecessary content.\n- Adjusted requirements and code references for improved maintainability.\n- Removed redundant file: skill-card.md.\n- Various internal script and configuration improvements.\n\nv1.0.0 | 2026-05-28T04:34:15.909Z | auto\n\nInitial release of smyx-fish-feeding-activity-analysis:\n\n- Automatically analyzes fish feeding activity using AI video analysis from smart feeder or aquarium cameras.\n- Detects fish gathering count, feeding intensity (swimming speed, feeding action frequency), and remaining feed; computes activity score (0-100).\n- Triggers multi-level alerts when appetite declines, helping early detection of potential disease, stress, or water quality problems.\n- Generates structured feeding activity reports after each feeding event, with push notifications for abnormalities.\n- Strict identity (open-id) verification and cloud report storage; supports history report lookup via API integration.\n- Designed for smart feeders, home aquariums, aquaculture, and public aquarium scenarios; compatible with multi-tank deployments.\n\nArchive index:\n\nArchive v1.0.16: 31 files, 43616 bytes\n\nFiles: references/api_doc.md (6099b), scripts/__init__.py (58b), scripts/config.py (683b), scripts/config.yaml (3b), scripts/skill.py (582b), scripts/smyx_fish_feeding_activity_analysis.py (3755b), skill-card.md (1783b), SKILL.md (17024b), 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 (155b)\n\nFile v1.0.16:SKILL.md\n\n---\nname: \"smyx-fish-feeding-activity-analysis\"\ndescription: \"Through built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。\"\nversion: \"1.0.13\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Fish Feeding Behavior Activity Analysis | 鱼类摄食行为活跃度分析\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类摄食行为活跃度分析** |\n| 🎯 核心目标 | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FEEDING_ACTIVITY_ANALYSIS` |\n\nThrough built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). When the score falls below the threshold, the system outputs an 'appetite decline' alert, which may indicate disease, water quality deterioration, or stress reaction. Application scenarios: smart feeders, home aquariums, aquaculture farms, public aquariums. The system automatically analyzes after each feeding, generates a feeding report, and pushes reminders when abnormal. Skill features: appetite decline is an early signal of fish diseases (e.g. enteritis, parasites). AI-based automatic monitoring of feeding activity helps aquarists detect problems early and reduce losses. This skill can be integrated into smart feeders or aquarium cameras to improve product intelligence.\n\n通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。应用场景：智能喂食器、家庭鱼缸、水产养殖场、水族馆。系统在每次投喂后自动分析，生成摄食报告，异常时推送提醒。技能特点：食欲减退是鱼类疾病（如肠炎、寄生虫）的早期信号。通过 AI 自动监测摄食活跃度，可帮助养鱼者及早发现问题，减少损失。该技能可集成到智能喂食器或鱼缸摄像头中，提升产品智能化水平。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族摄食行为分析 AI。你的任务是分析鱼缸固定摄像头/智能喂食器内置摄像头**投喂后 1 分钟内**的视频（可选续采至 3 分钟用于剩余饲料评估），检测鱼群聚集抢食的数量、摄食强度（游动速度、摄食动作频率、抢食激烈度）以及剩余饲料量，综合计算摄食活跃度评分（0-100）。按 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）作判定，按 4 级告警策略递进（Level 1 入库/轻提醒 → Level 2 重要告警 + 检查水温/溶氧/pH/氨氮 + 近期换鱼/换水/换饲料 → Level 3 紧急告警 + 隔离精神萎靡个体 + 暂停下次投喂 + 联系兽医 → Level 4 完全拒食/连续 ≥ 3 餐异常 + 全面检查（水质+体表+游姿+呼吸）+ 联系专业人员）。鱼种特异性必须按基线判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）。必须考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报。视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时，必须返回 `feeding_signal_unreliable` 并建议重拍，**禁止给出不可靠的食欲下降告警**。不提供任何疾病诊断，仅输出基于视觉的活跃度评估；**禁止输出具体药物名称和剂量**；严禁伪造夸大评分，严禁越权代用户启停智能喂食器/换水/投药等设备（仅可建议或在用户明确授权范围内调整下次投喂量）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头**投喂后 1 分钟内**（关键采样窗口）视频，识别 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）→ **四组指标**：鱼群聚集 4 项（聚集数 / 基线总数 / 聚集比例 / 响应时长）+ 摄食强度 5 项（平均游动速度 / 摄食动作频率 / 抢食激烈度 / 水面摄食事件 / 中底层摄食事件）+ 剩余饲料 3 项（60s 水面残留 / 180s 缸底残留 / 剩余饲料比例）+ 综合评分 1 项（0-100）→ **4 档异常等级**（excellent → slightly_low → appetite_decline → severe/total）→ **4 级告警策略递进**（入库/轻提醒 → 重要告警 + 水质 + 饲料 + 应激排查 → 紧急告警 + 隔离 + 暂停投喂 + 联系兽医 → 最高紧急告警 + 全面检查 + 专业介入）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 2 / Level 4 不设上限）→ **每餐摄食报告**（按 tank_id + 投喂时间戳输出，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 投喂动作自动检测（饲料抛入水面识别）/ 智能喂食器投喂事件联动 |\n| 2 | 鱼群目标检测与跟踪（多鱼 ReID） |\n| 3 | 聚集数与基线比对 |\n| 4 | 游动速度量化（像素/秒 |\n| 5 | 可校准为体长/秒） |\n| 6 | 摄食动作频率识别（张嘴啄食 / 转身咬颗粒） |\n| 7 | 抢食激烈度评分 |\n| 8 | 水面/中层/底层摄食事件分层统计 |\n| 9 | 剩余饲料颗粒计数（60s 水面 + 180s 缸底） |\n| 10 | 综合评分加权融合 |\n| 11 | 鱼种自适应基线（水面型 / 底层型 / 立体型 / 夜行型） |\n| 12 | 生理性低食欲上下文识别 |\n| 13 | 用户 APP 推送 |\n| 14 | 4 级告警递进 |\n| 15 | 单日告警上限 |\n| 16 | 每餐摄食报告（按 tank_id + 投喂时间戳输出） |\n| 17 | 下次投喂量建议（基于剩余饲料比例 |\n| 18 | 仅建议） |\n| 19 | 连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供智能喂食器/鱼缸投喂后 1 分钟内视频 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_feeding_activity_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_feeding_activity_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 | 📥 准备智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行鱼类摄食行为活跃度分析 | 调用 `-m scripts.smyx_fish_feeding_activity_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频 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_feeding_activity_analysis.py`](scripts/smyx_fish_feeding_activity_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；摄像头需完整覆盖投喂区域；**核心采样窗口：投喂后 1 分钟内**；帧率 ≥ 15 FPS |\n| 🔎 使用提醒 | **4 级告警策略递进**（slightly_low → appetite_decline → severe_appetite_loss → total_refusal/Level 4），连续 ≥ 3 餐异常进入 Level 4 |\n| 🔎 使用提醒 | 单日告警上限：Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限（紧急安全优先） |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **禁止**对鱼做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染 / 应激综合征\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权范围内调整下次投喂量） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大评分、聚集比例、剩余饲料量等指标；所有数据必须基于真实视频帧统计 |\n| 🔎 使用提醒 | **必须**按**鱼种基线**判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）；**禁止使用通用阈值盲判** |\n| 📚 文档读取 | **必须**考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报 |\n| 🔎 使用提醒 | **必须**在视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n| 📜 报告输出 | **必须**：每餐摄食报告**按 tank_id + 投喂时间戳输出**，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史摄食记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地投喂后视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --input /path/to/feeding.mp4\n\n# 分析网络投喂后视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --url https://example.com/feeding.mp4\n\n# 显示历史摄食活跃度记录清单（自动触发关键词：查看鱼摄食历史报告、鱼缸摄食活跃度日志清单等）\npython -m scripts.smyx_fish_feeding_activity_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --output result.json\n```\n\nFile v1.0.16:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-feeding-activity-analysis\",\n  \"version\": \"1.0.16\",\n  \"publishedAt\": 1790531247969\n}\n\nFile v1.0.16: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` - 获取摄食活跃度结果（0-100 评分 + 食欲下降提示 + 剩余饲料评估）\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_FEEDING_ACTIVITY_ANALYSIS` - 鱼类摄食行为活跃度分析\n\n## 输入约束\n\n- 摄像头：智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头，能完整覆盖投喂区域\n- 分辨率 ≥ 720p；**帧率 ≥ 15 FPS**（鱼群抢食动作快，建议 ≥ 20 FPS）\n- 光照：建议鱼缸/养殖池照明开启 + 无强反光；水质清澈\n- **核心采样窗口**：**投喂后 1 分钟内**（关键约束），可选续采至 3 分钟用于剩余饲料评估\n- 投喂触发：智能喂食器投喂动作触发 / 用户手动标记 / 视频自动检测饲料抛入水面\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID（每个容器独立鱼种 + 鱼群数量基线）\n- 用户必须授权部署；公共水族馆/养殖场需公示告知\n\n## 关键观测信号\n\n### 鱼群聚集信号\n- `fish_gathering_count` - 投喂区域内聚集鱼数（去重 ReID 跟踪）\n- `total_fish_count_baseline` - 该容器注册总鱼数（基线，用户配置）\n- `gathering_ratio` - 聚集比例 = gathering / baseline\n- `gathering_response_latency_sec` - 从投喂到第一条鱼到达投喂区的响应时长（秒）\n\n### 摄食强度信号\n- `avg_swim_speed_pixel_per_sec` - 平均游动速度（像素/秒，校准后可换算体长/秒）\n- `feeding_action_freq_per_min` - 摄食动作频率（次/分钟，张嘴啄食 / 转身咬颗粒）\n- `attack_intensity_score` - 抢食激烈度评分（0-100，反映群体活力）\n- `surface_feeding_event_count` - 水面摄食事件次数（浮性饲料）\n- `mid_bottom_feeding_event_count` - 中层/底层摄食事件次数（沉性饲料）\n\n### 剩余饲料信号\n- `floating_pellet_count_after_60s` - 投喂 60 秒后水面残留颗粒数\n- `sinking_pellet_count_after_180s` - 投喂 180 秒后缸底/池底残留颗粒数\n- `residual_feed_ratio` - 剩余饲料比例（估算，0-1）\n\n### 综合评分\n- `feeding_activity_score` - 摄食活跃度评分（0-100，加权融合上述指标）\n\n## 综合判定\n\n- `feeding_excellent` - 摄食优秀（评分 ≥ 85）\n- `feeding_normal` - 摄食正常（评分 70-85）\n- `feeding_slightly_low` - 摄食略低（评分 60-70）\n- `feeding_appetite_decline` - **食欲下降**（评分 40-60）\n- `feeding_severe_appetite_loss` - 严重食欲不振（评分 20-40）\n- `feeding_total_refusal` - 完全拒食（评分 < 20，聚集 < 10% 且无摄食动作）\n- `feeding_signal_unreliable` - 信号不可靠（视频不在投喂窗口 / 投喂未发生 / 浑浊度过高）\n\n## 4 级告警策略递进\n\n- Level 1（slightly_low）：仅入库或用户 APP 轻提醒\"摄食略低，请观察\"\n- Level 2（appetite_decline）：用户 APP 重要告警，建议**检查水温、溶氧、pH、氨氮、近期是否新增鱼/换水/换饲料**\n- Level 3（severe_appetite_loss）：紧急告警，建议**隔离观察精神萎靡个体 + 检查体表症状 + 暂停下一次投喂**，并提示联系**当地观赏鱼兽医**\n- Level 4（total_refusal / 连续 ≥ 3 餐 ≥ Level 2 / 同缸多条鱼同时拒食）：最高紧急告警 + 强烈建议**立即全面检查（水质 + 体表 + 游姿 + 呼吸）+ 联系专业人员**\n\n## 单日告警上限\n\n- Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权的下次投喂量自动调整范围内执行）\n- 评分、聚集比例、剩余饲料量等指标必须基于真实视频帧统计；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种摄食习性差异极大（金鱼 / 锦鲤水面摄食、鼠鱼/异型底层摄食、神仙鱼立体抢食、夜行鱼日间不进食）→ 必须按**鱼种基线**判定；**禁止使用通用阈值盲判**\n- 必须考虑\"生理性低食欲\"上下文：水温骤变、繁殖期、灯光开启/关闭过渡期、饲料品牌切换 → 评分降低属可解释，避免直接归因于疾病\n- 视频不在投喂窗口、未检测到投喂动作、水浑浊度过高时，必须返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸/养殖池 ID\n- `species` - 鱼种\n- `feeding_time` - 投喂时间戳\n- `feeding_amount_g` - 本次投喂量（克，可选）\n- `feeding_activity_score` - 0-100 摄食活跃度评分\n- `gathering_ratio` / `attack_intensity_score` / `residual_feed_ratio` - 关键子指标\n- `composite_scene` - 综合判定\n- `alert_level` - 告警等级\n- `recommended_actions` - 建议动作（观察 / 检查水质 / 暂停下次投喂 / 联系兽医，**不含药物**）\n- `next_feeding_suggestion` - 下次投喂量建议（基于剩余饲料比例，仅建议）\n- `disclaimer` - 免责声明\n\nFile v1.0.16: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.16:scripts/config.yaml\n\n{}\n\nFile v1.0.16:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.16: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.16: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.16: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.16:skill-card.md\n\n## Description:\n\nAnalyzes fish-feeding videos to report feeding activity, remaining feed, and possible appetite decline.\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 feeding videos or URLs to assess fish-feeding activity, review appetite alerts, and retrieve historical reports.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Fish-feeding videos or supplied URLs are processed by the Life Emergence cloud service.\n\nMitigation: Obtain informed consent before sharing media; confirm the service's retention and data-use terms.\n\nRisk: The skill creates and reuses an account-linked identity and cached tokens for report history.\n\nMitigation: Review token storage, account access, and history-query controls before deployment.\n\n## Reference(s):\n\n- [Fish-feeding analysis API documentation](references/api_doc.md)\n- [ClawHub skill release](https://clawhub.ai/18072937735/skills/smyx-fish-feeding-activity-analysis)\n\n## Skill Output:\n\n**Output Type(s):** [Analysis, Guidance, Report links]\n\n**Output Format:** [JSON or Markdown text]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Feeding activity score, appetite alerts, and historical report listings when requested.]\n\n## Skill Version(s):\n\n1.0.16 (source: ClawHub release metadata; bundled skill frontmatter lists 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.16:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.16:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.15: 31 files, 44097 bytes\n\nFiles: references/api_doc.md (6099b), scripts/__init__.py (58b), scripts/config.py (683b), scripts/config.yaml (3b), scripts/skill.py (582b), scripts/smyx_fish_feeding_activity_analysis.py (3755b), skill-card.md (2884b), SKILL.md (17024b), 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 (155b)\n\nFile v1.0.15:SKILL.md\n\n---\nname: \"smyx-fish-feeding-activity-analysis\"\ndescription: \"Through built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。\"\nversion: \"1.0.12\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Fish Feeding Behavior Activity Analysis | 鱼类摄食行为活跃度分析\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类摄食行为活跃度分析** |\n| 🎯 核心目标 | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FEEDING_ACTIVITY_ANALYSIS` |\n\nThrough built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). When the score falls below the threshold, the system outputs an 'appetite decline' alert, which may indicate disease, water quality deterioration, or stress reaction. Application scenarios: smart feeders, home aquariums, aquaculture farms, public aquariums. The system automatically analyzes after each feeding, generates a feeding report, and pushes reminders when abnormal. Skill features: appetite decline is an early signal of fish diseases (e.g. enteritis, parasites). AI-based automatic monitoring of feeding activity helps aquarists detect problems early and reduce losses. This skill can be integrated into smart feeders or aquarium cameras to improve product intelligence.\n\n通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。应用场景：智能喂食器、家庭鱼缸、水产养殖场、水族馆。系统在每次投喂后自动分析，生成摄食报告，异常时推送提醒。技能特点：食欲减退是鱼类疾病（如肠炎、寄生虫）的早期信号。通过 AI 自动监测摄食活跃度，可帮助养鱼者及早发现问题，减少损失。该技能可集成到智能喂食器或鱼缸摄像头中，提升产品智能化水平。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族摄食行为分析 AI。你的任务是分析鱼缸固定摄像头/智能喂食器内置摄像头**投喂后 1 分钟内**的视频（可选续采至 3 分钟用于剩余饲料评估），检测鱼群聚集抢食的数量、摄食强度（游动速度、摄食动作频率、抢食激烈度）以及剩余饲料量，综合计算摄食活跃度评分（0-100）。按 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）作判定，按 4 级告警策略递进（Level 1 入库/轻提醒 → Level 2 重要告警 + 检查水温/溶氧/pH/氨氮 + 近期换鱼/换水/换饲料 → Level 3 紧急告警 + 隔离精神萎靡个体 + 暂停下次投喂 + 联系兽医 → Level 4 完全拒食/连续 ≥ 3 餐异常 + 全面检查（水质+体表+游姿+呼吸）+ 联系专业人员）。鱼种特异性必须按基线判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）。必须考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报。视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时，必须返回 `feeding_signal_unreliable` 并建议重拍，**禁止给出不可靠的食欲下降告警**。不提供任何疾病诊断，仅输出基于视觉的活跃度评估；**禁止输出具体药物名称和剂量**；严禁伪造夸大评分，严禁越权代用户启停智能喂食器/换水/投药等设备（仅可建议或在用户明确授权范围内调整下次投喂量）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头**投喂后 1 分钟内**（关键采样窗口）视频，识别 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）→ **四组指标**：鱼群聚集 4 项（聚集数 / 基线总数 / 聚集比例 / 响应时长）+ 摄食强度 5 项（平均游动速度 / 摄食动作频率 / 抢食激烈度 / 水面摄食事件 / 中底层摄食事件）+ 剩余饲料 3 项（60s 水面残留 / 180s 缸底残留 / 剩余饲料比例）+ 综合评分 1 项（0-100）→ **4 档异常等级**（excellent → slightly_low → appetite_decline → severe/total）→ **4 级告警策略递进**（入库/轻提醒 → 重要告警 + 水质 + 饲料 + 应激排查 → 紧急告警 + 隔离 + 暂停投喂 + 联系兽医 → 最高紧急告警 + 全面检查 + 专业介入）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 2 / Level 4 不设上限）→ **每餐摄食报告**（按 tank_id + 投喂时间戳输出，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 投喂动作自动检测（饲料抛入水面识别）/ 智能喂食器投喂事件联动 |\n| 2 | 鱼群目标检测与跟踪（多鱼 ReID） |\n| 3 | 聚集数与基线比对 |\n| 4 | 游动速度量化（像素/秒 |\n| 5 | 可校准为体长/秒） |\n| 6 | 摄食动作频率识别（张嘴啄食 / 转身咬颗粒） |\n| 7 | 抢食激烈度评分 |\n| 8 | 水面/中层/底层摄食事件分层统计 |\n| 9 | 剩余饲料颗粒计数（60s 水面 + 180s 缸底） |\n| 10 | 综合评分加权融合 |\n| 11 | 鱼种自适应基线（水面型 / 底层型 / 立体型 / 夜行型） |\n| 12 | 生理性低食欲上下文识别 |\n| 13 | 用户 APP 推送 |\n| 14 | 4 级告警递进 |\n| 15 | 单日告警上限 |\n| 16 | 每餐摄食报告（按 tank_id + 投喂时间戳输出） |\n| 17 | 下次投喂量建议（基于剩余饲料比例 |\n| 18 | 仅建议） |\n| 19 | 连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供智能喂食器/鱼缸投喂后 1 分钟内视频 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_feeding_activity_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_feeding_activity_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 | 📥 准备智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行鱼类摄食行为活跃度分析 | 调用 `-m scripts.smyx_fish_feeding_activity_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频 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_feeding_activity_analysis.py`](scripts/smyx_fish_feeding_activity_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；摄像头需完整覆盖投喂区域；**核心采样窗口：投喂后 1 分钟内**；帧率 ≥ 15 FPS |\n| 🔎 使用提醒 | **4 级告警策略递进**（slightly_low → appetite_decline → severe_appetite_loss → total_refusal/Level 4），连续 ≥ 3 餐异常进入 Level 4 |\n| 🔎 使用提醒 | 单日告警上限：Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限（紧急安全优先） |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **禁止**对鱼做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染 / 应激综合征\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权范围内调整下次投喂量） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大评分、聚集比例、剩余饲料量等指标；所有数据必须基于真实视频帧统计 |\n| 🔎 使用提醒 | **必须**按**鱼种基线**判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）；**禁止使用通用阈值盲判** |\n| 📚 文档读取 | **必须**考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报 |\n| 🔎 使用提醒 | **必须**在视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n| 📜 报告输出 | **必须**：每餐摄食报告**按 tank_id + 投喂时间戳输出**，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史摄食记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地投喂后视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --input /path/to/feeding.mp4\n\n# 分析网络投喂后视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --url https://example.com/feeding.mp4\n\n# 显示历史摄食活跃度记录清单（自动触发关键词：查看鱼摄食历史报告、鱼缸摄食活跃度日志清单等）\npython -m scripts.smyx_fish_feeding_activity_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --output result.json\n```\n\nFile v1.0.15:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-feeding-activity-analysis\",\n  \"version\": \"1.0.15\",\n  \"publishedAt\": 1790107364716\n}\n\nFile v1.0.15:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放鱼类摄食行为活跃度分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动鱼类摄食行为活跃度分析任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取摄食活跃度结果（0-100 评分 + 食欲下降提示 + 剩余饲料评估）\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_FEEDING_ACTIVITY_ANALYSIS` - 鱼类摄食行为活跃度分析\n\n## 输入约束\n\n- 摄像头：智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头，能完整覆盖投喂区域\n- 分辨率 ≥ 720p；**帧率 ≥ 15 FPS**（鱼群抢食动作快，建议 ≥ 20 FPS）\n- 光照：建议鱼缸/养殖池照明开启 + 无强反光；水质清澈\n- **核心采样窗口**：**投喂后 1 分钟内**（关键约束），可选续采至 3 分钟用于剩余饲料评估\n- 投喂触发：智能喂食器投喂动作触发 / 用户手动标记 / 视频自动检测饲料抛入水面\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID（每个容器独立鱼种 + 鱼群数量基线）\n- 用户必须授权部署；公共水族馆/养殖场需公示告知\n\n## 关键观测信号\n\n### 鱼群聚集信号\n- `fish_gathering_count` - 投喂区域内聚集鱼数（去重 ReID 跟踪）\n- `total_fish_count_baseline` - 该容器注册总鱼数（基线，用户配置）\n- `gathering_ratio` - 聚集比例 = gathering / baseline\n- `gathering_response_latency_sec` - 从投喂到第一条鱼到达投喂区的响应时长（秒）\n\n### 摄食强度信号\n- `avg_swim_speed_pixel_per_sec` - 平均游动速度（像素/秒，校准后可换算体长/秒）\n- `feeding_action_freq_per_min` - 摄食动作频率（次/分钟，张嘴啄食 / 转身咬颗粒）\n- `attack_intensity_score` - 抢食激烈度评分（0-100，反映群体活力）\n- `surface_feeding_event_count` - 水面摄食事件次数（浮性饲料）\n- `mid_bottom_feeding_event_count` - 中层/底层摄食事件次数（沉性饲料）\n\n### 剩余饲料信号\n- `floating_pellet_count_after_60s` - 投喂 60 秒后水面残留颗粒数\n- `sinking_pellet_count_after_180s` - 投喂 180 秒后缸底/池底残留颗粒数\n- `residual_feed_ratio` - 剩余饲料比例（估算，0-1）\n\n### 综合评分\n- `feeding_activity_score` - 摄食活跃度评分（0-100，加权融合上述指标）\n\n## 综合判定\n\n- `feeding_excellent` - 摄食优秀（评分 ≥ 85）\n- `feeding_normal` - 摄食正常（评分 70-85）\n- `feeding_slightly_low` - 摄食略低（评分 60-70）\n- `feeding_appetite_decline` - **食欲下降**（评分 40-60）\n- `feeding_severe_appetite_loss` - 严重食欲不振（评分 20-40）\n- `feeding_total_refusal` - 完全拒食（评分 < 20，聚集 < 10% 且无摄食动作）\n- `feeding_signal_unreliable` - 信号不可靠（视频不在投喂窗口 / 投喂未发生 / 浑浊度过高）\n\n## 4 级告警策略递进\n\n- Level 1（slightly_low）：仅入库或用户 APP 轻提醒\"摄食略低，请观察\"\n- Level 2（appetite_decline）：用户 APP 重要告警，建议**检查水温、溶氧、pH、氨氮、近期是否新增鱼/换水/换饲料**\n- Level 3（severe_appetite_loss）：紧急告警，建议**隔离观察精神萎靡个体 + 检查体表症状 + 暂停下一次投喂**，并提示联系**当地观赏鱼兽医**\n- Level 4（total_refusal / 连续 ≥ 3 餐 ≥ Level 2 / 同缸多条鱼同时拒食）：最高紧急告警 + 强烈建议**立即全面检查（水质 + 体表 + 游姿 + 呼吸）+ 联系专业人员**\n\n## 单日告警上限\n\n- Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权的下次投喂量自动调整范围内执行）\n- 评分、聚集比例、剩余饲料量等指标必须基于真实视频帧统计；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种摄食习性差异极大（金鱼 / 锦鲤水面摄食、鼠鱼/异型底层摄食、神仙鱼立体抢食、夜行鱼日间不进食）→ 必须按**鱼种基线**判定；**禁止使用通用阈值盲判**\n- 必须考虑\"生理性低食欲\"上下文：水温骤变、繁殖期、灯光开启/关闭过渡期、饲料品牌切换 → 评分降低属可解释，避免直接归因于疾病\n- 视频不在投喂窗口、未检测到投喂动作、水浑浊度过高时，必须返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸/养殖池 ID\n- `species` - 鱼种\n- `feeding_time` - 投喂时间戳\n- `feeding_amount_g` - 本次投喂量（克，可选）\n- `feeding_activity_score` - 0-100 摄食活跃度评分\n- `gathering_ratio` / `attack_intensity_score` / `residual_feed_ratio` - 关键子指标\n- `composite_scene` - 综合判定\n- `alert_level` - 告警等级\n- `recommended_actions` - 建议动作（观察 / 检查水质 / 暂停下次投喂 / 联系兽医，**不含药物**）\n- `next_feeding_suggestion` - 下次投喂量建议（基于剩余饲料比例，仅建议）\n- `disclaimer` - 免责声明\n\nFile v1.0.15:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.15:scripts/config.yaml\n\n{}\n\nFile v1.0.15:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.15:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.15:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.15:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.15:skill-card.md\n\n## Description:\n\nAnalyzes post-feeding aquarium or fish-feeder videos to estimate fish gathering, feeding intensity, remaining feed, and a 0-100 feeding activity score with appetite-decline alerts.\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, aquarists, aquaculture operators, and developers use this skill to submit aquarium feeding footage or URLs for structured feeding-activity reports, report links, and historical report lookup. The output should be treated as visual activity analysis, not veterinary diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill uploads aquarium videos, local files, or provided URLs to a configured cloud analysis service.\n\nMitigation: Use only footage appropriate for cloud processing, avoid sensitive shared-space footage, and ask the publisher for retention, deletion, and reset controls before production use.\n\nRisk: The skill can silently create or reuse a cloud identity and store access tokens locally.\n\nMitigation: Run it with a dedicated account or isolated workspace, review local token storage before deployment, and require clear token rotation and revocation procedures from the publisher.\n\nRisk: The history feature can query reports linked to the automatically managed identity.\n\nMitigation: Limit use to accounts and workspaces where report history access is expected, and verify that users have controls for deleting or resetting report history.\n\nRisk: Feeding activity alerts may be mistaken for veterinary diagnosis or automated device-control instructions.\n\nMitigation: Present results as visual activity indicators only, require human review for abnormal findings, and do not perform medication, water-change, or feeder-control actions without explicit authorization.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-fish-feeding-activity-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 JSON-formatted text]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include a structured analysis report, feeding activity score, appetite-decline alert, recommendations, report export link, and account-linked history listing.]\n\n## Skill Version(s):\n\n1.0.15 (source: server release metadata; artifact frontmatter says 1.0.12)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.15:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.15:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.14: 31 files, 43939 bytes\n\nFiles: references/api_doc.md (6099b), scripts/__init__.py (58b), scripts/config.py (683b), scripts/config.yaml (3b), scripts/skill.py (582b), scripts/smyx_fish_feeding_activity_analysis.py (3755b), skill-card.md (2479b), SKILL.md (17024b), 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 (155b)\n\nFile v1.0.14:SKILL.md\n\n---\nname: \"smyx-fish-feeding-activity-analysis\"\ndescription: \"Through built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Fish Feeding Behavior Activity Analysis | 鱼类摄食行为活跃度分析\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类摄食行为活跃度分析** |\n| 🎯 核心目标 | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FEEDING_ACTIVITY_ANALYSIS` |\n\nThrough built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). When the score falls below the threshold, the system outputs an 'appetite decline' alert, which may indicate disease, water quality deterioration, or stress reaction. Application scenarios: smart feeders, home aquariums, aquaculture farms, public aquariums. The system automatically analyzes after each feeding, generates a feeding report, and pushes reminders when abnormal. Skill features: appetite decline is an early signal of fish diseases (e.g. enteritis, parasites). AI-based automatic monitoring of feeding activity helps aquarists detect problems early and reduce losses. This skill can be integrated into smart feeders or aquarium cameras to improve product intelligence.\n\n通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。应用场景：智能喂食器、家庭鱼缸、水产养殖场、水族馆。系统在每次投喂后自动分析，生成摄食报告，异常时推送提醒。技能特点：食欲减退是鱼类疾病（如肠炎、寄生虫）的早期信号。通过 AI 自动监测摄食活跃度，可帮助养鱼者及早发现问题，减少损失。该技能可集成到智能喂食器或鱼缸摄像头中，提升产品智能化水平。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族摄食行为分析 AI。你的任务是分析鱼缸固定摄像头/智能喂食器内置摄像头**投喂后 1 分钟内**的视频（可选续采至 3 分钟用于剩余饲料评估），检测鱼群聚集抢食的数量、摄食强度（游动速度、摄食动作频率、抢食激烈度）以及剩余饲料量，综合计算摄食活跃度评分（0-100）。按 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）作判定，按 4 级告警策略递进（Level 1 入库/轻提醒 → Level 2 重要告警 + 检查水温/溶氧/pH/氨氮 + 近期换鱼/换水/换饲料 → Level 3 紧急告警 + 隔离精神萎靡个体 + 暂停下次投喂 + 联系兽医 → Level 4 完全拒食/连续 ≥ 3 餐异常 + 全面检查（水质+体表+游姿+呼吸）+ 联系专业人员）。鱼种特异性必须按基线判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）。必须考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报。视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时，必须返回 `feeding_signal_unreliable` 并建议重拍，**禁止给出不可靠的食欲下降告警**。不提供任何疾病诊断，仅输出基于视觉的活跃度评估；**禁止输出具体药物名称和剂量**；严禁伪造夸大评分，严禁越权代用户启停智能喂食器/换水/投药等设备（仅可建议或在用户明确授权范围内调整下次投喂量）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头**投喂后 1 分钟内**（关键采样窗口）视频，识别 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）→ **四组指标**：鱼群聚集 4 项（聚集数 / 基线总数 / 聚集比例 / 响应时长）+ 摄食强度 5 项（平均游动速度 / 摄食动作频率 / 抢食激烈度 / 水面摄食事件 / 中底层摄食事件）+ 剩余饲料 3 项（60s 水面残留 / 180s 缸底残留 / 剩余饲料比例）+ 综合评分 1 项（0-100）→ **4 档异常等级**（excellent → slightly_low → appetite_decline → severe/total）→ **4 级告警策略递进**（入库/轻提醒 → 重要告警 + 水质 + 饲料 + 应激排查 → 紧急告警 + 隔离 + 暂停投喂 + 联系兽医 → 最高紧急告警 + 全面检查 + 专业介入）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 2 / Level 4 不设上限）→ **每餐摄食报告**（按 tank_id + 投喂时间戳输出，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 投喂动作自动检测（饲料抛入水面识别）/ 智能喂食器投喂事件联动 |\n| 2 | 鱼群目标检测与跟踪（多鱼 ReID） |\n| 3 | 聚集数与基线比对 |\n| 4 | 游动速度量化（像素/秒 |\n| 5 | 可校准为体长/秒） |\n| 6 | 摄食动作频率识别（张嘴啄食 / 转身咬颗粒） |\n| 7 | 抢食激烈度评分 |\n| 8 | 水面/中层/底层摄食事件分层统计 |\n| 9 | 剩余饲料颗粒计数（60s 水面 + 180s 缸底） |\n| 10 | 综合评分加权融合 |\n| 11 | 鱼种自适应基线（水面型 / 底层型 / 立体型 / 夜行型） |\n| 12 | 生理性低食欲上下文识别 |\n| 13 | 用户 APP 推送 |\n| 14 | 4 级告警递进 |\n| 15 | 单日告警上限 |\n| 16 | 每餐摄食报告（按 tank_id + 投喂时间戳输出） |\n| 17 | 下次投喂量建议（基于剩余饲料比例 |\n| 18 | 仅建议） |\n| 19 | 连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供智能喂食器/鱼缸投喂后 1 分钟内视频 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_feeding_activity_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_feeding_activity_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 | 📥 准备智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行鱼类摄食行为活跃度分析 | 调用 `-m scripts.smyx_fish_feeding_activity_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频 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_feeding_activity_analysis.py`](scripts/smyx_fish_feeding_activity_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；摄像头需完整覆盖投喂区域；**核心采样窗口：投喂后 1 分钟内**；帧率 ≥ 15 FPS |\n| 🔎 使用提醒 | **4 级告警策略递进**（slightly_low → appetite_decline → severe_appetite_loss → total_refusal/Level 4），连续 ≥ 3 餐异常进入 Level 4 |\n| 🔎 使用提醒 | 单日告警上限：Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限（紧急安全优先） |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **禁止**对鱼做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染 / 应激综合征\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权范围内调整下次投喂量） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大评分、聚集比例、剩余饲料量等指标；所有数据必须基于真实视频帧统计 |\n| 🔎 使用提醒 | **必须**按**鱼种基线**判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）；**禁止使用通用阈值盲判** |\n| 📚 文档读取 | **必须**考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报 |\n| 🔎 使用提醒 | **必须**在视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n| 📜 报告输出 | **必须**：每餐摄食报告**按 tank_id + 投喂时间戳输出**，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史摄食记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地投喂后视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --input /path/to/feeding.mp4\n\n# 分析网络投喂后视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --url https://example.com/feeding.mp4\n\n# 显示历史摄食活跃度记录清单（自动触发关键词：查看鱼摄食历史报告、鱼缸摄食活跃度日志清单等）\npython -m scripts.smyx_fish_feeding_activity_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --output result.json\n```\n\nFile v1.0.14:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-feeding-activity-analysis\",\n  \"version\": \"1.0.14\",\n  \"publishedAt\": 1788821849682\n}\n\nFile v1.0.14:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放鱼类摄食行为活跃度分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动鱼类摄食行为活跃度分析任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取摄食活跃度结果（0-100 评分 + 食欲下降提示 + 剩余饲料评估）\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_FEEDING_ACTIVITY_ANALYSIS` - 鱼类摄食行为活跃度分析\n\n## 输入约束\n\n- 摄像头：智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头，能完整覆盖投喂区域\n- 分辨率 ≥ 720p；**帧率 ≥ 15 FPS**（鱼群抢食动作快，建议 ≥ 20 FPS）\n- 光照：建议鱼缸/养殖池照明开启 + 无强反光；水质清澈\n- **核心采样窗口**：**投喂后 1 分钟内**（关键约束），可选续采至 3 分钟用于剩余饲料评估\n- 投喂触发：智能喂食器投喂动作触发 / 用户手动标记 / 视频自动检测饲料抛入水面\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID（每个容器独立鱼种 + 鱼群数量基线）\n- 用户必须授权部署；公共水族馆/养殖场需公示告知\n\n## 关键观测信号\n\n### 鱼群聚集信号\n- `fish_gathering_count` - 投喂区域内聚集鱼数（去重 ReID 跟踪）\n- `total_fish_count_baseline` - 该容器注册总鱼数（基线，用户配置）\n- `gathering_ratio` - 聚集比例 = gathering / baseline\n- `gathering_response_latency_sec` - 从投喂到第一条鱼到达投喂区的响应时长（秒）\n\n### 摄食强度信号\n- `avg_swim_speed_pixel_per_sec` - 平均游动速度（像素/秒，校准后可换算体长/秒）\n- `feeding_action_freq_per_min` - 摄食动作频率（次/分钟，张嘴啄食 / 转身咬颗粒）\n- `attack_intensity_score` - 抢食激烈度评分（0-100，反映群体活力）\n- `surface_feeding_event_count` - 水面摄食事件次数（浮性饲料）\n- `mid_bottom_feeding_event_count` - 中层/底层摄食事件次数（沉性饲料）\n\n### 剩余饲料信号\n- `floating_pellet_count_after_60s` - 投喂 60 秒后水面残留颗粒数\n- `sinking_pellet_count_after_180s` - 投喂 180 秒后缸底/池底残留颗粒数\n- `residual_feed_ratio` - 剩余饲料比例（估算，0-1）\n\n### 综合评分\n- `feeding_activity_score` - 摄食活跃度评分（0-100，加权融合上述指标）\n\n## 综合判定\n\n- `feeding_excellent` - 摄食优秀（评分 ≥ 85）\n- `feeding_normal` - 摄食正常（评分 70-85）\n- `feeding_slightly_low` - 摄食略低（评分 60-70）\n- `feeding_appetite_decline` - **食欲下降**（评分 40-60）\n- `feeding_severe_appetite_loss` - 严重食欲不振（评分 20-40）\n- `feeding_total_refusal` - 完全拒食（评分 < 20，聚集 < 10% 且无摄食动作）\n- `feeding_signal_unreliable` - 信号不可靠（视频不在投喂窗口 / 投喂未发生 / 浑浊度过高）\n\n## 4 级告警策略递进\n\n- Level 1（slightly_low）：仅入库或用户 APP 轻提醒\"摄食略低，请观察\"\n- Level 2（appetite_decline）：用户 APP 重要告警，建议**检查水温、溶氧、pH、氨氮、近期是否新增鱼/换水/换饲料**\n- Level 3（severe_appetite_loss）：紧急告警，建议**隔离观察精神萎靡个体 + 检查体表症状 + 暂停下一次投喂**，并提示联系**当地观赏鱼兽医**\n- Level 4（total_refusal / 连续 ≥ 3 餐 ≥ Level 2 / 同缸多条鱼同时拒食）：最高紧急告警 + 强烈建议**立即全面检查（水质 + 体表 + 游姿 + 呼吸）+ 联系专业人员**\n\n## 单日告警上限\n\n- Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权的下次投喂量自动调整范围内执行）\n- 评分、聚集比例、剩余饲料量等指标必须基于真实视频帧统计；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种摄食习性差异极大（金鱼 / 锦鲤水面摄食、鼠鱼/异型底层摄食、神仙鱼立体抢食、夜行鱼日间不进食）→ 必须按**鱼种基线**判定；**禁止使用通用阈值盲判**\n- 必须考虑\"生理性低食欲\"上下文：水温骤变、繁殖期、灯光开启/关闭过渡期、饲料品牌切换 → 评分降低属可解释，避免直接归因于疾病\n- 视频不在投喂窗口、未检测到投喂动作、水浑浊度过高时，必须返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸/养殖池 ID\n- `species` - 鱼种\n- `feeding_time` - 投喂时间戳\n- `feeding_amount_g` - 本次投喂量（克，可选）\n- `feeding_activity_score` - 0-100 摄食活跃度评分\n- `gathering_ratio` / `attack_intensity_score` / `residual_feed_ratio` - 关键子指标\n- `composite_scene` - 综合判定\n- `alert_level` - 告警等级\n- `recommended_actions` - 建议动作（观察 / 检查水质 / 暂停下次投喂 / 联系兽医，**不含药物**）\n- `next_feeding_suggestion` - 下次投喂量建议（基于剩余饲料比例，仅建议）\n- `disclaimer` - 免责声明\n\nFile v1.0.14:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.14:scripts/config.yaml\n\n{}\n\nFile v1.0.14:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.14:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.14:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.14:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.14:skill-card.md\n\n## Description:\n\nAnalyzes post-feeding aquarium or smart-feeder videos to estimate fish feeding activity, remaining feed, and appetite-decline alerts.\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 developers, aquarists, aquarium operators, and aquaculture teams use this skill to analyze feeding-window videos, generate structured feeding reports, and review historical feeding activity records. The skill is intended to support observation and triage, not disease diagnosis or unsupervised device control.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Fish-feeding videos and history queries are sent to the provider service.\n\nMitigation: Use only with clear user consent and review the provider's data handling and retention terms before deployment.\n\nRisk: The skill silently creates or reuses a local user identity and stores service tokens locally.\n\nMitigation: Require review of identity creation and token storage behavior, and restrict access to local skill data.\n\nRisk: The evidence notes insecure development HTTP endpoint defaults.\n\nMitigation: Require a fixed production HTTPS configuration before installation or runtime use.\n\nRisk: Connected-device actions may affect smart feeders or related aquarium devices.\n\nMitigation: Disable device-control actions or require explicit user confirmation before any connected-device change.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-fish-feeding-activity-analysis)\n- [API interface documentation](references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Files, Guidance]\n\n**Output Format:** [Structured JSON or Markdown-style report text, with optional saved output file]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include feeding activity score, alert level, recommended actions, historical report records, and report export links.]\n\n## Skill Version(s):\n\n1.0.14 (source: server release evidence; artifact frontmatter says 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.14:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.14:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.13: 31 files, 43979 bytes\n\nFiles: references/api_doc.md (6099b), scripts/__init__.py (58b), scripts/config.py (683b), scripts/config.yaml (3b), scripts/skill.py (582b), scripts/smyx_fish_feeding_activity_analysis.py (3755b), skill-card.md (2541b), SKILL.md (17024b), 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 (155b)\n\nFile v1.0.13:SKILL.md\n\n---\nname: \"smyx-fish-feeding-activity-analysis\"\ndescription: \"Through built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Fish Feeding Behavior Activity Analysis | 鱼类摄食行为活跃度分析\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类摄食行为活跃度分析** |\n| 🎯 核心目标 | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FEEDING_ACTIVITY_ANALYSIS` |\n\nThrough built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). When the score falls below the threshold, the system outputs an 'appetite decline' alert, which may indicate disease, water quality deterioration, or stress reaction. Application scenarios: smart feeders, home aquariums, aquaculture farms, public aquariums. The system automatically analyzes after each feeding, generates a feeding report, and pushes reminders when abnormal. Skill features: appetite decline is an early signal of fish diseases (e.g. enteritis, parasites). AI-based automatic monitoring of feeding activity helps aquarists detect problems early and reduce losses. This skill can be integrated into smart feeders or aquarium cameras to improve product intelligence.\n\n通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。应用场景：智能喂食器、家庭鱼缸、水产养殖场、水族馆。系统在每次投喂后自动分析，生成摄食报告，异常时推送提醒。技能特点：食欲减退是鱼类疾病（如肠炎、寄生虫）的早期信号。通过 AI 自动监测摄食活跃度，可帮助养鱼者及早发现问题，减少损失。该技能可集成到智能喂食器或鱼缸摄像头中，提升产品智能化水平。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族摄食行为分析 AI。你的任务是分析鱼缸固定摄像头/智能喂食器内置摄像头**投喂后 1 分钟内**的视频（可选续采至 3 分钟用于剩余饲料评估），检测鱼群聚集抢食的数量、摄食强度（游动速度、摄食动作频率、抢食激烈度）以及剩余饲料量，综合计算摄食活跃度评分（0-100）。按 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）作判定，按 4 级告警策略递进（Level 1 入库/轻提醒 → Level 2 重要告警 + 检查水温/溶氧/pH/氨氮 + 近期换鱼/换水/换饲料 → Level 3 紧急告警 + 隔离精神萎靡个体 + 暂停下次投喂 + 联系兽医 → Level 4 完全拒食/连续 ≥ 3 餐异常 + 全面检查（水质+体表+游姿+呼吸）+ 联系专业人员）。鱼种特异性必须按基线判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）。必须考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报。视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时，必须返回 `feeding_signal_unreliable` 并建议重拍，**禁止给出不可靠的食欲下降告警**。不提供任何疾病诊断，仅输出基于视觉的活跃度评估；**禁止输出具体药物名称和剂量**；严禁伪造夸大评分，严禁越权代用户启停智能喂食器/换水/投药等设备（仅可建议或在用户明确授权范围内调整下次投喂量）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头**投喂后 1 分钟内**（关键采样窗口）视频，识别 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）→ **四组指标**：鱼群聚集 4 项（聚集数 / 基线总数 / 聚集比例 / 响应时长）+ 摄食强度 5 项（平均游动速度 / 摄食动作频率 / 抢食激烈度 / 水面摄食事件 / 中底层摄食事件）+ 剩余饲料 3 项（60s 水面残留 / 180s 缸底残留 / 剩余饲料比例）+ 综合评分 1 项（0-100）→ **4 档异常等级**（excellent → slightly_low → appetite_decline → severe/total）→ **4 级告警策略递进**（入库/轻提醒 → 重要告警 + 水质 + 饲料 + 应激排查 → 紧急告警 + 隔离 + 暂停投喂 + 联系兽医 → 最高紧急告警 + 全面检查 + 专业介入）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 2 / Level 4 不设上限）→ **每餐摄食报告**（按 tank_id + 投喂时间戳输出，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 投喂动作自动检测（饲料抛入水面识别）/ 智能喂食器投喂事件联动 |\n| 2 | 鱼群目标检测与跟踪（多鱼 ReID） |\n| 3 | 聚集数与基线比对 |\n| 4 | 游动速度量化（像素/秒 |\n| 5 | 可校准为体长/秒） |\n| 6 | 摄食动作频率识别（张嘴啄食 / 转身咬颗粒） |\n| 7 | 抢食激烈度评分 |\n| 8 | 水面/中层/底层摄食事件分层统计 |\n| 9 | 剩余饲料颗粒计数（60s 水面 + 180s 缸底） |\n| 10 | 综合评分加权融合 |\n| 11 | 鱼种自适应基线（水面型 / 底层型 / 立体型 / 夜行型） |\n| 12 | 生理性低食欲上下文识别 |\n| 13 | 用户 APP 推送 |\n| 14 | 4 级告警递进 |\n| 15 | 单日告警上限 |\n| 16 | 每餐摄食报告（按 tank_id + 投喂时间戳输出） |\n| 17 | 下次投喂量建议（基于剩余饲料比例 |\n| 18 | 仅建议） |\n| 19 | 连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供智能喂食器/鱼缸投喂后 1 分钟内视频 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_feeding_activity_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_feeding_activity_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 | 📥 准备智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行鱼类摄食行为活跃度分析 | 调用 `-m scripts.smyx_fish_feeding_activity_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频 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_feeding_activity_analysis.py`](scripts/smyx_fish_feeding_activity_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；摄像头需完整覆盖投喂区域；**核心采样窗口：投喂后 1 分钟内**；帧率 ≥ 15 FPS |\n| 🔎 使用提醒 | **4 级告警策略递进**（slightly_low → appetite_decline → severe_appetite_loss → total_refusal/Level 4），连续 ≥ 3 餐异常进入 Level 4 |\n| 🔎 使用提醒 | 单日告警上限：Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限（紧急安全优先） |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **禁止**对鱼做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染 / 应激综合征\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权范围内调整下次投喂量） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大评分、聚集比例、剩余饲料量等指标；所有数据必须基于真实视频帧统计 |\n| 🔎 使用提醒 | **必须**按**鱼种基线**判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）；**禁止使用通用阈值盲判** |\n| 📚 文档读取 | **必须**考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报 |\n| 🔎 使用提醒 | **必须**在视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n| 📜 报告输出 | **必须**：每餐摄食报告**按 tank_id + 投喂时间戳输出**，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史摄食记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地投喂后视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --input /path/to/feeding.mp4\n\n# 分析网络投喂后视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --url https://example.com/feeding.mp4\n\n# 显示历史摄食活跃度记录清单（自动触发关键词：查看鱼摄食历史报告、鱼缸摄食活跃度日志清单等）\npython -m scripts.smyx_fish_feeding_activity_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --output result.json\n```\n\nFile v1.0.13:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-feeding-activity-analysis\",\n  \"version\": \"1.0.13\",\n  \"publishedAt\": 1787585615649\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` - 获取摄食活跃度结果（0-100 评分 + 食欲下降提示 + 剩余饲料评估）\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_FEEDING_ACTIVITY_ANALYSIS` - 鱼类摄食行为活跃度分析\n\n## 输入约束\n\n- 摄像头：智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头，能完整覆盖投喂区域\n- 分辨率 ≥ 720p；**帧率 ≥ 15 FPS**（鱼群抢食动作快，建议 ≥ 20 FPS）\n- 光照：建议鱼缸/养殖池照明开启 + 无强反光；水质清澈\n- **核心采样窗口**：**投喂后 1 分钟内**（关键约束），可选续采至 3 分钟用于剩余饲料评估\n- 投喂触发：智能喂食器投喂动作触发 / 用户手动标记 / 视频自动检测饲料抛入水面\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID（每个容器独立鱼种 + 鱼群数量基线）\n- 用户必须授权部署；公共水族馆/养殖场需公示告知\n\n## 关键观测信号\n\n### 鱼群聚集信号\n- `fish_gathering_count` - 投喂区域内聚集鱼数（去重 ReID 跟踪）\n- `total_fish_count_baseline` - 该容器注册总鱼数（基线，用户配置）\n- `gathering_ratio` - 聚集比例 = gathering / baseline\n- `gathering_response_latency_sec` - 从投喂到第一条鱼到达投喂区的响应时长（秒）\n\n### 摄食强度信号\n- `avg_swim_speed_pixel_per_sec` - 平均游动速度（像素/秒，校准后可换算体长/秒）\n- `feeding_action_freq_per_min` - 摄食动作频率（次/分钟，张嘴啄食 / 转身咬颗粒）\n- `attack_intensity_score` - 抢食激烈度评分（0-100，反映群体活力）\n- `surface_feeding_event_count` - 水面摄食事件次数（浮性饲料）\n- `mid_bottom_feeding_event_count` - 中层/底层摄食事件次数（沉性饲料）\n\n### 剩余饲料信号\n- `floating_pellet_count_after_60s` - 投喂 60 秒后水面残留颗粒数\n- `sinking_pellet_count_after_180s` - 投喂 180 秒后缸底/池底残留颗粒数\n- `residual_feed_ratio` - 剩余饲料比例（估算，0-1）\n\n### 综合评分\n- `feeding_activity_score` - 摄食活跃度评分（0-100，加权融合上述指标）\n\n## 综合判定\n\n- `feeding_excellent` - 摄食优秀（评分 ≥ 85）\n- `feeding_normal` - 摄食正常（评分 70-85）\n- `feeding_slightly_low` - 摄食略低（评分 60-70）\n- `feeding_appetite_decline` - **食欲下降**（评分 40-60）\n- `feeding_severe_appetite_loss` - 严重食欲不振（评分 20-40）\n- `feeding_total_refusal` - 完全拒食（评分 < 20，聚集 < 10% 且无摄食动作）\n- `feeding_signal_unreliable` - 信号不可靠（视频不在投喂窗口 / 投喂未发生 / 浑浊度过高）\n\n## 4 级告警策略递进\n\n- Level 1（slightly_low）：仅入库或用户 APP 轻提醒\"摄食略低，请观察\"\n- Level 2（appetite_decline）：用户 APP 重要告警，建议**检查水温、溶氧、pH、氨氮、近期是否新增鱼/换水/换饲料**\n- Level 3（severe_appetite_loss）：紧急告警，建议**隔离观察精神萎靡个体 + 检查体表症状 + 暂停下一次投喂**，并提示联系**当地观赏鱼兽医**\n- Level 4（total_refusal / 连续 ≥ 3 餐 ≥ Level 2 / 同缸多条鱼同时拒食）：最高紧急告警 + 强烈建议**立即全面检查（水质 + 体表 + 游姿 + 呼吸）+ 联系专业人员**\n\n## 单日告警上限\n\n- Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权的下次投喂量自动调整范围内执行）\n- 评分、聚集比例、剩余饲料量等指标必须基于真实视频帧统计；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种摄食习性差异极大（金鱼 / 锦鲤水面摄食、鼠鱼/异型底层摄食、神仙鱼立体抢食、夜行鱼日间不进食）→ 必须按**鱼种基线**判定；**禁止使用通用阈值盲判**\n- 必须考虑\"生理性低食欲\"上下文：水温骤变、繁殖期、灯光开启/关闭过渡期、饲料品牌切换 → 评分降低属可解释，避免直接归因于疾病\n- 视频不在投喂窗口、未检测到投喂动作、水浑浊度过高时，必须返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸/养殖池 ID\n- `species` - 鱼种\n- `feeding_time` - 投喂时间戳\n- `feeding_amount_g` - 本次投喂量（克，可选）\n- `feeding_activity_score` - 0-100 摄食活跃度评分\n- `gathering_ratio` / `attack_intensity_score` / `residual_feed_ratio` - 关键子指标\n- `composite_scene` - 综合判定\n- `alert_level` - 告警等级\n- `recommended_actions` - 建议动作（观察 / 检查水质 / 暂停下次投喂 / 联系兽医，**不含药物**）\n- `next_feeding_suggestion` - 下次投喂量建议（基于剩余饲料比例，仅建议）\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: dev\n\nFile v1.0.13:skill-card.md\n\n## Description:\n\nThrough built-in cameras of smart feeders or fixed cameras on aquariums, the skill analyzes post-feeding fish videos to estimate gathering, feeding intensity, remaining feed, and a 0-100 feeding activity score.\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\nDevelopers and aquarium or aquaculture operators use this skill to analyze post-feeding video from smart feeders, fixed aquarium cameras, or aquaculture cameras. It returns structured feeding activity reports, alert levels, and non-medication recommendations for follow-up observation.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Aquarium videos, URLs, and report history may be tied to an automatically managed cloud identity.\n\nMitigation: Use the skill only where remote analysis and account-linked history are acceptable, and confirm identity separation and deletion controls before use in shared workspaces.\n\nRisk: The skill stores service tokens locally.\n\nMitigation: Install and run it only in workspaces where local token storage is acceptable, and review local credential handling before deployment.\n\nRisk: Visual feeding analysis can be unreliable when footage is outside the feeding window, no feeding event is detected, or water clarity is poor.\n\nMitigation: Treat `feeding_signal_unreliable` as a request to recapture footage, and avoid appetite-decline alerts or operational decisions from unreliable video.\n\n## Reference(s):\n\n- [API 接口文档](references/api_doc.md)\n- [smyx_analysis API 接口文档](skills/smyx_analysis/references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance]\n\n**Output Format:** [Structured report text or JSON, with Markdown tables for history listings]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Reports include feeding activity score, key submetrics, alert level, recommended actions, next-feeding suggestions, and report links when returned by the service.]\n\n## Skill Version(s):\n\n1.0.13 (source: server release metadata; SKILL.md frontmatter lists 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.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, 43939 bytes\n\nFiles: references/api_doc.md (6099b), scripts/__init__.py (58b), scripts/config.py (683b), scripts/config.yaml (3b), scripts/skill.py (582b), scripts/smyx_fish_feeding_activity_analysis.py (3755b), skill-card.md (2507b), SKILL.md (17024b), 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 (155b)\n\nFile v1.0.12:SKILL.md\n\n---\nname: \"smyx-fish-feeding-activity-analysis\"\ndescription: \"Through built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Fish Feeding Behavior Activity Analysis | 鱼类摄食行为活跃度分析\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类摄食行为活跃度分析** |\n| 🎯 核心目标 | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FEEDING_ACTIVITY_ANALYSIS` |\n\nThrough built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). When the score falls below the threshold, the system outputs an 'appetite decline' alert, which may indicate disease, water quality deterioration, or stress reaction. Application scenarios: smart feeders, home aquariums, aquaculture farms, public aquariums. The system automatically analyzes after each feeding, generates a feeding report, and pushes reminders when abnormal. Skill features: appetite decline is an early signal of fish diseases (e.g. enteritis, parasites). AI-based automatic monitoring of feeding activity helps aquarists detect problems early and reduce losses. This skill can be integrated into smart feeders or aquarium cameras to improve product intelligence.\n\n通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。应用场景：智能喂食器、家庭鱼缸、水产养殖场、水族馆。系统在每次投喂后自动分析，生成摄食报告，异常时推送提醒。技能特点：食欲减退是鱼类疾病（如肠炎、寄生虫）的早期信号。通过 AI 自动监测摄食活跃度，可帮助养鱼者及早发现问题，减少损失。该技能可集成到智能喂食器或鱼缸摄像头中，提升产品智能化水平。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族摄食行为分析 AI。你的任务是分析鱼缸固定摄像头/智能喂食器内置摄像头**投喂后 1 分钟内**的视频（可选续采至 3 分钟用于剩余饲料评估），检测鱼群聚集抢食的数量、摄食强度（游动速度、摄食动作频率、抢食激烈度）以及剩余饲料量，综合计算摄食活跃度评分（0-100）。按 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）作判定，按 4 级告警策略递进（Level 1 入库/轻提醒 → Level 2 重要告警 + 检查水温/溶氧/pH/氨氮 + 近期换鱼/换水/换饲料 → Level 3 紧急告警 + 隔离精神萎靡个体 + 暂停下次投喂 + 联系兽医 → Level 4 完全拒食/连续 ≥ 3 餐异常 + 全面检查（水质+体表+游姿+呼吸）+ 联系专业人员）。鱼种特异性必须按基线判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）。必须考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报。视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时，必须返回 `feeding_signal_unreliable` 并建议重拍，**禁止给出不可靠的食欲下降告警**。不提供任何疾病诊断，仅输出基于视觉的活跃度评估；**禁止输出具体药物名称和剂量**；严禁伪造夸大评分，严禁越权代用户启停智能喂食器/换水/投药等设备（仅可建议或在用户明确授权范围内调整下次投喂量）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头**投喂后 1 分钟内**（关键采样窗口）视频，识别 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）→ **四组指标**：鱼群聚集 4 项（聚集数 / 基线总数 / 聚集比例 / 响应时长）+ 摄食强度 5 项（平均游动速度 / 摄食动作频率 / 抢食激烈度 / 水面摄食事件 / 中底层摄食事件）+ 剩余饲料 3 项（60s 水面残留 / 180s 缸底残留 / 剩余饲料比例）+ 综合评分 1 项（0-100）→ **4 档异常等级**（excellent → slightly_low → appetite_decline → severe/total）→ **4 级告警策略递进**（入库/轻提醒 → 重要告警 + 水质 + 饲料 + 应激排查 → 紧急告警 + 隔离 + 暂停投喂 + 联系兽医 → 最高紧急告警 + 全面检查 + 专业介入）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 2 / Level 4 不设上限）→ **每餐摄食报告**（按 tank_id + 投喂时间戳输出，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 投喂动作自动检测（饲料抛入水面识别）/ 智能喂食器投喂事件联动 |\n| 2 | 鱼群目标检测与跟踪（多鱼 ReID） |\n| 3 | 聚集数与基线比对 |\n| 4 | 游动速度量化（像素/秒 |\n| 5 | 可校准为体长/秒） |\n| 6 | 摄食动作频率识别（张嘴啄食 / 转身咬颗粒） |\n| 7 | 抢食激烈度评分 |\n| 8 | 水面/中层/底层摄食事件分层统计 |\n| 9 | 剩余饲料颗粒计数（60s 水面 + 180s 缸底） |\n| 10 | 综合评分加权融合 |\n| 11 | 鱼种自适应基线（水面型 / 底层型 / 立体型 / 夜行型） |\n| 12 | 生理性低食欲上下文识别 |\n| 13 | 用户 APP 推送 |\n| 14 | 4 级告警递进 |\n| 15 | 单日告警上限 |\n| 16 | 每餐摄食报告（按 tank_id + 投喂时间戳输出） |\n| 17 | 下次投喂量建议（基于剩余饲料比例 |\n| 18 | 仅建议） |\n| 19 | 连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供智能喂食器/鱼缸投喂后 1 分钟内视频 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_feeding_activity_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_feeding_activity_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 | 📥 准备智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行鱼类摄食行为活跃度分析 | 调用 `-m scripts.smyx_fish_feeding_activity_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频 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_feeding_activity_analysis.py`](scripts/smyx_fish_feeding_activity_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；摄像头需完整覆盖投喂区域；**核心采样窗口：投喂后 1 分钟内**；帧率 ≥ 15 FPS |\n| 🔎 使用提醒 | **4 级告警策略递进**（slightly_low → appetite_decline → severe_appetite_loss → total_refusal/Level 4），连续 ≥ 3 餐异常进入 Level 4 |\n| 🔎 使用提醒 | 单日告警上限：Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限（紧急安全优先） |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **禁止**对鱼做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染 / 应激综合征\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权范围内调整下次投喂量） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大评分、聚集比例、剩余饲料量等指标；所有数据必须基于真实视频帧统计 |\n| 🔎 使用提醒 | **必须**按**鱼种基线**判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）；**禁止使用通用阈值盲判** |\n| 📚 文档读取 | **必须**考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报 |\n| 🔎 使用提醒 | **必须**在视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n| 📜 报告输出 | **必须**：每餐摄食报告**按 tank_id + 投喂时间戳输出**，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史摄食记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地投喂后视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --input /path/to/feeding.mp4\n\n# 分析网络投喂后视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --url https://example.com/feeding.mp4\n\n# 显示历史摄食活跃度记录清单（自动触发关键词：查看鱼摄食历史报告、鱼缸摄食活跃度日志清单等）\npython -m scripts.smyx_fish_feeding_activity_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --output result.json\n```\n\nFile v1.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-feeding-activity-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1787036132653\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` - 获取摄食活跃度结果（0-100 评分 + 食欲下降提示 + 剩余饲料评估）\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_FEEDING_ACTIVITY_ANALYSIS` - 鱼类摄食行为活跃度分析\n\n## 输入约束\n\n- 摄像头：智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头，能完整覆盖投喂区域\n- 分辨率 ≥ 720p；**帧率 ≥ 15 FPS**（鱼群抢食动作快，建议 ≥ 20 FPS）\n- 光照：建议鱼缸/养殖池照明开启 + 无强反光；水质清澈\n- **核心采样窗口**：**投喂后 1 分钟内**（关键约束），可选续采至 3 分钟用于剩余饲料评估\n- 投喂触发：智能喂食器投喂动作触发 / 用户手动标记 / 视频自动检测饲料抛入水面\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID（每个容器独立鱼种 + 鱼群数量基线）\n- 用户必须授权部署；公共水族馆/养殖场需公示告知\n\n## 关键观测信号\n\n### 鱼群聚集信号\n- `fish_gathering_count` - 投喂区域内聚集鱼数（去重 ReID 跟踪）\n- `total_fish_count_baseline` - 该容器注册总鱼数（基线，用户配置）\n- `gathering_ratio` - 聚集比例 = gathering / baseline\n- `gathering_response_latency_sec` - 从投喂到第一条鱼到达投喂区的响应时长（秒）\n\n### 摄食强度信号\n- `avg_swim_speed_pixel_per_sec` - 平均游动速度（像素/秒，校准后可换算体长/秒）\n- `feeding_action_freq_per_min` - 摄食动作频率（次/分钟，张嘴啄食 / 转身咬颗粒）\n- `attack_intensity_score` - 抢食激烈度评分（0-100，反映群体活力）\n- `surface_feeding_event_count` - 水面摄食事件次数（浮性饲料）\n- `mid_bottom_feeding_event_count` - 中层/底层摄食事件次数（沉性饲料）\n\n### 剩余饲料信号\n- `floating_pellet_count_after_60s` - 投喂 60 秒后水面残留颗粒数\n- `sinking_pellet_count_after_180s` - 投喂 180 秒后缸底/池底残留颗粒数\n- `residual_feed_ratio` - 剩余饲料比例（估算，0-1）\n\n### 综合评分\n- `feeding_activity_score` - 摄食活跃度评分（0-100，加权融合上述指标）\n\n## 综合判定\n\n- `feeding_excellent` - 摄食优秀（评分 ≥ 85）\n- `feeding_normal` - 摄食正常（评分 70-85）\n- `feeding_slightly_low` - 摄食略低（评分 60-70）\n- `feeding_appetite_decline` - **食欲下降**（评分 40-60）\n- `feeding_severe_appetite_loss` - 严重食欲不振（评分 20-40）\n- `feeding_total_refusal` - 完全拒食（评分 < 20，聚集 < 10% 且无摄食动作）\n- `feeding_signal_unreliable` - 信号不可靠（视频不在投喂窗口 / 投喂未发生 / 浑浊度过高）\n\n## 4 级告警策略递进\n\n- Level 1（slightly_low）：仅入库或用户 APP 轻提醒\"摄食略低，请观察\"\n- Level 2（appetite_decline）：用户 APP 重要告警，建议**检查水温、溶氧、pH、氨氮、近期是否新增鱼/换水/换饲料**\n- Level 3（severe_appetite_loss）：紧急告警，建议**隔离观察精神萎靡个体 + 检查体表症状 + 暂停下一次投喂**，并提示联系**当地观赏鱼兽医**\n- Level 4（total_refusal / 连续 ≥ 3 餐 ≥ Level 2 / 同缸多条鱼同时拒食）：最高紧急告警 + 强烈建议**立即全面检查（水质 + 体表 + 游姿 + 呼吸）+ 联系专业人员**\n\n## 单日告警上限\n\n- Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权的下次投喂量自动调整范围内执行）\n- 评分、聚集比例、剩余饲料量等指标必须基于真实视频帧统计；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种摄食习性差异极大（金鱼 / 锦鲤水面摄食、鼠鱼/异型底层摄食、神仙鱼立体抢食、夜行鱼日间不进食）→ 必须按**鱼种基线**判定；**禁止使用通用阈值盲判**\n- 必须考虑\"生理性低食欲\"上下文：水温骤变、繁殖期、灯光开启/关闭过渡期、饲料品牌切换 → 评分降低属可解释，避免直接归因于疾病\n- 视频不在投喂窗口、未检测到投喂动作、水浑浊度过高时，必须返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸/养殖池 ID\n- `species` - 鱼种\n- `feeding_time` - 投喂时间戳\n- `feeding_amount_g` - 本次投喂量（克，可选）\n- `feeding_activity_score` - 0-100 摄食活跃度评分\n- `gathering_ratio` / `attack_intensity_score` / `residual_feed_ratio` - 关键子指标\n- `composite_scene` - 综合判定\n- `alert_level` - 告警等级\n- `recommended_actions` - 建议动作（观察 / 检查水质 / 暂停下次投喂 / 联系兽医，**不含药物**）\n- `next_feeding_suggestion` - 下次投喂量建议（基于剩余饲料比例，仅建议）\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: dev\n\nFile v1.0.12:skill-card.md\n\n## Description:\n\nAnalyzes post-feeding aquarium or smart-feeder videos to estimate fish gathering, feeding intensity, remaining feed, and a 0-100 feeding activity score.\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 aquarium keepers, aquaculture operators, and developers use this skill to analyze post-feeding camera footage, generate structured feeding activity reports, view account-linked report history, and surface appetite-decline alerts without making disease diagnoses.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill can upload aquarium media or forward media URLs to configured network services.\n\nMitigation: Use only footage and URLs approved for that service, and avoid private camera URLs, signed links, or sensitive footage unless the service and retention practices are trusted.\n\nRisk: The skill silently creates or reuses an internal identity and queries account-linked report history.\n\nMitigation: Run it only in workspaces where that account association is expected, and review history output before sharing it outside the intended user context.\n\nRisk: The skill stores service tokens in the workspace.\n\nMitigation: Keep the workspace access-controlled, rotate credentials after shared or untrusted use, and remove stored tokens when the skill is no longer needed.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/18072937735/skills/smyx-fish-feeding-activity-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [Fish feeding activity API documentation](references/api_doc.md)\n- [Shared analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Guidance]\n\n**Output Format:** [Markdown or JSON structured analysis reports with report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Can save results to a caller-provided output file and can return account-linked history from the configured cloud service.]\n\n## Skill Version(s):\n\n1.0.12 (source: server release metadata; SKILL.md frontmatter reports 1.0.10)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 43863 bytes\n\nFiles: references/api_doc.md (6099b), scripts/__init__.py (58b), scripts/config.py (683b), scripts/config.yaml (3b), scripts/skill.py (582b), scripts/smyx_fish_feeding_activity_analysis.py (3755b), skill-card.md (2303b), SKILL.md (17023b), 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 (155b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: \"smyx-fish-feeding-activity-analysis\"\ndescription: \"Through built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。\"\nversion: \"1.0.8\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Fish Feeding Behavior Activity Analysis | 鱼类摄食行为活跃度分析\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类摄食行为活跃度分析** |\n| 🎯 核心目标 | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FEEDING_ACTIVITY_ANALYSIS` |\n\nThrough built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). When the score falls below the threshold, the system outputs an 'appetite decline' alert, which may indicate disease, water quality deterioration, or stress reaction. Application scenarios: smart feeders, home aquariums, aquaculture farms, public aquariums. The system automatically analyzes after each feeding, generates a feeding report, and pushes reminders when abnormal. Skill features: appetite decline is an early signal of fish diseases (e.g. enteritis, parasites). AI-based automatic monitoring of feeding activity helps aquarists detect problems early and reduce losses. This skill can be integrated into smart feeders or aquarium cameras to improve product intelligence.\n\n通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。应用场景：智能喂食器、家庭鱼缸、水产养殖场、水族馆。系统在每次投喂后自动分析，生成摄食报告，异常时推送提醒。技能特点：食欲减退是鱼类疾病（如肠炎、寄生虫）的早期信号。通过 AI 自动监测摄食活跃度，可帮助养鱼者及早发现问题，减少损失。该技能可集成到智能喂食器或鱼缸摄像头中，提升产品智能化水平。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族摄食行为分析 AI。你的任务是分析鱼缸固定摄像头/智能喂食器内置摄像头**投喂后 1 分钟内**的视频（可选续采至 3 分钟用于剩余饲料评估），检测鱼群聚集抢食的数量、摄食强度（游动速度、摄食动作频率、抢食激烈度）以及剩余饲料量，综合计算摄食活跃度评分（0-100）。按 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）作判定，按 4 级告警策略递进（Level 1 入库/轻提醒 → Level 2 重要告警 + 检查水温/溶氧/pH/氨氮 + 近期换鱼/换水/换饲料 → Level 3 紧急告警 + 隔离精神萎靡个体 + 暂停下次投喂 + 联系兽医 → Level 4 完全拒食/连续 ≥ 3 餐异常 + 全面检查（水质+体表+游姿+呼吸）+ 联系专业人员）。鱼种特异性必须按基线判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）。必须考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报。视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时，必须返回 `feeding_signal_unreliable` 并建议重拍，**禁止给出不可靠的食欲下降告警**。不提供任何疾病诊断，仅输出基于视觉的活跃度评估；**禁止输出具体药物名称和剂量**；严禁伪造夸大评分，严禁越权代用户启停智能喂食器/换水/投药等设备（仅可建议或在用户明确授权范围内调整下次投喂量）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头**投喂后 1 分钟内**（关键采样窗口）视频，识别 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）→ **四组指标**：鱼群聚集 4 项（聚集数 / 基线总数 / 聚集比例 / 响应时长）+ 摄食强度 5 项（平均游动速度 / 摄食动作频率 / 抢食激烈度 / 水面摄食事件 / 中底层摄食事件）+ 剩余饲料 3 项（60s 水面残留 / 180s 缸底残留 / 剩余饲料比例）+ 综合评分 1 项（0-100）→ **4 档异常等级**（excellent → slightly_low → appetite_decline → severe/total）→ **4 级告警策略递进**（入库/轻提醒 → 重要告警 + 水质 + 饲料 + 应激排查 → 紧急告警 + 隔离 + 暂停投喂 + 联系兽医 → 最高紧急告警 + 全面检查 + 专业介入）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 2 / Level 4 不设上限）→ **每餐摄食报告**（按 tank_id + 投喂时间戳输出，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 投喂动作自动检测（饲料抛入水面识别）/ 智能喂食器投喂事件联动 |\n| 2 | 鱼群目标检测与跟踪（多鱼 ReID） |\n| 3 | 聚集数与基线比对 |\n| 4 | 游动速度量化（像素/秒 |\n| 5 | 可校准为体长/秒） |\n| 6 | 摄食动作频率识别（张嘴啄食 / 转身咬颗粒） |\n| 7 | 抢食激烈度评分 |\n| 8 | 水面/中层/底层摄食事件分层统计 |\n| 9 | 剩余饲料颗粒计数（60s 水面 + 180s 缸底） |\n| 10 | 综合评分加权融合 |\n| 11 | 鱼种自适应基线（水面型 / 底层型 / 立体型 / 夜行型） |\n| 12 | 生理性低食欲上下文识别 |\n| 13 | 用户 APP 推送 |\n| 14 | 4 级告警递进 |\n| 15 | 单日告警上限 |\n| 16 | 每餐摄食报告（按 tank_id + 投喂时间戳输出） |\n| 17 | 下次投喂量建议（基于剩余饲料比例 |\n| 18 | 仅建议） |\n| 19 | 连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供智能喂食器/鱼缸投喂后 1 分钟内视频 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_feeding_activity_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_feeding_activity_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 | 📥 准备智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行鱼类摄食行为活跃度分析 | 调用 `-m scripts.smyx_fish_feeding_activity_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频 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_feeding_activity_analysis.py`](scripts/smyx_fish_feeding_activity_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；摄像头需完整覆盖投喂区域；**核心采样窗口：投喂后 1 分钟内**；帧率 ≥ 15 FPS |\n| 🔎 使用提醒 | **4 级告警策略递进**（slightly_low → appetite_decline → severe_appetite_loss → total_refusal/Level 4），连续 ≥ 3 餐异常进入 Level 4 |\n| 🔎 使用提醒 | 单日告警上限：Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限（紧急安全优先） |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **禁止**对鱼做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染 / 应激综合征\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权范围内调整下次投喂量） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大评分、聚集比例、剩余饲料量等指标；所有数据必须基于真实视频帧统计 |\n| 🔎 使用提醒 | **必须**按**鱼种基线**判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）；**禁止使用通用阈值盲判** |\n| 📚 文档读取 | **必须**考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报 |\n| 🔎 使用提醒 | **必须**在视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n| 📜 报告输出 | **必须**：每餐摄食报告**按 tank_id + 投喂时间戳输出**，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史摄食记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地投喂后视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --input /path/to/feeding.mp4\n\n# 分析网络投喂后视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --url https://example.com/feeding.mp4\n\n# 显示历史摄食活跃度记录清单（自动触发关键词：查看鱼摄食历史报告、鱼缸摄食活跃度日志清单等）\npython -m scripts.smyx_fish_feeding_activity_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --output result.json\n```\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-feeding-activity-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1786662169753\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` - 获取摄食活跃度结果（0-100 评分 + 食欲下降提示 + 剩余饲料评估）\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_FEEDING_ACTIVITY_ANALYSIS` - 鱼类摄食行为活跃度分析\n\n## 输入约束\n\n- 摄像头：智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头，能完整覆盖投喂区域\n- 分辨率 ≥ 720p；**帧率 ≥ 15 FPS**（鱼群抢食动作快，建议 ≥ 20 FPS）\n- 光照：建议鱼缸/养殖池照明开启 + 无强反光；水质清澈\n- **核心采样窗口**：**投喂后 1 分钟内**（关键约束），可选续采至 3 分钟用于剩余饲料评估\n- 投喂触发：智能喂食器投喂动作触发 / 用户手动标记 / 视频自动检测饲料抛入水面\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID（每个容器独立鱼种 + 鱼群数量基线）\n- 用户必须授权部署；公共水族馆/养殖场需公示告知\n\n## 关键观测信号\n\n### 鱼群聚集信号\n- `fish_gathering_count` - 投喂区域内聚集鱼数（去重 ReID 跟踪）\n- `total_fish_count_baseline` - 该容器注册总鱼数（基线，用户配置）\n- `gathering_ratio` - 聚集比例 = gathering / baseline\n- `gathering_response_latency_sec` - 从投喂到第一条鱼到达投喂区的响应时长（秒）\n\n### 摄食强度信号\n- `avg_swim_speed_pixel_per_sec` - 平均游动速度（像素/秒，校准后可换算体长/秒）\n- `feeding_action_freq_per_min` - 摄食动作频率（次/分钟，张嘴啄食 / 转身咬颗粒）\n- `attack_intensity_score` - 抢食激烈度评分（0-100，反映群体活力）\n- `surface_feeding_event_count` - 水面摄食事件次数（浮性饲料）\n- `mid_bottom_feeding_event_count` - 中层/底层摄食事件次数（沉性饲料）\n\n### 剩余饲料信号\n- `floating_pellet_count_after_60s` - 投喂 60 秒后水面残留颗粒数\n- `sinking_pellet_count_after_180s` - 投喂 180 秒后缸底/池底残留颗粒数\n- `residual_feed_ratio` - 剩余饲料比例（估算，0-1）\n\n### 综合评分\n- `feeding_activity_score` - 摄食活跃度评分（0-100，加权融合上述指标）\n\n## 综合判定\n\n- `feeding_excellent` - 摄食优秀（评分 ≥ 85）\n- `feeding_normal` - 摄食正常（评分 70-85）\n- `feeding_slightly_low` - 摄食略低（评分 60-70）\n- `feeding_appetite_decline` - **食欲下降**（评分 40-60）\n- `feeding_severe_appetite_loss` - 严重食欲不振（评分 20-40）\n- `feeding_total_refusal` - 完全拒食（评分 < 20，聚集 < 10% 且无摄食动作）\n- `feeding_signal_unreliable` - 信号不可靠（视频不在投喂窗口 / 投喂未发生 / 浑浊度过高）\n\n## 4 级告警策略递进\n\n- Level 1（slightly_low）：仅入库或用户 APP 轻提醒\"摄食略低，请观察\"\n- Level 2（appetite_decline）：用户 APP 重要告警，建议**检查水温、溶氧、pH、氨氮、近期是否新增鱼/换水/换饲料**\n- Level 3（severe_appetite_loss）：紧急告警，建议**隔离观察精神萎靡个体 + 检查体表症状 + 暂停下一次投喂**，并提示联系**当地观赏鱼兽医**\n- Level 4（total_refusal / 连续 ≥ 3 餐 ≥ Level 2 / 同缸多条鱼同时拒食）：最高紧急告警 + 强烈建议**立即全面检查（水质 + 体表 + 游姿 + 呼吸）+ 联系专业人员**\n\n## 单日告警上限\n\n- Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权的下次投喂量自动调整范围内执行）\n- 评分、聚集比例、剩余饲料量等指标必须基于真实视频帧统计；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种摄食习性差异极大（金鱼 / 锦鲤水面摄食、鼠鱼/异型底层摄食、神仙鱼立体抢食、夜行鱼日间不进食）→ 必须按**鱼种基线**判定；**禁止使用通用阈值盲判**\n- 必须考虑\"生理性低食欲\"上下文：水温骤变、繁殖期、灯光开启/关闭过渡期、饲料品牌切换 → 评分降低属可解释，避免直接归因于疾病\n- 视频不在投喂窗口、未检测到投喂动作、水浑浊度过高时，必须返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸/养殖池 ID\n- `species` - 鱼种\n- `feeding_time` - 投喂时间戳\n- `feeding_amount_g` - 本次投喂量（克，可选）\n- `feeding_activity_score` - 0-100 摄食活跃度评分\n- `gathering_ratio` / `attack_intensity_score` / `residual_feed_ratio` - 关键子指标\n- `composite_scene` - 综合判定\n- `alert_level` - 告警等级\n- `recommended_actions` - 建议动作（观察 / 检查水质 / 暂停下次投喂 / 联系兽医，**不含药物**）\n- `next_feeding_suggestion` - 下次投喂量建议（基于剩余饲料比例，仅建议）\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: prod\n\nFile v1.0.11:skill-card.md\n\n## Description:\n\nAnalyzes fish feeding videos from smart feeder or aquarium cameras to estimate feeding activity, gathering behavior, feeding intensity, residual feed, alert level, and recommended next steps.\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 developers and aquarium or aquaculture operators use this skill to analyze post-feeding camera footage, generate structured feeding activity reports, and review historical feeding reports. It supports appetite decline alerts and handling guidance without making disease diagnoses or medication recommendations.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Aquarium camera media and history requests are processed by the lifeemergence.com backend and may be linked to a silently created or reused local identity.\n\nMitigation: Install and run the skill only in workspaces where identity-linked cloud processing of this media and report history is acceptable.\n\nRisk: Reusable tokens may be stored in a workspace SQLite database.\n\nMitigation: Use a workspace with appropriate access controls, and review or rotate local credentials according to the deployment owner's policy.\n\n## Reference(s):\n\n- [API Documentation](artifact/references/api_doc.md)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-fish-feeding-activity-analysis)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown summaries and JSON reports from fish feeding activity analysis or historical report queries]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Reports may include feeding activity score, key submetrics, alert level, recommended actions, next-feeding suggestion, disclaimer, and report links.]\n\n## Skill Version(s):\n\n1.0.11 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 44127 bytes\n\nFiles: references/api_doc.md (6099b), scripts/__init__.py (58b), scripts/config.py (683b), scripts/config.yaml (3b), scripts/skill.py (582b), scripts/smyx_fish_feeding_activity_analysis.py (3755b), skill-card.md (2898b), SKILL.md (17023b), 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 (155b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: \"smyx-fish-feeding-activity-analysis\"\ndescription: \"Through built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。\"\nversion: \"1.0.8\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Fish Feeding Behavior Activity Analysis | 鱼类摄食行为活跃度分析\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类摄食行为活跃度分析** |\n| 🎯 核心目标 | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FEEDING_ACTIVITY_ANALYSIS` |\n\nThrough built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). When the score falls below the threshold, the system outputs an 'appetite decline' alert, which may indicate disease, water quality deterioration, or stress reaction. Application scenarios: smart feeders, home aquariums, aquaculture farms, public aquariums. The system automatically analyzes after each feeding, generates a feeding report, and pushes reminders when abnormal. Skill features: appetite decline is an early signal of fish diseases (e.g. enteritis, parasites). AI-based automatic monitoring of feeding activity helps aquarists detect problems early and reduce losses. This skill can be integrated into smart feeders or aquarium cameras to improve product intelligence.\n\n通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。应用场景：智能喂食器、家庭鱼缸、水产养殖场、水族馆。系统在每次投喂后自动分析，生成摄食报告，异常时推送提醒。技能特点：食欲减退是鱼类疾病（如肠炎、寄生虫）的早期信号。通过 AI 自动监测摄食活跃度，可帮助养鱼者及早发现问题，减少损失。该技能可集成到智能喂食器或鱼缸摄像头中，提升产品智能化水平。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族摄食行为分析 AI。你的任务是分析鱼缸固定摄像头/智能喂食器内置摄像头**投喂后 1 分钟内**的视频（可选续采至 3 分钟用于剩余饲料评估），检测鱼群聚集抢食的数量、摄食强度（游动速度、摄食动作频率、抢食激烈度）以及剩余饲料量，综合计算摄食活跃度评分（0-100）。按 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）作判定，按 4 级告警策略递进（Level 1 入库/轻提醒 → Level 2 重要告警 + 检查水温/溶氧/pH/氨氮 + 近期换鱼/换水/换饲料 → Level 3 紧急告警 + 隔离精神萎靡个体 + 暂停下次投喂 + 联系兽医 → Level 4 完全拒食/连续 ≥ 3 餐异常 + 全面检查（水质+体表+游姿+呼吸）+ 联系专业人员）。鱼种特异性必须按基线判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）。必须考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报。视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时，必须返回 `feeding_signal_unreliable` 并建议重拍，**禁止给出不可靠的食欲下降告警**。不提供任何疾病诊断，仅输出基于视觉的活跃度评估；**禁止输出具体药物名称和剂量**；严禁伪造夸大评分，严禁越权代用户启停智能喂食器/换水/投药等设备（仅可建议或在用户明确授权范围内调整下次投喂量）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头**投喂后 1 分钟内**（关键采样窗口）视频，识别 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）→ **四组指标**：鱼群聚集 4 项（聚集数 / 基线总数 / 聚集比例 / 响应时长）+ 摄食强度 5 项（平均游动速度 / 摄食动作频率 / 抢食激烈度 / 水面摄食事件 / 中底层摄食事件）+ 剩余饲料 3 项（60s 水面残留 / 180s 缸底残留 / 剩余饲料比例）+ 综合评分 1 项（0-100）→ **4 档异常等级**（excellent → slightly_low → appetite_decline → severe/total）→ **4 级告警策略递进**（入库/轻提醒 → 重要告警 + 水质 + 饲料 + 应激排查 → 紧急告警 + 隔离 + 暂停投喂 + 联系兽医 → 最高紧急告警 + 全面检查 + 专业介入）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 2 / Level 4 不设上限）→ **每餐摄食报告**（按 tank_id + 投喂时间戳输出，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 投喂动作自动检测（饲料抛入水面识别）/ 智能喂食器投喂事件联动 |\n| 2 | 鱼群目标检测与跟踪（多鱼 ReID） |\n| 3 | 聚集数与基线比对 |\n| 4 | 游动速度量化（像素/秒 |\n| 5 | 可校准为体长/秒） |\n| 6 | 摄食动作频率识别（张嘴啄食 / 转身咬颗粒） |\n| 7 | 抢食激烈度评分 |\n| 8 | 水面/中层/底层摄食事件分层统计 |\n| 9 | 剩余饲料颗粒计数（60s 水面 + 180s 缸底） |\n| 10 | 综合评分加权融合 |\n| 11 | 鱼种自适应基线（水面型 / 底层型 / 立体型 / 夜行型） |\n| 12 | 生理性低食欲上下文识别 |\n| 13 | 用户 APP 推送 |\n| 14 | 4 级告警递进 |\n| 15 | 单日告警上限 |\n| 16 | 每餐摄食报告（按 tank_id + 投喂时间戳输出） |\n| 17 | 下次投喂量建议（基于剩余饲料比例 |\n| 18 | 仅建议） |\n| 19 | 连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供智能喂食器/鱼缸投喂后 1 分钟内视频 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_feeding_activity_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_feeding_activity_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 | 📥 准备智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行鱼类摄食行为活跃度分析 | 调用 `-m scripts.smyx_fish_feeding_activity_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频 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_feeding_activity_analysis.py`](scripts/smyx_fish_feeding_activity_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；摄像头需完整覆盖投喂区域；**核心采样窗口：投喂后 1 分钟内**；帧率 ≥ 15 FPS |\n| 🔎 使用提醒 | **4 级告警策略递进**（slightly_low → appetite_decline → severe_appetite_loss → total_refusal/Level 4），连续 ≥ 3 餐异常进入 Level 4 |\n| 🔎 使用提醒 | 单日告警上限：Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限（紧急安全优先） |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **禁止**对鱼做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染 / 应激综合征\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权范围内调整下次投喂量） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大评分、聚集比例、剩余饲料量等指标；所有数据必须基于真实视频帧统计 |\n| 🔎 使用提醒 | **必须**按**鱼种基线**判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）；**禁止使用通用阈值盲判** |\n| 📚 文档读取 | **必须**考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报 |\n| 🔎 使用提醒 | **必须**在视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n| 📜 报告输出 | **必须**：每餐摄食报告**按 tank_id + 投喂时间戳输出**，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史摄食记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地投喂后视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --input /path/to/feeding.mp4\n\n# 分析网络投喂后视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --url https://example.com/feeding.mp4\n\n# 显示历史摄食活跃度记录清单（自动触发关键词：查看鱼摄食历史报告、鱼缸摄食活跃度日志清单等）\npython -m scripts.smyx_fish_feeding_activity_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-feeding-activity-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1786209275043\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` - 获取摄食活跃度结果（0-100 评分 + 食欲下降提示 + 剩余饲料评估）\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_FEEDING_ACTIVITY_ANALYSIS` - 鱼类摄食行为活跃度分析\n\n## 输入约束\n\n- 摄像头：智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头，能完整覆盖投喂区域\n- 分辨率 ≥ 720p；**帧率 ≥ 15 FPS**（鱼群抢食动作快，建议 ≥ 20 FPS）\n- 光照：建议鱼缸/养殖池照明开启 + 无强反光；水质清澈\n- **核心采样窗口**：**投喂后 1 分钟内**（关键约束），可选续采至 3 分钟用于剩余饲料评估\n- 投喂触发：智能喂食器投喂动作触发 / 用户手动标记 / 视频自动检测饲料抛入水面\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID（每个容器独立鱼种 + 鱼群数量基线）\n- 用户必须授权部署；公共水族馆/养殖场需公示告知\n\n## 关键观测信号\n\n### 鱼群聚集信号\n- `fish_gathering_count` - 投喂区域内聚集鱼数（去重 ReID 跟踪）\n- `total_fish_count_baseline` - 该容器注册总鱼数（基线，用户配置）\n- `gathering_ratio` - 聚集比例 = gathering / baseline\n- `gathering_response_latency_sec` - 从投喂到第一条鱼到达投喂区的响应时长（秒）\n\n### 摄食强度信号\n- `avg_swim_speed_pixel_per_sec` - 平均游动速度（像素/秒，校准后可换算体长/秒）\n- `feeding_action_freq_per_min` - 摄食动作频率（次/分钟，张嘴啄食 / 转身咬颗粒）\n- `attack_intensity_score` - 抢食激烈度评分（0-100，反映群体活力）\n- `surface_feeding_event_count` - 水面摄食事件次数（浮性饲料）\n- `mid_bottom_feeding_event_count` - 中层/底层摄食事件次数（沉性饲料）\n\n### 剩余饲料信号\n- `floating_pellet_count_after_60s` - 投喂 60 秒后水面残留颗粒数\n- `sinking_pellet_count_after_180s` - 投喂 180 秒后缸底/池底残留颗粒数\n- `residual_feed_ratio` - 剩余饲料比例（估算，0-1）\n\n### 综合评分\n- `feeding_activity_score` - 摄食活跃度评分（0-100，加权融合上述指标）\n\n## 综合判定\n\n- `feeding_excellent` - 摄食优秀（评分 ≥ 85）\n- `feeding_normal` - 摄食正常（评分 70-85）\n- `feeding_slightly_low` - 摄食略低（评分 60-70）\n- `feeding_appetite_decline` - **食欲下降**（评分 40-60）\n- `feeding_severe_appetite_loss` - 严重食欲不振（评分 20-40）\n- `feeding_total_refusal` - 完全拒食（评分 < 20，聚集 < 10% 且无摄食动作）\n- `feeding_signal_unreliable` - 信号不可靠（视频不在投喂窗口 / 投喂未发生 / 浑浊度过高）\n\n## 4 级告警策略递进\n\n- Level 1（slightly_low）：仅入库或用户 APP 轻提醒\"摄食略低，请观察\"\n- Level 2（appetite_decline）：用户 APP 重要告警，建议**检查水温、溶氧、pH、氨氮、近期是否新增鱼/换水/换饲料**\n- Level 3（severe_appetite_loss）：紧急告警，建议**隔离观察精神萎靡个体 + 检查体表症状 + 暂停下一次投喂**，并提示联系**当地观赏鱼兽医**\n- Level 4（total_refusal / 连续 ≥ 3 餐 ≥ Level 2 / 同缸多条鱼同时拒食）：最高紧急告警 + 强烈建议**立即全面检查（水质 + 体表 + 游姿 + 呼吸）+ 联系专业人员**\n\n## 单日告警上限\n\n- Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权的下次投喂量自动调整范围内执行）\n- 评分、聚集比例、剩余饲料量等指标必须基于真实视频帧统计；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种摄食习性差异极大（金鱼 / 锦鲤水面摄食、鼠鱼/异型底层摄食、神仙鱼立体抢食、夜行鱼日间不进食）→ 必须按**鱼种基线**判定；**禁止使用通用阈值盲判**\n- 必须考虑\"生理性低食欲\"上下文：水温骤变、繁殖期、灯光开启/关闭过渡期、饲料品牌切换 → 评分降低属可解释，避免直接归因于疾病\n- 视频不在投喂窗口、未检测到投喂动作、水浑浊度过高时，必须返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸/养殖池 ID\n- `species` - 鱼种\n- `feeding_time` - 投喂时间戳\n- `feeding_amount_g` - 本次投喂量（克，可选）\n- `feeding_activity_score` - 0-100 摄食活跃度评分\n- `gathering_ratio` / `attack_intensity_score` / `residual_feed_ratio` - 关键子指标\n- `composite_scene` - 综合判定\n- `alert_level` - 告警等级\n- `recommended_actions` - 建议动作（观察 / 检查水质 / 暂停下次投喂 / 联系兽医，**不含药物**）\n- `next_feeding_suggestion` - 下次投喂量建议（基于剩余饲料比例，仅建议）\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: prod\n\nFile v1.0.10:skill-card.md\n\n## Description:\n\nThrough built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding, uses AI object detection and motion analysis to estimate fish gathering, feeding intensity, remaining feed, and a 0-100 feeding activity score.\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, aquarium operators, aquaculture teams, and developers use this skill to analyze post-feeding aquarium or feeder-camera media, generate structured feeding activity reports, and review cloud-stored report history. The skill supports appetite-decline alerts and next-feeding suggestions, but its outputs should be reviewed before operational action.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill sends aquarium media and report-history queries to cloud services and stores account-related tokens or user identity data locally.\n\nMitigation: Install only after confirming the service account or open-id associated with reports, how local data and cloud reports can be deleted, and whether cloud processing is acceptable for the deployment.\n\nRisk: Feeding analysis can produce misleading appetite or health-related guidance if media quality, feeding-window timing, water clarity, or fish species baseline is unsuitable.\n\nMitigation: Review results before acting, require clear post-feeding media, treat unreliable signals as a reason to re-record, and avoid using the output as a disease diagnosis or medication plan.\n\nRisk: The artifact references possible feeder or companion-service actions that could affect animal care if enabled without approval.\n\nMitigation: Confirm that any feeder adjustment or related device action is disabled unless explicitly approved by the user or site operator.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-fish-feeding-activity-analysis)\n- [API interface documentation](references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, guidance]\n\n**Output Format:** [Markdown text containing structured JSON report content and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include feeding activity score, composite scene, alert level, recommended actions, next-feeding suggestion, disclaimer, and cloud report export URL.]\n\n## Skill Version(s):\n\n1.0.10 (source: server release metadata; artifact frontmatter reports 1.0.8)\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, 43995 bytes\n\nFiles: references/api_doc.md (6099b), scripts/__init__.py (58b), scripts/config.py (683b), scripts/config.yaml (3b), scripts/skill.py (582b), scripts/smyx_fish_feeding_activity_analysis.py (3755b), skill-card.md (2680b), SKILL.md (17023b), 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 (154b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: \"smyx-fish-feeding-activity-analysis\"\ndescription: \"Through built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。\"\nversion: \"1.0.7\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Fish Feeding Behavior Activity Analysis | 鱼类摄食行为活跃度分析\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类摄食行为活跃度分析** |\n| 🎯 核心目标 | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FEEDING_ACTIVITY_ANALYSIS` |\n\nThrough built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). When the score falls below the threshold, the system outputs an 'appetite decline' alert, which may indicate disease, water quality deterioration, or stress reaction. Application scenarios: smart feeders, home aquariums, aquaculture farms, public aquariums. The system automatically analyzes after each feeding, generates a feeding report, and pushes reminders when abnormal. Skill features: appetite decline is an early signal of fish diseases (e.g. enteritis, parasites). AI-based automatic monitoring of feeding activity helps aquarists detect problems early and reduce losses. This skill can be integrated into smart feeders or aquarium cameras to improve product intelligence.\n\n通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。应用场景：智能喂食器、家庭鱼缸、水产养殖场、水族馆。系统在每次投喂后自动分析，生成摄食报告，异常时推送提醒。技能特点：食欲减退是鱼类疾病（如肠炎、寄生虫）的早期信号。通过 AI 自动监测摄食活跃度，可帮助养鱼者及早发现问题，减少损失。该技能可集成到智能喂食器或鱼缸摄像头中，提升产品智能化水平。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族摄食行为分析 AI。你的任务是分析鱼缸固定摄像头/智能喂食器内置摄像头**投喂后 1 分钟内**的视频（可选续采至 3 分钟用于剩余饲料评估），检测鱼群聚集抢食的数量、摄食强度（游动速度、摄食动作频率、抢食激烈度）以及剩余饲料量，综合计算摄食活跃度评分（0-100）。按 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）作判定，按 4 级告警策略递进（Level 1 入库/轻提醒 → Level 2 重要告警 + 检查水温/溶氧/pH/氨氮 + 近期换鱼/换水/换饲料 → Level 3 紧急告警 + 隔离精神萎靡个体 + 暂停下次投喂 + 联系兽医 → Level 4 完全拒食/连续 ≥ 3 餐异常 + 全面检查（水质+体表+游姿+呼吸）+ 联系专业人员）。鱼种特异性必须按基线判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）。必须考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报。视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时，必须返回 `feeding_signal_unreliable` 并建议重拍，**禁止给出不可靠的食欲下降告警**。不提供任何疾病诊断，仅输出基于视觉的活跃度评估；**禁止输出具体药物名称和剂量**；严禁伪造夸大评分，严禁越权代用户启停智能喂食器/换水/投药等设备（仅可建议或在用户明确授权范围内调整下次投喂量）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头**投喂后 1 分钟内**（关键采样窗口）视频，识别 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）→ **四组指标**：鱼群聚集 4 项（聚集数 / 基线总数 / 聚集比例 / 响应时长）+ 摄食强度 5 项（平均游动速度 / 摄食动作频率 / 抢食激烈度 / 水面摄食事件 / 中底层摄食事件）+ 剩余饲料 3 项（60s 水面残留 / 180s 缸底残留 / 剩余饲料比例）+ 综合评分 1 项（0-100）→ **4 档异常等级**（excellent → slightly_low → appetite_decline → severe/total）→ **4 级告警策略递进**（入库/轻提醒 → 重要告警 + 水质 + 饲料 + 应激排查 → 紧急告警 + 隔离 + 暂停投喂 + 联系兽医 → 最高紧急告警 + 全面检查 + 专业介入）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 2 / Level 4 不设上限）→ **每餐摄食报告**（按 tank_id + 投喂时间戳输出，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 投喂动作自动检测（饲料抛入水面识别）/ 智能喂食器投喂事件联动 |\n| 2 | 鱼群目标检测与跟踪（多鱼 ReID） |\n| 3 | 聚集数与基线比对 |\n| 4 | 游动速度量化（像素/秒 |\n| 5 | 可校准为体长/秒） |\n| 6 | 摄食动作频率识别（张嘴啄食 / 转身咬颗粒） |\n| 7 | 抢食激烈度评分 |\n| 8 | 水面/中层/底层摄食事件分层统计 |\n| 9 | 剩余饲料颗粒计数（60s 水面 + 180s 缸底） |\n| 10 | 综合评分加权融合 |\n| 11 | 鱼种自适应基线（水面型 / 底层型 / 立体型 / 夜行型） |\n| 12 | 生理性低食欲上下文识别 |\n| 13 | 用户 APP 推送 |\n| 14 | 4 级告警递进 |\n| 15 | 单日告警上限 |\n| 16 | 每餐摄食报告（按 tank_id + 投喂时间戳输出） |\n| 17 | 下次投喂量建议（基于剩余饲料比例 |\n| 18 | 仅建议） |\n| 19 | 连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供智能喂食器/鱼缸投喂后 1 分钟内视频 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_feeding_activity_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_feeding_activity_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 | 📥 准备智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行鱼类摄食行为活跃度分析 | 调用 `-m scripts.smyx_fish_feeding_activity_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络智能喂食器/鱼缸固定摄像头投喂后 1 分钟内视频 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_feeding_activity_analysis.py`](scripts/smyx_fish_feeding_activity_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；摄像头需完整覆盖投喂区域；**核心采样窗口：投喂后 1 分钟内**；帧率 ≥ 15 FPS |\n| 🔎 使用提醒 | **4 级告警策略递进**（slightly_low → appetite_decline → severe_appetite_loss → total_refusal/Level 4），连续 ≥ 3 餐异常进入 Level 4 |\n| 🔎 使用提醒 | 单日告警上限：Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限（紧急安全优先） |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **禁止**对鱼做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染 / 应激综合征\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权范围内调整下次投喂量） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大评分、聚集比例、剩余饲料量等指标；所有数据必须基于真实视频帧统计 |\n| 🔎 使用提醒 | **必须**按**鱼种基线**判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）；**禁止使用通用阈值盲判** |\n| 📚 文档读取 | **必须**考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报 |\n| 🔎 使用提醒 | **必须**在视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n| 📜 报告输出 | **必须**：每餐摄食报告**按 tank_id + 投喂时间戳输出**，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史摄食记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地投喂后视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --input /path/to/feeding.mp4\n\n# 分析网络投喂后视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --url https://example.com/feeding.mp4\n\n# 显示历史摄食活跃度记录清单（自动触发关键词：查看鱼摄食历史报告、鱼缸摄食活跃度日志清单等）\npython -m scripts.smyx_fish_feeding_activity_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-feeding-activity-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1785382767548\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` - 获取摄食活跃度结果（0-100 评分 + 食欲下降提示 + 剩余饲料评估）\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_FEEDING_ACTIVITY_ANALYSIS` - 鱼类摄食行为活跃度分析\n\n## 输入约束\n\n- 摄像头：智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头，能完整覆盖投喂区域\n- 分辨率 ≥ 720p；**帧率 ≥ 15 FPS**（鱼群抢食动作快，建议 ≥ 20 FPS）\n- 光照：建议鱼缸/养殖池照明开启 + 无强反光；水质清澈\n- **核心采样窗口**：**投喂后 1 分钟内**（关键约束），可选续采至 3 分钟用于剩余饲料评估\n- 投喂触发：智能喂食器投喂动作触发 / 用户手动标记 / 视频自动检测饲料抛入水面\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID（每个容器独立鱼种 + 鱼群数量基线）\n- 用户必须授权部署；公共水族馆/养殖场需公示告知\n\n## 关键观测信号\n\n### 鱼群聚集信号\n- `fish_gathering_count` - 投喂区域内聚集鱼数（去重 ReID 跟踪）\n- `total_fish_count_baseline` - 该容器注册总鱼数（基线，用户配置）\n- `gathering_ratio` - 聚集比例 = gathering / baseline\n- `gathering_response_latency_sec` - 从投喂到第一条鱼到达投喂区的响应时长（秒）\n\n### 摄食强度信号\n- `avg_swim_speed_pixel_per_sec` - 平均游动速度（像素/秒，校准后可换算体长/秒）\n- `feeding_action_freq_per_min` - 摄食动作频率（次/分钟，张嘴啄食 / 转身咬颗粒）\n- `attack_intensity_score` - 抢食激烈度评分（0-100，反映群体活力）\n- `surface_feeding_event_count` - 水面摄食事件次数（浮性饲料）\n- `mid_bottom_feeding_event_count` - 中层/底层摄食事件次数（沉性饲料）\n\n### 剩余饲料信号\n- `floating_pellet_count_after_60s` - 投喂 60 秒后水面残留颗粒数\n- `sinking_pellet_count_after_180s` - 投喂 180 秒后缸底/池底残留颗粒数\n- `residual_feed_ratio` - 剩余饲料比例（估算，0-1）\n\n### 综合评分\n- `feeding_activity_score` - 摄食活跃度评分（0-100，加权融合上述指标）\n\n## 综合判定\n\n- `feeding_excellent` - 摄食优秀（评分 ≥ 85）\n- `feeding_normal` - 摄食正常（评分 70-85）\n- `feeding_slightly_low` - 摄食略低（评分 60-70）\n- `feeding_appetite_decline` - **食欲下降**（评分 40-60）\n- `feeding_severe_appetite_loss` - 严重食欲不振（评分 20-40）\n- `feeding_total_refusal` - 完全拒食（评分 < 20，聚集 < 10% 且无摄食动作）\n- `feeding_signal_unreliable` - 信号不可靠（视频不在投喂窗口 / 投喂未发生 / 浑浊度过高）\n\n## 4 级告警策略递进\n\n- Level 1（slightly_low）：仅入库或用户 APP 轻提醒\"摄食略低，请观察\"\n- Level 2（appetite_decline）：用户 APP 重要告警，建议**检查水温、溶氧、pH、氨氮、近期是否新增鱼/换水/换饲料**\n- Level 3（severe_appetite_loss）：紧急告警，建议**隔离观察精神萎靡个体 + 检查体表症状 + 暂停下一次投喂**，并提示联系**当地观赏鱼兽医**\n- Level 4（total_refusal / 连续 ≥ 3 餐 ≥ Level 2 / 同缸多条鱼同时拒食）：最高紧急告警 + 强烈建议**立即全面检查（水质 + 体表 + 游姿 + 呼吸）+ 联系专业人员**\n\n## 单日告警上限\n\n- Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权的下次投喂量自动调整范围内执行）\n- 评分、聚集比例、剩余饲料量等指标必须基于真实视频帧统计；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种摄食习性差异极大（金鱼 / 锦鲤水面摄食、鼠鱼/异型底层摄食、神仙鱼立体抢食、夜行鱼日间不进食）→ 必须按**鱼种基线**判定；**禁止使用通用阈值盲判**\n- 必须考虑\"生理性低食欲\"上下文：水温骤变、繁殖期、灯光开启/关闭过渡期、饲料品牌切换 → 评分降低属可解释，避免直接归因于疾病\n- 视频不在投喂窗口、未检测到投喂动作、水浑浊度过高时，必须返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸/养殖池 ID\n- `species` - 鱼种\n- `feeding_time` - 投喂时间戳\n- `feeding_amount_g` - 本次投喂量（克，可选）\n- `feeding_activity_score` - 0-100 摄食活跃度评分\n- `gathering_ratio` / `attack_intensity_score` / `residual_feed_ratio` - 关键子指标\n- `composite_scene` - 综合判定\n- `alert_level` - 告警等级\n- `recommended_actions` - 建议动作（观察 / 检查水质 / 暂停下次投喂 / 联系兽医，**不含药物**）\n- `next_feeding_suggestion` - 下次投喂量建议（基于剩余饲料比例，仅建议）\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: prod\n\nFile v1.0.9:skill-card.md\n\n## Description: <br>\nAnalyzes fish feeding videos from smart feeder or aquarium cameras to estimate gathering behavior, feeding intensity, remaining feed, and a 0-100 feeding activity score. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[18072937735](https://clawhub.ai/user/18072937735) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers, aquarium operators, aquaculture teams, and smart feeder integrators can use this skill to submit post-feeding media for fish feeding activity reports, appetite-decline alerts, and history lookups. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill may submit media URLs or uploaded media to a cloud-backed analyzer. <br>\nMitigation: Use it only with aquarium, farm, or facility videos that are approved for external processing. <br>\nRisk: The skill silently creates or reuses a backend identity and stores authentication tokens locally for report access. <br>\nMitigation: Review workspace data handling and token storage policies before deployment, especially in shared or regulated environments. <br>\nRisk: Feeding scores and alerts can be misleading when video quality, timing, water clarity, or species baseline is unsuitable. <br>\nMitigation: Require clear post-feeding footage, species-specific baselines, and human review before acting on abnormal feeding alerts. <br>\nRisk: Fish health recommendations could be mistaken for diagnosis or treatment advice. <br>\nMitigation: Keep outputs limited to visual activity assessment and non-drug recommendations, and refer serious or repeated abnormalities to qualified fish health professionals. <br>\n\n\n## Reference(s): <br>\n- [Fish feeding activity API documentation](references/api_doc.md) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Analysis, API Calls, Markdown, JSON, Files, Shell commands, Guidance] <br>\n**Output Format:** [Markdown or JSON reports with feeding activity scores, key metrics, recommendations, and report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Can write the report to a user-specified output file and can list cloud-backed historical reports.] <br>\n\n## Skill Version(s): <br>\n1.0.9 (source: server release metadata; artifact frontmatter says 1.0.7) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.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, 43935 bytes\n\nFiles: references/api_doc.md (6099b), scripts/__init__.py (58b), scripts/config.py (683b), scripts/config.yaml (3b), scripts/skill.py (582b), scripts/smyx_fish_feeding_activity_analysis.py (3755b), skill-card.md (2577b), SKILL.md (17023b), 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 (154b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"smyx-fish-feeding-activity-analysis\"\ndescription: \"Through built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。\"\nversion: \"1.0.5\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Fish Feeding Behavior Activity Analysis | 鱼类摄食行为活跃度分析\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类摄食行为活跃度分析** |\n| 🎯 核心目标 | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FEEDING_ACTIVITY_ANALYSIS` |\n\nThrough built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). When the score falls below the threshold, the system outputs an 'appetite decline' alert, which may indicate disease, water quality deterioration, or stress reaction. Application scenarios: smart feeders, home aquariums, aquaculture farms, public aquariums. The system automatically analyzes after each feeding, generates a feeding report, and pushes reminders when abnormal. Skill features: appetite decline is an early signal of fish diseases (e.g. enteritis, parasites). AI-based automatic monitoring of feeding activity helps aquarists detect problems early and reduce losses. This skill can be integrated into smart feeders or aquarium cameras to improve product intelligence.\n\n通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。应用场景：智能喂食器、家庭鱼缸、水产养殖场、水族馆。系统在每次投喂后自动分析，生成摄食报告，异常时推送提醒。技能特点：食欲减退是鱼类疾病（如肠炎、寄生虫）的早期信号。通过 AI 自动监测摄食活跃度，可帮助养鱼者及早发现问题，减少损失。该技能可集成到智能喂食器或鱼缸摄像头中，提升产品智能化水平。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族摄食行为分析 AI。你的任务是分析鱼缸固定摄像头/智能喂食器内置摄像头**投喂后 1 分钟内**的视频（可选续采至 3 分钟用于剩余饲料评估），检测鱼群聚集抢食的数量、摄食强度（游动速度、摄食动作频率、抢食激烈度）以及剩余饲料量，综合计算摄食活跃度评分（0-100）。按 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）作判定，按 4 级告警策略递进（Level 1 入库/轻提醒 → Level 2 重要告警 + 检查水温/溶氧/pH/氨氮 + 近期换鱼/换水/换饲料 → Level 3 紧急告警 + 隔离精神萎靡个体 + 暂停下次投喂 + 联系兽医 → Level 4 完全拒食/连续 ≥ 3 餐异常 + 全面检查（水质+体表+游姿+呼吸）+ 联系专业人员）。鱼种特异性必须按基线判定（水面金鱼/锦鲤 vs 底层鼠鱼/异型 vs 立体抢食神仙鱼 vs 日间不进食的夜行鱼）。必须考虑生理性低食欲的上下文（水温骤变、繁殖期、灯光过渡期、饲料品牌切换），避免误报。视频不在投喂窗口/未检测到投喂动作/水浑浊度过高时，必须返回 `feeding_signal_unreliable` 并建议重拍，**禁止给出不可靠的食欲下降告警**。不提供任何疾病诊断，仅输出基于视觉的活跃度评估；**禁止输出具体药物名称和剂量**；严禁伪造夸大评分，严禁越权代用户启停智能喂食器/换水/投药等设备（仅可建议或在用户明确授权范围内调整下次投喂量）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头**投喂后 1 分钟内**（关键采样窗口）视频，识别 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）→ **四组指标**：鱼群聚集 4 项（聚集数 / 基线总数 / 聚集比例 / 响应时长）+ 摄食强度 5 项（平均游动速度 / 摄食动作频率 / 抢食激烈度 / 水面摄食事件 / 中底层摄食事件）+ 剩余饲料 3 项（60s 水面残留 / 180s 缸底残留 / 剩余饲料比例）+ 综合评分 1 项（0-100）→ **4 档异常等级**（excellent → slightly_low → appetite_decline → severe/total）→ **4 级告警策略递进**（入库/轻提醒 → 重要告警 + 水质 + 饲料 + 应激排查 → 紧急告警 + 隔离 + 暂停投喂 + 联系兽医 → 最高紧急告警 + 全面检查 + 专业介入）→ 单日告警上限（Level 1 不限 / Level 2 × 4 / Level 3 × 2 / Level 4 不设上限）→ **每餐摄食报告**（按 tank_id + 投喂时间戳输出，含活跃度评分 + 关键子指标 + 下次投喂量建议 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 投喂动作自动检测（饲料抛入水面识别）/ 智能喂食器投喂事件联动 |\n| 2 | 鱼群目标检测与跟踪（多鱼 ReID） |\n| 3 | 聚集数与基线比对 |\n| 4 | 游动速度量化（像素/秒 |\n| 5 | 可校准为体长/秒） |\n| 6 | 摄食动作频率识别（张嘴啄食 / 转身咬颗粒） |\n| 7 | 抢食激烈度评分 |\n| 8 | 水面/中层/底层摄食事件分层统计 |\n| 9 | 剩余饲料颗粒计数（60s 水面 + 180s 缸底） |\n| 10 | 综合评分加权融合 |\n| 11 | 鱼种自适应基线（水面型 / 底层型 / 立体型 / 夜行型） |\n| 12 | 生理性低食欲上下文识别 |\n| 13 | 用户 APP 推送 |\n| 14 | 4 级告警递进 |\n| 15 | 单日告警上限 |\n| 16 | 每餐摄食报告（按 tank_id + 投喂时间戳输出） |\n| 17 | 下次投喂量建议（基于剩余饲料比例 |\n| 18 | 仅建议） |\n| 19 | 连续 ≥ 3 餐 Level 2 → 强烈建议联系**当地观赏鱼兽医或养殖场技术员** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供智能喂食器/鱼缸投喂后 1 分钟内视频 URL 或文件需要分析时，默认触发本技能进行鱼类摄食行为活跃度分析 |\n| 🔎 明确分析意图 | 当用户明确提及鱼摄食活跃度、鱼食欲下降、鱼不吃食、鱼抢食、智能喂食器、剩余饲料、鱼摄食评分等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼摄食历史报告、鱼缸摄食活跃度日志清单、食欲下降事件清单、查询历史鱼摄食记录、显示所有鱼缸摄食报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本...","readmeExcerpt":"Skill: Fish Feeding Behavior Activity Analysis | 鱼类摄食行为活跃度分析 Owner: 18072937735 Summary: Through built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and compu","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.smyx_fish_feeding_activity_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地投喂后视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --input /path/to/feeding.mp4\n\n# 分析网络投喂后视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --url https://example.com/feeding.mp4\n\n# 显示历史摄食活跃度记录清单（自动触发关键词：查看鱼摄食历史报告、鱼缸摄食活跃度日志清单等）\npython -m scripts.smyx_fish_feeding_activity_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --output result.json"},{"language":"bash","snippet":"python -m scripts.smyx_fish_feeding_activity_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地投喂后视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --input /path/to/feeding.mp4\n\n# 分析网络投喂后视频/实时流（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_feeding_activity_analysis --url https://example.com/feeding.mp4\n\n# 显示历史摄食活跃度记录清单（自动触发关键词：查看鱼摄食历史报告、鱼缸摄食活跃度日志清单等）\npython -m scripts.smyx_fish_feeding_activity_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_feeding_activity_analysis --input fe.mp4 --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"smyx-fish-feeding-activity-analysis\"\ndescription: \"Through built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。\"\nversion: \"1.0.13\"\nlicense: \"MIT-0\"\n---\n\n# 🍽️ Fish Feeding Behavior Activity Analysis | 鱼类摄食行为活跃度分析\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼类摄食行为活跃度分析** |\n| 🎯 核心目标 | 通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FEEDING_ACTIVITY_ANALYSIS` |\n\nThrough built-in cameras of smart feeders or fixed cameras on aquariums, the system captures fish feeding videos after feeding. Using AI object detection and motion analysis, it identifies the number of fish gathering for food, feeding intensity (fish swimming speed, feeding action frequency), and remaining feed amount, and computes a comprehensive feeding activity score (0-100). When the score falls below the threshold, the system outputs an 'appetite decline' alert, which may indicate disease, water quality deterioration, or stress reaction. Application scenarios: smart feeders, home aquariums, aquaculture farms, public aquariums. The system automatically analyzes after each feeding, generates a feeding report, and pushes reminders when abnormal. Skill features: appetite decline is an early signal of fish diseases (e.g. enteritis, parasites). AI-based automatic monitoring of feeding activity helps aquarists detect problems early and reduce losses. This skill can be integrated into smart feeders or aquarium cameras to improve product intelligence.\n\n通过智能喂食器内置摄像头或鱼缸固定摄像头，在投喂后拍摄鱼群摄食视频，利用 AI 目标检测和运动分析技术，识别鱼群聚集抢食的数量、摄食强度（鱼只游动速度、摄食动作频率）以及剩余饲料量，综合计算摄食活跃度评分（0-100 分）。当活跃度评分低于阈值时，输出'食欲下降'提示，可能预示疾病、水质恶化或应激反应。应用场景：智能喂食器、家庭鱼缸、水产养殖场、水族馆。系统在每次投喂后自动分析，生成摄食报告，异常时推送提醒。技能特点：食欲减退是鱼类疾病（如肠炎、寄生虫）的早期信号。通过 AI 自动监测摄食活跃度，可帮助养鱼者及早发现问题，减少损失。该技能可集成到智能喂食器或鱼缸摄像头中，提升产品智能化水平。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族摄食行为分析 AI。你的任务是分析鱼缸固定摄像头/智能喂食器内置摄像头**投喂后 1 分钟内**的视频（可选续采至 3 分钟用于剩余饲料评估），检测鱼群聚集抢食的数量、摄食强度（游动速度、摄食动作频率、抢食激烈度）以及剩余饲料量，综合计算摄食活跃度评分（0-100）。按 7 类综合场景（feeding_excellent / normal / slightly_low / appetite_decline / severe_appetite_loss / total_refusal / signal_unreliable）作判定，按 4 级告警策略递进（Level 1 入库/轻提醒 → Level 2 重要告警 + 检查水温/溶氧/pH/氨氮 + 近期换鱼/换水/换饲料 → Level 3 紧急告警 + 隔离精神萎靡个体 + 暂停下次投喂 + 联系兽医 → Level 4 完全拒食/连续 ≥ 3 餐异常 + 全面检查（水质+体表+游姿+呼吸）+ 联系专业人员）。鱼种特异性必须按基线判"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-fish-feeding-activity-analysis\",\n  \"version\": \"1.0.16\",\n  \"publishedAt\": 1790531247969\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` - 获取摄食活跃度结果（0-100 评分 + 食欲下降提示 + 剩余饲料评估）\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_FEEDING_ACTIVITY_ANALYSIS` - 鱼类摄食行为活跃度分析\n\n## 输入约束\n\n- 摄像头：智能喂食器内置摄像头 / 鱼缸固定摄像头 / 养殖池上方摄像头，能完整覆盖投喂区域\n- 分辨率 ≥ 720p；**帧率 ≥ 15 FPS**（鱼群抢食动作快，建议 ≥ 20 FPS）\n- 光照：建议鱼缸/养殖池照明开启 + 无强反光；水质清澈\n- **核心采样窗口**：**投喂后 1 分钟内**（关键约束），可选续采至 3 分钟用于剩余饲料评估\n- 投喂触发：智能喂食器投喂动作触发 / 用户手动标记 / 视频自动检测饲料抛入水面\n- 多鱼缸/池场景按摄像头 ID 绑定到注册容器 ID（每个容器独立鱼种 + 鱼群数量基线）\n- 用户必须授权部署；公共水族馆/养殖场需公示告知\n\n## 关键观测信号\n\n### 鱼群聚集信号\n- `fish_gathering_count` - 投喂区域内聚集鱼数（去重 ReID 跟踪）\n- `total_fish_count_baseline` - 该容器注册总鱼数（基线，用户配置）\n- `gathering_ratio` - 聚集比例 = gathering / baseline\n- `gathering_response_latency_sec` - 从投喂到第一条鱼到达投喂区的响应时长（秒）\n\n### 摄食强度信号\n- `avg_swim_speed_pixel_per_sec` - 平均游动速度（像素/秒，校准后可换算体长/秒）\n- `feeding_action_freq_per_min` - 摄食动作频率（次/分钟，张嘴啄食 / 转身咬颗粒）\n- `attack_intensity_score` - 抢食激烈度评分（0-100，反映群体活力）\n- `surface_feeding_event_count` - 水面摄食事件次数（浮性饲料）\n- `mid_bottom_feeding_event_count` - 中层/底层摄食事件次数（沉性饲料）\n\n### 剩余饲料信号\n- `floating_pellet_count_after_60s` - 投喂 60 秒后水面残留颗粒数\n- `sinking_pellet_count_after_180s` - 投喂 180 秒后缸底/池底残留颗粒数\n- `residual_feed_ratio` - 剩余饲料比例（估算，0-1）\n\n### 综合评分\n- `feeding_activity_score` - 摄食活跃度评分（0-100，加权融合上述指标）\n\n## 综合判定\n\n- `feeding_excellent` - 摄食优秀（评分 ≥ 85）\n- `feeding_normal` - 摄食正常（评分 70-85）\n- `feeding_slightly_low` - 摄食略低（评分 60-70）\n- `feeding_appetite_decline` - **食欲下降**（评分 40-60）\n- `feeding_severe_appetite_loss` - 严重食欲不振（评分 20-40）\n- `feeding_total_refusal` - 完全拒食（评分 < 20，聚集 < 10% 且无摄食动作）\n- `feeding_signal_unreliable` - 信号不可靠（视频不在投喂窗口 / 投喂未发生 / 浑浊度过高）\n\n## 4 级告警策略递进\n\n- Level 1（slightly_low）：仅入库或用户 APP 轻提醒\"摄食略低，请观察\"\n- Level 2（appetite_decline）：用户 APP 重要告警，建议**检查水温、溶氧、pH、氨氮、近期是否新增鱼/换水/换饲料**\n- Level 3（severe_appetite_loss）：紧急告警，建议**隔离观察精神萎靡个体 + 检查体表症状 + 暂停下一次投喂**，并提示联系**当地观赏鱼兽医**\n- Level 4（total_refusal / 连续 ≥ 3 餐 ≥ Level 2 / 同缸多条鱼同时拒食）：最高紧急告警 + 强烈建议**立即全面检查（水质 + 体表 + 游姿 + 呼吸）+ 联系专业人员**\n\n## 单日告警上限\n\n- Level 1 不限 / Level 2 × 4（按投喂次数）/ Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"肠炎 / 寄生虫 / 鳃病 / 细菌感染\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**长期存储完整鱼缸/养殖池视频（≤ 7 天，仅入库异常摄食事件片段；公共养殖场按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停智能喂食器 / 投药 / 换水 / 加热 / 灯光；任何水族设备控制变更必须由用户确认（仅可建议或在用户明确授权的下次投喂量自动调整范围内执行）\n- 评分、聚集比例、剩余饲料量等指标必须基于真实视频帧统计；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种摄食习性差异极大（金鱼 / 锦鲤水面摄食、鼠鱼/异型底层摄食、神仙鱼立体抢食、夜行鱼日间不进食）→ 必须按**鱼种基线**判定；**禁止使用通用阈值盲判**\n- 必须考虑\"生理性低食欲\"上下文：水温骤变、繁殖期、灯光开启/关闭过渡期、饲料品牌切换 → 评分降低属可解释，避免直接归因于疾病\n- 视频不在投喂窗口、未检测到投喂动作、水浑浊度过高时，必须返回 `feeding_signal_unreliable`，**禁止给出不可靠的食欲下降告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸/养殖池 ID\n- `species` - 鱼种\n- `feedi"},{"path":"skills/smyx_analysis/references/api_doc.md","content":"# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |"},{"path":"scripts/config.yaml","content":"{}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1202,"uniquenessScore":42,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T21:18:38.802Z","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:18:38.802Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T08:06:52.164Z","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"}]}}}