{"id":"674f6e4b-7204-4692-89d2-02df4102a338","entityType":"agent","slug":"clawhub-smyx-sunjinhui-smyx-fish-color-brightness-assessment-an","name":"Ornamental Fish Color Brightness Assessment | 观赏鱼体色鲜艳度评估","canonicalUrl":"https://www.xpersona.co/agent/clawhub-smyx-sunjinhui-smyx-fish-color-brightness-assessment-an","canonicalPath":"/agent/clawhub-smyx-sunjinhui-smyx-fish-color-brightness-assessment-an","generatedAt":"2026-10-10T11:01:59.318Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T05:29:25.803Z","emptyReason":null},"description":"Through fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy. | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.7K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-fish-color-brightness-assessment-analysis","sourceUrl":"https://clawhub.ai/smyx-sunjinhui/smyx-fish-color-brightness-assessment-analysis","homepage":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-color-brightness-assessment-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/smyx-sunjinhui/smyx-fish-color-brightness-assessment-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-color-brightness-assessment-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":64,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Ornamental Fish Color Brightness Assessment | 观赏鱼体色鲜艳度评估 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-10T05:29:25.803Z","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-10T05:29:25.803Z","emptyReason":null},"stars":null,"forks":null,"downloads":1653,"packageName":null,"latestVersion":"1.0.12","tractionLabel":"1.7K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T05:29:25.802Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T05:29:25.803Z","lastCrawledAt":"2026-10-10T05:29:25.802Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T05:29:25.802Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.12","createdAt":"2026-10-03T12:30:26.329Z","changelog":"v1.0.12 Changelog - Documentation updated: SKILL.md revised for accuracy, structure, and clarity. - Redundant file removed: skill-card.md deleted. - No functional or code changes; update is documentation-only.","fileCount":31,"zipByteSize":45103},{"version":"1.0.11","createdAt":"2026-09-26T21:34:25.565Z","changelog":"smxy-fish-color-brightness-assessment-analysis v1.0.11 - Updated documentation in SKILL.md, including overviews, capability descriptions, and instructions. - Modified internal configuration (skills/smyx_common/scripts/config.yaml). - Removed redundant documentation file (skill-card.md).","fileCount":31,"zipByteSize":45232},{"version":"1.0.10","createdAt":"2026-09-16T01:45:37.847Z","changelog":"- Updated SKILL.md content, including version bump from 1.0.12 to 1.0.14. - Removed the file skill-card.md. - No changes to technical capabilities or features described in the skill. - Documentation and metadata were refreshed; no functional or usage impacts for end users.","fileCount":31,"zipByteSize":45536},{"version":"1.0.9","createdAt":"2026-08-25T08:58:33.407Z","changelog":"- Updated skill version to 1.0.12. - Removed the file \"skill-card.md\". - Revised and updated documentation in SKILL.md with minor edits. - No functional or feature changes.","fileCount":31,"zipByteSize":45378},{"version":"1.0.8","createdAt":"2026-08-19T12:30:29.574Z","changelog":"- Internal resource/metadata file `skill-card.md` was removed. - Minor configuration update in `skills/smyx_common/scripts/config.yaml`. - No user-facing feature changes; skill behavior remains the same.","fileCount":31,"zipByteSize":45564},{"version":"1.0.7","createdAt":"2026-08-11T06:42:44.959Z","changelog":"- Updated SKILL.md version to 1.0.11 with minor documentation or metadata changes. - Removed file: skill-card.md. - No changes to code or core functionality; this update is documentation/metadata only.","fileCount":31,"zipByteSize":45499},{"version":"1.0.6","createdAt":"2026-08-07T10:09:43.017Z","changelog":"- Removed the file skill-card.md from the skill package. - No changes to feature set or user-facing documentation. - Version and core capabilities remain unchanged.","fileCount":31,"zipByteSize":45481},{"version":"1.0.5","createdAt":"2026-07-30T00:27:28.188Z","changelog":"- Updated skill version from 1.0.7 to 1.0.9. - SKILL.md revised with minor documentation updates. - Removed the skill-card.md file. - No changes to code or core functionality; update is documentation-focused.","fileCount":31,"zipByteSize":45418}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-fish-color-brightness-assessment-analysis","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-fish-color-brightness-assessment-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/smyx-sunjinhui/smyx-fish-color-brightness-assessment-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-smyx-sunjinhui-smyx-fish-color-brightness-assessment-an/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-color-brightness-assessment-an/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-color-brightness-assessment-an/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-color-brightness-assessment-an/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-color-brightness-assessment-an/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-color-brightness-assessment-an/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-10T11:01:59.315Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-color-brightness-assessment-an/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-color-brightness-assessment-an/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-color-brightness-assessment-an/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-color-brightness-assessment-an/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-10T05:29:25.803Z","emptyReason":null},"readme":"Skill: Ornamental Fish Color Brightness Assessment | 观赏鱼体色鲜艳度评估\n\nOwner: smyx-sunjinhui\n\nSummary: Through fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy. | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。\n\nTags: latest:1.0.12\n\nVersion history:\n\nv1.0.12 | 2026-10-03T12:30:26.329Z | auto\n\nv1.0.12 Changelog\n\n- Documentation updated: SKILL.md revised for accuracy, structure, and clarity.\n- Redundant file removed: skill-card.md deleted.\n- No functional or code changes; update is documentation-only.\n\nv1.0.11 | 2026-09-26T21:34:25.565Z | auto\n\nsmxy-fish-color-brightness-assessment-analysis v1.0.11\n\n- Updated documentation in SKILL.md, including overviews, capability descriptions, and instructions.\n- Modified internal configuration (skills/smyx_common/scripts/config.yaml).\n- Removed redundant documentation file (skill-card.md).\n\nv1.0.10 | 2026-09-16T01:45:37.847Z | auto\n\n- Updated SKILL.md content, including version bump from 1.0.12 to 1.0.14.\n- Removed the file skill-card.md.\n- No changes to technical capabilities or features described in the skill.\n- Documentation and metadata were refreshed; no functional or usage impacts for end users.\n\nv1.0.9 | 2026-08-25T08:58:33.407Z | auto\n\n- Updated skill version to 1.0.12.\n- Removed the file \"skill-card.md\".\n- Revised and updated documentation in SKILL.md with minor edits.\n- No functional or feature changes.\n\nv1.0.8 | 2026-08-19T12:30:29.574Z | auto\n\n- Internal resource/metadata file `skill-card.md` was removed.\n- Minor configuration update in `skills/smyx_common/scripts/config.yaml`.\n- No user-facing feature changes; skill behavior remains the same.\n\nv1.0.7 | 2026-08-11T06:42:44.959Z | auto\n\n- Updated SKILL.md version to 1.0.11 with minor documentation or metadata changes.\n- Removed file: skill-card.md. \n- No changes to code or core functionality; this update is documentation/metadata only.\n\nv1.0.6 | 2026-08-07T10:09:43.017Z | auto\n\n- Removed the file skill-card.md from the skill package.\n- No changes to feature set or user-facing documentation.\n- Version and core capabilities remain unchanged.\n\nv1.0.5 | 2026-07-30T00:27:28.188Z | auto\n\n- Updated skill version from 1.0.7 to 1.0.9.\n- SKILL.md revised with minor documentation updates.\n- Removed the skill-card.md file.\n- No changes to code or core functionality; update is documentation-focused.\n\nv1.0.4 | 2026-07-15T17:10:50.560Z | auto\n\n- Updated version to 1.0.7 in SKILL.md for clearer version tracking.\n- Improved and clarified documentation in SKILL.md.\n- Removed obsolete skill-card.md to maintain project cleanliness.\n- Minor adjustments in shared utility script for consistency.\n\nv1.0.3 | 2026-07-05T22:52:23.890Z | auto\n\nsmyx-fish-color-brightness-assessment-analysis 1.0.3\n\n- Internal configuration updated in `skills/smyx_common/scripts/config.py`.\n- Documentation file `skill-card.md` removed.\n\nv1.0.2 | 2026-06-30T03:27:25.261Z | auto\n\nsmyx-fish-color-brightness-assessment-analysis v1.0.2\n\n- Updated internal scripts: modified `skills/smyx_common/scripts/dao.py` and `skills/smyx_common/scripts/util.py`\n- Documentation refined in `SKILL.md`\n- Removed redundant documentation file: `skill-card.md`\n\nv1.0.1 | 2026-06-27T17:13:28.389Z | auto\n\n- Major update: overhauled user identity and report query flows for better automation and privacy.\n- User no longer needs to manually provide or see internal identity info; identity is handled automatically.\n- Cloud-based historical report queries are now enforced—local or memory-based report sourcing is forbidden.\n- Documentation and instructions reorganized and clarified for improved readability (especially Workflow, Capabilities, and Requirements).\n- Outdated/unneeded files removed; scripts cleaned up for streamlined execution.\n- New API/service parameter options documented; error-prone manual steps removed from the standard flow.\n\nv1.0.0 | 2026-05-28T07:09:39.931Z | auto\n\nsmyx-fish-color-brightness-assessment-analysis v1.0.0\n\n- Initial release of the skill for AI-based assessment of ornamental fish color brightness and vibrancy from aquarium images.\n- Supports white balance calibration using in-frame white/gray/ColorChecker reference, fish body region segmentation, and vibrancy scoring (0-100) based on HSV color space, tailored to species and subtype.\n- Generates color vibrancy reports with trends and four-level alert strategy (from positive feedback to urgent veterinary suggestion).\n- Enforces mandatory open-id retrieval protocol for historical report queries; all queries must use the cloud API and never local records.\n- Strict data quality and user/privacy safeguards: unreliable input (e.g., no white reference, low-confidence segmentation) is rejected with specific feedback. No disease/feed/drug recommendations beyond neutral suggestions. \n- Multi-language description and guidance included (English & Chinese).\n\nArchive index:\n\nArchive v1.0.12: 31 files, 45103 bytes\n\nFiles: references/api_doc.md (7488b), scripts/__init__.py (62b), scripts/config.py (691b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_fish_color_brightness_assessment_analysis.py (3820b), skill-card.md (1849b), SKILL.md (19010b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (166b)\n\nFile v1.0.12:SKILL.md\n\n---\nname: \"smyx-fish-color-brightness-assessment-analysis\"\ndescription: \"Through fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy. | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。\"\nversion: \"1.0.17\"\nlicense: \"MIT-0\"\n---\n\n# 🌈 Ornamental Fish Color Brightness Assessment | 观赏鱼体色鲜艳度评估\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **观赏鱼体色鲜艳度评估** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy score (0-100). When the score is below a threshold (e.g. <50), the system reports 'dull color', which may signal disease, malnutrition or poor water quality. Application scenarios: home aquariums, public aquariums, ornamental fish farms. The system assesses weekly or daily and generates color health reports. Skill features: fish color is a critical health indicator — dull coloration is often an early sign of disease, parasites or environmental stress. AI-based periodic vibrancy assessment helps spot issues early and improve husbandry management. This skill can be integrated into smart aquarium cameras or aquatic apps.\n\n通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。应用场景：家庭鱼缸、水族馆、观赏鱼养殖场。系统每周或每日评估，生成体色健康报告。技能特点：鱼体颜色是健康的重要指示器，体色暗淡常为疾病、寄生虫或环境应激的早期表现。通过 AI 定期评估鲜艳度，可及时发现问题，提升养殖管理水平。该技能可集成到智能鱼缸摄像头或水族 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族色彩评估 AI。你的任务是分析观赏鱼体侧高清图像（≥ 1080p，鱼体侧面拍摄，视野内必须有白卡/灰卡/ColorChecker 作白平衡参考），先对图像做**白平衡校正与光照归一化**（基于白参考估算光照色温 K），然后分割鱼体并提取躯干主区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）的 **HSV-S（饱和度）+ HSV-V（亮度）+ HSV-H（色相分布直方图）**，按 **species_subtype（精确到子品系，如锦鲤-大正三色 / 神仙鱼-银河系 / 孔雀鱼-礼服）匹配标准色度基线**（饱和度范围 / 亮度范围 / 调色板 / z-score），计算 **vibrancy_score_0_100（鲜艳度综合评分）**，再结合 7 天 / 30 天评分趋势，按 7 类综合场景判定（color_vibrant_excellent ≥ 85 / color_vibrant_good 70-84 / color_acceptable 50-69 / color_dull_mild 35-49 / color_dull_severe < 35 / color_baseline_unavailable / color_signal_unreliable），并按 4 级提醒策略递进（Level 1 积极反馈 → Level 2 评估增色饲料+光照+水质 → Level 3 紧急检查体表+游姿+水质五项+联系兽医 → Level 4 连续 ≥ 14 天或同缸 ≥ 50% 同时严重暗淡 + 全面排查 + 所有联系人）。**核心硬约束：未做白平衡的评分一律视为不可信** → 必须返回 `color_signal_unreliable`。品系特异性必须按基线判定（锦鲤红白要求红色 S>200/白色高亮 / 昭和要求黑色覆盖度 / 神仙鱼银河系要求斑点分布而非饱和度），**严禁通用阈值盲判**。生理性上下文必须考虑（**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变**），避免误判。白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见时必须返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡。不提供任何疾病诊断，仅输出基于色彩分析的鲜艳度评分；**严禁输出具体药物名称、剂量、给药方案**；**严禁输出具体饲料品牌名称、增色剂品牌**（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"）；严禁伪造夸大 HSV 值与鲜艳度评分；严禁越权代用户启停灯光/加热棒/喂食器/增氧/换水（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼缸固定摄像头 / 智能鱼缸内置摄像头 / 手机侧拍**定期拍摄**（默认每周或每日 1 次，含白参考）高清图像，识别 7 类综合场景（color_vibrant_excellent / good / acceptable / dull_mild / dull_severe / baseline_unavailable / signal_unreliable）→ **五组指标**：白平衡校正 5 项（白参考类型 / 检测置信度 / 估算色温 K / 是否校正 / 光照归一化）+ 鱼体分割 5 项（fish_id / species_subtype / 分割掩膜像素 / 分割置信度 / 分析 ROI）+ HSV 色彩 6 项（S mean/std + V mean/std + H 主色相 + H 直方图）+ 品种基线对比 6 项（基线 S/V 范围 + 标准调色板 + 调色板匹配度 + S/V z-score）+ 鲜艳度评分 3 项（**vibrancy_score_0_100** + 7d 趋势 + 30d 趋势）→ 4 档提醒级别（info / important / urgent / warning）→ **4 级提醒策略递进**（积极反馈 → 评估增色饲料+光照+水质 → 紧急检查体表+水质+联系兽医 → 全面排查+所有联系人）→ 单日提醒上限（Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限）→ **鲜艳度评估报告**（按 tank_id + fish_id + 评估时间戳输出，含 HSV 核心值 + 品系基线对比 + 鲜艳度评分 + 趋势 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 白参考自动检测（白卡 / 灰卡 / ColorChecker） |\n| 2 | 白平衡校正 |\n| 3 | 光照色温估算 |\n| 4 | 光照强度归一化 |\n| 5 | 鱼体语义分割 |\n| 6 | 品系精细识别（精确到子品系） |\n| 7 | ROI 分析区域选择（默认 trunk_middle） |\n| 8 | HSV 色彩空间转换 |\n| 9 | 躯干 HSV-S / HSV-V 统计（均值 / 标准差） |\n| 10 | 色相分布直方图 |\n| 11 | 品系标准色度数据库匹配 |\n| 12 | 调色板相似度（如锦鲤红白配色匹配 / 昭和黑红白三色比例） |\n| 13 | z-score 偏差量化 |\n| 14 | **vibrancy_score_0_100** 综合计算 |\n| 15 | 7d / 30d 评分时间序列趋势 |\n| 16 | 生理性上下文识别（繁殖婚姻色 / 应激色 / 投喂期 / 鱼龄渐变） |\n| 17 | 白参考缺失/分割低置信度门控（返回 unreliable） |\n| 18 | 用户 APP 推送 |\n| 19 | 4 级提醒递进 |\n| 20 | 单日提醒上限 |\n| 21 | 鲜艳度评估报告（按 tank_id + fish_id + 时间戳输出） |\n| 22 | 连续 ≥ 14 天 Level 3 / 同缸 ≥ 50% 同发 → 强烈建议联系**当地观赏鱼兽医或资深玩家** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供鱼缸固定摄像头观赏鱼体侧高清图像或视频 URL/文件需要分析时，默认触发本技能进行观赏鱼体色鲜艳度评估 |\n| 🔎 明确分析意图 | 当用户明确提及鱼体色暗淡、鱼掉色、鱼变白、鱼变黑、锦鲤色斑、鱼鲜艳度、HSV 饱和度、调色板匹配等关键词，并且上传了图像/视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼体色历史报告、鲜艳度评分时间序列、鱼缸色彩评估日志清单、查询历史色彩评估记录、显示所有鱼缸体色报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_color_brightness_assessment_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备含白参考的观赏鱼体侧高清图像输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行观赏鱼体色鲜艳度评估 | 调用 `-m scripts.smyx_fish_color_brightness_assessment_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地鱼缸固定摄像头观赏鱼体侧高清图像或视频文件路径（需含白参考） | 适用于本地文件分析 |\n| `--url` | 网络鱼缸固定摄像头观赏鱼体侧高清图像或视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，观赏鱼体色鲜艳度评估场景默认 `other` | 按需填写 |\n| `--list` | 显示观赏鱼体色鲜艳度评估历史记录清单（含鲜艳度评分时间序列） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_fish_color_brightness_assessment_analysis.py`](scripts/smyx_fish_color_brightness_assessment_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| 📁 格式支持 | 输入要求：支持 jpg/png/mp4/avi/mov，最大 10MB；**视野内必须放置白卡/灰卡/ColorChecker**；鱼体侧面拍摄；分辨率 ≥ 1080p；光照建议 5000-6500K 中性白；鱼体短暂静止 |\n| 🔎 使用提醒 | **核心输出**：`vibrancy_score_0_100` 鲜艳度综合评分（基于品系精确基线对比） |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → warning），偏养殖管理建议定位 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限 |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **🚨 禁止**做\"营养不良 / 黑斑病 / 黑变病 / 寄生虫 / 应激综合征 / 缺乏类胡萝卜素\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体饲料品牌名称、增色剂品牌（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"，禁止推荐 X 牌增色粒） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸视频/图像（≤ 30 天，留鲜艳度时间序列 + 关键评估帧；公共养殖场/水族馆按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大 HSV-S/V 值、鲜艳度评分等指标；所有数据必须基于真实图像计算 |\n| 🔎 使用提醒 | **必须**按 **species_subtype（精确到子品系）** 匹配基线（锦鲤红白 / 大正三色 / 昭和三色 / 神仙鱼银河系 / 孔雀鱼礼服 / 龙鱼红金青）；**禁止使用通用阈值盲判** |\n| 🧑‍⚖️ 结果性质 | **必须**做白平衡校正与光照归一化（基于白参考估算光照色温 K），**未做白平衡的评分一律视为不可信** → 返回 `color_signal_unreliable` |\n| 📚 文档读取 | **必须**考虑生理性上下文（**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变**），避免误判 |\n| 🧑‍⚖️ 结果性质 | **必须**在白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见时返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡 |\n| 🔎 使用提醒 | **必须**：连续 ≥ 14 天 Level 3 / 同缸 ≥ 50% 个体同时严重暗淡 → 强烈建议联系**当地观赏鱼兽医或资深玩家** |\n| 📜 报告输出 | **必须**：鲜艳度评估报告**按 tank_id + fish_id + 评估时间戳输出**，含 HSV 核心值 + 品系基线对比 + 鲜艳度评分 + 趋势 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史评估记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地含白参考的观赏鱼体侧高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input /path/to/koi.jpg\n\n# 分析网络含白参考的观赏鱼体侧高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --url https://example.com/koi.jpg\n\n# 显示历史鲜艳度评估记录清单（自动触发关键词：查看鱼体色历史报告、鲜艳度评分时间序列等）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --output result.json\n```\n\nFile v1.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-color-brightness-assessment-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1791030626329\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` - 获取评估结果（HSV-S/V 均值 + 鲜艳度评分 + 品种基线对比）\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_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` - 观赏鱼体色鲜艳度评估\n\n## 输入约束\n\n- 摄像头：鱼缸固定摄像头 / 智能鱼缸内置摄像头 / 手机拍摄（侧面，垂直于鱼体侧面方向）\n- 分辨率 ≥ 1080p（颜色饱和度评估需高色彩精度）\n- **关键硬件要求**：**视野内必须放置已知白色参考物（白卡 / 灰卡 / 标准 ColorChecker）**，用于做**白平衡校正**与**光照归一化**（核心，否则环境灯光偏色会让评分失真）\n- 拍摄角度：**鱼体侧面**（评估躯干主区域颜色），鱼体应位于视野中央，与背景对比清晰\n- 光照：建议鱼缸照明常开 + **使用 5000-6500K 中性白光源**\n- 鱼体拍摄时应**短暂静止**\n- 多鱼缸场景按摄像头 ID 绑定到注册容器 ID\n- **部署时必须录入**：鱼种 + 品系（决定标准色度数据库匹配，如锦鲤红白/大正三色/昭和三色、金鱼狮子头/兰寿、神仙鱼银河系/熊猫、孔雀鱼礼服/草尾、热带龙鱼红/金/青）\n- 用户必须授权部署；公共养殖场 / 水族馆需公示告知\n\n## 关键观测信号\n\n### 白平衡校正与光照归一化（核心）\n- `white_reference_type` - 白参考类型（white_card / gray_card / colorchecker / not_detected）\n- `white_reference_detection_confidence` - 白参考检测置信度（0-1）\n- `light_temperature_kelvin_estimated` - 估算光照色温（K）\n- `wb_correction_applied` - 是否已做白平衡校正（bool）\n- `light_intensity_normalized_score` - 光照强度归一化评分\n\n### 鱼体区域分割\n- `fish_id` - 鱼个体唯一标识（可选）\n- `species_subtype` - 鱼种 + 品系（精确到子品系，如\"锦鲤-大正三色\"）\n- `body_segmentation_mask_pixel_count` - 鱼体分割掩膜像素数\n- `body_segmentation_confidence` - 分割置信度（0-1）\n- `analysis_roi` - 分析区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）\n\n### HSV 色彩信号（核心）\n- `hsv_s_mean` - 躯干区域**饱和度均值**\n- `hsv_s_std` - 饱和度标准差\n- `hsv_v_mean` - 躯干区域**亮度均值**\n- `hsv_v_std` - 亮度标准差\n- `hsv_h_dominant_hue_deg` - 主色相（0-360）\n- `hsv_h_distribution_histogram` - 色相分布直方图（用于多色品种如锦鲤\"红/白/黑\"分区比例）\n\n### 品种基线对比\n- `species_subtype_baseline_s_range` - 该品系健康标准饱和度范围\n- `species_subtype_baseline_v_range` - 该品系健康标准亮度范围\n- `species_subtype_baseline_h_target_palette` - 该品系标准色相调色板\n- `color_palette_match_score` - 与标准调色板的匹配度（0-100）\n- `s_baseline_z_score` - 饱和度相对基线的 z-score\n- `v_baseline_z_score` - 亮度相对基线的 z-score\n\n### 鲜艳度综合评分\n- `vibrancy_score_0_100` - **鲜艳度综合评分（0-100，核心输出）**\n- `vibrancy_score_trend_7d` - 近 7 天评分变化趋势\n- `vibrancy_score_trend_30d` - 近 30 天评分变化趋势\n\n## 综合判定\n\n- `color_vibrant_excellent` - 鲜艳度极佳（≥ 85）\n- `color_vibrant_good` - 鲜艳度良好（70-84）\n- `color_acceptable` - 可接受（50-69）\n- `color_dull_mild` - **体色暗淡轻度**（35-49）\n- `color_dull_severe` - **体色暗淡严重**（< 35）\n- `color_baseline_unavailable` - 该品系暂无标准基线（仅输出客观 HSV 值，不评分鲜艳度）\n- `color_signal_unreliable` - 信号不可靠（白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非疾病诊断）\n\n- Level 1（excellent / good）：仅入库 + 积极反馈\"鲜艳度优秀，继续保持当前管理方式\"\n- Level 2（acceptable / dull_mild）：重要提示，建议**评估增色饲料（中性提示\"含虾青素/螺旋藻类\"，禁止具体品牌）/ 检查光照（光谱完整性 + 色温 + 周期）/ 检查水质（NH3/NO2-/pH/KH）**\n- Level 3（dull_severe，单次）：紧急提示，建议**立即检查体表 + 游姿 + 摄食活跃度 + 水质五项 + 投喂记录**，并联系**当地观赏鱼兽医或资深玩家**\n- Level 4（dull_severe 连续 ≥ 14 天 / 同缸 ≥ 50% 个体同时严重暗淡）：最高紧急提示 + 推送所有管理人员 + 强烈建议**全面排查**\n\n## 单日提醒上限\n\n- Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **🚨 禁止**做\"营养不良 / 黑斑病 / 黑变病 / 寄生虫 / 应激综合征 / 缺乏类胡萝卜素\"等**具体疾病诊断**\n- **🚨 绝对禁止**输出具体药物名称、剂量、给药方案\n- **🚨 绝对禁止**输出具体饲料品牌名称、增色剂品牌（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"，**禁止推荐 X 牌增色粒**）\n- **禁止**长期存储完整鱼缸视频/图像（≤ 30 天，留鲜艳度时间序列 + 关键评估帧）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认\n- HSV-S/V 值、鲜艳度评分等指标必须基于真实图像计算；**禁止伪造或夸大评分**\n- 品系特异性：不同品系标准色度差异极大（锦鲤红白要求红色 S>200/白色高亮，昭和要求黑色覆盖度，神仙鱼银河系要求斑点分布而非饱和度）→ 必须**按 species_subtype 精确匹配基线**；**严禁通用阈值盲判**\n- 必须考虑光照与白平衡上下文：暖光（< 4000K）让黄/红偏强、冷光（> 7000K）让蓝/绿偏强、**未做白平衡的评分一律视为不可信**\n- 必须考虑生理性上下文：**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变** → 不可直接告警\n- 白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见 → 必须返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸 ID\n- `species_subtype` - 鱼种 + 品系\n- `fish_id` - 鱼个体（可选）\n- `white_balance_calibration` - 白平衡校正信息\n- `body_roi` - 分析区域\n- `hsv_values` - HSV 核心值\n- `species_subtype_baseline_comparison` - 品系基线对比\n- `vibrancy_score_0_100` - **鲜艳度综合评分**\n- `vibrancy_trend_7d` / `vibrancy_trend_30d` - 近期趋势\n- `composite_scene` - 综合判定\n- `alert_level` - 提醒等级\n- `recommended_actions` - 建议动作（评估增色饲料/光照/水质 / 检查体表 / 联系兽医，**不含药物与品牌**）\n- `disclaimer` - 免责声明\n\nFile v1.0.12:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.12:scripts/config.yaml\n\n{}\n\nFile v1.0.12:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.12:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.12:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.12:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.12:skill-card.md\n\n## Description:\n\nAssesses ornamental-fish color from images or videos and reports vibrancy scores, trends, and aquarium care guidance.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nAquarium keepers, fish farms, and aquarium app developers use this skill to review fish color changes and receive husbandry suggestions from image or video assessments. It can also retrieve previous assessment reports.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Fish images or videos and report requests are sent to a cloud service.\n\nMitigation: Use only media you are comfortable sending to the service; avoid sensitive media.\n\nRisk: The skill silently creates or reuses an account identity and stores service tokens locally.\n\nMitigation: Review and manage the stored account context and local data before using the skill in a shared workspace.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-color-brightness-assessment-analysis)\n- [Assessment API documentation](references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON]\n\n**Output Format:** [Structured assessment report or Markdown history table]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Reports may include vibrancy scores, color measurements, trends, care suggestions, and report links.]\n\n## Skill Version(s):\n\n1.0.12 (source: server-resolved ClawHub release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 45232 bytes\n\nFiles: references/api_doc.md (7488b), scripts/__init__.py (62b), scripts/config.py (691b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_fish_color_brightness_assessment_analysis.py (3820b), skill-card.md (2129b), SKILL.md (19010b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (166b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: \"smyx-fish-color-brightness-assessment-analysis\"\ndescription: \"Through fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy. | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。\"\nversion: \"1.0.16\"\nlicense: \"MIT-0\"\n---\n\n# 🌈 Ornamental Fish Color Brightness Assessment | 观赏鱼体色鲜艳度评估\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **观赏鱼体色鲜艳度评估** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy score (0-100). When the score is below a threshold (e.g. <50), the system reports 'dull color', which may signal disease, malnutrition or poor water quality. Application scenarios: home aquariums, public aquariums, ornamental fish farms. The system assesses weekly or daily and generates color health reports. Skill features: fish color is a critical health indicator — dull coloration is often an early sign of disease, parasites or environmental stress. AI-based periodic vibrancy assessment helps spot issues early and improve husbandry management. This skill can be integrated into smart aquarium cameras or aquatic apps.\n\n通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。应用场景：家庭鱼缸、水族馆、观赏鱼养殖场。系统每周或每日评估，生成体色健康报告。技能特点：鱼体颜色是健康的重要指示器，体色暗淡常为疾病、寄生虫或环境应激的早期表现。通过 AI 定期评估鲜艳度，可及时发现问题，提升养殖管理水平。该技能可集成到智能鱼缸摄像头或水族 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族色彩评估 AI。你的任务是分析观赏鱼体侧高清图像（≥ 1080p，鱼体侧面拍摄，视野内必须有白卡/灰卡/ColorChecker 作白平衡参考），先对图像做**白平衡校正与光照归一化**（基于白参考估算光照色温 K），然后分割鱼体并提取躯干主区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）的 **HSV-S（饱和度）+ HSV-V（亮度）+ HSV-H（色相分布直方图）**，按 **species_subtype（精确到子品系，如锦鲤-大正三色 / 神仙鱼-银河系 / 孔雀鱼-礼服）匹配标准色度基线**（饱和度范围 / 亮度范围 / 调色板 / z-score），计算 **vibrancy_score_0_100（鲜艳度综合评分）**，再结合 7 天 / 30 天评分趋势，按 7 类综合场景判定（color_vibrant_excellent ≥ 85 / color_vibrant_good 70-84 / color_acceptable 50-69 / color_dull_mild 35-49 / color_dull_severe < 35 / color_baseline_unavailable / color_signal_unreliable），并按 4 级提醒策略递进（Level 1 积极反馈 → Level 2 评估增色饲料+光照+水质 → Level 3 紧急检查体表+游姿+水质五项+联系兽医 → Level 4 连续 ≥ 14 天或同缸 ≥ 50% 同时严重暗淡 + 全面排查 + 所有联系人）。**核心硬约束：未做白平衡的评分一律视为不可信** → 必须返回 `color_signal_unreliable`。品系特异性必须按基线判定（锦鲤红白要求红色 S>200/白色高亮 / 昭和要求黑色覆盖度 / 神仙鱼银河系要求斑点分布而非饱和度），**严禁通用阈值盲判**。生理性上下文必须考虑（**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变**），避免误判。白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见时必须返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡。不提供任何疾病诊断，仅输出基于色彩分析的鲜艳度评分；**严禁输出具体药物名称、剂量、给药方案**；**严禁输出具体饲料品牌名称、增色剂品牌**（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"）；严禁伪造夸大 HSV 值与鲜艳度评分；严禁越权代用户启停灯光/加热棒/喂食器/增氧/换水（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼缸固定摄像头 / 智能鱼缸内置摄像头 / 手机侧拍**定期拍摄**（默认每周或每日 1 次，含白参考）高清图像，识别 7 类综合场景（color_vibrant_excellent / good / acceptable / dull_mild / dull_severe / baseline_unavailable / signal_unreliable）→ **五组指标**：白平衡校正 5 项（白参考类型 / 检测置信度 / 估算色温 K / 是否校正 / 光照归一化）+ 鱼体分割 5 项（fish_id / species_subtype / 分割掩膜像素 / 分割置信度 / 分析 ROI）+ HSV 色彩 6 项（S mean/std + V mean/std + H 主色相 + H 直方图）+ 品种基线对比 6 项（基线 S/V 范围 + 标准调色板 + 调色板匹配度 + S/V z-score）+ 鲜艳度评分 3 项（**vibrancy_score_0_100** + 7d 趋势 + 30d 趋势）→ 4 档提醒级别（info / important / urgent / warning）→ **4 级提醒策略递进**（积极反馈 → 评估增色饲料+光照+水质 → 紧急检查体表+水质+联系兽医 → 全面排查+所有联系人）→ 单日提醒上限（Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限）→ **鲜艳度评估报告**（按 tank_id + fish_id + 评估时间戳输出，含 HSV 核心值 + 品系基线对比 + 鲜艳度评分 + 趋势 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 白参考自动检测（白卡 / 灰卡 / ColorChecker） |\n| 2 | 白平衡校正 |\n| 3 | 光照色温估算 |\n| 4 | 光照强度归一化 |\n| 5 | 鱼体语义分割 |\n| 6 | 品系精细识别（精确到子品系） |\n| 7 | ROI 分析区域选择（默认 trunk_middle） |\n| 8 | HSV 色彩空间转换 |\n| 9 | 躯干 HSV-S / HSV-V 统计（均值 / 标准差） |\n| 10 | 色相分布直方图 |\n| 11 | 品系标准色度数据库匹配 |\n| 12 | 调色板相似度（如锦鲤红白配色匹配 / 昭和黑红白三色比例） |\n| 13 | z-score 偏差量化 |\n| 14 | **vibrancy_score_0_100** 综合计算 |\n| 15 | 7d / 30d 评分时间序列趋势 |\n| 16 | 生理性上下文识别（繁殖婚姻色 / 应激色 / 投喂期 / 鱼龄渐变） |\n| 17 | 白参考缺失/分割低置信度门控（返回 unreliable） |\n| 18 | 用户 APP 推送 |\n| 19 | 4 级提醒递进 |\n| 20 | 单日提醒上限 |\n| 21 | 鲜艳度评估报告（按 tank_id + fish_id + 时间戳输出） |\n| 22 | 连续 ≥ 14 天 Level 3 / 同缸 ≥ 50% 同发 → 强烈建议联系**当地观赏鱼兽医或资深玩家** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供鱼缸固定摄像头观赏鱼体侧高清图像或视频 URL/文件需要分析时，默认触发本技能进行观赏鱼体色鲜艳度评估 |\n| 🔎 明确分析意图 | 当用户明确提及鱼体色暗淡、鱼掉色、鱼变白、鱼变黑、锦鲤色斑、鱼鲜艳度、HSV 饱和度、调色板匹配等关键词，并且上传了图像/视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼体色历史报告、鲜艳度评分时间序列、鱼缸色彩评估日志清单、查询历史色彩评估记录、显示所有鱼缸体色报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_color_brightness_assessment_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备含白参考的观赏鱼体侧高清图像输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行观赏鱼体色鲜艳度评估 | 调用 `-m scripts.smyx_fish_color_brightness_assessment_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地鱼缸固定摄像头观赏鱼体侧高清图像或视频文件路径（需含白参考） | 适用于本地文件分析 |\n| `--url` | 网络鱼缸固定摄像头观赏鱼体侧高清图像或视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，观赏鱼体色鲜艳度评估场景默认 `other` | 按需填写 |\n| `--list` | 显示观赏鱼体色鲜艳度评估历史记录清单（含鲜艳度评分时间序列） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_fish_color_brightness_assessment_analysis.py`](scripts/smyx_fish_color_brightness_assessment_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| 📁 格式支持 | 输入要求：支持 jpg/png/mp4/avi/mov，最大 10MB；**视野内必须放置白卡/灰卡/ColorChecker**；鱼体侧面拍摄；分辨率 ≥ 1080p；光照建议 5000-6500K 中性白；鱼体短暂静止 |\n| 🔎 使用提醒 | **核心输出**：`vibrancy_score_0_100` 鲜艳度综合评分（基于品系精确基线对比） |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → warning），偏养殖管理建议定位 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限 |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **🚨 禁止**做\"营养不良 / 黑斑病 / 黑变病 / 寄生虫 / 应激综合征 / 缺乏类胡萝卜素\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体饲料品牌名称、增色剂品牌（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"，禁止推荐 X 牌增色粒） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸视频/图像（≤ 30 天，留鲜艳度时间序列 + 关键评估帧；公共养殖场/水族馆按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大 HSV-S/V 值、鲜艳度评分等指标；所有数据必须基于真实图像计算 |\n| 🔎 使用提醒 | **必须**按 **species_subtype（精确到子品系）** 匹配基线（锦鲤红白 / 大正三色 / 昭和三色 / 神仙鱼银河系 / 孔雀鱼礼服 / 龙鱼红金青）；**禁止使用通用阈值盲判** |\n| 🧑‍⚖️ 结果性质 | **必须**做白平衡校正与光照归一化（基于白参考估算光照色温 K），**未做白平衡的评分一律视为不可信** → 返回 `color_signal_unreliable` |\n| 📚 文档读取 | **必须**考虑生理性上下文（**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变**），避免误判 |\n| 🧑‍⚖️ 结果性质 | **必须**在白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见时返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡 |\n| 🔎 使用提醒 | **必须**：连续 ≥ 14 天 Level 3 / 同缸 ≥ 50% 个体同时严重暗淡 → 强烈建议联系**当地观赏鱼兽医或资深玩家** |\n| 📜 报告输出 | **必须**：鲜艳度评估报告**按 tank_id + fish_id + 评估时间戳输出**，含 HSV 核心值 + 品系基线对比 + 鲜艳度评分 + 趋势 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史评估记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地含白参考的观赏鱼体侧高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input /path/to/koi.jpg\n\n# 分析网络含白参考的观赏鱼体侧高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --url https://example.com/koi.jpg\n\n# 显示历史鲜艳度评估记录清单（自动触发关键词：查看鱼体色历史报告、鲜艳度评分时间序列等）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --output result.json\n```\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-color-brightness-assessment-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1790458465565\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` - 获取评估结果（HSV-S/V 均值 + 鲜艳度评分 + 品种基线对比）\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_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` - 观赏鱼体色鲜艳度评估\n\n## 输入约束\n\n- 摄像头：鱼缸固定摄像头 / 智能鱼缸内置摄像头 / 手机拍摄（侧面，垂直于鱼体侧面方向）\n- 分辨率 ≥ 1080p（颜色饱和度评估需高色彩精度）\n- **关键硬件要求**：**视野内必须放置已知白色参考物（白卡 / 灰卡 / 标准 ColorChecker）**，用于做**白平衡校正**与**光照归一化**（核心，否则环境灯光偏色会让评分失真）\n- 拍摄角度：**鱼体侧面**（评估躯干主区域颜色），鱼体应位于视野中央，与背景对比清晰\n- 光照：建议鱼缸照明常开 + **使用 5000-6500K 中性白光源**\n- 鱼体拍摄时应**短暂静止**\n- 多鱼缸场景按摄像头 ID 绑定到注册容器 ID\n- **部署时必须录入**：鱼种 + 品系（决定标准色度数据库匹配，如锦鲤红白/大正三色/昭和三色、金鱼狮子头/兰寿、神仙鱼银河系/熊猫、孔雀鱼礼服/草尾、热带龙鱼红/金/青）\n- 用户必须授权部署；公共养殖场 / 水族馆需公示告知\n\n## 关键观测信号\n\n### 白平衡校正与光照归一化（核心）\n- `white_reference_type` - 白参考类型（white_card / gray_card / colorchecker / not_detected）\n- `white_reference_detection_confidence` - 白参考检测置信度（0-1）\n- `light_temperature_kelvin_estimated` - 估算光照色温（K）\n- `wb_correction_applied` - 是否已做白平衡校正（bool）\n- `light_intensity_normalized_score` - 光照强度归一化评分\n\n### 鱼体区域分割\n- `fish_id` - 鱼个体唯一标识（可选）\n- `species_subtype` - 鱼种 + 品系（精确到子品系，如\"锦鲤-大正三色\"）\n- `body_segmentation_mask_pixel_count` - 鱼体分割掩膜像素数\n- `body_segmentation_confidence` - 分割置信度（0-1）\n- `analysis_roi` - 分析区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）\n\n### HSV 色彩信号（核心）\n- `hsv_s_mean` - 躯干区域**饱和度均值**\n- `hsv_s_std` - 饱和度标准差\n- `hsv_v_mean` - 躯干区域**亮度均值**\n- `hsv_v_std` - 亮度标准差\n- `hsv_h_dominant_hue_deg` - 主色相（0-360）\n- `hsv_h_distribution_histogram` - 色相分布直方图（用于多色品种如锦鲤\"红/白/黑\"分区比例）\n\n### 品种基线对比\n- `species_subtype_baseline_s_range` - 该品系健康标准饱和度范围\n- `species_subtype_baseline_v_range` - 该品系健康标准亮度范围\n- `species_subtype_baseline_h_target_palette` - 该品系标准色相调色板\n- `color_palette_match_score` - 与标准调色板的匹配度（0-100）\n- `s_baseline_z_score` - 饱和度相对基线的 z-score\n- `v_baseline_z_score` - 亮度相对基线的 z-score\n\n### 鲜艳度综合评分\n- `vibrancy_score_0_100` - **鲜艳度综合评分（0-100，核心输出）**\n- `vibrancy_score_trend_7d` - 近 7 天评分变化趋势\n- `vibrancy_score_trend_30d` - 近 30 天评分变化趋势\n\n## 综合判定\n\n- `color_vibrant_excellent` - 鲜艳度极佳（≥ 85）\n- `color_vibrant_good` - 鲜艳度良好（70-84）\n- `color_acceptable` - 可接受（50-69）\n- `color_dull_mild` - **体色暗淡轻度**（35-49）\n- `color_dull_severe` - **体色暗淡严重**（< 35）\n- `color_baseline_unavailable` - 该品系暂无标准基线（仅输出客观 HSV 值，不评分鲜艳度）\n- `color_signal_unreliable` - 信号不可靠（白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非疾病诊断）\n\n- Level 1（excellent / good）：仅入库 + 积极反馈\"鲜艳度优秀，继续保持当前管理方式\"\n- Level 2（acceptable / dull_mild）：重要提示，建议**评估增色饲料（中性提示\"含虾青素/螺旋藻类\"，禁止具体品牌）/ 检查光照（光谱完整性 + 色温 + 周期）/ 检查水质（NH3/NO2-/pH/KH）**\n- Level 3（dull_severe，单次）：紧急提示，建议**立即检查体表 + 游姿 + 摄食活跃度 + 水质五项 + 投喂记录**，并联系**当地观赏鱼兽医或资深玩家**\n- Level 4（dull_severe 连续 ≥ 14 天 / 同缸 ≥ 50% 个体同时严重暗淡）：最高紧急提示 + 推送所有管理人员 + 强烈建议**全面排查**\n\n## 单日提醒上限\n\n- Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **🚨 禁止**做\"营养不良 / 黑斑病 / 黑变病 / 寄生虫 / 应激综合征 / 缺乏类胡萝卜素\"等**具体疾病诊断**\n- **🚨 绝对禁止**输出具体药物名称、剂量、给药方案\n- **🚨 绝对禁止**输出具体饲料品牌名称、增色剂品牌（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"，**禁止推荐 X 牌增色粒**）\n- **禁止**长期存储完整鱼缸视频/图像（≤ 30 天，留鲜艳度时间序列 + 关键评估帧）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认\n- HSV-S/V 值、鲜艳度评分等指标必须基于真实图像计算；**禁止伪造或夸大评分**\n- 品系特异性：不同品系标准色度差异极大（锦鲤红白要求红色 S>200/白色高亮，昭和要求黑色覆盖度，神仙鱼银河系要求斑点分布而非饱和度）→ 必须**按 species_subtype 精确匹配基线**；**严禁通用阈值盲判**\n- 必须考虑光照与白平衡上下文：暖光（< 4000K）让黄/红偏强、冷光（> 7000K）让蓝/绿偏强、**未做白平衡的评分一律视为不可信**\n- 必须考虑生理性上下文：**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变** → 不可直接告警\n- 白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见 → 必须返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸 ID\n- `species_subtype` - 鱼种 + 品系\n- `fish_id` - 鱼个体（可选）\n- `white_balance_calibration` - 白平衡校正信息\n- `body_roi` - 分析区域\n- `hsv_values` - HSV 核心值\n- `species_subtype_baseline_comparison` - 品系基线对比\n- `vibrancy_score_0_100` - **鲜艳度综合评分**\n- `vibrancy_trend_7d` / `vibrancy_trend_30d` - 近期趋势\n- `composite_scene` - 综合判定\n- `alert_level` - 提醒等级\n- `recommended_actions` - 建议动作（评估增色饲料/光照/水质 / 检查体表 / 联系兽医，**不含药物与品牌**）\n- `disclaimer` - 免责声明\n\nFile v1.0.11:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.11:scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.11:skill-card.md\n\n## Description:\n\nAssesses ornamental fish color brightness from images or video and provides a vibrancy report with husbandry guidance.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nAquarium owners, fish farms, and aquatic-care teams use the skill to review fish color trends from images or video and receive assessment reports and care suggestions; it is not a veterinary diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Fish images or videos are sent to the publisher's cloud service.\n\nMitigation: Obtain informed consent before sending media and confirm the publisher's retention and sharing terms.\n\nRisk: The skill creates or reuses a local identity record and caches service tokens without a prominent user prompt.\n\nMitigation: Disclose the identity and token handling, restrict local access, and define storage limits and deletion procedures.\n\nRisk: The analysis may not reliably deliver the advertised fish-specific assessment.\n\nMitigation: Check reports against the supplied images and species information; do not use scores as a veterinary diagnosis.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-color-brightness-assessment-analysis)\n- [Skill API reference](references/api_doc.md)\n- [Skill usage introduction](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Analysis, Guidance]\n\n**Output Format:** [Text or JSON report with optional Markdown report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Can return a historical report list and save results to a file.]\n\n## Skill Version(s):\n\n1.0.11 (source: ClawHub release metadata; artifact frontmatter reports 1.0.16)\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, 45536 bytes\n\nFiles: references/api_doc.md (7488b), scripts/__init__.py (62b), scripts/config.py (691b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_fish_color_brightness_assessment_analysis.py (3820b), skill-card.md (2734b), SKILL.md (19010b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (472b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (166b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: \"smyx-fish-color-brightness-assessment-analysis\"\ndescription: \"Through fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy. | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。\"\nversion: \"1.0.14\"\nlicense: \"MIT-0\"\n---\n\n# 🌈 Ornamental Fish Color Brightness Assessment | 观赏鱼体色鲜艳度评估\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **观赏鱼体色鲜艳度评估** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy score (0-100). When the score is below a threshold (e.g. <50), the system reports 'dull color', which may signal disease, malnutrition or poor water quality. Application scenarios: home aquariums, public aquariums, ornamental fish farms. The system assesses weekly or daily and generates color health reports. Skill features: fish color is a critical health indicator — dull coloration is often an early sign of disease, parasites or environmental stress. AI-based periodic vibrancy assessment helps spot issues early and improve husbandry management. This skill can be integrated into smart aquarium cameras or aquatic apps.\n\n通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。应用场景：家庭鱼缸、水族馆、观赏鱼养殖场。系统每周或每日评估，生成体色健康报告。技能特点：鱼体颜色是健康的重要指示器，体色暗淡常为疾病、寄生虫或环境应激的早期表现。通过 AI 定期评估鲜艳度，可及时发现问题，提升养殖管理水平。该技能可集成到智能鱼缸摄像头或水族 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族色彩评估 AI。你的任务是分析观赏鱼体侧高清图像（≥ 1080p，鱼体侧面拍摄，视野内必须有白卡/灰卡/ColorChecker 作白平衡参考），先对图像做**白平衡校正与光照归一化**（基于白参考估算光照色温 K），然后分割鱼体并提取躯干主区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）的 **HSV-S（饱和度）+ HSV-V（亮度）+ HSV-H（色相分布直方图）**，按 **species_subtype（精确到子品系，如锦鲤-大正三色 / 神仙鱼-银河系 / 孔雀鱼-礼服）匹配标准色度基线**（饱和度范围 / 亮度范围 / 调色板 / z-score），计算 **vibrancy_score_0_100（鲜艳度综合评分）**，再结合 7 天 / 30 天评分趋势，按 7 类综合场景判定（color_vibrant_excellent ≥ 85 / color_vibrant_good 70-84 / color_acceptable 50-69 / color_dull_mild 35-49 / color_dull_severe < 35 / color_baseline_unavailable / color_signal_unreliable），并按 4 级提醒策略递进（Level 1 积极反馈 → Level 2 评估增色饲料+光照+水质 → Level 3 紧急检查体表+游姿+水质五项+联系兽医 → Level 4 连续 ≥ 14 天或同缸 ≥ 50% 同时严重暗淡 + 全面排查 + 所有联系人）。**核心硬约束：未做白平衡的评分一律视为不可信** → 必须返回 `color_signal_unreliable`。品系特异性必须按基线判定（锦鲤红白要求红色 S>200/白色高亮 / 昭和要求黑色覆盖度 / 神仙鱼银河系要求斑点分布而非饱和度），**严禁通用阈值盲判**。生理性上下文必须考虑（**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变**），避免误判。白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见时必须返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡。不提供任何疾病诊断，仅输出基于色彩分析的鲜艳度评分；**严禁输出具体药物名称、剂量、给药方案**；**严禁输出具体饲料品牌名称、增色剂品牌**（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"）；严禁伪造夸大 HSV 值与鲜艳度评分；严禁越权代用户启停灯光/加热棒/喂食器/增氧/换水（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼缸固定摄像头 / 智能鱼缸内置摄像头 / 手机侧拍**定期拍摄**（默认每周或每日 1 次，含白参考）高清图像，识别 7 类综合场景（color_vibrant_excellent / good / acceptable / dull_mild / dull_severe / baseline_unavailable / signal_unreliable）→ **五组指标**：白平衡校正 5 项（白参考类型 / 检测置信度 / 估算色温 K / 是否校正 / 光照归一化）+ 鱼体分割 5 项（fish_id / species_subtype / 分割掩膜像素 / 分割置信度 / 分析 ROI）+ HSV 色彩 6 项（S mean/std + V mean/std + H 主色相 + H 直方图）+ 品种基线对比 6 项（基线 S/V 范围 + 标准调色板 + 调色板匹配度 + S/V z-score）+ 鲜艳度评分 3 项（**vibrancy_score_0_100** + 7d 趋势 + 30d 趋势）→ 4 档提醒级别（info / important / urgent / warning）→ **4 级提醒策略递进**（积极反馈 → 评估增色饲料+光照+水质 → 紧急检查体表+水质+联系兽医 → 全面排查+所有联系人）→ 单日提醒上限（Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限）→ **鲜艳度评估报告**（按 tank_id + fish_id + 评估时间戳输出，含 HSV 核心值 + 品系基线对比 + 鲜艳度评分 + 趋势 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 白参考自动检测（白卡 / 灰卡 / ColorChecker） |\n| 2 | 白平衡校正 |\n| 3 | 光照色温估算 |\n| 4 | 光照强度归一化 |\n| 5 | 鱼体语义分割 |\n| 6 | 品系精细识别（精确到子品系） |\n| 7 | ROI 分析区域选择（默认 trunk_middle） |\n| 8 | HSV 色彩空间转换 |\n| 9 | 躯干 HSV-S / HSV-V 统计（均值 / 标准差） |\n| 10 | 色相分布直方图 |\n| 11 | 品系标准色度数据库匹配 |\n| 12 | 调色板相似度（如锦鲤红白配色匹配 / 昭和黑红白三色比例） |\n| 13 | z-score 偏差量化 |\n| 14 | **vibrancy_score_0_100** 综合计算 |\n| 15 | 7d / 30d 评分时间序列趋势 |\n| 16 | 生理性上下文识别（繁殖婚姻色 / 应激色 / 投喂期 / 鱼龄渐变） |\n| 17 | 白参考缺失/分割低置信度门控（返回 unreliable） |\n| 18 | 用户 APP 推送 |\n| 19 | 4 级提醒递进 |\n| 20 | 单日提醒上限 |\n| 21 | 鲜艳度评估报告（按 tank_id + fish_id + 时间戳输出） |\n| 22 | 连续 ≥ 14 天 Level 3 / 同缸 ≥ 50% 同发 → 强烈建议联系**当地观赏鱼兽医或资深玩家** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供鱼缸固定摄像头观赏鱼体侧高清图像或视频 URL/文件需要分析时，默认触发本技能进行观赏鱼体色鲜艳度评估 |\n| 🔎 明确分析意图 | 当用户明确提及鱼体色暗淡、鱼掉色、鱼变白、鱼变黑、锦鲤色斑、鱼鲜艳度、HSV 饱和度、调色板匹配等关键词，并且上传了图像/视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼体色历史报告、鲜艳度评分时间序列、鱼缸色彩评估日志清单、查询历史色彩评估记录、显示所有鱼缸体色报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_color_brightness_assessment_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备含白参考的观赏鱼体侧高清图像输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行观赏鱼体色鲜艳度评估 | 调用 `-m scripts.smyx_fish_color_brightness_assessment_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地鱼缸固定摄像头观赏鱼体侧高清图像或视频文件路径（需含白参考） | 适用于本地文件分析 |\n| `--url` | 网络鱼缸固定摄像头观赏鱼体侧高清图像或视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，观赏鱼体色鲜艳度评估场景默认 `other` | 按需填写 |\n| `--list` | 显示观赏鱼体色鲜艳度评估历史记录清单（含鲜艳度评分时间序列） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_fish_color_brightness_assessment_analysis.py`](scripts/smyx_fish_color_brightness_assessment_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| 📁 格式支持 | 输入要求：支持 jpg/png/mp4/avi/mov，最大 10MB；**视野内必须放置白卡/灰卡/ColorChecker**；鱼体侧面拍摄；分辨率 ≥ 1080p；光照建议 5000-6500K 中性白；鱼体短暂静止 |\n| 🔎 使用提醒 | **核心输出**：`vibrancy_score_0_100` 鲜艳度综合评分（基于品系精确基线对比） |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → warning），偏养殖管理建议定位 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限 |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **🚨 禁止**做\"营养不良 / 黑斑病 / 黑变病 / 寄生虫 / 应激综合征 / 缺乏类胡萝卜素\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体饲料品牌名称、增色剂品牌（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"，禁止推荐 X 牌增色粒） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸视频/图像（≤ 30 天，留鲜艳度时间序列 + 关键评估帧；公共养殖场/水族馆按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大 HSV-S/V 值、鲜艳度评分等指标；所有数据必须基于真实图像计算 |\n| 🔎 使用提醒 | **必须**按 **species_subtype（精确到子品系）** 匹配基线（锦鲤红白 / 大正三色 / 昭和三色 / 神仙鱼银河系 / 孔雀鱼礼服 / 龙鱼红金青）；**禁止使用通用阈值盲判** |\n| 🧑‍⚖️ 结果性质 | **必须**做白平衡校正与光照归一化（基于白参考估算光照色温 K），**未做白平衡的评分一律视为不可信** → 返回 `color_signal_unreliable` |\n| 📚 文档读取 | **必须**考虑生理性上下文（**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变**），避免误判 |\n| 🧑‍⚖️ 结果性质 | **必须**在白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见时返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡 |\n| 🔎 使用提醒 | **必须**：连续 ≥ 14 天 Level 3 / 同缸 ≥ 50% 个体同时严重暗淡 → 强烈建议联系**当地观赏鱼兽医或资深玩家** |\n| 📜 报告输出 | **必须**：鲜艳度评估报告**按 tank_id + fish_id + 评估时间戳输出**，含 HSV 核心值 + 品系基线对比 + 鲜艳度评分 + 趋势 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史评估记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地含白参考的观赏鱼体侧高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input /path/to/koi.jpg\n\n# 分析网络含白参考的观赏鱼体侧高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --url https://example.com/koi.jpg\n\n# 显示历史鲜艳度评估记录清单（自动触发关键词：查看鱼体色历史报告、鲜艳度评分时间序列等）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-color-brightness-assessment-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1789523137847\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` - 获取评估结果（HSV-S/V 均值 + 鲜艳度评分 + 品种基线对比）\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_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` - 观赏鱼体色鲜艳度评估\n\n## 输入约束\n\n- 摄像头：鱼缸固定摄像头 / 智能鱼缸内置摄像头 / 手机拍摄（侧面，垂直于鱼体侧面方向）\n- 分辨率 ≥ 1080p（颜色饱和度评估需高色彩精度）\n- **关键硬件要求**：**视野内必须放置已知白色参考物（白卡 / 灰卡 / 标准 ColorChecker）**，用于做**白平衡校正**与**光照归一化**（核心，否则环境灯光偏色会让评分失真）\n- 拍摄角度：**鱼体侧面**（评估躯干主区域颜色），鱼体应位于视野中央，与背景对比清晰\n- 光照：建议鱼缸照明常开 + **使用 5000-6500K 中性白光源**\n- 鱼体拍摄时应**短暂静止**\n- 多鱼缸场景按摄像头 ID 绑定到注册容器 ID\n- **部署时必须录入**：鱼种 + 品系（决定标准色度数据库匹配，如锦鲤红白/大正三色/昭和三色、金鱼狮子头/兰寿、神仙鱼银河系/熊猫、孔雀鱼礼服/草尾、热带龙鱼红/金/青）\n- 用户必须授权部署；公共养殖场 / 水族馆需公示告知\n\n## 关键观测信号\n\n### 白平衡校正与光照归一化（核心）\n- `white_reference_type` - 白参考类型（white_card / gray_card / colorchecker / not_detected）\n- `white_reference_detection_confidence` - 白参考检测置信度（0-1）\n- `light_temperature_kelvin_estimated` - 估算光照色温（K）\n- `wb_correction_applied` - 是否已做白平衡校正（bool）\n- `light_intensity_normalized_score` - 光照强度归一化评分\n\n### 鱼体区域分割\n- `fish_id` - 鱼个体唯一标识（可选）\n- `species_subtype` - 鱼种 + 品系（精确到子品系，如\"锦鲤-大正三色\"）\n- `body_segmentation_mask_pixel_count` - 鱼体分割掩膜像素数\n- `body_segmentation_confidence` - 分割置信度（0-1）\n- `analysis_roi` - 分析区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）\n\n### HSV 色彩信号（核心）\n- `hsv_s_mean` - 躯干区域**饱和度均值**\n- `hsv_s_std` - 饱和度标准差\n- `hsv_v_mean` - 躯干区域**亮度均值**\n- `hsv_v_std` - 亮度标准差\n- `hsv_h_dominant_hue_deg` - 主色相（0-360）\n- `hsv_h_distribution_histogram` - 色相分布直方图（用于多色品种如锦鲤\"红/白/黑\"分区比例）\n\n### 品种基线对比\n- `species_subtype_baseline_s_range` - 该品系健康标准饱和度范围\n- `species_subtype_baseline_v_range` - 该品系健康标准亮度范围\n- `species_subtype_baseline_h_target_palette` - 该品系标准色相调色板\n- `color_palette_match_score` - 与标准调色板的匹配度（0-100）\n- `s_baseline_z_score` - 饱和度相对基线的 z-score\n- `v_baseline_z_score` - 亮度相对基线的 z-score\n\n### 鲜艳度综合评分\n- `vibrancy_score_0_100` - **鲜艳度综合评分（0-100，核心输出）**\n- `vibrancy_score_trend_7d` - 近 7 天评分变化趋势\n- `vibrancy_score_trend_30d` - 近 30 天评分变化趋势\n\n## 综合判定\n\n- `color_vibrant_excellent` - 鲜艳度极佳（≥ 85）\n- `color_vibrant_good` - 鲜艳度良好（70-84）\n- `color_acceptable` - 可接受（50-69）\n- `color_dull_mild` - **体色暗淡轻度**（35-49）\n- `color_dull_severe` - **体色暗淡严重**（< 35）\n- `color_baseline_unavailable` - 该品系暂无标准基线（仅输出客观 HSV 值，不评分鲜艳度）\n- `color_signal_unreliable` - 信号不可靠（白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非疾病诊断）\n\n- Level 1（excellent / good）：仅入库 + 积极反馈\"鲜艳度优秀，继续保持当前管理方式\"\n- Level 2（acceptable / dull_mild）：重要提示，建议**评估增色饲料（中性提示\"含虾青素/螺旋藻类\"，禁止具体品牌）/ 检查光照（光谱完整性 + 色温 + 周期）/ 检查水质（NH3/NO2-/pH/KH）**\n- Level 3（dull_severe，单次）：紧急提示，建议**立即检查体表 + 游姿 + 摄食活跃度 + 水质五项 + 投喂记录**，并联系**当地观赏鱼兽医或资深玩家**\n- Level 4（dull_severe 连续 ≥ 14 天 / 同缸 ≥ 50% 个体同时严重暗淡）：最高紧急提示 + 推送所有管理人员 + 强烈建议**全面排查**\n\n## 单日提醒上限\n\n- Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **🚨 禁止**做\"营养不良 / 黑斑病 / 黑变病 / 寄生虫 / 应激综合征 / 缺乏类胡萝卜素\"等**具体疾病诊断**\n- **🚨 绝对禁止**输出具体药物名称、剂量、给药方案\n- **🚨 绝对禁止**输出具体饲料品牌名称、增色剂品牌（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"，**禁止推荐 X 牌增色粒**）\n- **禁止**长期存储完整鱼缸视频/图像（≤ 30 天，留鲜艳度时间序列 + 关键评估帧）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认\n- HSV-S/V 值、鲜艳度评分等指标必须基于真实图像计算；**禁止伪造或夸大评分**\n- 品系特异性：不同品系标准色度差异极大（锦鲤红白要求红色 S>200/白色高亮，昭和要求黑色覆盖度，神仙鱼银河系要求斑点分布而非饱和度）→ 必须**按 species_subtype 精确匹配基线**；**严禁通用阈值盲判**\n- 必须考虑光照与白平衡上下文：暖光（< 4000K）让黄/红偏强、冷光（> 7000K）让蓝/绿偏强、**未做白平衡的评分一律视为不可信**\n- 必须考虑生理性上下文：**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变** → 不可直接告警\n- 白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见 → 必须返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸 ID\n- `species_subtype` - 鱼种 + 品系\n- `fish_id` - 鱼个体（可选）\n- `white_balance_calibration` - 白平衡校正信息\n- `body_roi` - 分析区域\n- `hsv_values` - HSV 核心值\n- `species_subtype_baseline_comparison` - 品系基线对比\n- `vibrancy_score_0_100` - **鲜艳度综合评分**\n- `vibrancy_trend_7d` / `vibrancy_trend_30d` - 近期趋势\n- `composite_scene` - 综合判定\n- `alert_level` - 提醒等级\n- `recommended_actions` - 建议动作（评估增色饲料/光照/水质 / 检查体表 / 联系兽医，**不含药物与品牌**）\n- `disclaimer` - 免责声明\n\nFile v1.0.10:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.10:scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.10:skill-card.md\n\n## Description:\n\nAssesses ornamental fish images or videos for body-color saturation and brightness, compares HSV measurements against species-specific baselines, and returns a vibrancy score, trend information, and husbandry-oriented recommendations.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nAquarium keepers, aquaculture staff, and app developers use this skill to analyze fish-side images or videos, monitor color vibrancy over time, and receive color-focused husbandry guidance. It is suited for recurring checks where white-balance reference, side-view capture, and species subtype context are available.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Fish images or videos, report history, and a stable agent identity may be sent to the provider's cloud service.\n\nMitigation: Install only when this data sharing is acceptable, avoid sensitive media, and review provider retention and access controls before use.\n\nRisk: The package may default to insecure HTTP endpoints for some service URLs.\n\nMitigation: Require HTTPS-only endpoints in configuration before executing analysis or history queries.\n\nRisk: The skill can automatically create or reuse a persistent identity and may store tokens locally.\n\nMitigation: Review identity creation and token-storage behavior, avoid silent account creation for one-off analysis, and rotate or delete stored credentials when no longer needed.\n\nRisk: Color-based findings may be mistaken for veterinary diagnosis or treatment advice.\n\nMitigation: Use results as color and husbandry support only; do not provide disease diagnoses, medication names, dosages, or treatment plans.\n\n## Reference(s):\n\n- [API Interface Documentation](references/api_doc.md)\n- [Analysis API Reference](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, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown and JSON text, with optional file output]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include HSV metrics, species-baseline comparisons, vibrancy scores, trend summaries, recommended actions, and report links.]\n\n## Skill Version(s):\n\n1.0.10 (source: server release metadata; artifact frontmatter lists 1.0.14)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 45378 bytes\n\nFiles: references/api_doc.md (7488b), scripts/__init__.py (62b), scripts/config.py (691b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_fish_color_brightness_assessment_analysis.py (3820b), skill-card.md (2543b), SKILL.md (19010b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (472b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (165b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: \"smyx-fish-color-brightness-assessment-analysis\"\ndescription: \"Through fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy. | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。\"\nversion: \"1.0.12\"\nlicense: \"MIT-0\"\n---\n\n# 🌈 Ornamental Fish Color Brightness Assessment | 观赏鱼体色鲜艳度评估\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **观赏鱼体色鲜艳度评估** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy score (0-100). When the score is below a threshold (e.g. <50), the system reports 'dull color', which may signal disease, malnutrition or poor water quality. Application scenarios: home aquariums, public aquariums, ornamental fish farms. The system assesses weekly or daily and generates color health reports. Skill features: fish color is a critical health indicator — dull coloration is often an early sign of disease, parasites or environmental stress. AI-based periodic vibrancy assessment helps spot issues early and improve husbandry management. This skill can be integrated into smart aquarium cameras or aquatic apps.\n\n通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。应用场景：家庭鱼缸、水族馆、观赏鱼养殖场。系统每周或每日评估，生成体色健康报告。技能特点：鱼体颜色是健康的重要指示器，体色暗淡常为疾病、寄生虫或环境应激的早期表现。通过 AI 定期评估鲜艳度，可及时发现问题，提升养殖管理水平。该技能可集成到智能鱼缸摄像头或水族 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族色彩评估 AI。你的任务是分析观赏鱼体侧高清图像（≥ 1080p，鱼体侧面拍摄，视野内必须有白卡/灰卡/ColorChecker 作白平衡参考），先对图像做**白平衡校正与光照归一化**（基于白参考估算光照色温 K），然后分割鱼体并提取躯干主区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）的 **HSV-S（饱和度）+ HSV-V（亮度）+ HSV-H（色相分布直方图）**，按 **species_subtype（精确到子品系，如锦鲤-大正三色 / 神仙鱼-银河系 / 孔雀鱼-礼服）匹配标准色度基线**（饱和度范围 / 亮度范围 / 调色板 / z-score），计算 **vibrancy_score_0_100（鲜艳度综合评分）**，再结合 7 天 / 30 天评分趋势，按 7 类综合场景判定（color_vibrant_excellent ≥ 85 / color_vibrant_good 70-84 / color_acceptable 50-69 / color_dull_mild 35-49 / color_dull_severe < 35 / color_baseline_unavailable / color_signal_unreliable），并按 4 级提醒策略递进（Level 1 积极反馈 → Level 2 评估增色饲料+光照+水质 → Level 3 紧急检查体表+游姿+水质五项+联系兽医 → Level 4 连续 ≥ 14 天或同缸 ≥ 50% 同时严重暗淡 + 全面排查 + 所有联系人）。**核心硬约束：未做白平衡的评分一律视为不可信** → 必须返回 `color_signal_unreliable`。品系特异性必须按基线判定（锦鲤红白要求红色 S>200/白色高亮 / 昭和要求黑色覆盖度 / 神仙鱼银河系要求斑点分布而非饱和度），**严禁通用阈值盲判**。生理性上下文必须考虑（**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变**），避免误判。白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见时必须返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡。不提供任何疾病诊断，仅输出基于色彩分析的鲜艳度评分；**严禁输出具体药物名称、剂量、给药方案**；**严禁输出具体饲料品牌名称、增色剂品牌**（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"）；严禁伪造夸大 HSV 值与鲜艳度评分；严禁越权代用户启停灯光/加热棒/喂食器/增氧/换水（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼缸固定摄像头 / 智能鱼缸内置摄像头 / 手机侧拍**定期拍摄**（默认每周或每日 1 次，含白参考）高清图像，识别 7 类综合场景（color_vibrant_excellent / good / acceptable / dull_mild / dull_severe / baseline_unavailable / signal_unreliable）→ **五组指标**：白平衡校正 5 项（白参考类型 / 检测置信度 / 估算色温 K / 是否校正 / 光照归一化）+ 鱼体分割 5 项（fish_id / species_subtype / 分割掩膜像素 / 分割置信度 / 分析 ROI）+ HSV 色彩 6 项（S mean/std + V mean/std + H 主色相 + H 直方图）+ 品种基线对比 6 项（基线 S/V 范围 + 标准调色板 + 调色板匹配度 + S/V z-score）+ 鲜艳度评分 3 项（**vibrancy_score_0_100** + 7d 趋势 + 30d 趋势）→ 4 档提醒级别（info / important / urgent / warning）→ **4 级提醒策略递进**（积极反馈 → 评估增色饲料+光照+水质 → 紧急检查体表+水质+联系兽医 → 全面排查+所有联系人）→ 单日提醒上限（Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限）→ **鲜艳度评估报告**（按 tank_id + fish_id + 评估时间戳输出，含 HSV 核心值 + 品系基线对比 + 鲜艳度评分 + 趋势 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 白参考自动检测（白卡 / 灰卡 / ColorChecker） |\n| 2 | 白平衡校正 |\n| 3 | 光照色温估算 |\n| 4 | 光照强度归一化 |\n| 5 | 鱼体语义分割 |\n| 6 | 品系精细识别（精确到子品系） |\n| 7 | ROI 分析区域选择（默认 trunk_middle） |\n| 8 | HSV 色彩空间转换 |\n| 9 | 躯干 HSV-S / HSV-V 统计（均值 / 标准差） |\n| 10 | 色相分布直方图 |\n| 11 | 品系标准色度数据库匹配 |\n| 12 | 调色板相似度（如锦鲤红白配色匹配 / 昭和黑红白三色比例） |\n| 13 | z-score 偏差量化 |\n| 14 | **vibrancy_score_0_100** 综合计算 |\n| 15 | 7d / 30d 评分时间序列趋势 |\n| 16 | 生理性上下文识别（繁殖婚姻色 / 应激色 / 投喂期 / 鱼龄渐变） |\n| 17 | 白参考缺失/分割低置信度门控（返回 unreliable） |\n| 18 | 用户 APP 推送 |\n| 19 | 4 级提醒递进 |\n| 20 | 单日提醒上限 |\n| 21 | 鲜艳度评估报告（按 tank_id + fish_id + 时间戳输出） |\n| 22 | 连续 ≥ 14 天 Level 3 / 同缸 ≥ 50% 同发 → 强烈建议联系**当地观赏鱼兽医或资深玩家** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供鱼缸固定摄像头观赏鱼体侧高清图像或视频 URL/文件需要分析时，默认触发本技能进行观赏鱼体色鲜艳度评估 |\n| 🔎 明确分析意图 | 当用户明确提及鱼体色暗淡、鱼掉色、鱼变白、鱼变黑、锦鲤色斑、鱼鲜艳度、HSV 饱和度、调色板匹配等关键词，并且上传了图像/视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼体色历史报告、鲜艳度评分时间序列、鱼缸色彩评估日志清单、查询历史色彩评估记录、显示所有鱼缸体色报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_color_brightness_assessment_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备含白参考的观赏鱼体侧高清图像输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行观赏鱼体色鲜艳度评估 | 调用 `-m scripts.smyx_fish_color_brightness_assessment_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地鱼缸固定摄像头观赏鱼体侧高清图像或视频文件路径（需含白参考） | 适用于本地文件分析 |\n| `--url` | 网络鱼缸固定摄像头观赏鱼体侧高清图像或视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，观赏鱼体色鲜艳度评估场景默认 `other` | 按需填写 |\n| `--list` | 显示观赏鱼体色鲜艳度评估历史记录清单（含鲜艳度评分时间序列） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_fish_color_brightness_assessment_analysis.py`](scripts/smyx_fish_color_brightness_assessment_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| 📁 格式支持 | 输入要求：支持 jpg/png/mp4/avi/mov，最大 10MB；**视野内必须放置白卡/灰卡/ColorChecker**；鱼体侧面拍摄；分辨率 ≥ 1080p；光照建议 5000-6500K 中性白；鱼体短暂静止 |\n| 🔎 使用提醒 | **核心输出**：`vibrancy_score_0_100` 鲜艳度综合评分（基于品系精确基线对比） |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → warning），偏养殖管理建议定位 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限 |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **🚨 禁止**做\"营养不良 / 黑斑病 / 黑变病 / 寄生虫 / 应激综合征 / 缺乏类胡萝卜素\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体饲料品牌名称、增色剂品牌（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"，禁止推荐 X 牌增色粒） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸视频/图像（≤ 30 天，留鲜艳度时间序列 + 关键评估帧；公共养殖场/水族馆按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大 HSV-S/V 值、鲜艳度评分等指标；所有数据必须基于真实图像计算 |\n| 🔎 使用提醒 | **必须**按 **species_subtype（精确到子品系）** 匹配基线（锦鲤红白 / 大正三色 / 昭和三色 / 神仙鱼银河系 / 孔雀鱼礼服 / 龙鱼红金青）；**禁止使用通用阈值盲判** |\n| 🧑‍⚖️ 结果性质 | **必须**做白平衡校正与光照归一化（基于白参考估算光照色温 K），**未做白平衡的评分一律视为不可信** → 返回 `color_signal_unreliable` |\n| 📚 文档读取 | **必须**考虑生理性上下文（**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变**），避免误判 |\n| 🧑‍⚖️ 结果性质 | **必须**在白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见时返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡 |\n| 🔎 使用提醒 | **必须**：连续 ≥ 14 天 Level 3 / 同缸 ≥ 50% 个体同时严重暗淡 → 强烈建议联系**当地观赏鱼兽医或资深玩家** |\n| 📜 报告输出 | **必须**：鲜艳度评估报告**按 tank_id + fish_id + 评估时间戳输出**，含 HSV 核心值 + 品系基线对比 + 鲜艳度评分 + 趋势 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史评估记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地含白参考的观赏鱼体侧高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input /path/to/koi.jpg\n\n# 分析网络含白参考的观赏鱼体侧高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --url https://example.com/koi.jpg\n\n# 显示历史鲜艳度评估记录清单（自动触发关键词：查看鱼体色历史报告、鲜艳度评分时间序列等）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-color-brightness-assessment-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1787648313407\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` - 获取评估结果（HSV-S/V 均值 + 鲜艳度评分 + 品种基线对比）\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_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` - 观赏鱼体色鲜艳度评估\n\n## 输入约束\n\n- 摄像头：鱼缸固定摄像头 / 智能鱼缸内置摄像头 / 手机拍摄（侧面，垂直于鱼体侧面方向）\n- 分辨率 ≥ 1080p（颜色饱和度评估需高色彩精度）\n- **关键硬件要求**：**视野内必须放置已知白色参考物（白卡 / 灰卡 / 标准 ColorChecker）**，用于做**白平衡校正**与**光照归一化**（核心，否则环境灯光偏色会让评分失真）\n- 拍摄角度：**鱼体侧面**（评估躯干主区域颜色），鱼体应位于视野中央，与背景对比清晰\n- 光照：建议鱼缸照明常开 + **使用 5000-6500K 中性白光源**\n- 鱼体拍摄时应**短暂静止**\n- 多鱼缸场景按摄像头 ID 绑定到注册容器 ID\n- **部署时必须录入**：鱼种 + 品系（决定标准色度数据库匹配，如锦鲤红白/大正三色/昭和三色、金鱼狮子头/兰寿、神仙鱼银河系/熊猫、孔雀鱼礼服/草尾、热带龙鱼红/金/青）\n- 用户必须授权部署；公共养殖场 / 水族馆需公示告知\n\n## 关键观测信号\n\n### 白平衡校正与光照归一化（核心）\n- `white_reference_type` - 白参考类型（white_card / gray_card / colorchecker / not_detected）\n- `white_reference_detection_confidence` - 白参考检测置信度（0-1）\n- `light_temperature_kelvin_estimated` - 估算光照色温（K）\n- `wb_correction_applied` - 是否已做白平衡校正（bool）\n- `light_intensity_normalized_score` - 光照强度归一化评分\n\n### 鱼体区域分割\n- `fish_id` - 鱼个体唯一标识（可选）\n- `species_subtype` - 鱼种 + 品系（精确到子品系，如\"锦鲤-大正三色\"）\n- `body_segmentation_mask_pixel_count` - 鱼体分割掩膜像素数\n- `body_segmentation_confidence` - 分割置信度（0-1）\n- `analysis_roi` - 分析区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）\n\n### HSV 色彩信号（核心）\n- `hsv_s_mean` - 躯干区域**饱和度均值**\n- `hsv_s_std` - 饱和度标准差\n- `hsv_v_mean` - 躯干区域**亮度均值**\n- `hsv_v_std` - 亮度标准差\n- `hsv_h_dominant_hue_deg` - 主色相（0-360）\n- `hsv_h_distribution_histogram` - 色相分布直方图（用于多色品种如锦鲤\"红/白/黑\"分区比例）\n\n### 品种基线对比\n- `species_subtype_baseline_s_range` - 该品系健康标准饱和度范围\n- `species_subtype_baseline_v_range` - 该品系健康标准亮度范围\n- `species_subtype_baseline_h_target_palette` - 该品系标准色相调色板\n- `color_palette_match_score` - 与标准调色板的匹配度（0-100）\n- `s_baseline_z_score` - 饱和度相对基线的 z-score\n- `v_baseline_z_score` - 亮度相对基线的 z-score\n\n### 鲜艳度综合评分\n- `vibrancy_score_0_100` - **鲜艳度综合评分（0-100，核心输出）**\n- `vibrancy_score_trend_7d` - 近 7 天评分变化趋势\n- `vibrancy_score_trend_30d` - 近 30 天评分变化趋势\n\n## 综合判定\n\n- `color_vibrant_excellent` - 鲜艳度极佳（≥ 85）\n- `color_vibrant_good` - 鲜艳度良好（70-84）\n- `color_acceptable` - 可接受（50-69）\n- `color_dull_mild` - **体色暗淡轻度**（35-49）\n- `color_dull_severe` - **体色暗淡严重**（< 35）\n- `color_baseline_unavailable` - 该品系暂无标准基线（仅输出客观 HSV 值，不评分鲜艳度）\n- `color_signal_unreliable` - 信号不可靠（白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非疾病诊断）\n\n- Level 1（excellent / good）：仅入库 + 积极反馈\"鲜艳度优秀，继续保持当前管理方式\"\n- Level 2（acceptable / dull_mild）：重要提示，建议**评估增色饲料（中性提示\"含虾青素/螺旋藻类\"，禁止具体品牌）/ 检查光照（光谱完整性 + 色温 + 周期）/ 检查水质（NH3/NO2-/pH/KH）**\n- Level 3（dull_severe，单次）：紧急提示，建议**立即检查体表 + 游姿 + 摄食活跃度 + 水质五项 + 投喂记录**，并联系**当地观赏鱼兽医或资深玩家**\n- Level 4（dull_severe 连续 ≥ 14 天 / 同缸 ≥ 50% 个体同时严重暗淡）：最高紧急提示 + 推送所有管理人员 + 强烈建议**全面排查**\n\n## 单日提醒上限\n\n- Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **🚨 禁止**做\"营养不良 / 黑斑病 / 黑变病 / 寄生虫 / 应激综合征 / 缺乏类胡萝卜素\"等**具体疾病诊断**\n- **🚨 绝对禁止**输出具体药物名称、剂量、给药方案\n- **🚨 绝对禁止**输出具体饲料品牌名称、增色剂品牌（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"，**禁止推荐 X 牌增色粒**）\n- **禁止**长期存储完整鱼缸视频/图像（≤ 30 天，留鲜艳度时间序列 + 关键评估帧）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认\n- HSV-S/V 值、鲜艳度评分等指标必须基于真实图像计算；**禁止伪造或夸大评分**\n- 品系特异性：不同品系标准色度差异极大（锦鲤红白要求红色 S>200/白色高亮，昭和要求黑色覆盖度，神仙鱼银河系要求斑点分布而非饱和度）→ 必须**按 species_subtype 精确匹配基线**；**严禁通用阈值盲判**\n- 必须考虑光照与白平衡上下文：暖光（< 4000K）让黄/红偏强、冷光（> 7000K）让蓝/绿偏强、**未做白平衡的评分一律视为不可信**\n- 必须考虑生理性上下文：**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变** → 不可直接告警\n- 白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见 → 必须返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸 ID\n- `species_subtype` - 鱼种 + 品系\n- `fish_id` - 鱼个体（可选）\n- `white_balance_calibration` - 白平衡校正信息\n- `body_roi` - 分析区域\n- `hsv_values` - HSV 核心值\n- `species_subtype_baseline_comparison` - 品系基线对比\n- `vibrancy_score_0_100` - **鲜艳度综合评分**\n- `vibrancy_trend_7d` / `vibrancy_trend_30d` - 近期趋势\n- `composite_scene` - 综合判定\n- `alert_level` - 提醒等级\n- `recommended_actions` - 建议动作（评估增色饲料/光照/水质 / 检查体表 / 联系兽医，**不含药物与品牌**）\n- `disclaimer` - 免责声明\n\nFile v1.0.9:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.9:scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.9:skill-card.md\n\n## Description:\n\nAssesses ornamental fish color vibrancy from aquarium images or videos by extracting HSV color signals, comparing them with species-specific baselines, and producing a structured vibrancy report.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to evaluate ornamental fish color brightness from fixed aquarium camera, smart aquarium, phone image, video, or URL inputs and to retrieve historical color assessment reports. It supports husbandry review by reporting vibrancy scores, HSV measurements, baseline comparisons, trends, and non-diagnostic recommended actions.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Fish images, videos, and report-history requests are sent to the publisher's cloud-backed service.\n\nMitigation: Use the skill only with media and report data approved for that publisher service, and review endpoint configuration before deployment.\n\nRisk: The skill can silently create or reuse an identity and store service tokens locally.\n\nMitigation: Require token-storage documentation and a way to inspect or delete stored identity data before installation.\n\nRisk: The skill accepts URL inputs for backend processing.\n\nMitigation: Apply URL allowlisting and permission review before enabling URL-based analysis.\n\n## Reference(s):\n\n- [API documentation](references/api_doc.md)\n- [Skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-color-brightness-assessment-analysis)\n- [Publisher profile](https://clawhub.ai/user/smyx-sunjinhui)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, json, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown or JSON structured analysis reports with report links and command-line output]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Outputs may include HSV measurements, vibrancy score, baseline comparison, trend fields, alert level, recommended actions, and historical report tables.]\n\n## Skill Version(s):\n\n1.0.9 (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.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, 45564 bytes\n\nFiles: references/api_doc.md (7488b), scripts/__init__.py (62b), scripts/config.py (691b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_fish_color_brightness_assessment_analysis.py (3820b), skill-card.md (2924b), SKILL.md (19010b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (472b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (165b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"smyx-fish-color-brightness-assessment-analysis\"\ndescription: \"Through fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy. | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🌈 Ornamental Fish Color Brightness Assessment | 观赏鱼体色鲜艳度评估\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **观赏鱼体色鲜艳度评估** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy score (0-100). When the score is below a threshold (e.g. <50), the system reports 'dull color', which may signal disease, malnutrition or poor water quality. Application scenarios: home aquariums, public aquariums, ornamental fish farms. The system assesses weekly or daily and generates color health reports. Skill features: fish color is a critical health indicator — dull coloration is often an early sign of disease, parasites or environmental stress. AI-based periodic vibrancy assessment helps spot issues early and improve husbandry management. This skill can be integrated into smart aquarium cameras or aquatic apps.\n\n通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。应用场景：家庭鱼缸、水族馆、观赏鱼养殖场。系统每周或每日评估，生成体色健康报告。技能特点：鱼体颜色是健康的重要指示器，体色暗淡常为疾病、寄生虫或环境应激的早期表现。通过 AI 定期评估鲜艳度，可及时发现问题，提升养殖管理水平。该技能可集成到智能鱼缸摄像头或水族 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族色彩评估 AI。你的任务是分析观赏鱼体侧高清图像（≥ 1080p，鱼体侧面拍摄，视野内必须有白卡/灰卡/ColorChecker 作白平衡参考），先对图像做**白平衡校正与光照归一化**（基于白参考估算光照色温 K），然后分割鱼体并提取躯干主区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）的 **HSV-S（饱和度）+ HSV-V（亮度）+ HSV-H（色相分布直方图）**，按 **species_subtype（精确到子品系，如锦鲤-大正三色 / 神仙鱼-银河系 / 孔雀鱼-礼服）匹配标准色度基线**（饱和度范围 / 亮度范围 / 调色板 / z-score），计算 **vibrancy_score_0_100（鲜艳度综合评分）**，再结合 7 天 / 30 天评分趋势，按 7 类综合场景判定（color_vibrant_excellent ≥ 85 / color_vibrant_good 70-84 / color_acceptable 50-69 / color_dull_mild 35-49 / color_dull_severe < 35 / color_baseline_unavailable / color_signal_unreliable），并按 4 级提醒策略递进（Level 1 积极反馈 → Level 2 评估增色饲料+光照+水质 → Level 3 紧急检查体表+游姿+水质五项+联系兽医 → Level 4 连续 ≥ 14 天或同缸 ≥ 50% 同时严重暗淡 + 全面排查 + 所有联系人）。**核心硬约束：未做白平衡的评分一律视为不可信** → 必须返回 `color_signal_unreliable`。品系特异性必须按基线判定（锦鲤红白要求红色 S>200/白色高亮 / 昭和要求黑色覆盖度 / 神仙鱼银河系要求斑点分布而非饱和度），**严禁通用阈值盲判**。生理性上下文必须考虑（**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变**），避免误判。白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见时必须返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡。不提供任何疾病诊断，仅输出基于色彩分析的鲜艳度评分；**严禁输出具体药物名称、剂量、给药方案**；**严禁输出具体饲料品牌名称、增色剂品牌**（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"）；严禁伪造夸大 HSV 值与鲜艳度评分；严禁越权代用户启停灯光/加热棒/喂食器/增氧/换水（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼缸固定摄像头 / 智能鱼缸内置摄像头 / 手机侧拍**定期拍摄**（默认每周或每日 1 次，含白参考）高清图像，识别 7 类综合场景（color_vibrant_excellent / good / acceptable / dull_mild / dull_severe / baseline_unavailable / signal_unreliable）→ **五组指标**：白平衡校正 5 项（白参考类型 / 检测置信度 / 估算色温 K / 是否校正 / 光照归一化）+ 鱼体分割 5 项（fish_id / species_subtype / 分割掩膜像素 / 分割置信度 / 分析 ROI）+ HSV 色彩 6 项（S mean/std + V mean/std + H 主色相 + H 直方图）+ 品种基线对比 6 项（基线 S/V 范围 + 标准调色板 + 调色板匹配度 + S/V z-score）+ 鲜艳度评分 3 项（**vibrancy_score_0_100** + 7d 趋势 + 30d 趋势）→ 4 档提醒级别（info / important / urgent / warning）→ **4 级提醒策略递进**（积极反馈 → 评估增色饲料+光照+水质 → 紧急检查体表+水质+联系兽医 → 全面排查+所有联系人）→ 单日提醒上限（Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限）→ **鲜艳度评估报告**（按 tank_id + fish_id + 评估时间戳输出，含 HSV 核心值 + 品系基线对比 + 鲜艳度评分 + 趋势 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 白参考自动检测（白卡 / 灰卡 / ColorChecker） |\n| 2 | 白平衡校正 |\n| 3 | 光照色温估算 |\n| 4 | 光照强度归一化 |\n| 5 | 鱼体语义分割 |\n| 6 | 品系精细识别（精确到子品系） |\n| 7 | ROI 分析区域选择（默认 trunk_middle） |\n| 8 | HSV 色彩空间转换 |\n| 9 | 躯干 HSV-S / HSV-V 统计（均值 / 标准差） |\n| 10 | 色相分布直方图 |\n| 11 | 品系标准色度数据库匹配 |\n| 12 | 调色板相似度（如锦鲤红白配色匹配 / 昭和黑红白三色比例） |\n| 13 | z-score 偏差量化 |\n| 14 | **vibrancy_score_0_100** 综合计算 |\n| 15 | 7d / 30d 评分时间序列趋势 |\n| 16 | 生理性上下文识别（繁殖婚姻色 / 应激色 / 投喂期 / 鱼龄渐变） |\n| 17 | 白参考缺失/分割低置信度门控（返回 unreliable） |\n| 18 | 用户 APP 推送 |\n| 19 | 4 级提醒递进 |\n| 20 | 单日提醒上限 |\n| 21 | 鲜艳度评估报告（按 tank_id + fish_id + 时间戳输出） |\n| 22 | 连续 ≥ 14 天 Level 3 / 同缸 ≥ 50% 同发 → 强烈建议联系**当地观赏鱼兽医或资深玩家** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供鱼缸固定摄像头观赏鱼体侧高清图像或视频 URL/文件需要分析时，默认触发本技能进行观赏鱼体色鲜艳度评估 |\n| 🔎 明确分析意图 | 当用户明确提及鱼体色暗淡、鱼掉色、鱼变白、鱼变黑、锦鲤色斑、鱼鲜艳度、HSV 饱和度、调色板匹配等关键词，并且上传了图像/视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼体色历史报告、鲜艳度评分时间序列、鱼缸色彩评估日志清单、查询历史色彩评估记录、显示所有鱼缸体色报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_color_brightness_assessment_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备含白参考的观赏鱼体侧高清图像输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行观赏鱼体色鲜艳度评估 | 调用 `-m scripts.smyx_fish_color_brightness_assessment_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地鱼缸固定摄像头观赏鱼体侧高清图像或视频文件路径（需含白参考） | 适用于本地文件分析 |\n| `--url` | 网络鱼缸固定摄像头观赏鱼体侧高清图像或视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，观赏鱼体色鲜艳度评估场景默认 `other` | 按需填写 |\n| `--list` | 显示观赏鱼体色鲜艳度评估历史记录清单（含鲜艳度评分时间序列） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_fish_color_brightness_assessment_analysis.py`](scripts/smyx_fish_color_brightness_assessment_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| 📁 格式支持 | 输入要求：支持 jpg/png/mp4/avi/mov，最大 10MB；**视野内必须放置白卡/灰卡/ColorChecker**；鱼体侧面拍摄；分辨率 ≥ 1080p；光照建议 5000-6500K 中性白；鱼体短暂静止 |\n| 🔎 使用提醒 | **核心输出**：`vibrancy_score_0_100` 鲜艳度综合评分（基于品系精确基线对比） |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → warning），偏养殖管理建议定位 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限 |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **🚨 禁止**做\"营养不良 / 黑斑病 / 黑变病 / 寄生虫 / 应激综合征 / 缺乏类胡萝卜素\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体饲料品牌名称、增色剂品牌（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"，禁止推荐 X 牌增色粒） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸视频/图像（≤ 30 天，留鲜艳度时间序列 + 关键评估帧；公共养殖场/水族馆按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大 HSV-S/V 值、鲜艳度评分等指标；所有数据必须基于真实图像计算 |\n| 🔎 使用提醒 | **必须**按 **species_subtype（精确到子品系）** 匹配基线（锦鲤红白 / 大正三色 / 昭和三色 / 神仙鱼银河系 / 孔雀鱼礼服 / 龙鱼红金青）；**禁止使用通用阈值盲判** |\n| 🧑‍⚖️ 结果性质 | **必须**做白平衡校正与光照归一化（基于白参考估算光照色温 K），**未做白平衡的评分一律视为不可信** → 返回 `color_signal_unreliable` |\n| 📚 文档读取 | **必须**考虑生理性上下文（**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变**），避免误判 |\n| 🧑‍⚖️ 结果性质 | **必须**在白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见时返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡 |\n| 🔎 使用提醒 | **必须**：连续 ≥ 14 天 Level 3 / 同缸 ≥ 50% 个体同时严重暗淡 → 强烈建议联系**当地观赏鱼兽医或资深玩家** |\n| 📜 报告输出 | **必须**：鲜艳度评估报告**按 tank_id + fish_id + 评估时间戳输出**，含 HSV 核心值 + 品系基线对比 + 鲜艳度评分 + 趋势 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史评估记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地含白参考的观赏鱼体侧高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input /path/to/koi.jpg\n\n# 分析网络含白参考的观赏鱼体侧高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --url https://example.com/koi.jpg\n\n# 显示历史鲜艳度评估记录清单（自动触发关键词：查看鱼体色历史报告、鲜艳度评分时间序列等）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-color-brightness-assessment-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1787142629574\n}\n\nFile v1.0.8:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放观赏鱼体色鲜艳度评估 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动观赏鱼体色鲜艳度评估任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取评估结果（HSV-S/V 均值 + 鲜艳度评分 + 品种基线对比）\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_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` - 观赏鱼体色鲜艳度评估\n\n## 输入约束\n\n- 摄像头：鱼缸固定摄像头 / 智能鱼缸内置摄像头 / 手机拍摄（侧面，垂直于鱼体侧面方向）\n- 分辨率 ≥ 1080p（颜色饱和度评估需高色彩精度）\n- **关键硬件要求**：**视野内必须放置已知白色参考物（白卡 / 灰卡 / 标准 ColorChecker）**，用于做**白平衡校正**与**光照归一化**（核心，否则环境灯光偏色会让评分失真）\n- 拍摄角度：**鱼体侧面**（评估躯干主区域颜色），鱼体应位于视野中央，与背景对比清晰\n- 光照：建议鱼缸照明常开 + **使用 5000-6500K 中性白光源**\n- 鱼体拍摄时应**短暂静止**\n- 多鱼缸场景按摄像头 ID 绑定到注册容器 ID\n- **部署时必须录入**：鱼种 + 品系（决定标准色度数据库匹配，如锦鲤红白/大正三色/昭和三色、金鱼狮子头/兰寿、神仙鱼银河系/熊猫、孔雀鱼礼服/草尾、热带龙鱼红/金/青）\n- 用户必须授权部署；公共养殖场 / 水族馆需公示告知\n\n## 关键观测信号\n\n### 白平衡校正与光照归一化（核心）\n- `white_reference_type` - 白参考类型（white_card / gray_card / colorchecker / not_detected）\n- `white_reference_detection_confidence` - 白参考检测置信度（0-1）\n- `light_temperature_kelvin_estimated` - 估算光照色温（K）\n- `wb_correction_applied` - 是否已做白平衡校正（bool）\n- `light_intensity_normalized_score` - 光照强度归一化评分\n\n### 鱼体区域分割\n- `fish_id` - 鱼个体唯一标识（可选）\n- `species_subtype` - 鱼种 + 品系（精确到子品系，如\"锦鲤-大正三色\"）\n- `body_segmentation_mask_pixel_count` - 鱼体分割掩膜像素数\n- `body_segmentation_confidence` - 分割置信度（0-1）\n- `analysis_roi` - 分析区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）\n\n### HSV 色彩信号（核心）\n- `hsv_s_mean` - 躯干区域**饱和度均值**\n- `hsv_s_std` - 饱和度标准差\n- `hsv_v_mean` - 躯干区域**亮度均值**\n- `hsv_v_std` - 亮度标准差\n- `hsv_h_dominant_hue_deg` - 主色相（0-360）\n- `hsv_h_distribution_histogram` - 色相分布直方图（用于多色品种如锦鲤\"红/白/黑\"分区比例）\n\n### 品种基线对比\n- `species_subtype_baseline_s_range` - 该品系健康标准饱和度范围\n- `species_subtype_baseline_v_range` - 该品系健康标准亮度范围\n- `species_subtype_baseline_h_target_palette` - 该品系标准色相调色板\n- `color_palette_match_score` - 与标准调色板的匹配度（0-100）\n- `s_baseline_z_score` - 饱和度相对基线的 z-score\n- `v_baseline_z_score` - 亮度相对基线的 z-score\n\n### 鲜艳度综合评分\n- `vibrancy_score_0_100` - **鲜艳度综合评分（0-100，核心输出）**\n- `vibrancy_score_trend_7d` - 近 7 天评分变化趋势\n- `vibrancy_score_trend_30d` - 近 30 天评分变化趋势\n\n## 综合判定\n\n- `color_vibrant_excellent` - 鲜艳度极佳（≥ 85）\n- `color_vibrant_good` - 鲜艳度良好（70-84）\n- `color_acceptable` - 可接受（50-69）\n- `color_dull_mild` - **体色暗淡轻度**（35-49）\n- `color_dull_severe` - **体色暗淡严重**（< 35）\n- `color_baseline_unavailable` - 该品系暂无标准基线（仅输出客观 HSV 值，不评分鲜艳度）\n- `color_signal_unreliable` - 信号不可靠（白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非疾病诊断）\n\n- Level 1（excellent / good）：仅入库 + 积极反馈\"鲜艳度优秀，继续保持当前管理方式\"\n- Level 2（acceptable / dull_mild）：重要提示，建议**评估增色饲料（中性提示\"含虾青素/螺旋藻类\"，禁止具体品牌）/ 检查光照（光谱完整性 + 色温 + 周期）/ 检查水质（NH3/NO2-/pH/KH）**\n- Level 3（dull_severe，单次）：紧急提示，建议**立即检查体表 + 游姿 + 摄食活跃度 + 水质五项 + 投喂记录**，并联系**当地观赏鱼兽医或资深玩家**\n- Level 4（dull_severe 连续 ≥ 14 天 / 同缸 ≥ 50% 个体同时严重暗淡）：最高紧急提示 + 推送所有管理人员 + 强烈建议**全面排查**\n\n## 单日提醒上限\n\n- Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **🚨 禁止**做\"营养不良 / 黑斑病 / 黑变病 / 寄生虫 / 应激综合征 / 缺乏类胡萝卜素\"等**具体疾病诊断**\n- **🚨 绝对禁止**输出具体药物名称、剂量、给药方案\n- **🚨 绝对禁止**输出具体饲料品牌名称、增色剂品牌（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"，**禁止推荐 X 牌增色粒**）\n- **禁止**长期存储完整鱼缸视频/图像（≤ 30 天，留鲜艳度时间序列 + 关键评估帧）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认\n- HSV-S/V 值、鲜艳度评分等指标必须基于真实图像计算；**禁止伪造或夸大评分**\n- 品系特异性：不同品系标准色度差异极大（锦鲤红白要求红色 S>200/白色高亮，昭和要求黑色覆盖度，神仙鱼银河系要求斑点分布而非饱和度）→ 必须**按 species_subtype 精确匹配基线**；**严禁通用阈值盲判**\n- 必须考虑光照与白平衡上下文：暖光（< 4000K）让黄/红偏强、冷光（> 7000K）让蓝/绿偏强、**未做白平衡的评分一律视为不可信**\n- 必须考虑生理性上下文：**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变** → 不可直接告警\n- 白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见 → 必须返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸 ID\n- `species_subtype` - 鱼种 + 品系\n- `fish_id` - 鱼个体（可选）\n- `white_balance_calibration` - 白平衡校正信息\n- `body_roi` - 分析区域\n- `hsv_values` - HSV 核心值\n- `species_subtype_baseline_comparison` - 品系基线对比\n- `vibrancy_score_0_100` - **鲜艳度综合评分**\n- `vibrancy_trend_7d` / `vibrancy_trend_30d` - 近期趋势\n- `composite_scene` - 综合判定\n- `alert_level` - 提醒等级\n- `recommended_actions` - 建议动作（评估增色饲料/光照/水质 / 检查体表 / 联系兽医，**不含药物与品牌**）\n- `disclaimer` - 免责声明\n\nFile v1.0.8:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.8:scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.8:skill-card.md\n\n## Description:\n\nAssesses ornamental fish images or videos for color saturation, brightness, species-specific baseline fit, vibrancy score, trends, and husbandry-oriented recommendations.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nAquarium keepers, ornamental fish farms, public aquariums, and developers integrating smart aquarium workflows use this skill to analyze fish media and generate color vibrancy reports. It supports recurring review of saturation, brightness, baseline comparison, trend, and suggested management actions without providing veterinary diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Supplied aquarium images, videos, or URL references may be sent to a remote cloud service for analysis.\n\nMitigation: Use only non-sensitive aquarium media and install the skill only where cloud processing of that media is acceptable.\n\nRisk: The skill may automatically create or reuse account identity state and store identity tokens in a local workspace database.\n\nMitigation: Run it in a workspace where this persistence is acceptable, review local data handling before installation, and remove workspace data when the identity state is no longer needed.\n\nRisk: Historical report lookup can query account-linked analysis history.\n\nMitigation: Use history lookup only when the user requests prior reports and confirm that the workspace account context is appropriate for the reports being retrieved.\n\nRisk: Color-vibrancy results could be mistaken for a veterinary diagnosis or direct treatment instruction.\n\nMitigation: Treat outputs as color and husbandry screening guidance only; avoid medicine or product-brand recommendations and consult a qualified ornamental fish veterinarian or expert for health decisions.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-color-brightness-assessment-analysis)\n- [API documentation](references/api_doc.md)\n- [Skill usage demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, guidance, shell commands]\n\n**Output Format:** [Markdown or JSON structured analysis report with report links and optional saved output file]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include vibrancy score, HSV values, baseline comparison, trend fields, alert level, recommended actions, and report export URL.]\n\n## Skill Version(s):\n\n1.0.8 (source: server release metadata; packaged SKILL.md 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.8:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.8:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.7: 31 files, 45499 bytes\n\nFiles: references/api_doc.md (7488b), scripts/__init__.py (62b), scripts/config.py (691b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_fish_color_brightness_assessment_analysis.py (3820b), skill-card.md (2731b), SKILL.md (19010b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (165b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"smyx-fish-color-brightness-assessment-analysis\"\ndescription: \"Through fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy. | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🌈 Ornamental Fish Color Brightness Assessment | 观赏鱼体色鲜艳度评估\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **观赏鱼体色鲜艳度评估** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy score (0-100). When the score is below a threshold (e.g. <50), the system reports 'dull color', which may signal disease, malnutrition or poor water quality. Application scenarios: home aquariums, public aquariums, ornamental fish farms. The system assesses weekly or daily and generates color health reports. Skill features: fish color is a critical health indicator — dull coloration is often an early sign of disease, parasites or environmental stress. AI-based periodic vibrancy assessment helps spot issues early and improve husbandry management. This skill can be integrated into smart aquarium cameras or aquatic apps.\n\n通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。应用场景：家庭鱼缸、水族馆、观赏鱼养殖场。系统每周或每日评估，生成体色健康报告。技能特点：鱼体颜色是健康的重要指示器，体色暗淡常为疾病、寄生虫或环境应激的早期表现。通过 AI 定期评估鲜艳度，可及时发现问题，提升养殖管理水平。该技能可集成到智能鱼缸摄像头或水族 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族色彩评估 AI。你的任务是分析观赏鱼体侧高清图像（≥ 1080p，鱼体侧面拍摄，视野内必须有白卡/灰卡/ColorChecker 作白平衡参考），先对图像做**白平衡校正与光照归一化**（基于白参考估算光照色温 K），然后分割鱼体并提取躯干主区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）的 **HSV-S（饱和度）+ HSV-V（亮度）+ HSV-H（色相分布直方图）**，按 **species_subtype（精确到子品系，如锦鲤-大正三色 / 神仙鱼-银河系 / 孔雀鱼-礼服）匹配标准色度基线**（饱和度范围 / 亮度范围 / 调色板 / z-score），计算 **vibrancy_score_0_100（鲜艳度综合评分）**，再结合 7 天 / 30 天评分趋势，按 7 类综合场景判定（color_vibrant_excellent ≥ 85 / color_vibrant_good 70-84 / color_acceptable 50-69 / color_dull_mild 35-49 / color_dull_severe < 35 / color_baseline_unavailable / color_signal_unreliable），并按 4 级提醒策略递进（Level 1 积极反馈 → Level 2 评估增色饲料+光照+水质 → Level 3 紧急检查体表+游姿+水质五项+联系兽医 → Level 4 连续 ≥ 14 天或同缸 ≥ 50% 同时严重暗淡 + 全面排查 + 所有联系人）。**核心硬约束：未做白平衡的评分一律视为不可信** → 必须返回 `color_signal_unreliable`。品系特异性必须按基线判定（锦鲤红白要求红色 S>200/白色高亮 / 昭和要求黑色覆盖度 / 神仙鱼银河系要求斑点分布而非饱和度），**严禁通用阈值盲判**。生理性上下文必须考虑（**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变**），避免误判。白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见时必须返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡。不提供任何疾病诊断，仅输出基于色彩分析的鲜艳度评分；**严禁输出具体药物名称、剂量、给药方案**；**严禁输出具体饲料品牌名称、增色剂品牌**（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"）；严禁伪造夸大 HSV 值与鲜艳度评分；严禁越权代用户启停灯光/加热棒/喂食器/增氧/换水（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼缸固定摄像头 / 智能鱼缸内置摄像头 / 手机侧拍**定期拍摄**（默认每周或每日 1 次，含白参考）高清图像，识别 7 类综合场景（color_vibrant_excellent / good / acceptable / dull_mild / dull_severe / baseline_unavailable / signal_unreliable）→ **五组指标**：白平衡校正 5 项（白参考类型 / 检测置信度 / 估算色温 K / 是否校正 / 光照归一化）+ 鱼体分割 5 项（fish_id / species_subtype / 分割掩膜像素 / 分割置信度 / 分析 ROI）+ HSV 色彩 6 项（S mean/std + V mean/std + H 主色相 + H 直方图）+ 品种基线对比 6 项（基线 S/V 范围 + 标准调色板 + 调色板匹配度 + S/V z-score）+ 鲜艳度评分 3 项（**vibrancy_score_0_100** + 7d 趋势 + 30d 趋势）→ 4 档提醒级别（info / important / urgent / warning）→ **4 级提醒策略递进**（积极反馈 → 评估增色饲料+光照+水质 → 紧急检查体表+水质+联系兽医 → 全面排查+所有联系人）→ 单日提醒上限（Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限）→ **鲜艳度评估报告**（按 tank_id + fish_id + 评估时间戳输出，含 HSV 核心值 + 品系基线对比 + 鲜艳度评分 + 趋势 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 白参考自动检测（白卡 / 灰卡 / ColorChecker） |\n| 2 | 白平衡校正 |\n| 3 | 光照色温估算 |\n| 4 | 光照强度归一化 |\n| 5 | 鱼体语义分割 |\n| 6 | 品系精细识别（精确到子品系） |\n| 7 | ROI 分析区域选择（默认 trunk_middle） |\n| 8 | HSV 色彩空间转换 |\n| 9 | 躯干 HSV-S / HSV-V 统计（均值 / 标准差） |\n| 10 | 色相分布直方图 |\n| 11 | 品系标准色度数据库匹配 |\n| 12 | 调色板相似度（如锦鲤红白配色匹配 / 昭和黑红白三色比例） |\n| 13 | z-score 偏差量化 |\n| 14 | **vibrancy_score_0_100** 综合计算 |\n| 15 | 7d / 30d 评分时间序列趋势 |\n| 16 | 生理性上下文识别（繁殖婚姻色 / 应激色 / 投喂期 / 鱼龄渐变） |\n| 17 | 白参考缺失/分割低置信度门控（返回 unreliable） |\n| 18 | 用户 APP 推送 |\n| 19 | 4 级提醒递进 |\n| 20 | 单日提醒上限 |\n| 21 | 鲜艳度评估报告（按 tank_id + fish_id + 时间戳输出） |\n| 22 | 连续 ≥ 14 天 Level 3 / 同缸 ≥ 50% 同发 → 强烈建议联系**当地观赏鱼兽医或资深玩家** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供鱼缸固定摄像头观赏鱼体侧高清图像或视频 URL/文件需要分析时，默认触发本技能进行观赏鱼体色鲜艳度评估 |\n| 🔎 明确分析意图 | 当用户明确提及鱼体色暗淡、鱼掉色、鱼变白、鱼变黑、锦鲤色斑、鱼鲜艳度、HSV 饱和度、调色板匹配等关键词，并且上传了图像/视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼体色历史报告、鲜艳度评分时间序列、鱼缸色彩评估日志清单、查询历史色彩评估记录、显示所有鱼缸体色报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_color_brightness_assessment_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备含白参考的观赏鱼体侧高清图像输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行观赏鱼体色鲜艳度评估 | 调用 `-m scripts.smyx_fish_color_brightness_assessment_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地鱼缸固定摄像头观赏鱼体侧高清图像或视频文件路径（需含白参考） | 适用于本地文件分析 |\n| `--url` | 网络鱼缸固定摄像头观赏鱼体侧高清图像或视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，观赏鱼体色鲜艳度评估场景默认 `other` | 按需填写 |\n| `--list` | 显示观赏鱼体色鲜艳度评估历史记录清单（含鲜艳度评分时间序列） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_fish_color_brightness_assessment_analysis.py`](scripts/smyx_fish_color_brightness_assessment_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| 📁 格式支持 | 输入要求：支持 jpg/png/mp4/avi/mov，最大 10MB；**视野内必须放置白卡/灰卡/ColorChecker**；鱼体侧面拍摄；分辨率 ≥ 1080p；光照建议 5000-6500K 中性白；鱼体短暂静止 |\n| 🔎 使用提醒 | **核心输出**：`vibrancy_score_0_100` 鲜艳度综合评分（基于品系精确基线对比） |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → warning），偏养殖管理建议定位 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限 |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **🚨 禁止**做\"营养不良 / 黑斑病 / 黑变病 / 寄生虫 / 应激综合征 / 缺乏类胡萝卜素\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体饲料品牌名称、增色剂品牌（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"，禁止推荐 X 牌增色粒） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸视频/图像（≤ 30 天，留鲜艳度时间序列 + 关键评估帧；公共养殖场/水族馆按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大 HSV-S/V 值、鲜艳度评分等指标；所有数据必须基于真实图像计算 |\n| 🔎 使用提醒 | **必须**按 **species_subtype（精确到子品系）** 匹配基线（锦鲤红白 / 大正三色 / 昭和三色 / 神仙鱼银河系 / 孔雀鱼礼服 / 龙鱼红金青）；**禁止使用通用阈值盲判** |\n| 🧑‍⚖️ 结果性质 | **必须**做白平衡校正与光照归一化（基于白参考估算光照色温 K），**未做白平衡的评分一律视为不可信** → 返回 `color_signal_unreliable` |\n| 📚 文档读取 | **必须**考虑生理性上下文（**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变**），避免误判 |\n| 🧑‍⚖️ 结果性质 | **必须**在白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见时返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡 |\n| 🔎 使用提醒 | **必须**：连续 ≥ 14 天 Level 3 / 同缸 ≥ 50% 个体同时严重暗淡 → 强烈建议联系**当地观赏鱼兽医或资深玩家** |\n| 📜 报告输出 | **必须**：鲜艳度评估报告**按 tank_id + fish_id + 评估时间戳输出**，含 HSV 核心值 + 品系基线对比 + 鲜艳度评分 + 趋势 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史评估记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地含白参考的观赏鱼体侧高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input /path/to/koi.jpg\n\n# 分析网络含白参考的观赏鱼体侧高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --url https://example.com/koi.jpg\n\n# 显示历史鲜艳度评估记录清单（自动触发关键词：查看鱼体色历史报告、鲜艳度评分时间序列等）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-color-brightness-assessment-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1786430564959\n}\n\nFile v1.0.7:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放观赏鱼体色鲜艳度评估 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动观赏鱼体色鲜艳度评估任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取评估结果（HSV-S/V 均值 + 鲜艳度评分 + 品种基线对比）\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_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` - 观赏鱼体色鲜艳度评估\n\n## 输入约束\n\n- 摄像头：鱼缸固定摄像头 / 智能鱼缸内置摄像头 / 手机拍摄（侧面，垂直于鱼体侧面方向）\n- 分辨率 ≥ 1080p（颜色饱和度评估需高色彩精度）\n- **关键硬件要求**：**视野内必须放置已知白色参考物（白卡 / 灰卡 / 标准 ColorChecker）**，用于做**白平衡校正**与**光照归一化**（核心，否则环境灯光偏色会让评分失真）\n- 拍摄角度：**鱼体侧面**（评估躯干主区域颜色），鱼体应位于视野中央，与背景对比清晰\n- 光照：建议鱼缸照明常开 + **使用 5000-6500K 中性白光源**\n- 鱼体拍摄时应**短暂静止**\n- 多鱼缸场景按摄像头 ID 绑定到注册容器 ID\n- **部署时必须录入**：鱼种 + 品系（决定标准色度数据库匹配，如锦鲤红白/大正三色/昭和三色、金鱼狮子头/兰寿、神仙鱼银河系/熊猫、孔雀鱼礼服/草尾、热带龙鱼红/金/青）\n- 用户必须授权部署；公共养殖场 / 水族馆需公示告知\n\n## 关键观测信号\n\n### 白平衡校正与光照归一化（核心）\n- `white_reference_type` - 白参考类型（white_card / gray_card / colorchecker / not_detected）\n- `white_reference_detection_confidence` - 白参考检测置信度（0-1）\n- `light_temperature_kelvin_estimated` - 估算光照色温（K）\n- `wb_correction_applied` - 是否已做白平衡校正（bool）\n- `light_intensity_normalized_score` - 光照强度归一化评分\n\n### 鱼体区域分割\n- `fish_id` - 鱼个体唯一标识（可选）\n- `species_subtype` - 鱼种 + 品系（精确到子品系，如\"锦鲤-大正三色\"）\n- `body_segmentation_mask_pixel_count` - 鱼体分割掩膜像素数\n- `body_segmentation_confidence` - 分割置信度（0-1）\n- `analysis_roi` - 分析区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）\n\n### HSV 色彩信号（核心）\n- `hsv_s_mean` - 躯干区域**饱和度均值**\n- `hsv_s_std` - 饱和度标准差\n- `hsv_v_mean` - 躯干区域**亮度均值**\n- `hsv_v_std` - 亮度标准差\n- `hsv_h_dominant_hue_deg` - 主色相（0-360）\n- `hsv_h_distribution_histogram` - 色相分布直方图（用于多色品种如锦鲤\"红/白/黑\"分区比例）\n\n### 品种基线对比\n- `species_subtype_baseline_s_range` - 该品系健康标准饱和度范围\n- `species_subtype_baseline_v_range` - 该品系健康标准亮度范围\n- `species_subtype_baseline_h_target_palette` - 该品系标准色相调色板\n- `color_palette_match_score` - 与标准调色板的匹配度（0-100）\n- `s_baseline_z_score` - 饱和度相对基线的 z-score\n- `v_baseline_z_score` - 亮度相对基线的 z-score\n\n### 鲜艳度综合评分\n- `vibrancy_score_0_100` - **鲜艳度综合评分（0-100，核心输出）**\n- `vibrancy_score_trend_7d` - 近 7 天评分变化趋势\n- `vibrancy_score_trend_30d` - 近 30 天评分变化趋势\n\n## 综合判定\n\n- `color_vibrant_excellent` - 鲜艳度极佳（≥ 85）\n- `color_vibrant_good` - 鲜艳度良好（70-84）\n- `color_acceptable` - 可接受（50-69）\n- `color_dull_mild` - **体色暗淡轻度**（35-49）\n- `color_dull_severe` - **体色暗淡严重**（< 35）\n- `color_baseline_unavailable` - 该品系暂无标准基线（仅输出客观 HSV 值，不评分鲜艳度）\n- `color_signal_unreliable` - 信号不可靠（白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非疾病诊断）\n\n- Level 1（excellent / good）：仅入库 + 积极反馈\"鲜艳度优秀，继续保持当前管理方式\"\n- Level 2（acceptable / dull_mild）：重要提示，建议**评估增色饲料（中性提示\"含虾青素/螺旋藻类\"，禁止具体品牌）/ 检查光照（光谱完整性 + 色温 + 周期）/ 检查水质（NH3/NO2-/pH/KH）**\n- Level 3（dull_severe，单次）：紧急提示，建议**立即检查体表 + 游姿 + 摄食活跃度 + 水质五项 + 投喂记录**，并联系**当地观赏鱼兽医或资深玩家**\n- Level 4（dull_severe 连续 ≥ 14 天 / 同缸 ≥ 50% 个体同时严重暗淡）：最高紧急提示 + 推送所有管理人员 + 强烈建议**全面排查**\n\n## 单日提醒上限\n\n- Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **🚨 禁止**做\"营养不良 / 黑斑病 / 黑变病 / 寄生虫 / 应激综合征 / 缺乏类胡萝卜素\"等**具体疾病诊断**\n- **🚨 绝对禁止**输出具体药物名称、剂量、给药方案\n- **🚨 绝对禁止**输出具体饲料品牌名称、增色剂品牌（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"，**禁止推荐 X 牌增色粒**）\n- **禁止**长期存储完整鱼缸视频/图像（≤ 30 天，留鲜艳度时间序列 + 关键评估帧）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认\n- HSV-S/V 值、鲜艳度评分等指标必须基于真实图像计算；**禁止伪造或夸大评分**\n- 品系特异性：不同品系标准色度差异极大（锦鲤红白要求红色 S>200/白色高亮，昭和要求黑色覆盖度，神仙鱼银河系要求斑点分布而非饱和度）→ 必须**按 species_subtype 精确匹配基线**；**严禁通用阈值盲判**\n- 必须考虑光照与白平衡上下文：暖光（< 4000K）让黄/红偏强、冷光（> 7000K）让蓝/绿偏强、**未做白平衡的评分一律视为不可信**\n- 必须考虑生理性上下文：**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变** → 不可直接告警\n- 白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见 → 必须返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸 ID\n- `species_subtype` - 鱼种 + 品系\n- `fish_id` - 鱼个体（可选）\n- `white_balance_calibration` - 白平衡校正信息\n- `body_roi` - 分析区域\n- `hsv_values` - HSV 核心值\n- `species_subtype_baseline_comparison` - 品系基线对比\n- `vibrancy_score_0_100` - **鲜艳度综合评分**\n- `vibrancy_trend_7d` / `vibrancy_trend_30d` - 近期趋势\n- `composite_scene` - 综合判定\n- `alert_level` - 提醒等级\n- `recommended_actions` - 建议动作（评估增色饲料/光照/水质 / 检查体表 / 联系兽医，**不含药物与品牌**）\n- `disclaimer` - 免责声明\n\nFile v1.0.7:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.7:scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.7:skill-card.md\n\n## Description:\n\nAssesses ornamental fish color vibrancy from aquarium image or video inputs by extracting HSV saturation and brightness signals, comparing them with species-specific baselines, and producing a structured vibrancy report.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users, aquarium operators, and developers use this skill to analyze supported fish images, videos, or URLs for color vibrancy scoring, species-baseline comparison, trend reporting, and management-oriented recommendations.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Fish images, videos, or submitted URLs may be processed by the publisher's cloud service.\n\nMitigation: Use non-sensitive media and avoid private or internal URLs unless the publisher provides acceptable consent, retention, deletion, and data-use controls.\n\nRisk: The skill may create or reuse backend accounts and store local tokens in the workspace with limited user control.\n\nMitigation: Review local account and token storage before installation, restrict workspace access, and remove stored credentials when the skill is no longer needed.\n\nRisk: Color-vibrancy reports can be misleading when inputs lack white-reference calibration, have poor lighting, or do not show the fish side clearly.\n\nMitigation: Require the documented input controls, including a white or gray reference, adequate lighting, species subtype, and side-view imagery; treat unreliable signals as needing retake rather than diagnosis.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-color-brightness-assessment-analysis)\n- [Skill API Documentation](references/api_doc.md)\n- [Shared Analysis API Documentation](skills/smyx_analysis/references/api_doc.md)\n- [Skill Usage Introduction](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance]\n\n**Output Format:** [Markdown or JSON structured analysis report with command-line usage guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Reports may include HSV measurements, species-baseline comparison, vibrancy score, trend fields, recommended actions, and a report link.]\n\n## Skill Version(s):\n\n1.0.7 (source: server release metadata; 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.7:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.7:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.6: 31 files, 45481 bytes\n\nFiles: references/api_doc.md (7488b), scripts/__init__.py (62b), scripts/config.py (691b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_fish_color_brightness_assessment_analysis.py (3820b), skill-card.md (2695b), SKILL.md (19009b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (165b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"smyx-fish-color-brightness-assessment-analysis\"\ndescription: \"Through fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy. | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 🌈 Ornamental Fish Color Brightness Assessment | 观赏鱼体色鲜艳度评估\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **观赏鱼体色鲜艳度评估** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy score (0-100). When the score is below a threshold (e.g. <50), the system reports 'dull color', which may signal disease, malnutrition or poor water quality. Application scenarios: home aquariums, public aquariums, ornamental fish farms. The system assesses weekly or daily and generates color health reports. Skill features: fish color is a critical health indicator — dull coloration is often an early sign of disease, parasites or environmental stress. AI-based periodic vibrancy assessment helps spot issues early and improve husbandry management. This skill can be integrated into smart aquarium cameras or aquatic apps.\n\n通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。应用场景：家庭鱼缸、水族馆、观赏鱼养殖场。系统每周或每日评估，生成体色健康报告。技能特点：鱼体颜色是健康的重要指示器，体色暗淡常为疾病、寄生虫或环境应激的早期表现。通过 AI 定期评估鲜艳度，可及时发现问题，提升养殖管理水平。该技能可集成到智能鱼缸摄像头或水族 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族色彩评估 AI。你的任务是分析观赏鱼体侧高清图像（≥ 1080p，鱼体侧面拍摄，视野内必须有白卡/灰卡/ColorChecker 作白平衡参考），先对图像做**白平衡校正与光照归一化**（基于白参考估算光照色温 K），然后分割鱼体并提取躯干主区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）的 **HSV-S（饱和度）+ HSV-V（亮度）+ HSV-H（色相分布直方图）**，按 **species_subtype（精确到子品系，如锦鲤-大正三色 / 神仙鱼-银河系 / 孔雀鱼-礼服）匹配标准色度基线**（饱和度范围 / 亮度范围 / 调色板 / z-score），计算 **vibrancy_score_0_100（鲜艳度综合评分）**，再结合 7 天 / 30 天评分趋势，按 7 类综合场景判定（color_vibrant_excellent ≥ 85 / color_vibrant_good 70-84 / color_acceptable 50-69 / color_dull_mild 35-49 / color_dull_severe < 35 / color_baseline_unavailable / color_signal_unreliable），并按 4 级提醒策略递进（Level 1 积极反馈 → Level 2 评估增色饲料+光照+水质 → Level 3 紧急检查体表+游姿+水质五项+联系兽医 → Level 4 连续 ≥ 14 天或同缸 ≥ 50% 同时严重暗淡 + 全面排查 + 所有联系人）。**核心硬约束：未做白平衡的评分一律视为不可信** → 必须返回 `color_signal_unreliable`。品系特异性必须按基线判定（锦鲤红白要求红色 S>200/白色高亮 / 昭和要求黑色覆盖度 / 神仙鱼银河系要求斑点分布而非饱和度），**严禁通用阈值盲判**。生理性上下文必须考虑（**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变**），避免误判。白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见时必须返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡。不提供任何疾病诊断，仅输出基于色彩分析的鲜艳度评分；**严禁输出具体药物名称、剂量、给药方案**；**严禁输出具体饲料品牌名称、增色剂品牌**（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"）；严禁伪造夸大 HSV 值与鲜艳度评分；严禁越权代用户启停灯光/加热棒/喂食器/增氧/换水（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼缸固定摄像头 / 智能鱼缸内置摄像头 / 手机侧拍**定期拍摄**（默认每周或每日 1 次，含白参考）高清图像，识别 7 类综合场景（color_vibrant_excellent / good / acceptable / dull_mild / dull_severe / baseline_unavailable / signal_unreliable）→ **五组指标**：白平衡校正 5 项（白参考类型 / 检测置信度 / 估算色温 K / 是否校正 / 光照归一化）+ 鱼体分割 5 项（fish_id / species_subtype / 分割掩膜像素 / 分割置信度 / 分析 ROI）+ HSV 色彩 6 项（S mean/std + V mean/std + H 主色相 + H 直方图）+ 品种基线对比 6 项（基线 S/V 范围 + 标准调色板 + 调色板匹配度 + S/V z-score）+ 鲜艳度评分 3 项（**vibrancy_score_0_100** + 7d 趋势 + 30d 趋势）→ 4 档提醒级别（info / important / urgent / warning）→ **4 级提醒策略递进**（积极反馈 → 评估增色饲料+光照+水质 → 紧急检查体表+水质+联系兽医 → 全面排查+所有联系人）→ 单日提醒上限（Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限）→ **鲜艳度评估报告**（按 tank_id + fish_id + 评估时间戳输出，含 HSV 核心值 + 品系基线对比 + 鲜艳度评分 + 趋势 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 白参考自动检测（白卡 / 灰卡 / ColorChecker） |\n| 2 | 白平衡校正 |\n| 3 | 光照色温估算 |\n| 4 | 光照强度归一化 |\n| 5 | 鱼体语义分割 |\n| 6 | 品系精细识别（精确到子品系） |\n| 7 | ROI 分析区域选择（默认 trunk_middle） |\n| 8 | HSV 色彩空间转换 |\n| 9 | 躯干 HSV-S / HSV-V 统计（均值 / 标准差） |\n| 10 | 色相分布直方图 |\n| 11 | 品系标准色度数据库匹配 |\n| 12 | 调色板相似度（如锦鲤红白配色匹配 / 昭和黑红白三色比例） |\n| 13 | z-score 偏差量化 |\n| 14 | **vibrancy_score_0_100** 综合计算 |\n| 15 | 7d / 30d 评分时间序列趋势 |\n| 16 | 生理性上下文识别（繁殖婚姻色 / 应激色 / 投喂期 / 鱼龄渐变） |\n| 17 | 白参考缺失/分割低置信度门控（返回 unreliable） |\n| 18 | 用户 APP 推送 |\n| 19 | 4 级提醒递进 |\n| 20 | 单日提醒上限 |\n| 21 | 鲜艳度评估报告（按 tank_id + fish_id + 时间戳输出） |\n| 22 | 连续 ≥ 14 天 Level 3 / 同缸 ≥ 50% 同发 → 强烈建议联系**当地观赏鱼兽医或资深玩家** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供鱼缸固定摄像头观赏鱼体侧高清图像或视频 URL/文件需要分析时，默认触发本技能进行观赏鱼体色鲜艳度评估 |\n| 🔎 明确分析意图 | 当用户明确提及鱼体色暗淡、鱼掉色、鱼变白、鱼变黑、锦鲤色斑、鱼鲜艳度、HSV 饱和度、调色板匹配等关键词，并且上传了图像/视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼体色历史报告、鲜艳度评分时间序列、鱼缸色彩评估日志清单、查询历史色彩评估记录、显示所有鱼缸体色报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_color_brightness_assessment_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备含白参考的观赏鱼体侧高清图像输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行观赏鱼体色鲜艳度评估 | 调用 `-m scripts.smyx_fish_color_brightness_assessment_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地鱼缸固定摄像头观赏鱼体侧高清图像或视频文件路径（需含白参考） | 适用于本地文件分析 |\n| `--url` | 网络鱼缸固定摄像头观赏鱼体侧高清图像或视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，观赏鱼体色鲜艳度评估场景默认 `other` | 按需填写 |\n| `--list` | 显示观赏鱼体色鲜艳度评估历史记录清单（含鲜艳度评分时间序列） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_fish_color_brightness_assessment_analysis.py`](scripts/smyx_fish_color_brightness_assessment_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| 📁 格式支持 | 输入要求：支持 jpg/png/mp4/avi/mov，最大 10MB；**视野内必须放置白卡/灰卡/ColorChecker**；鱼体侧面拍摄；分辨率 ≥ 1080p；光照建议 5000-6500K 中性白；鱼体短暂静止 |\n| 🔎 使用提醒 | **核心输出**：`vibrancy_score_0_100` 鲜艳度综合评分（基于品系精确基线对比） |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → warning），偏养殖管理建议定位 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限 |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **🚨 禁止**做\"营养不良 / 黑斑病 / 黑变病 / 寄生虫 / 应激综合征 / 缺乏类胡萝卜素\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体饲料品牌名称、增色剂品牌（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"，禁止推荐 X 牌增色粒） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸视频/图像（≤ 30 天，留鲜艳度时间序列 + 关键评估帧；公共养殖场/水族馆按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大 HSV-S/V 值、鲜艳度评分等指标；所有数据必须基于真实图像计算 |\n| 🔎 使用提醒 | **必须**按 **species_subtype（精确到子品系）** 匹配基线（锦鲤红白 / 大正三色 / 昭和三色 / 神仙鱼银河系 / 孔雀鱼礼服 / 龙鱼红金青）；**禁止使用通用阈值盲判** |\n| 🧑‍⚖️ 结果性质 | **必须**做白平衡校正与光照归一化（基于白参考估算光照色温 K），**未做白平衡的评分一律视为不可信** → 返回 `color_signal_unreliable` |\n| 📚 文档读取 | **必须**考虑生理性上下文（**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变**），避免误判 |\n| 🧑‍⚖️ 结果性质 | **必须**在白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见时返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡 |\n| 🔎 使用提醒 | **必须**：连续 ≥ 14 天 Level 3 / 同缸 ≥ 50% 个体同时严重暗淡 → 强烈建议联系**当地观赏鱼兽医或资深玩家** |\n| 📜 报告输出 | **必须**：鲜艳度评估报告**按 tank_id + fish_id + 评估时间戳输出**，含 HSV 核心值 + 品系基线对比 + 鲜艳度评分 + 趋势 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史评估记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地含白参考的观赏鱼体侧高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input /path/to/koi.jpg\n\n# 分析网络含白参考的观赏鱼体侧高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --url https://example.com/koi.jpg\n\n# 显示历史鲜艳度评估记录清单（自动触发关键词：查看鱼体色历史报告、鲜艳度评分时间序列等）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-color-brightness-assessment-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1786097383017\n}\n\nFile v1.0.6:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放观赏鱼体色鲜艳度评估 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动观赏鱼体色鲜艳度评估任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取评估结果（HSV-S/V 均值 + 鲜艳度评分 + 品种基线对比）\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_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` - 观赏鱼体色鲜艳度评估\n\n## 输入约束\n\n- 摄像头：鱼缸固定摄像头 / 智能鱼缸内置摄像头 / 手机拍摄（侧面，垂直于鱼体侧面方向）\n- 分辨率 ≥ 1080p（颜色饱和度评估需高色彩精度）\n- **关键硬件要求**：**视野内必须放置已知白色参考物（白卡 / 灰卡 / 标准 ColorChecker）**，用于做**白平衡校正**与**光照归一化**（核心，否则环境灯光偏色会让评分失真）\n- 拍摄角度：**鱼体侧面**（评估躯干主区域颜色），鱼体应位于视野中央，与背景对比清晰\n- 光照：建议鱼缸照明常开 + **使用 5000-6500K 中性白光源**\n- 鱼体拍摄时应**短暂静止**\n- 多鱼缸场景按摄像头 ID 绑定到注册容器 ID\n- **部署时必须录入**：鱼种 + 品系（决定标准色度数据库匹配，如锦鲤红白/大正三色/昭和三色、金鱼狮子头/兰寿、神仙鱼银河系/熊猫、孔雀鱼礼服/草尾、热带龙鱼红/金/青）\n- 用户必须授权部署；公共养殖场 / 水族馆需公示告知\n\n## 关键观测信号\n\n### 白平衡校正与光照归一化（核心）\n- `white_reference_type` - 白参考类型（white_card / gray_card / colorchecker / not_detected）\n- `white_reference_detection_confidence` - 白参考检测置信度（0-1）\n- `light_temperature_kelvin_estimated` - 估算光照色温（K）\n- `wb_correction_applied` - 是否已做白平衡校正（bool）\n- `light_intensity_normalized_score` - 光照强度归一化评分\n\n### 鱼体区域分割\n- `fish_id` - 鱼个体唯一标识（可选）\n- `species_subtype` - 鱼种 + 品系（精确到子品系，如\"锦鲤-大正三色\"）\n- `body_segmentation_mask_pixel_count` - 鱼体分割掩膜像素数\n- `body_segmentation_confidence` - 分割置信度（0-1）\n- `analysis_roi` - 分析区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）\n\n### HSV 色彩信号（核心）\n- `hsv_s_mean` - 躯干区域**饱和度均值**\n- `hsv_s_std` - 饱和度标准差\n- `hsv_v_mean` - 躯干区域**亮度均值**\n- `hsv_v_std` - 亮度标准差\n- `hsv_h_dominant_hue_deg` - 主色相（0-360）\n- `hsv_h_distribution_histogram` - 色相分布直方图（用于多色品种如锦鲤\"红/白/黑\"分区比例）\n\n### 品种基线对比\n- `species_subtype_baseline_s_range` - 该品系健康标准饱和度范围\n- `species_subtype_baseline_v_range` - 该品系健康标准亮度范围\n- `species_subtype_baseline_h_target_palette` - 该品系标准色相调色板\n- `color_palette_match_score` - 与标准调色板的匹配度（0-100）\n- `s_baseline_z_score` - 饱和度相对基线的 z-score\n- `v_baseline_z_score` - 亮度相对基线的 z-score\n\n### 鲜艳度综合评分\n- `vibrancy_score_0_100` - **鲜艳度综合评分（0-100，核心输出）**\n- `vibrancy_score_trend_7d` - 近 7 天评分变化趋势\n- `vibrancy_score_trend_30d` - 近 30 天评分变化趋势\n\n## 综合判定\n\n- `color_vibrant_excellent` - 鲜艳度极佳（≥ 85）\n- `color_vibrant_good` - 鲜艳度良好（70-84）\n- `color_acceptable` - 可接受（50-69）\n- `color_dull_mild` - **体色暗淡轻度**（35-49）\n- `color_dull_severe` - **体色暗淡严重**（< 35）\n- `color_baseline_unavailable` - 该品系暂无标准基线（仅输出客观 HSV 值，不评分鲜艳度）\n- `color_signal_unreliable` - 信号不可靠（白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非疾病诊断）\n\n- Level 1（excellent / good）：仅入库 + 积极反馈\"鲜艳度优秀，继续保持当前管理方式\"\n- Level 2（acceptable / dull_mild）：重要提示，建议**评估增色饲料（中性提示\"含虾青素/螺旋藻类\"，禁止具体品牌）/ 检查光照（光谱完整性 + 色温 + 周期）/ 检查水质（NH3/NO2-/pH/KH）**\n- Level 3（dull_severe，单次）：紧急提示，建议**立即检查体表 + 游姿 + 摄食活跃度 + 水质五项 + 投喂记录**，并联系**当地观赏鱼兽医或资深玩家**\n- Level 4（dull_severe 连续 ≥ 14 天 / 同缸 ≥ 50% 个体同时严重暗淡）：最高紧急提示 + 推送所有管理人员 + 强烈建议**全面排查**\n\n## 单日提醒上限\n\n- Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **🚨 禁止**做\"营养不良 / 黑斑病 / 黑变病 / 寄生虫 / 应激综合征 / 缺乏类胡萝卜素\"等**具体疾病诊断**\n- **🚨 绝对禁止**输出具体药物名称、剂量、给药方案\n- **🚨 绝对禁止**输出具体饲料品牌名称、增色剂品牌（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"，**禁止推荐 X 牌增色粒**）\n- **禁止**长期存储完整鱼缸视频/图像（≤ 30 天，留鲜艳度时间序列 + 关键评估帧）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认\n- HSV-S/V 值、鲜艳度评分等指标必须基于真实图像计算；**禁止伪造或夸大评分**\n- 品系特异性：不同品系标准色度差异极大（锦鲤红白要求红色 S>200/白色高亮，昭和要求黑色覆盖度，神仙鱼银河系要求斑点分布而非饱和度）→ 必须**按 species_subtype 精确匹配基线**；**严禁通用阈值盲判**\n- 必须考虑光照与白平衡上下文：暖光（< 4000K）让黄/红偏强、冷光（> 7000K）让蓝/绿偏强、**未做白平衡的评分一律视为不可信**\n- 必须考虑生理性上下文：**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变** → 不可直接告警\n- 白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见 → 必须返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼缸 ID\n- `species_subtype` - 鱼种 + 品系\n- `fish_id` - 鱼个体（可选）\n- `white_balance_calibration` - 白平衡校正信息\n- `body_roi` - 分析区域\n- `hsv_values` - HSV 核心值\n- `species_subtype_baseline_comparison` - 品系基线对比\n- `vibrancy_score_0_100` - **鲜艳度综合评分**\n- `vibrancy_trend_7d` / `vibrancy_trend_30d` - 近期趋势\n- `composite_scene` - 综合判定\n- `alert_level` - 提醒等级\n- `recommended_actions` - 建议动作（评估增色饲料/光照/水质 / 检查体表 / 联系兽医，**不含药物与品牌**）\n- `disclaimer` - 免责声明\n\nFile v1.0.6:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.6:scripts/config.yaml\n\n{}\n\nFile v1.0.6:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.6:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.6:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.6:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.6:skill-card.md\n\n## Description:\n\nAssesses ornamental fish image or video inputs for color vibrancy by extracting HSV saturation and brightness signals, comparing them with species-specific baselines, and returning a structured score, trend, recommendations, and report link.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nAquarium owners, public aquarium staff, ornamental fish farms, and developers of aquarium-monitoring workflows use this skill to evaluate fish color brightness from camera images or videos and produce color-health reports with scoring, trend context, and non-diagnostic management suggestions.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill sends aquarium images, videos, or URLs to the lifeemergence cloud service for analysis.\n\nMitigation: Use only media that is acceptable to share with that service, avoid sensitive or private footage, and confirm retention and account controls before deployment in shared or commercial environments.\n\nRisk: The skill creates or reuses a local identity and stores service tokens in a workspace SQLite database.\n\nMitigation: Run it in a dedicated workspace, restrict workspace access, and remove local identity or token data when it is no longer needed.\n\nRisk: Color-vibrancy results can be misleading when input images lack a white reference, have poor lighting, or do not show a clear side view of the fish.\n\nMitigation: Require suitable image capture conditions, treat unreliable results as a prompt to recapture the media, and avoid using the output as a disease diagnosis or treatment instruction.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-color-brightness-assessment-analysis)\n- [API documentation](references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance]\n\n**Output Format:** [Markdown tables and structured JSON report fields with optional saved output files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Reports may include HSV values, species-subtype baseline comparison, vibrancy score, trend fields, recommendations, disclaimers, and report links.]\n\n## Skill Version(s):\n\n1.0.6 (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.6:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.6:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.5: 31 files, 45418 bytes\n\nFiles: references/api_doc.md (7488b), scripts/__init__.py (62b), scripts/config.py (691b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_fish_color_brightness_assessment_analysis.py (3820b), skill-card.md (2669b), SKILL.md (19009b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (165b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: \"smyx-fish-color-brightness-assessment-analysis\"\ndescription: \"Through fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy. | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 🌈 Ornamental Fish Color Brightness Assessment | 观赏鱼体色鲜艳度评估\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **观赏鱼体色鲜艳度评估** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy score (0-100). When the score is below a threshold (e.g. <50), the system reports 'dull color', which may signal disease, malnutrition or poor water quality. Application scenarios: home aquariums, public aquariums, ornamental fish farms. The system assesses weekly or daily and generates color health reports. Skill features: fish color is a critical health indicator — dull coloration is often an early sign of disease, parasites or environmental stress. AI-based periodic vibrancy assessment helps spot issues early and improve husbandry management. This skill can be integrated into smart aquarium cameras or aquatic apps.\n\n通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。应用场景：家庭鱼缸、水族馆、观赏鱼养殖场。系统每周或每日评估，生成体色健康报告。技能特点：鱼体颜色是健康的重要指示器，体色暗淡常为疾病、寄生虫或环境应激的早期表现。通过 AI 定期评估鲜艳度，可及时发现问题，提升养殖管理水平。该技能可集成到智能鱼缸摄像头或水族 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族色彩评估 AI。你的任务是分析观赏鱼体侧高清图像（≥ 1080p，鱼体侧面拍摄，视野内必须有白卡/灰卡/ColorChecker 作白平衡参考），先对图像做**白平衡校正与光照归一化**（基于白参考估算光照色温 K），然后分割鱼体并提取躯干主区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）的 **HSV-S（饱和度）+ HSV-V（亮度）+ HSV-H（色相分布直方图）**，按 **species_subtype（精确到子品系，如锦鲤-大正三色 / 神仙鱼-银河系 / 孔雀鱼-礼服）匹配标准色度基线**（饱和度范围 / 亮度范围 / 调色板 / z-score），计算 **vibrancy_score_0_100（鲜艳度综合评分）**，再结合 7 天 / 30 天评分趋势，按 7 类综合场景判定（color_vibrant_excellent ≥ 85 / color_vibrant_good 70-84 / color_acceptable 50-69 / color_dull_mild 35-49 / color_dull_severe < 35 / color_baseline_unavailable / color_signal_unreliable），并按 4 级提醒策略递进（Level 1 积极反馈 → Level 2 评估增色饲料+光照+水质 → Level 3 紧急检查体表+游姿+水质五项+联系兽医 → Level 4 连续 ≥ 14 天或同缸 ≥ 50% 同时严重暗淡 + 全面排查 + 所有联系人）。**核心硬约束：未做白平衡的评分一律视为不可信** → 必须返回 `color_signal_unreliable`。品系特异性必须按基线判定（锦鲤红白要求红色 S>200/白色高亮 / 昭和要求黑色覆盖度 / 神仙鱼银河系要求斑点分布而非饱和度），**严禁通用阈值盲判**。生理性上下文必须考虑（**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变**），避免误判。白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见时必须返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡。不提供任何疾病诊断，仅输出基于色彩分析的鲜艳度评分；**严禁输出具体药物名称、剂量、给药方案**；**严禁输出具体饲料品牌名称、增色剂品牌**（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"）；严禁伪造夸大 HSV 值与鲜艳度评分；严禁越权代用户启停灯光/加热棒/喂食器/增氧/换水（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼缸固定摄像头 / 智能鱼缸内置摄像头 / 手机侧拍**定期拍摄**（默认每周或每日 1 次，含白参考）高清图像，识别 7 类综合场景（color_vibrant_excellent / good / acceptable / dull_mild / dull_severe / baseline_unavailable / signal_unreliable）→ **五组指标**：白平衡校正 5 项（白参考类型 / 检测置信度 / 估算色温 K / 是否校正 / 光照归一化）+ 鱼体分割 5 项（fish_id / species_subtype / 分割掩膜像素 / 分割置信度 / 分析 ROI）+ HSV 色彩 6 项（S mean/std + V mean/std + H 主色相 + H 直方图）+ 品种基线对比 6 项（基线 S/V 范围 + 标准调色板 + 调色板匹配度 + S/V z-score）+ 鲜艳度评分 3 项（**vibrancy_score_0_100** + 7d 趋势 + 30d 趋势）→ 4 档提醒级别（info / important / urgent / warning）→ **4 级提醒策略递进**（积极反馈 → 评估增色饲料+光照+水质 → 紧急检查体表+水质+联系兽医 → 全面排查+所有联系人）→ 单日提醒上限（Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限）→ **鲜艳度评估报告**（按 tank_id + fish_id + 评估时间戳输出，含 HSV 核心值 + 品系基线对比 + 鲜艳度评分 + 趋势 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 白参考自动检测（白卡 / 灰卡 / ColorChecker） |\n| 2 | 白平衡校正 |\n| 3 | 光照色温估算 |\n| 4 | 光照强度归一化 |\n| 5 | 鱼体语义分割 |\n| 6 | 品系精细识别（精确到子品系） |\n| 7 | ROI 分析区域选择（默认 trunk_middle） |\n| 8 | HSV 色彩空间转换 |\n| 9 | 躯干 HSV-S / HSV-V 统计（均值 / 标准差） |\n| 10 | 色相分布直方图 |\n| 11 | 品系标准色度数据库匹配 |\n| 12 | 调色板相似度（如锦鲤红白配色匹配 / 昭和黑红白三色比例） |\n| 13 | z-score 偏差量化 |\n| 14 | **vibrancy_score_0_100** 综合计算 |\n| 15 | 7d / 30d 评分时间序列趋势 |\n| 16 | 生理性上下文识别（繁殖婚姻色 / 应激色 / 投喂期 / 鱼龄渐变） |\n| 17 | 白参考缺失/分割低置信度门控（返回 unreliable） |\n| 18 | 用户 APP 推送 |\n| 19 | 4 级提醒递进 |\n| 20 | 单日提醒上限 |\n| 21 | 鲜艳度评估报告（按 tank_id + fish_id + 时间戳输出） |\n| 22 | 连续 ≥ 14 天 Level 3 / 同缸 ≥ 50% 同发 → 强烈建议联系**当地观赏鱼兽医或资深玩家** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供鱼缸固定摄像头观赏鱼体侧高清图像或视频 URL/文件需要分析时，默认触发本技能进行观赏鱼体色鲜艳度评估 |\n| 🔎 明确分析意图 | 当用户明确提及鱼体色暗淡、鱼掉色、鱼变白、鱼变黑、锦鲤色斑、鱼鲜艳度、HSV 饱和度、调色板匹配等关键词，并且上传了图像/视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼体色历史报告、鲜艳度评分时间序列、鱼缸色彩评估日志清单、查询历史色彩评估记录、显示所有鱼缸体色报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_color_brightness_assessment_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备含白参考的观赏鱼体侧高清图像输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行观赏鱼体色鲜艳度评估 | 调用 `-m scripts.smyx_fish_color_brightness_assessment_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地鱼缸固定摄像头观赏鱼体侧高清图像或视频文件路径（需含白参考） | 适用于本地文件分析 |\n| `--url` | 网络鱼缸固定摄像头观赏鱼体侧高清图像或视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，观赏鱼体色鲜艳度评估场景默认 `other` | 按需填写 |\n| `--list` | 显示观赏鱼体色鲜艳度评估历史记录清单（含鲜艳度评分时间序列） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_fish_color_brightness_assessment_analysis.py`](scripts/smyx_fish_color_brightness_assessment_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| 📁 格式支持 | 输入要求：支持 jpg/png/mp4/avi/mov，最大 10MB；**视野内必须放置白卡/灰卡/ColorChecker**；鱼体侧面拍摄；分辨率 ≥ 1080p；光照建议 5000-6500K 中性白；鱼体短暂静止 |\n| 🔎 使用提醒 | **核心输出**：`vibrancy_score_0_100` 鲜艳度综合评分（基于品系精确基线对比） |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → warning），偏养殖管理建议定位 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限 |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **🚨 禁止**做\"营养不良 / 黑斑病 / 黑变病 / 寄生虫 / 应激综合征 / 缺乏类胡萝卜素\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体饲料品牌名称、增色剂品牌（仅可中性提示\"含虾青素/螺旋藻类增色饲料\"，禁止推荐 X 牌增色粒） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼缸视频/图像（≤ 30 天，留鲜艳度时间序列 + 关键评估帧；公共养殖场/水族馆按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大 HSV-S/V 值、鲜艳度评分等指标；所有数据必须基于真实图像计算 |\n| 🔎 使用提醒 | **必须**按 **species_subtype（精确到子品系）** 匹配基线（锦鲤红白 / 大正三色 / 昭和三色 / 神仙鱼银河系 / 孔雀鱼礼服 / 龙鱼红金青）；**禁止使用通用阈值盲判** |\n| 🧑‍⚖️ 结果性质 | **必须**做白平衡校正与光照归一化（基于白参考估算光照色温 K），**未做白平衡的评分一律视为不可信** → 返回 `color_signal_unreliable` |\n| 📚 文档读取 | **必须**考虑生理性上下文（**繁殖期婚姻色加深 / 应激色暂时暗淡 / 投喂后短时增色 / 鱼龄增长色彩自然渐变**），避免误判 |\n| 🧑‍⚖️ 结果性质 | **必须**在白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见时返回 `color_signal_unreliable` 并建议重拍/补光/放置白卡 |\n| 🔎 使用提醒 | \n\nArchive v1.0.4: 31 files, 45437 bytes\n\nFiles: references/...","readmeExcerpt":"Skill: Ornamental Fish Color Brightness Assessment | 观赏鱼体色鲜艳度评估 Owner: smyx-sunjinhui Summary: Through fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy ","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.smyx_fish_color_brightness_assessment_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地含白参考的观赏鱼体侧高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input /path/to/koi.jpg\n\n# 分析网络含白参考的观赏鱼体侧高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --url https://example.com/koi.jpg\n\n# 显示历史鲜艳度评估记录清单（自动触发关键词：查看鱼体色历史报告、鲜艳度评分时间序列等）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --output result.json"},{"language":"bash","snippet":"python -m scripts.smyx_fish_color_brightness_assessment_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地含白参考的观赏鱼体侧高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input /path/to/koi.jpg\n\n# 分析网络含白参考的观赏鱼体侧高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --url https://example.com/koi.jpg\n\n# 显示历史鲜艳度评估记录清单（自动触发关键词：查看鱼体色历史报告、鲜艳度评分时间序列等）\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_color_brightness_assessment_analysis --input koi.jpg --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"smyx-fish-color-brightness-assessment-analysis\"\ndescription: \"Through fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy. | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。\"\nversion: \"1.0.17\"\nlicense: \"MIT-0\"\n---\n\n# 🌈 Ornamental Fish Color Brightness Assessment | 观赏鱼体色鲜艳度评估\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **观赏鱼体色鲜艳度评估** |\n| 🎯 核心目标 | 通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` |\n\nThrough fixed aquarium cameras, the system periodically captures high-definition side images of ornamental fish (such as koi, goldfish, tropical fish), and uses AI vision analysis to extract color saturation (HSV-S channel) and brightness (HSV-V channel) of specific body regions (e.g. mid-trunk), compares them with healthy standard color ranges of the same species (built-in database or user-defined), and outputs a vibrancy score (0-100). When the score is below a threshold (e.g. <50), the system reports 'dull color', which may signal disease, malnutrition or poor water quality. Application scenarios: home aquariums, public aquariums, ornamental fish farms. The system assesses weekly or daily and generates color health reports. Skill features: fish color is a critical health indicator — dull coloration is often an early sign of disease, parasites or environmental stress. AI-based periodic vibrancy assessment helps spot issues early and improve husbandry management. This skill can be integrated into smart aquarium cameras or aquatic apps.\n\n通过鱼缸固定摄像头，定期拍摄观赏鱼（如锦鲤、金鱼、热带鱼）的体侧高清图像，利用 AI 视觉分析技术提取鱼体特定区域（如躯干中部）的颜色饱和度（HSV 色彩空间的 S 通道值）和亮度（V 通道值），并对比同品种健康鱼的标准色度范围（内置数据库或用户自定义），输出鲜艳度评分（0-100 分）。当评分低于阈值（如 < 50）时，提示'体色暗淡'，可能为疾病、营养不良或水质不良的信号。应用场景：家庭鱼缸、水族馆、观赏鱼养殖场。系统每周或每日评估，生成体色健康报告。技能特点：鱼体颜色是健康的重要指示器，体色暗淡常为疾病、寄生虫或环境应激的早期表现。通过 AI 定期评估鲜艳度，可及时发现问题，提升养殖管理水平。该技能可集成到智能鱼缸摄像头或水族 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水族色彩评估 AI。你的任务是分析观赏鱼体侧高清图像（≥ 1080p，鱼体侧面拍摄，视野内必须有白卡/灰卡/ColorChecker 作白平衡参考），先对图像做**白平衡校正与光照归一化**（基于白参考估算光照色温 K），然后分割鱼体并提取躯干主区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）的 **HSV-S（饱和度）+ HSV-V（亮度）+ HSV-H（色相分布直方图）**，按 **species_subtype（精确到子品系，如锦鲤-大正三色 / 神仙鱼-银河系 / 孔雀鱼-礼服）匹配标准色度基线**（饱和度范围 / "},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-color-brightness-assessment-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1791030626329\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` - 获取评估结果（HSV-S/V 均值 + 鲜艳度评分 + 品种基线对比）\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_COLOR_BRIGHTNESS_ASSESSMENT_ANALYSIS` - 观赏鱼体色鲜艳度评估\n\n## 输入约束\n\n- 摄像头：鱼缸固定摄像头 / 智能鱼缸内置摄像头 / 手机拍摄（侧面，垂直于鱼体侧面方向）\n- 分辨率 ≥ 1080p（颜色饱和度评估需高色彩精度）\n- **关键硬件要求**：**视野内必须放置已知白色参考物（白卡 / 灰卡 / 标准 ColorChecker）**，用于做**白平衡校正**与**光照归一化**（核心，否则环境灯光偏色会让评分失真）\n- 拍摄角度：**鱼体侧面**（评估躯干主区域颜色），鱼体应位于视野中央，与背景对比清晰\n- 光照：建议鱼缸照明常开 + **使用 5000-6500K 中性白光源**\n- 鱼体拍摄时应**短暂静止**\n- 多鱼缸场景按摄像头 ID 绑定到注册容器 ID\n- **部署时必须录入**：鱼种 + 品系（决定标准色度数据库匹配，如锦鲤红白/大正三色/昭和三色、金鱼狮子头/兰寿、神仙鱼银河系/熊猫、孔雀鱼礼服/草尾、热带龙鱼红/金/青）\n- 用户必须授权部署；公共养殖场 / 水族馆需公示告知\n\n## 关键观测信号\n\n### 白平衡校正与光照归一化（核心）\n- `white_reference_type` - 白参考类型（white_card / gray_card / colorchecker / not_detected）\n- `white_reference_detection_confidence` - 白参考检测置信度（0-1）\n- `light_temperature_kelvin_estimated` - 估算光照色温（K）\n- `wb_correction_applied` - 是否已做白平衡校正（bool）\n- `light_intensity_normalized_score` - 光照强度归一化评分\n\n### 鱼体区域分割\n- `fish_id` - 鱼个体唯一标识（可选）\n- `species_subtype` - 鱼种 + 品系（精确到子品系，如\"锦鲤-大正三色\"）\n- `body_segmentation_mask_pixel_count` - 鱼体分割掩膜像素数\n- `body_segmentation_confidence` - 分割置信度（0-1）\n- `analysis_roi` - 分析区域（默认 trunk_middle，可选 head / dorsal / caudal_fin）\n\n### HSV 色彩信号（核心）\n- `hsv_s_mean` - 躯干区域**饱和度均值**\n- `hsv_s_std` - 饱和度标准差\n- `hsv_v_mean` - 躯干区域**亮度均值**\n- `hsv_v_std` - 亮度标准差\n- `hsv_h_dominant_hue_deg` - 主色相（0-360）\n- `hsv_h_distribution_histogram` - 色相分布直方图（用于多色品种如锦鲤\"红/白/黑\"分区比例）\n\n### 品种基线对比\n- `species_subtype_baseline_s_range` - 该品系健康标准饱和度范围\n- `species_subtype_baseline_v_range` - 该品系健康标准亮度范围\n- `species_subtype_baseline_h_target_palette` - 该品系标准色相调色板\n- `color_palette_match_score` - 与标准调色板的匹配度（0-100）\n- `s_baseline_z_score` - 饱和度相对基线的 z-score\n- `v_baseline_z_score` - 亮度相对基线的 z-score\n\n### 鲜艳度综合评分\n- `vibrancy_score_0_100` - **鲜艳度综合评分（0-100，核心输出）**\n- `vibrancy_score_trend_7d` - 近 7 天评分变化趋势\n- `vibrancy_score_trend_30d` - 近 30 天评分变化趋势\n\n## 综合判定\n\n- `color_vibrant_excellent` - 鲜艳度极佳（≥ 85）\n- `color_vibrant_good` - 鲜艳度良好（70-84）\n- `color_acceptable` - 可接受（50-69）\n- `color_dull_mild` - **体色暗淡轻度**（35-49）\n- `color_dull_severe` - **体色暗淡严重**（< 35）\n- `color_baseline_unavailable` - 该品系暂无标准基线（仅输出客观 HSV 值，不评分鲜艳度）\n- `color_signal_unreliable` - 信号不可靠（白参考未检出 / 分割置信度 < 0.7 / 光照过暗或过曝 / 鱼体姿态侧面不可见）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非疾病诊断）\n\n- Level 1（excellent / good）：仅入库 + 积极反馈\"鲜艳度优秀，继续保持当前管理方式\"\n- Level 2（acceptable / dull_mild）：重要提示，建议**评估增色饲料（中性提示\"含虾青素/螺旋藻类\"，禁止具体品牌）/ 检查光照（光谱完整性 + 色温 + 周期）/ 检查水质（NH3/NO2-/pH/KH）**\n- Level 3（dull_severe，单次）：紧急提示，建议**立即检查体表 + 游姿 + 摄食活跃度 + 水质五项 + 投喂记录**，并联系**当地观赏鱼兽医或资深玩家**\n- Level 4（dull_severe 连续 ≥ 14 天 / 同缸 ≥ 50% 个体同时严重暗淡）：最高紧急提示 + 推送所有管理人员 + 强烈建议**"},{"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":1212,"uniquenessScore":43,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T05:29:25.803Z","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-10T05:29:25.803Z","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-10T11:01:59.318Z","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"}]}}}