{"id":"091eb179-3616-47b4-af0c-6791c96662f7","entityType":"agent","slug":"clawhub-smyx-sunjinhui-smyx-fish-fry-growth-measurement-analysi","name":"Fish Fry Growth Rate Measurement (via Reference Object) | 鱼苗生长速度测量（通过参照物）","canonicalUrl":"https://www.xpersona.co/agent/clawhub-smyx-sunjinhui-smyx-fish-fry-growth-measurement-analysi","canonicalPath":"/agent/clawhub-smyx-sunjinhui-smyx-fish-fry-growth-measurement-analysi","generatedAt":"2026-10-10T11:02:22.235Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T04:58:58.787Z","emptyReason":null},"description":"Through fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。","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-fry-growth-measurement-analysis","sourceUrl":"https://clawhub.ai/smyx-sunjinhui/smyx-fish-fry-growth-measurement-analysis","homepage":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-fry-growth-measurement-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/smyx-sunjinhui/smyx-fish-fry-growth-measurement-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-fry-growth-measurement-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":64,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Fish Fry Growth Rate Measurement (via Reference Object) | 鱼苗生长速度测量（通过参照物） technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust me"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T04:58:58.787Z","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-10T04:58:58.787Z","emptyReason":null},"stars":null,"forks":null,"downloads":1670,"packageName":null,"latestVersion":"1.0.11","tractionLabel":"1.7K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T04:58:58.761Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T04:58:58.787Z","lastCrawledAt":"2026-10-10T04:58:58.761Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T04:58:58.761Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.11","createdAt":"2026-09-29T11:14:25.654Z","changelog":"- skill-card.md file removed for cleanup and consolidation. - Version updated from 1.0.15 to 1.0.16 in SKILL.md. - SKILL.md updated; no functional or API changes, just documentation or metadata adjustments. - No user-facing features or behavior were changed.","fileCount":31,"zipByteSize":44607},{"version":"1.0.10","createdAt":"2026-09-23T20:04:35.976Z","changelog":"- Updated documentation: SKILL.md now reflects the latest version (1.0.15) with content and version updates. - Removed skill-card.md file from the project. - Minor configuration changes in skills/smyx_common/scripts/config.yaml. - No functional or API/interface changes; update focused on documentation and housekeeping.","fileCount":31,"zipByteSize":44948},{"version":"1.0.9","createdAt":"2026-09-09T02:27:28.204Z","changelog":"- Updated SKILL.md to version 1.0.13 with content revisions and metadata changes. - Removed the file skill-card.md. - No changes to the core skill logic or scripts; this update affects documentation and descriptive content only.","fileCount":31,"zipByteSize":44919},{"version":"1.0.8","createdAt":"2026-08-25T11:09:32.026Z","changelog":"- Removed the documentation file skill-card.md from the project. - No changes to code or core functionality. - All user-facing features and workflows remain unchanged.","fileCount":31,"zipByteSize":44835},{"version":"1.0.7","createdAt":"2026-08-22T16:39:29.735Z","changelog":"smyx-fish-fry-growth-measurement-analysis 1.0.7 Changelog - Updated documentation in SKILL.md, including skill description and workflow details. - Version and metadata changes for better version tracking. - Removed redundant documentation file: skill-card.md. - Updated configuration: minor edits in skills/smyx_common/scripts/config.yaml.","fileCount":31,"zipByteSize":45136},{"version":"1.0.6","createdAt":"2026-08-13T14:37:39.494Z","changelog":"- Updated SKILL.md content, including version bump from 1.0.8 to 1.0.9 - Removed deprecated file: skill-card.md - Documentation now more accurately reflects constraints, workflow, and requirements - No functional or code changes; this is a documentation and versioning update only","fileCount":31,"zipByteSize":44948},{"version":"1.0.5","createdAt":"2026-08-02T13:20:30.996Z","changelog":"- Updated skill version to 1.0.8. - Revised documentation in SKILL.md for improved clarity and detailed workflow. - Removed redundant file: skill-card.md. - No functional changes to analysis logic or API usage. - Enhanced overview and instructions for report retrieval and user privacy compliance.","fileCount":31,"zipByteSize":45066},{"version":"1.0.4","createdAt":"2026-07-13T02:22:27.916Z","changelog":"- Updated: Internal utility code changes in `skills/smyx_common/scripts/util.py` for improved processing or refactoring. - Removed: Obsolete or redundant documentation file `skill-card.md` was deleted. - No impact on core functionality or user-visible features. - Documentation content is otherwise unchanged.","fileCount":31,"zipByteSize":44894}]},"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-fry-growth-measurement-analysis","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-fish-fry-growth-measurement-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-fry-growth-measurement-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-fry-growth-measurement-analysi/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-fry-growth-measurement-analysi/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-fry-growth-measurement-analysi/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-fry-growth-measurement-analysi/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-fry-growth-measurement-analysi/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-fry-growth-measurement-analysi/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:02:22.228Z"}},"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-fry-growth-measurement-analysi/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-fry-growth-measurement-analysi/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-fry-growth-measurement-analysi/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-fish-fry-growth-measurement-analysi/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-10T04:58:58.787Z","emptyReason":null},"readme":"Skill: Fish Fry Growth Rate Measurement (via Reference Object) | 鱼苗生长速度测量（通过参照物）\n\nOwner: smyx-sunjinhui\n\nSummary: Through fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。\n\nTags: latest:1.0.11\n\nVersion history:\n\nv1.0.11 | 2026-09-29T11:14:25.654Z | auto\n\n- skill-card.md file removed for cleanup and consolidation.\n- Version updated from 1.0.15 to 1.0.16 in SKILL.md.\n- SKILL.md updated; no functional or API changes, just documentation or metadata adjustments.\n- No user-facing features or behavior were changed.\n\nv1.0.10 | 2026-09-23T20:04:35.976Z | auto\n\n- Updated documentation: SKILL.md now reflects the latest version (1.0.15) with content and version updates.\n- Removed skill-card.md file from the project.\n- Minor configuration changes in skills/smyx_common/scripts/config.yaml.\n- No functional or API/interface changes; update focused on documentation and housekeeping.\n\nv1.0.9 | 2026-09-09T02:27:28.204Z | auto\n\n- Updated SKILL.md to version 1.0.13 with content revisions and metadata changes.\n- Removed the file skill-card.md.\n- No changes to the core skill logic or scripts; this update affects documentation and descriptive content only.\n\nv1.0.8 | 2026-08-25T11:09:32.026Z | auto\n\n- Removed the documentation file skill-card.md from the project.\n- No changes to code or core functionality.\n- All user-facing features and workflows remain unchanged.\n\nv1.0.7 | 2026-08-22T16:39:29.735Z | auto\n\nsmyx-fish-fry-growth-measurement-analysis 1.0.7 Changelog\n\n- Updated documentation in SKILL.md, including skill description and workflow details.\n- Version and metadata changes for better version tracking.\n- Removed redundant documentation file: skill-card.md.\n- Updated configuration: minor edits in skills/smyx_common/scripts/config.yaml.\n\nv1.0.6 | 2026-08-13T14:37:39.494Z | auto\n\n- Updated SKILL.md content, including version bump from 1.0.8 to 1.0.9\n- Removed deprecated file: skill-card.md\n- Documentation now more accurately reflects constraints, workflow, and requirements\n- No functional or code changes; this is a documentation and versioning update only\n\nv1.0.5 | 2026-08-02T13:20:30.996Z | auto\n\n- Updated skill version to 1.0.8.\n- Revised documentation in SKILL.md for improved clarity and detailed workflow.\n- Removed redundant file: skill-card.md.\n- No functional changes to analysis logic or API usage.\n- Enhanced overview and instructions for report retrieval and user privacy compliance.\n\nv1.0.4 | 2026-07-13T02:22:27.916Z | auto\n\n- Updated: Internal utility code changes in `skills/smyx_common/scripts/util.py` for improved processing or refactoring.\n- Removed: Obsolete or redundant documentation file `skill-card.md` was deleted.\n- No impact on core functionality or user-visible features.\n- Documentation content is otherwise unchanged.\n\nv1.0.3 | 2026-07-08T15:24:29.690Z | auto\n\nsmyx-fish-fry-growth-measurement-analysis 1.0.5\n\n- Updated version from 1.0.3 to 1.0.5 in SKILL.md.\n- No functional or user-facing changes documented aside from version bump.\n\nv1.0.2 | 2026-07-02T00:19:29.842Z | auto\n\n- Refactored and updated core logic in `dao.py` and `util.py` scripts for improved performance and maintainability.\n- Removed the `skill-card.md` file.\n- No user-facing feature changes; overall functionality remains consistent.\n- Version bumped for internal codebase updates.\n\nv1.0.1 | 2026-06-27T08:07:29.510Z | auto\n\n- Refactored user identity handling: all open-id acquisition is now automatic and internal; users are never asked for or shown internal identity parameters.\n- Simplified usage flow and documentation, with skill operation, cloud report queries, and report association now fully automated.\n- Updated and clarified skill description and operation steps, removing unnecessary user-facing identity prompts.\n- Improved constraints and compliance: stricter privacy protection, clearer prohibition on revealing or requesting user identity, and updated forbidden actions.\n- Removed deprecated and redundant script files; updated script paths and configuration references.\n\nv1.0.0 | 2026-05-28T04:52:03.954Z | auto\n\nInitial release of smyx-fish-fry-growth-measurement-analysis:\n\n- AI-based measurement of fish fry length from images with a known-size reference object (ruler, coin, calibration board).\n- Automatic calculation and tracking of individual fry growth rates over time, with growth curve plotting.\n- Supports anomaly detection and multi-level alerts (e.g. stunted growth), including actionable suggestions.\n- Designed for aquaculture, ornamental fish breeding, and laboratory environments.\n- Integrates with smart fry tanks and management apps; generates structured growth reports and statistical insights.\n- Strict operational protocols for open-id authorization, calibration accuracy, and historical report retrieval.\n\nArchive index:\n\nArchive v1.0.11: 31 files, 44607 bytes\n\nFiles: references/api_doc.md (7162b), scripts/__init__.py (74b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_fish_fry_growth_measurement_analysis.py (3826b), skill-card.md (1995b), SKILL.md (17357b), 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 (161b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: \"smyx-fish-fry-growth-measurement-analysis\"\ndescription: \"Through fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。\"\nversion: \"1.0.16\"\nlicense: \"MIT-0\"\n---\n\n# 📏 Fish Fry Growth Rate Measurement (via Reference Object) | 鱼苗生长速度测量（通过参照物）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼苗生长速度测量（通过参照物）** |\n| 🎯 核心目标 | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FRY_GROWTH_MEASUREMENT_ANALYSIS` |\n\nThrough fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. This skill helps aquaculturists or ornamental fish breeders evaluate fry health and feed conversion ratio, and timely adjust feeding strategy. Application scenarios: fry rearing tanks, aquaculture farms, ornamental fish breeding farms, laboratories. The system automatically captures images, generates growth reports, and alerts on anomalies (such as stunted growth). Skill features: growth rate is a critical indicator for fry health and feeding optimization. AI-based periodic measurement and growth-curve plotting helps farmers detect slow growth early, adjust management and improve survival rate and yield. This skill can be integrated into smart fry tanks or aquaculture management apps.\n\n通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。该技能有助于水产养殖者或观赏鱼繁育者评估鱼苗健康状况、饲料转化率，及时调整投喂策略。应用场景：鱼苗培育缸、水产养殖场、观赏鱼繁殖场、实验室。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。技能特点：生长速率是评估鱼苗健康、优化投喂的关键指标。通过 AI 自动定期测量并绘制生长曲线，可帮助养殖者及时发现生长迟缓问题，调整管理措施，提高成活率和产量。该技能可集成到智能鱼苗缸或养殖管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水产养殖生长监测 AI。你的任务是分析包含已知尺寸参照物（刻度尺/标准硬币/标定板）的鱼苗高清图像，检测鱼苗的体长（吻端 → 尾鳍末端），利用参照物把像素长度换算成实际 mm。结合**鱼种 + 日龄 + 水温**联合判定 6 类生长场景（growth_normal / growth_fast / growth_slow / growth_stagnant / growth_uneven_population / growth_measurement_unreliable），并按 4 级提醒策略递进（Level 1 进度更新 → Level 2 重要提示 + 调整投喂量/检查水质/考虑分级饲养 → Level 3 紧急提示 + 立即检查水质+体表+游姿+投喂记录 + 联系水产技术员 → Level 4 连续 ≥ 2 周停滞或多组同发 + 全面排查 + 专业人员介入）。**核心硬约束：参照物必须与鱼苗位于同一水平面，摄像头必须严格俯拍垂直向下**，否则透视畸变会让 mm 换算失真，必须返回 `growth_measurement_unreliable`。鱼种特异性必须按基线判定（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d），**严禁通用阈值盲判**。鱼体姿态弯曲会导致体长低估，必须过滤或纠正。参照物检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡严重时必须返回 `growth_measurement_unreliable` 并建议重拍。不提供任何疾病诊断，仅输出基于视觉的体长测量值与统计；**严禁输出具体药物名称、剂量和饲料品牌推荐**（仅可中性建议如\"调整粒径/调整投喂量\"）；严禁伪造夸大体长 / 生长速率 / CV%；严禁越权代用户启停喂食器/加热棒/增氧/换水/灯光（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头**定期拍摄**（默认每日或每周，含已知尺寸参照物）高清图像，识别 6 类生长场景（growth_normal / fast / slow / stagnant / uneven_population / signal_unreliable）→ **四组指标**：参照物校准 5 项（type / known_mm / 像素长度 / pixel_per_mm / 检测置信度）+ 鱼苗测量 7 项（吻端坐标 / 尾鳍末端坐标 / 像素长度 / 实际 mm / 测量置信度 / 姿态伸直 / fry_id）+ 群体统计 6 项（measured_count / mean / std / CV% / p10 / p50 / p90）+ 生长速率 4 项（上次测量日期 / 距上次天数 / mm/day / 生长曲线点列表）→ 4 档提醒级别（info / important / urgent / warning）→ **4 级提醒策略递进**（仅入库进度更新 → 调整投喂/分级饲养 → 紧急检查水质+体表+联系技术员 → 全面排查+专业介入）→ 单日提醒上限（Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限）→ **生长报告**（按 tank_id 输出，含本次测量值 + 群体统计 + 生长曲线 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 参照物自动检测与识别（直尺刻度 / 标准硬币圆形 / 棋盘格标定板） |\n| 2 | **亚像素级 pixel_per_mm 校准** |\n| 3 | 鱼苗目标检测 |\n| 4 | 鱼苗吻端 / 尾鳍末端关键点检测 |\n| 5 | 姿态弯曲过滤（脊柱曲率 > 阈值则该样本剔除或做曲线补偿） |\n| 6 | 体长像素 → mm 换算 |\n| 7 | 群体统计（均值 / 标准差 / CV% / 分位数） |\n| 8 | 跨次时间序列存档与生长曲线绘制 |\n| 9 | 鱼种自适应基线（生长速率基线表 + 日龄修正 + 水温 Q10 修正） |\n| 10 | 用户 APP 推送 |\n| 11 | 4 级提醒递进 |\n| 12 | 单日提醒上限 |\n| 13 | 生长报告（按 tank_id + 测量时间戳输出） |\n| 14 | CV% 群体均匀度评估（驱动分级饲养建议） |\n| 15 | 连续 ≥ 2 周 Level 3 → 强烈建议联系**当地水产养殖技术员或观赏鱼繁育专家** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供含参照物（刻度尺/标准硬币/标定板）的鱼苗缸高清图像或视频 URL/文件需要分析时，默认触发本技能进行鱼苗生长速度测量 |\n| 🔎 明确分析意图 | 当用户明确提及鱼苗体长、鱼苗生长速度、生长曲线、生长停滞、生长迟缓、CV 均匀度、分级饲养等关键词，并且上传了图像/视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单、生长停滞事件清单、查询历史鱼苗测量记录、显示所有鱼苗缸生长报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_fry_growth_measurement_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_fry_growth_measurement_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_fry_growth_measurement_analysis.py`](scripts/smyx_fish_fry_growth_measurement_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；**视野内必须放置已知尺寸参照物**；**严格俯拍**（参照物与鱼苗同一水平面）；分辨率 ≥ 1080p；鱼苗短暂静止或在透明计数槽中 |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → warning），连续 ≥ 2 周停滞或多组同发进入更高级别 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限 |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **禁止**对鱼苗做\"营养不良 / 肠炎 / 寄生虫 / 应激综合征 / 遗传缺陷\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体饲料品牌名称推荐（仅可中性建议如\"调整粒径\"、\"调整投喂量\"） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼苗缸视频/图像（≤ 30 天，留生长曲线 + 关键测量帧；公共养殖场/实验室按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大体长、生长速率、CV% 等指标；所有数据必须基于真实图像测量 |\n| 🔎 使用提醒 | **必须**按**鱼种 + 日龄 + 水温**联合判定基线（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d）；**禁止使用通用阈值盲判** |\n| 🔎 使用提醒 | **必须**做透视畸变校验：参照物与鱼苗不在同一水平面 / 摄像头不垂直俯拍 → 返回 `growth_measurement_unreliable` |\n| 🔎 使用提醒 | **必须**做姿态过滤：鱼体弯曲会导致体长低估，必须过滤或纠正 |\n| 🔎 使用提醒 | **必须**在参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡严重时返回 `growth_measurement_unreliable`，**禁止给出不可靠的生长停滞告警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 周 Level 3 → 强烈建议联系**当地水产养殖技术员或观赏鱼繁育专家** |\n| 📜 报告输出 | **必须**：生长报告**按 tank_id + 测量时间戳输出**，含本次测量值 + 群体统计 + 生长曲线 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史生长记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地含参照物的鱼苗高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input /path/to/fry.jpg\n\n# 分析网络含参照物的鱼苗高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --url https://example.com/fry.jpg\n\n# 显示历史生长测量记录清单（自动触发关键词：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单等）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --output result.json\n```\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-fry-growth-measurement-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1790680465654\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` - 获取测量结果（体长 mm + 生长速率 mm/day + 生长曲线）\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_FRY_GROWTH_MEASUREMENT_ANALYSIS` - 鱼苗生长速度测量（通过参照物）\n\n## 输入约束\n\n- 摄像头：鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头（俯拍）\n- 分辨率 ≥ 1080p（鱼苗 5-30mm 全长，需高清才能精确测量到亚毫米级）\n- **关键硬件要求**：**视野内必须放置已知尺寸的参照物**（recognized reference object），三选一：\n    - 防水刻度尺（最佳，建议金属/塑料防水尺，黑底白刻度对比强）\n    - 标准硬币（1 元硬币 25.0mm / 5 角 20.5mm / 1 角 19.0mm；美元 quarter 24.26mm）\n    - 标定板（黑白棋盘格 5mm/10mm 已知边长）\n- 拍摄角度：**严格俯拍（垂直向下）**，参照物与鱼苗位于**同一水平面**（避免透视畸变导致换算误差）\n- 鱼苗拍摄时应**短暂静止**或在透明计数槽中（移动模糊会让吻端/尾鳍末端定位失准）\n- 多鱼苗缸场景按摄像头 ID 绑定到注册鱼苗缸 ID\n- **部署时必须录入**：鱼种、孵化日期（用于换算日龄）、参照物类型 + 已知尺寸（mm）\n- 用户必须授权部署；公共养殖场 / 实验室需公示告知\n\n## 关键观测信号\n\n### 参照物校准信号（核心）\n- `reference_type` - 参照物类型（ruler / coin / calibration_board）\n- `reference_known_length_mm` - 参照物已知尺寸（mm）\n- `reference_detected_pixel_length` - 参照物检测到的像素长度\n- `pixel_per_mm` - 校准比例（px/mm，核心换算系数）\n- `reference_detection_confidence` - 参照物检测置信度（0-1）\n\n### 鱼苗测量信号（每条 fry_id 独立）\n- `fry_id` - 鱼苗唯一标识（ReID 输出，可选）\n- `snout_xy` - 吻端 2D 像素坐标\n- `tail_tip_xy` - 尾鳍末端 2D 像素坐标\n- `body_length_px` - 吻端到尾鳍末端像素长度\n- `body_length_mm` - **实际体长（mm，= body_length_px / pixel_per_mm）**\n- `body_length_measurement_confidence` - 测量置信度（0-1，吻端/尾鳍末端定位质量）\n- `posture_is_straight` - 鱼体姿态是否伸直（弯曲会导致体长低估）\n\n### 群体统计\n- `measured_fry_count` - 本次成功测量鱼苗数\n- `body_length_mean_mm` - 平均体长\n- `body_length_std_mm` - 体长标准差\n- `body_length_cv_percent` - 变异系数（CV%，反映群体均匀度）\n- `body_length_p10` / `body_length_p50` / `body_length_p90` - 体长 10/50/90 分位数\n\n### 生长速率（结合历史数据）\n- `last_measurement_date` - 上次测量日期\n- `days_since_last_measurement` - 距上次测量天数\n- `growth_rate_mm_per_day` - 平均日增长（mm/day）\n- `growth_curve_points` - 生长曲线数据点列表（[{date, mean_mm}, ...]）\n\n## 综合判定\n\n- `growth_normal` - 生长正常（速率在鱼种基线区间内）\n- `growth_fast` - 生长偏快（>基线 1.2 倍，可能投喂过量需关注水质）\n- `growth_slow` - 生长偏慢（<基线 0.7 倍，疑似饲料质量/水质/温度问题）\n- `growth_stagnant` - **生长停滞**（连续 ≥ 2 次测量速率 < 基线 0.3 倍）\n- `growth_uneven_population` - 群体大小不均（CV% > 30%，需考虑分级饲养）\n- `growth_measurement_unreliable` - 测量不可靠（参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非健康告警）\n\n- Level 1（growth_normal / growth_fast）：仅入库 + 用户 APP 进度更新\"本次平均体长 X mm，日增长 Y mm/day，生长正常\"\n- Level 2（growth_slow / growth_uneven_population）：重要提示，建议**检查投喂量与频次 / 检查水温与水质 / 评估饲料品牌或粒径是否匹配鱼苗口径 / 考虑分级饲养均匀群体**\n- Level 3（growth_stagnant，单次）：紧急提示，建议**立即检查水质（溶氧/pH/氨氮/亚硝酸盐）+ 检查体表与游姿 + 检查投喂记录**，并联系**当地水产养殖技术员或观赏鱼繁育专家**\n- Level 4（growth_stagnant 连续 ≥ 2 周 / 同缸多组鱼苗同时停滞）：最高紧急提示 + 推送所有管理人员 + 强烈建议**全面排查（饲料 + 水质 + 病害 + 密度 + 光照周期）+ 专业人员介入**\n\n## 单日提醒上限\n\n- Level 1 不限（建议默认每天/每周 1 次测量） / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"营养不良 / 肠炎 / 寄生虫 / 应激综合征 / 遗传缺陷\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**输出具体饲料品牌名称推荐（仅可指出\"建议更换粒径\"等中性建议）\n- **禁止**长期存储完整鱼苗缸视频/图像（≤ 30 天，留生长曲线 + 关键测量帧；公共养殖场/实验室按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议）\n- 体长、生长速率、CV% 等指标必须基于真实图像测量；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种生长基线差异极大（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d）→ 必须按**鱼种 + 日龄 + 水温**联合判定基线；**禁止使用通用阈值盲判**\n- 必须考虑透视畸变上下文：参照物与鱼苗不在同一水平面 / 摄像头不垂直俯拍 → 必须返回 `growth_measurement_unreliable` 并提示调整拍摄\n- 参照物未检出 / 置信度 < 0.8 / 鱼苗姿态弯曲多数 / 视野遮挡严重 → 必须返回 `growth_measurement_unreliable`，**禁止给出不可靠的生长停滞告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼苗缸 ID\n- `species` - 鱼种\n- `fry_age_days` - 鱼苗日龄\n- `reference_calibration` - 参照物校准信息（type / known_mm / pixel_per_mm / confidence）\n- `population_statistics` - 群体统计（mean / std / CV% / p10 / p50 / p90）\n- `growth_rate_mm_per_day` - 平均日增长\n- `growth_curve_image_url` - 生长曲线图 URL\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\nAnalyzes fish-fry images or video with a known-size reference object to estimate body length, track growth rates and curves, and report growth concerns.\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\nAquaculture operators, ornamental fish breeders, and developers use the skill to analyze calibrated fry-tank media, review growth measurements and trends, and retrieve historical reports.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill automatically creates or reuses a backend identity and stores access tokens locally.\n\nMitigation: Review account linkage before installation and ask the publisher about token retention, deletion, and permission scope.\n\nRisk: Fish-tank media and generated history records are sent to configured lifeemergence.com services for cloud processing.\n\nMitigation: Use only media and records approved for cloud processing; review the destination and data-handling terms before use.\n\n## Reference(s):\n\n- [Fish fry measurement API documentation](references/api_doc.md)\n- [ClawHub skill listing](https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-fry-growth-measurement-analysis)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON]\n\n**Output Format:** [Structured analysis report or Markdown history table; optional saved text or JSON file]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Reports may include measurements, growth trends, alerts, recommendations, and report links.]\n\n## Skill Version(s):\n\n1.0.11 (source: ClawHub release metadata; bundled SKILL.md lists 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, 44948 bytes\n\nFiles: references/api_doc.md (7162b), scripts/__init__.py (74b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_fish_fry_growth_measurement_analysis.py (3826b), skill-card.md (2753b), SKILL.md (17357b), 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 (161b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: \"smyx-fish-fry-growth-measurement-analysis\"\ndescription: \"Through fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。\"\nversion: \"1.0.15\"\nlicense: \"MIT-0\"\n---\n\n# 📏 Fish Fry Growth Rate Measurement (via Reference Object) | 鱼苗生长速度测量（通过参照物）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼苗生长速度测量（通过参照物）** |\n| 🎯 核心目标 | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FRY_GROWTH_MEASUREMENT_ANALYSIS` |\n\nThrough fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. This skill helps aquaculturists or ornamental fish breeders evaluate fry health and feed conversion ratio, and timely adjust feeding strategy. Application scenarios: fry rearing tanks, aquaculture farms, ornamental fish breeding farms, laboratories. The system automatically captures images, generates growth reports, and alerts on anomalies (such as stunted growth). Skill features: growth rate is a critical indicator for fry health and feeding optimization. AI-based periodic measurement and growth-curve plotting helps farmers detect slow growth early, adjust management and improve survival rate and yield. This skill can be integrated into smart fry tanks or aquaculture management apps.\n\n通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。该技能有助于水产养殖者或观赏鱼繁育者评估鱼苗健康状况、饲料转化率，及时调整投喂策略。应用场景：鱼苗培育缸、水产养殖场、观赏鱼繁殖场、实验室。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。技能特点：生长速率是评估鱼苗健康、优化投喂的关键指标。通过 AI 自动定期测量并绘制生长曲线，可帮助养殖者及时发现生长迟缓问题，调整管理措施，提高成活率和产量。该技能可集成到智能鱼苗缸或养殖管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水产养殖生长监测 AI。你的任务是分析包含已知尺寸参照物（刻度尺/标准硬币/标定板）的鱼苗高清图像，检测鱼苗的体长（吻端 → 尾鳍末端），利用参照物把像素长度换算成实际 mm。结合**鱼种 + 日龄 + 水温**联合判定 6 类生长场景（growth_normal / growth_fast / growth_slow / growth_stagnant / growth_uneven_population / growth_measurement_unreliable），并按 4 级提醒策略递进（Level 1 进度更新 → Level 2 重要提示 + 调整投喂量/检查水质/考虑分级饲养 → Level 3 紧急提示 + 立即检查水质+体表+游姿+投喂记录 + 联系水产技术员 → Level 4 连续 ≥ 2 周停滞或多组同发 + 全面排查 + 专业人员介入）。**核心硬约束：参照物必须与鱼苗位于同一水平面，摄像头必须严格俯拍垂直向下**，否则透视畸变会让 mm 换算失真，必须返回 `growth_measurement_unreliable`。鱼种特异性必须按基线判定（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d），**严禁通用阈值盲判**。鱼体姿态弯曲会导致体长低估，必须过滤或纠正。参照物检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡严重时必须返回 `growth_measurement_unreliable` 并建议重拍。不提供任何疾病诊断，仅输出基于视觉的体长测量值与统计；**严禁输出具体药物名称、剂量和饲料品牌推荐**（仅可中性建议如\"调整粒径/调整投喂量\"）；严禁伪造夸大体长 / 生长速率 / CV%；严禁越权代用户启停喂食器/加热棒/增氧/换水/灯光（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头**定期拍摄**（默认每日或每周，含已知尺寸参照物）高清图像，识别 6 类生长场景（growth_normal / fast / slow / stagnant / uneven_population / signal_unreliable）→ **四组指标**：参照物校准 5 项（type / known_mm / 像素长度 / pixel_per_mm / 检测置信度）+ 鱼苗测量 7 项（吻端坐标 / 尾鳍末端坐标 / 像素长度 / 实际 mm / 测量置信度 / 姿态伸直 / fry_id）+ 群体统计 6 项（measured_count / mean / std / CV% / p10 / p50 / p90）+ 生长速率 4 项（上次测量日期 / 距上次天数 / mm/day / 生长曲线点列表）→ 4 档提醒级别（info / important / urgent / warning）→ **4 级提醒策略递进**（仅入库进度更新 → 调整投喂/分级饲养 → 紧急检查水质+体表+联系技术员 → 全面排查+专业介入）→ 单日提醒上限（Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限）→ **生长报告**（按 tank_id 输出，含本次测量值 + 群体统计 + 生长曲线 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 参照物自动检测与识别（直尺刻度 / 标准硬币圆形 / 棋盘格标定板） |\n| 2 | **亚像素级 pixel_per_mm 校准** |\n| 3 | 鱼苗目标检测 |\n| 4 | 鱼苗吻端 / 尾鳍末端关键点检测 |\n| 5 | 姿态弯曲过滤（脊柱曲率 > 阈值则该样本剔除或做曲线补偿） |\n| 6 | 体长像素 → mm 换算 |\n| 7 | 群体统计（均值 / 标准差 / CV% / 分位数） |\n| 8 | 跨次时间序列存档与生长曲线绘制 |\n| 9 | 鱼种自适应基线（生长速率基线表 + 日龄修正 + 水温 Q10 修正） |\n| 10 | 用户 APP 推送 |\n| 11 | 4 级提醒递进 |\n| 12 | 单日提醒上限 |\n| 13 | 生长报告（按 tank_id + 测量时间戳输出） |\n| 14 | CV% 群体均匀度评估（驱动分级饲养建议） |\n| 15 | 连续 ≥ 2 周 Level 3 → 强烈建议联系**当地水产养殖技术员或观赏鱼繁育专家** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供含参照物（刻度尺/标准硬币/标定板）的鱼苗缸高清图像或视频 URL/文件需要分析时，默认触发本技能进行鱼苗生长速度测量 |\n| 🔎 明确分析意图 | 当用户明确提及鱼苗体长、鱼苗生长速度、生长曲线、生长停滞、生长迟缓、CV 均匀度、分级饲养等关键词，并且上传了图像/视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单、生长停滞事件清单、查询历史鱼苗测量记录、显示所有鱼苗缸生长报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_fry_growth_measurement_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_fry_growth_measurement_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_fry_growth_measurement_analysis.py`](scripts/smyx_fish_fry_growth_measurement_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；**视野内必须放置已知尺寸参照物**；**严格俯拍**（参照物与鱼苗同一水平面）；分辨率 ≥ 1080p；鱼苗短暂静止或在透明计数槽中 |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → warning），连续 ≥ 2 周停滞或多组同发进入更高级别 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限 |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **禁止**对鱼苗做\"营养不良 / 肠炎 / 寄生虫 / 应激综合征 / 遗传缺陷\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体饲料品牌名称推荐（仅可中性建议如\"调整粒径\"、\"调整投喂量\"） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼苗缸视频/图像（≤ 30 天，留生长曲线 + 关键测量帧；公共养殖场/实验室按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大体长、生长速率、CV% 等指标；所有数据必须基于真实图像测量 |\n| 🔎 使用提醒 | **必须**按**鱼种 + 日龄 + 水温**联合判定基线（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d）；**禁止使用通用阈值盲判** |\n| 🔎 使用提醒 | **必须**做透视畸变校验：参照物与鱼苗不在同一水平面 / 摄像头不垂直俯拍 → 返回 `growth_measurement_unreliable` |\n| 🔎 使用提醒 | **必须**做姿态过滤：鱼体弯曲会导致体长低估，必须过滤或纠正 |\n| 🔎 使用提醒 | **必须**在参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡严重时返回 `growth_measurement_unreliable`，**禁止给出不可靠的生长停滞告警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 周 Level 3 → 强烈建议联系**当地水产养殖技术员或观赏鱼繁育专家** |\n| 📜 报告输出 | **必须**：生长报告**按 tank_id + 测量时间戳输出**，含本次测量值 + 群体统计 + 生长曲线 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史生长记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地含参照物的鱼苗高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input /path/to/fry.jpg\n\n# 分析网络含参照物的鱼苗高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --url https://example.com/fry.jpg\n\n# 显示历史生长测量记录清单（自动触发关键词：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单等）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-fry-growth-measurement-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1790193875976\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` - 获取测量结果（体长 mm + 生长速率 mm/day + 生长曲线）\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_FRY_GROWTH_MEASUREMENT_ANALYSIS` - 鱼苗生长速度测量（通过参照物）\n\n## 输入约束\n\n- 摄像头：鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头（俯拍）\n- 分辨率 ≥ 1080p（鱼苗 5-30mm 全长，需高清才能精确测量到亚毫米级）\n- **关键硬件要求**：**视野内必须放置已知尺寸的参照物**（recognized reference object），三选一：\n    - 防水刻度尺（最佳，建议金属/塑料防水尺，黑底白刻度对比强）\n    - 标准硬币（1 元硬币 25.0mm / 5 角 20.5mm / 1 角 19.0mm；美元 quarter 24.26mm）\n    - 标定板（黑白棋盘格 5mm/10mm 已知边长）\n- 拍摄角度：**严格俯拍（垂直向下）**，参照物与鱼苗位于**同一水平面**（避免透视畸变导致换算误差）\n- 鱼苗拍摄时应**短暂静止**或在透明计数槽中（移动模糊会让吻端/尾鳍末端定位失准）\n- 多鱼苗缸场景按摄像头 ID 绑定到注册鱼苗缸 ID\n- **部署时必须录入**：鱼种、孵化日期（用于换算日龄）、参照物类型 + 已知尺寸（mm）\n- 用户必须授权部署；公共养殖场 / 实验室需公示告知\n\n## 关键观测信号\n\n### 参照物校准信号（核心）\n- `reference_type` - 参照物类型（ruler / coin / calibration_board）\n- `reference_known_length_mm` - 参照物已知尺寸（mm）\n- `reference_detected_pixel_length` - 参照物检测到的像素长度\n- `pixel_per_mm` - 校准比例（px/mm，核心换算系数）\n- `reference_detection_confidence` - 参照物检测置信度（0-1）\n\n### 鱼苗测量信号（每条 fry_id 独立）\n- `fry_id` - 鱼苗唯一标识（ReID 输出，可选）\n- `snout_xy` - 吻端 2D 像素坐标\n- `tail_tip_xy` - 尾鳍末端 2D 像素坐标\n- `body_length_px` - 吻端到尾鳍末端像素长度\n- `body_length_mm` - **实际体长（mm，= body_length_px / pixel_per_mm）**\n- `body_length_measurement_confidence` - 测量置信度（0-1，吻端/尾鳍末端定位质量）\n- `posture_is_straight` - 鱼体姿态是否伸直（弯曲会导致体长低估）\n\n### 群体统计\n- `measured_fry_count` - 本次成功测量鱼苗数\n- `body_length_mean_mm` - 平均体长\n- `body_length_std_mm` - 体长标准差\n- `body_length_cv_percent` - 变异系数（CV%，反映群体均匀度）\n- `body_length_p10` / `body_length_p50` / `body_length_p90` - 体长 10/50/90 分位数\n\n### 生长速率（结合历史数据）\n- `last_measurement_date` - 上次测量日期\n- `days_since_last_measurement` - 距上次测量天数\n- `growth_rate_mm_per_day` - 平均日增长（mm/day）\n- `growth_curve_points` - 生长曲线数据点列表（[{date, mean_mm}, ...]）\n\n## 综合判定\n\n- `growth_normal` - 生长正常（速率在鱼种基线区间内）\n- `growth_fast` - 生长偏快（>基线 1.2 倍，可能投喂过量需关注水质）\n- `growth_slow` - 生长偏慢（<基线 0.7 倍，疑似饲料质量/水质/温度问题）\n- `growth_stagnant` - **生长停滞**（连续 ≥ 2 次测量速率 < 基线 0.3 倍）\n- `growth_uneven_population` - 群体大小不均（CV% > 30%，需考虑分级饲养）\n- `growth_measurement_unreliable` - 测量不可靠（参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非健康告警）\n\n- Level 1（growth_normal / growth_fast）：仅入库 + 用户 APP 进度更新\"本次平均体长 X mm，日增长 Y mm/day，生长正常\"\n- Level 2（growth_slow / growth_uneven_population）：重要提示，建议**检查投喂量与频次 / 检查水温与水质 / 评估饲料品牌或粒径是否匹配鱼苗口径 / 考虑分级饲养均匀群体**\n- Level 3（growth_stagnant，单次）：紧急提示，建议**立即检查水质（溶氧/pH/氨氮/亚硝酸盐）+ 检查体表与游姿 + 检查投喂记录**，并联系**当地水产养殖技术员或观赏鱼繁育专家**\n- Level 4（growth_stagnant 连续 ≥ 2 周 / 同缸多组鱼苗同时停滞）：最高紧急提示 + 推送所有管理人员 + 强烈建议**全面排查（饲料 + 水质 + 病害 + 密度 + 光照周期）+ 专业人员介入**\n\n## 单日提醒上限\n\n- Level 1 不限（建议默认每天/每周 1 次测量） / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"营养不良 / 肠炎 / 寄生虫 / 应激综合征 / 遗传缺陷\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**输出具体饲料品牌名称推荐（仅可指出\"建议更换粒径\"等中性建议）\n- **禁止**长期存储完整鱼苗缸视频/图像（≤ 30 天，留生长曲线 + 关键测量帧；公共养殖场/实验室按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议）\n- 体长、生长速率、CV% 等指标必须基于真实图像测量；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种生长基线差异极大（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d）→ 必须按**鱼种 + 日龄 + 水温**联合判定基线；**禁止使用通用阈值盲判**\n- 必须考虑透视畸变上下文：参照物与鱼苗不在同一水平面 / 摄像头不垂直俯拍 → 必须返回 `growth_measurement_unreliable` 并提示调整拍摄\n- 参照物未检出 / 置信度 < 0.8 / 鱼苗姿态弯曲多数 / 视野遮挡严重 → 必须返回 `growth_measurement_unreliable`，**禁止给出不可靠的生长停滞告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼苗缸 ID\n- `species` - 鱼种\n- `fry_age_days` - 鱼苗日龄\n- `reference_calibration` - 参照物校准信息（type / known_mm / pixel_per_mm / confidence）\n- `population_statistics` - 群体统计（mean / std / CV% / p10 / p50 / p90）\n- `growth_rate_mm_per_day` - 平均日增长\n- `growth_curve_image_url` - 生长曲线图 URL\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: prod\n\nFile v1.0.10:skill-card.md\n\n## Description:\n\nMeasures fish fry body length and growth rate from periodic images or videos that include a known-size reference object, then returns structured growth statistics, curves, report links, and management-oriented alerts.\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 aquaculture operators, ornamental fish breeders, lab users, and agents use this skill to analyze fry tank media with a reference object, estimate body length and growth rate, review historical measurements, and decide whether feeding, grading, or water-quality checks are warranted.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Fish tank images or videos, media URLs, and history queries may be sent to configured lifeemergence.com cloud services.\n\nMitigation: Use the skill only where users have authorized cloud processing, avoid sensitive media, and review retention, deletion, and report-access controls before production use.\n\nRisk: The skill can silently create or reuse identity and link uploads and history queries to that identity.\n\nMitigation: Review local identity and token storage behavior, especially for shared farm, lab, or workstation environments, and separate or delete records when operators change.\n\nRisk: Growth measurements can be misleading if the reference object, camera angle, image clarity, or fish posture is unsuitable.\n\nMitigation: Require a known-size reference object in the same plane, strict overhead capture, clear media, and human review of unreliable or high-impact outputs before changing husbandry practices.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-fry-growth-measurement-analysis)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n- [API 接口文档](references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, json, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown or JSON analysis output with structured measurements, growth statistics, recommendations, history listings, and report links.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May save the analysis output to a user-specified file and may query cloud-hosted history for the resolved user identity.]\n\n## Skill Version(s):\n\n1.0.10 (source: server release metadata; artifact frontmatter states 1.0.15)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 44919 bytes\n\nFiles: references/api_doc.md (7162b), scripts/__init__.py (74b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_fish_fry_growth_measurement_analysis.py (3826b), skill-card.md (2683b), SKILL.md (17357b), 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 (160b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: \"smyx-fish-fry-growth-measurement-analysis\"\ndescription: \"Through fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。\"\nversion: \"1.0.13\"\nlicense: \"MIT-0\"\n---\n\n# 📏 Fish Fry Growth Rate Measurement (via Reference Object) | 鱼苗生长速度测量（通过参照物）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼苗生长速度测量（通过参照物）** |\n| 🎯 核心目标 | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FRY_GROWTH_MEASUREMENT_ANALYSIS` |\n\nThrough fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. This skill helps aquaculturists or ornamental fish breeders evaluate fry health and feed conversion ratio, and timely adjust feeding strategy. Application scenarios: fry rearing tanks, aquaculture farms, ornamental fish breeding farms, laboratories. The system automatically captures images, generates growth reports, and alerts on anomalies (such as stunted growth). Skill features: growth rate is a critical indicator for fry health and feeding optimization. AI-based periodic measurement and growth-curve plotting helps farmers detect slow growth early, adjust management and improve survival rate and yield. This skill can be integrated into smart fry tanks or aquaculture management apps.\n\n通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。该技能有助于水产养殖者或观赏鱼繁育者评估鱼苗健康状况、饲料转化率，及时调整投喂策略。应用场景：鱼苗培育缸、水产养殖场、观赏鱼繁殖场、实验室。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。技能特点：生长速率是评估鱼苗健康、优化投喂的关键指标。通过 AI 自动定期测量并绘制生长曲线，可帮助养殖者及时发现生长迟缓问题，调整管理措施，提高成活率和产量。该技能可集成到智能鱼苗缸或养殖管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水产养殖生长监测 AI。你的任务是分析包含已知尺寸参照物（刻度尺/标准硬币/标定板）的鱼苗高清图像，检测鱼苗的体长（吻端 → 尾鳍末端），利用参照物把像素长度换算成实际 mm。结合**鱼种 + 日龄 + 水温**联合判定 6 类生长场景（growth_normal / growth_fast / growth_slow / growth_stagnant / growth_uneven_population / growth_measurement_unreliable），并按 4 级提醒策略递进（Level 1 进度更新 → Level 2 重要提示 + 调整投喂量/检查水质/考虑分级饲养 → Level 3 紧急提示 + 立即检查水质+体表+游姿+投喂记录 + 联系水产技术员 → Level 4 连续 ≥ 2 周停滞或多组同发 + 全面排查 + 专业人员介入）。**核心硬约束：参照物必须与鱼苗位于同一水平面，摄像头必须严格俯拍垂直向下**，否则透视畸变会让 mm 换算失真，必须返回 `growth_measurement_unreliable`。鱼种特异性必须按基线判定（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d），**严禁通用阈值盲判**。鱼体姿态弯曲会导致体长低估，必须过滤或纠正。参照物检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡严重时必须返回 `growth_measurement_unreliable` 并建议重拍。不提供任何疾病诊断，仅输出基于视觉的体长测量值与统计；**严禁输出具体药物名称、剂量和饲料品牌推荐**（仅可中性建议如\"调整粒径/调整投喂量\"）；严禁伪造夸大体长 / 生长速率 / CV%；严禁越权代用户启停喂食器/加热棒/增氧/换水/灯光（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头**定期拍摄**（默认每日或每周，含已知尺寸参照物）高清图像，识别 6 类生长场景（growth_normal / fast / slow / stagnant / uneven_population / signal_unreliable）→ **四组指标**：参照物校准 5 项（type / known_mm / 像素长度 / pixel_per_mm / 检测置信度）+ 鱼苗测量 7 项（吻端坐标 / 尾鳍末端坐标 / 像素长度 / 实际 mm / 测量置信度 / 姿态伸直 / fry_id）+ 群体统计 6 项（measured_count / mean / std / CV% / p10 / p50 / p90）+ 生长速率 4 项（上次测量日期 / 距上次天数 / mm/day / 生长曲线点列表）→ 4 档提醒级别（info / important / urgent / warning）→ **4 级提醒策略递进**（仅入库进度更新 → 调整投喂/分级饲养 → 紧急检查水质+体表+联系技术员 → 全面排查+专业介入）→ 单日提醒上限（Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限）→ **生长报告**（按 tank_id 输出，含本次测量值 + 群体统计 + 生长曲线 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 参照物自动检测与识别（直尺刻度 / 标准硬币圆形 / 棋盘格标定板） |\n| 2 | **亚像素级 pixel_per_mm 校准** |\n| 3 | 鱼苗目标检测 |\n| 4 | 鱼苗吻端 / 尾鳍末端关键点检测 |\n| 5 | 姿态弯曲过滤（脊柱曲率 > 阈值则该样本剔除或做曲线补偿） |\n| 6 | 体长像素 → mm 换算 |\n| 7 | 群体统计（均值 / 标准差 / CV% / 分位数） |\n| 8 | 跨次时间序列存档与生长曲线绘制 |\n| 9 | 鱼种自适应基线（生长速率基线表 + 日龄修正 + 水温 Q10 修正） |\n| 10 | 用户 APP 推送 |\n| 11 | 4 级提醒递进 |\n| 12 | 单日提醒上限 |\n| 13 | 生长报告（按 tank_id + 测量时间戳输出） |\n| 14 | CV% 群体均匀度评估（驱动分级饲养建议） |\n| 15 | 连续 ≥ 2 周 Level 3 → 强烈建议联系**当地水产养殖技术员或观赏鱼繁育专家** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供含参照物（刻度尺/标准硬币/标定板）的鱼苗缸高清图像或视频 URL/文件需要分析时，默认触发本技能进行鱼苗生长速度测量 |\n| 🔎 明确分析意图 | 当用户明确提及鱼苗体长、鱼苗生长速度、生长曲线、生长停滞、生长迟缓、CV 均匀度、分级饲养等关键词，并且上传了图像/视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单、生长停滞事件清单、查询历史鱼苗测量记录、显示所有鱼苗缸生长报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_fry_growth_measurement_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_fry_growth_measurement_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_fry_growth_measurement_analysis.py`](scripts/smyx_fish_fry_growth_measurement_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；**视野内必须放置已知尺寸参照物**；**严格俯拍**（参照物与鱼苗同一水平面）；分辨率 ≥ 1080p；鱼苗短暂静止或在透明计数槽中 |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → warning），连续 ≥ 2 周停滞或多组同发进入更高级别 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限 |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **禁止**对鱼苗做\"营养不良 / 肠炎 / 寄生虫 / 应激综合征 / 遗传缺陷\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体饲料品牌名称推荐（仅可中性建议如\"调整粒径\"、\"调整投喂量\"） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼苗缸视频/图像（≤ 30 天，留生长曲线 + 关键测量帧；公共养殖场/实验室按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大体长、生长速率、CV% 等指标；所有数据必须基于真实图像测量 |\n| 🔎 使用提醒 | **必须**按**鱼种 + 日龄 + 水温**联合判定基线（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d）；**禁止使用通用阈值盲判** |\n| 🔎 使用提醒 | **必须**做透视畸变校验：参照物与鱼苗不在同一水平面 / 摄像头不垂直俯拍 → 返回 `growth_measurement_unreliable` |\n| 🔎 使用提醒 | **必须**做姿态过滤：鱼体弯曲会导致体长低估，必须过滤或纠正 |\n| 🔎 使用提醒 | **必须**在参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡严重时返回 `growth_measurement_unreliable`，**禁止给出不可靠的生长停滞告警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 周 Level 3 → 强烈建议联系**当地水产养殖技术员或观赏鱼繁育专家** |\n| 📜 报告输出 | **必须**：生长报告**按 tank_id + 测量时间戳输出**，含本次测量值 + 群体统计 + 生长曲线 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史生长记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地含参照物的鱼苗高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input /path/to/fry.jpg\n\n# 分析网络含参照物的鱼苗高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --url https://example.com/fry.jpg\n\n# 显示历史生长测量记录清单（自动触发关键词：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单等）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-fry-growth-measurement-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1788920848204\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` - 获取测量结果（体长 mm + 生长速率 mm/day + 生长曲线）\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_FRY_GROWTH_MEASUREMENT_ANALYSIS` - 鱼苗生长速度测量（通过参照物）\n\n## 输入约束\n\n- 摄像头：鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头（俯拍）\n- 分辨率 ≥ 1080p（鱼苗 5-30mm 全长，需高清才能精确测量到亚毫米级）\n- **关键硬件要求**：**视野内必须放置已知尺寸的参照物**（recognized reference object），三选一：\n    - 防水刻度尺（最佳，建议金属/塑料防水尺，黑底白刻度对比强）\n    - 标准硬币（1 元硬币 25.0mm / 5 角 20.5mm / 1 角 19.0mm；美元 quarter 24.26mm）\n    - 标定板（黑白棋盘格 5mm/10mm 已知边长）\n- 拍摄角度：**严格俯拍（垂直向下）**，参照物与鱼苗位于**同一水平面**（避免透视畸变导致换算误差）\n- 鱼苗拍摄时应**短暂静止**或在透明计数槽中（移动模糊会让吻端/尾鳍末端定位失准）\n- 多鱼苗缸场景按摄像头 ID 绑定到注册鱼苗缸 ID\n- **部署时必须录入**：鱼种、孵化日期（用于换算日龄）、参照物类型 + 已知尺寸（mm）\n- 用户必须授权部署；公共养殖场 / 实验室需公示告知\n\n## 关键观测信号\n\n### 参照物校准信号（核心）\n- `reference_type` - 参照物类型（ruler / coin / calibration_board）\n- `reference_known_length_mm` - 参照物已知尺寸（mm）\n- `reference_detected_pixel_length` - 参照物检测到的像素长度\n- `pixel_per_mm` - 校准比例（px/mm，核心换算系数）\n- `reference_detection_confidence` - 参照物检测置信度（0-1）\n\n### 鱼苗测量信号（每条 fry_id 独立）\n- `fry_id` - 鱼苗唯一标识（ReID 输出，可选）\n- `snout_xy` - 吻端 2D 像素坐标\n- `tail_tip_xy` - 尾鳍末端 2D 像素坐标\n- `body_length_px` - 吻端到尾鳍末端像素长度\n- `body_length_mm` - **实际体长（mm，= body_length_px / pixel_per_mm）**\n- `body_length_measurement_confidence` - 测量置信度（0-1，吻端/尾鳍末端定位质量）\n- `posture_is_straight` - 鱼体姿态是否伸直（弯曲会导致体长低估）\n\n### 群体统计\n- `measured_fry_count` - 本次成功测量鱼苗数\n- `body_length_mean_mm` - 平均体长\n- `body_length_std_mm` - 体长标准差\n- `body_length_cv_percent` - 变异系数（CV%，反映群体均匀度）\n- `body_length_p10` / `body_length_p50` / `body_length_p90` - 体长 10/50/90 分位数\n\n### 生长速率（结合历史数据）\n- `last_measurement_date` - 上次测量日期\n- `days_since_last_measurement` - 距上次测量天数\n- `growth_rate_mm_per_day` - 平均日增长（mm/day）\n- `growth_curve_points` - 生长曲线数据点列表（[{date, mean_mm}, ...]）\n\n## 综合判定\n\n- `growth_normal` - 生长正常（速率在鱼种基线区间内）\n- `growth_fast` - 生长偏快（>基线 1.2 倍，可能投喂过量需关注水质）\n- `growth_slow` - 生长偏慢（<基线 0.7 倍，疑似饲料质量/水质/温度问题）\n- `growth_stagnant` - **生长停滞**（连续 ≥ 2 次测量速率 < 基线 0.3 倍）\n- `growth_uneven_population` - 群体大小不均（CV% > 30%，需考虑分级饲养）\n- `growth_measurement_unreliable` - 测量不可靠（参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非健康告警）\n\n- Level 1（growth_normal / growth_fast）：仅入库 + 用户 APP 进度更新\"本次平均体长 X mm，日增长 Y mm/day，生长正常\"\n- Level 2（growth_slow / growth_uneven_population）：重要提示，建议**检查投喂量与频次 / 检查水温与水质 / 评估饲料品牌或粒径是否匹配鱼苗口径 / 考虑分级饲养均匀群体**\n- Level 3（growth_stagnant，单次）：紧急提示，建议**立即检查水质（溶氧/pH/氨氮/亚硝酸盐）+ 检查体表与游姿 + 检查投喂记录**，并联系**当地水产养殖技术员或观赏鱼繁育专家**\n- Level 4（growth_stagnant 连续 ≥ 2 周 / 同缸多组鱼苗同时停滞）：最高紧急提示 + 推送所有管理人员 + 强烈建议**全面排查（饲料 + 水质 + 病害 + 密度 + 光照周期）+ 专业人员介入**\n\n## 单日提醒上限\n\n- Level 1 不限（建议默认每天/每周 1 次测量） / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"营养不良 / 肠炎 / 寄生虫 / 应激综合征 / 遗传缺陷\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**输出具体饲料品牌名称推荐（仅可指出\"建议更换粒径\"等中性建议）\n- **禁止**长期存储完整鱼苗缸视频/图像（≤ 30 天，留生长曲线 + 关键测量帧；公共养殖场/实验室按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议）\n- 体长、生长速率、CV% 等指标必须基于真实图像测量；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种生长基线差异极大（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d）→ 必须按**鱼种 + 日龄 + 水温**联合判定基线；**禁止使用通用阈值盲判**\n- 必须考虑透视畸变上下文：参照物与鱼苗不在同一水平面 / 摄像头不垂直俯拍 → 必须返回 `growth_measurement_unreliable` 并提示调整拍摄\n- 参照物未检出 / 置信度 < 0.8 / 鱼苗姿态弯曲多数 / 视野遮挡严重 → 必须返回 `growth_measurement_unreliable`，**禁止给出不可靠的生长停滞告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼苗缸 ID\n- `species` - 鱼种\n- `fry_age_days` - 鱼苗日龄\n- `reference_calibration` - 参照物校准信息（type / known_mm / pixel_per_mm / confidence）\n- `population_statistics` - 群体统计（mean / std / CV% / p10 / p50 / p90）\n- `growth_rate_mm_per_day` - 平均日增长\n- `growth_curve_image_url` - 生长曲线图 URL\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\nMeasures fish fry body length and growth rate from periodic tank images or video that include a known-size reference object, then returns structured growth statistics, curve data, alerts, recommendations, and report links.\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 aquaculture operators, ornamental fish breeders, laboratory users, and developers can use this skill to analyze fry tank images or videos with a calibration object, estimate body length and growth trends, query prior reports, and produce structured management guidance.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill uploads media to configured remote services and queries identity-linked cloud report history.\n\nMitigation: Use only media approved for those services, confirm remote data handling with the publisher, and avoid private or regulated imagery until handling and retention are documented.\n\nRisk: The skill can create or reuse a local identity and store bearer-style tokens in a shared SQLite database.\n\nMitigation: Run it in an isolated workspace or account, restrict access to the workspace data directory, and rotate or remove stored tokens after evaluation.\n\nRisk: The authoritative security verdict is suspicious and calls out endpoint, identity-scope, and token-persistence concerns.\n\nMitigation: Do not use it in production until the publisher documents data handling, scopes identity use, protects or avoids local token persistence, and moves defaults to HTTPS production services.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-fry-growth-measurement-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):** [Analysis, JSON, Markdown, Files, Guidance]\n\n**Output Format:** [Markdown or JSON structured report with report links; optional saved output file.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Requires a local media file path or media URL for analysis, or --list for history queries; supports basic, standard, and json detail levels.]\n\n## Skill Version(s):\n\n1.0.9 (source: server release evidence and target metadata; artifact frontmatter says 1.0.13)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 44835 bytes\n\nFiles: references/api_doc.md (7162b), scripts/__init__.py (74b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_fish_fry_growth_measurement_analysis.py (3826b), skill-card.md (2489b), SKILL.md (17357b), 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 (160b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"smyx-fish-fry-growth-measurement-analysis\"\ndescription: \"Through fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 📏 Fish Fry Growth Rate Measurement (via Reference Object) | 鱼苗生长速度测量（通过参照物）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼苗生长速度测量（通过参照物）** |\n| 🎯 核心目标 | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FRY_GROWTH_MEASUREMENT_ANALYSIS` |\n\nThrough fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. This skill helps aquaculturists or ornamental fish breeders evaluate fry health and feed conversion ratio, and timely adjust feeding strategy. Application scenarios: fry rearing tanks, aquaculture farms, ornamental fish breeding farms, laboratories. The system automatically captures images, generates growth reports, and alerts on anomalies (such as stunted growth). Skill features: growth rate is a critical indicator for fry health and feeding optimization. AI-based periodic measurement and growth-curve plotting helps farmers detect slow growth early, adjust management and improve survival rate and yield. This skill can be integrated into smart fry tanks or aquaculture management apps.\n\n通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。该技能有助于水产养殖者或观赏鱼繁育者评估鱼苗健康状况、饲料转化率，及时调整投喂策略。应用场景：鱼苗培育缸、水产养殖场、观赏鱼繁殖场、实验室。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。技能特点：生长速率是评估鱼苗健康、优化投喂的关键指标。通过 AI 自动定期测量并绘制生长曲线，可帮助养殖者及时发现生长迟缓问题，调整管理措施，提高成活率和产量。该技能可集成到智能鱼苗缸或养殖管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水产养殖生长监测 AI。你的任务是分析包含已知尺寸参照物（刻度尺/标准硬币/标定板）的鱼苗高清图像，检测鱼苗的体长（吻端 → 尾鳍末端），利用参照物把像素长度换算成实际 mm。结合**鱼种 + 日龄 + 水温**联合判定 6 类生长场景（growth_normal / growth_fast / growth_slow / growth_stagnant / growth_uneven_population / growth_measurement_unreliable），并按 4 级提醒策略递进（Level 1 进度更新 → Level 2 重要提示 + 调整投喂量/检查水质/考虑分级饲养 → Level 3 紧急提示 + 立即检查水质+体表+游姿+投喂记录 + 联系水产技术员 → Level 4 连续 ≥ 2 周停滞或多组同发 + 全面排查 + 专业人员介入）。**核心硬约束：参照物必须与鱼苗位于同一水平面，摄像头必须严格俯拍垂直向下**，否则透视畸变会让 mm 换算失真，必须返回 `growth_measurement_unreliable`。鱼种特异性必须按基线判定（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d），**严禁通用阈值盲判**。鱼体姿态弯曲会导致体长低估，必须过滤或纠正。参照物检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡严重时必须返回 `growth_measurement_unreliable` 并建议重拍。不提供任何疾病诊断，仅输出基于视觉的体长测量值与统计；**严禁输出具体药物名称、剂量和饲料品牌推荐**（仅可中性建议如\"调整粒径/调整投喂量\"）；严禁伪造夸大体长 / 生长速率 / CV%；严禁越权代用户启停喂食器/加热棒/增氧/换水/灯光（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头**定期拍摄**（默认每日或每周，含已知尺寸参照物）高清图像，识别 6 类生长场景（growth_normal / fast / slow / stagnant / uneven_population / signal_unreliable）→ **四组指标**：参照物校准 5 项（type / known_mm / 像素长度 / pixel_per_mm / 检测置信度）+ 鱼苗测量 7 项（吻端坐标 / 尾鳍末端坐标 / 像素长度 / 实际 mm / 测量置信度 / 姿态伸直 / fry_id）+ 群体统计 6 项（measured_count / mean / std / CV% / p10 / p50 / p90）+ 生长速率 4 项（上次测量日期 / 距上次天数 / mm/day / 生长曲线点列表）→ 4 档提醒级别（info / important / urgent / warning）→ **4 级提醒策略递进**（仅入库进度更新 → 调整投喂/分级饲养 → 紧急检查水质+体表+联系技术员 → 全面排查+专业介入）→ 单日提醒上限（Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限）→ **生长报告**（按 tank_id 输出，含本次测量值 + 群体统计 + 生长曲线 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 参照物自动检测与识别（直尺刻度 / 标准硬币圆形 / 棋盘格标定板） |\n| 2 | **亚像素级 pixel_per_mm 校准** |\n| 3 | 鱼苗目标检测 |\n| 4 | 鱼苗吻端 / 尾鳍末端关键点检测 |\n| 5 | 姿态弯曲过滤（脊柱曲率 > 阈值则该样本剔除或做曲线补偿） |\n| 6 | 体长像素 → mm 换算 |\n| 7 | 群体统计（均值 / 标准差 / CV% / 分位数） |\n| 8 | 跨次时间序列存档与生长曲线绘制 |\n| 9 | 鱼种自适应基线（生长速率基线表 + 日龄修正 + 水温 Q10 修正） |\n| 10 | 用户 APP 推送 |\n| 11 | 4 级提醒递进 |\n| 12 | 单日提醒上限 |\n| 13 | 生长报告（按 tank_id + 测量时间戳输出） |\n| 14 | CV% 群体均匀度评估（驱动分级饲养建议） |\n| 15 | 连续 ≥ 2 周 Level 3 → 强烈建议联系**当地水产养殖技术员或观赏鱼繁育专家** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供含参照物（刻度尺/标准硬币/标定板）的鱼苗缸高清图像或视频 URL/文件需要分析时，默认触发本技能进行鱼苗生长速度测量 |\n| 🔎 明确分析意图 | 当用户明确提及鱼苗体长、鱼苗生长速度、生长曲线、生长停滞、生长迟缓、CV 均匀度、分级饲养等关键词，并且上传了图像/视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单、生长停滞事件清单、查询历史鱼苗测量记录、显示所有鱼苗缸生长报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_fry_growth_measurement_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_fry_growth_measurement_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_fry_growth_measurement_analysis.py`](scripts/smyx_fish_fry_growth_measurement_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；**视野内必须放置已知尺寸参照物**；**严格俯拍**（参照物与鱼苗同一水平面）；分辨率 ≥ 1080p；鱼苗短暂静止或在透明计数槽中 |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → warning），连续 ≥ 2 周停滞或多组同发进入更高级别 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限 |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **禁止**对鱼苗做\"营养不良 / 肠炎 / 寄生虫 / 应激综合征 / 遗传缺陷\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体饲料品牌名称推荐（仅可中性建议如\"调整粒径\"、\"调整投喂量\"） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼苗缸视频/图像（≤ 30 天，留生长曲线 + 关键测量帧；公共养殖场/实验室按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大体长、生长速率、CV% 等指标；所有数据必须基于真实图像测量 |\n| 🔎 使用提醒 | **必须**按**鱼种 + 日龄 + 水温**联合判定基线（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d）；**禁止使用通用阈值盲判** |\n| 🔎 使用提醒 | **必须**做透视畸变校验：参照物与鱼苗不在同一水平面 / 摄像头不垂直俯拍 → 返回 `growth_measurement_unreliable` |\n| 🔎 使用提醒 | **必须**做姿态过滤：鱼体弯曲会导致体长低估，必须过滤或纠正 |\n| 🔎 使用提醒 | **必须**在参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡严重时返回 `growth_measurement_unreliable`，**禁止给出不可靠的生长停滞告警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 周 Level 3 → 强烈建议联系**当地水产养殖技术员或观赏鱼繁育专家** |\n| 📜 报告输出 | **必须**：生长报告**按 tank_id + 测量时间戳输出**，含本次测量值 + 群体统计 + 生长曲线 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史生长记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地含参照物的鱼苗高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input /path/to/fry.jpg\n\n# 分析网络含参照物的鱼苗高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --url https://example.com/fry.jpg\n\n# 显示历史生长测量记录清单（自动触发关键词：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单等）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-fry-growth-measurement-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1787656172026\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` - 获取测量结果（体长 mm + 生长速率 mm/day + 生长曲线）\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_FRY_GROWTH_MEASUREMENT_ANALYSIS` - 鱼苗生长速度测量（通过参照物）\n\n## 输入约束\n\n- 摄像头：鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头（俯拍）\n- 分辨率 ≥ 1080p（鱼苗 5-30mm 全长，需高清才能精确测量到亚毫米级）\n- **关键硬件要求**：**视野内必须放置已知尺寸的参照物**（recognized reference object），三选一：\n    - 防水刻度尺（最佳，建议金属/塑料防水尺，黑底白刻度对比强）\n    - 标准硬币（1 元硬币 25.0mm / 5 角 20.5mm / 1 角 19.0mm；美元 quarter 24.26mm）\n    - 标定板（黑白棋盘格 5mm/10mm 已知边长）\n- 拍摄角度：**严格俯拍（垂直向下）**，参照物与鱼苗位于**同一水平面**（避免透视畸变导致换算误差）\n- 鱼苗拍摄时应**短暂静止**或在透明计数槽中（移动模糊会让吻端/尾鳍末端定位失准）\n- 多鱼苗缸场景按摄像头 ID 绑定到注册鱼苗缸 ID\n- **部署时必须录入**：鱼种、孵化日期（用于换算日龄）、参照物类型 + 已知尺寸（mm）\n- 用户必须授权部署；公共养殖场 / 实验室需公示告知\n\n## 关键观测信号\n\n### 参照物校准信号（核心）\n- `reference_type` - 参照物类型（ruler / coin / calibration_board）\n- `reference_known_length_mm` - 参照物已知尺寸（mm）\n- `reference_detected_pixel_length` - 参照物检测到的像素长度\n- `pixel_per_mm` - 校准比例（px/mm，核心换算系数）\n- `reference_detection_confidence` - 参照物检测置信度（0-1）\n\n### 鱼苗测量信号（每条 fry_id 独立）\n- `fry_id` - 鱼苗唯一标识（ReID 输出，可选）\n- `snout_xy` - 吻端 2D 像素坐标\n- `tail_tip_xy` - 尾鳍末端 2D 像素坐标\n- `body_length_px` - 吻端到尾鳍末端像素长度\n- `body_length_mm` - **实际体长（mm，= body_length_px / pixel_per_mm）**\n- `body_length_measurement_confidence` - 测量置信度（0-1，吻端/尾鳍末端定位质量）\n- `posture_is_straight` - 鱼体姿态是否伸直（弯曲会导致体长低估）\n\n### 群体统计\n- `measured_fry_count` - 本次成功测量鱼苗数\n- `body_length_mean_mm` - 平均体长\n- `body_length_std_mm` - 体长标准差\n- `body_length_cv_percent` - 变异系数（CV%，反映群体均匀度）\n- `body_length_p10` / `body_length_p50` / `body_length_p90` - 体长 10/50/90 分位数\n\n### 生长速率（结合历史数据）\n- `last_measurement_date` - 上次测量日期\n- `days_since_last_measurement` - 距上次测量天数\n- `growth_rate_mm_per_day` - 平均日增长（mm/day）\n- `growth_curve_points` - 生长曲线数据点列表（[{date, mean_mm}, ...]）\n\n## 综合判定\n\n- `growth_normal` - 生长正常（速率在鱼种基线区间内）\n- `growth_fast` - 生长偏快（>基线 1.2 倍，可能投喂过量需关注水质）\n- `growth_slow` - 生长偏慢（<基线 0.7 倍，疑似饲料质量/水质/温度问题）\n- `growth_stagnant` - **生长停滞**（连续 ≥ 2 次测量速率 < 基线 0.3 倍）\n- `growth_uneven_population` - 群体大小不均（CV% > 30%，需考虑分级饲养）\n- `growth_measurement_unreliable` - 测量不可靠（参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非健康告警）\n\n- Level 1（growth_normal / growth_fast）：仅入库 + 用户 APP 进度更新\"本次平均体长 X mm，日增长 Y mm/day，生长正常\"\n- Level 2（growth_slow / growth_uneven_population）：重要提示，建议**检查投喂量与频次 / 检查水温与水质 / 评估饲料品牌或粒径是否匹配鱼苗口径 / 考虑分级饲养均匀群体**\n- Level 3（growth_stagnant，单次）：紧急提示，建议**立即检查水质（溶氧/pH/氨氮/亚硝酸盐）+ 检查体表与游姿 + 检查投喂记录**，并联系**当地水产养殖技术员或观赏鱼繁育专家**\n- Level 4（growth_stagnant 连续 ≥ 2 周 / 同缸多组鱼苗同时停滞）：最高紧急提示 + 推送所有管理人员 + 强烈建议**全面排查（饲料 + 水质 + 病害 + 密度 + 光照周期）+ 专业人员介入**\n\n## 单日提醒上限\n\n- Level 1 不限（建议默认每天/每周 1 次测量） / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"营养不良 / 肠炎 / 寄生虫 / 应激综合征 / 遗传缺陷\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**输出具体饲料品牌名称推荐（仅可指出\"建议更换粒径\"等中性建议）\n- **禁止**长期存储完整鱼苗缸视频/图像（≤ 30 天，留生长曲线 + 关键测量帧；公共养殖场/实验室按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议）\n- 体长、生长速率、CV% 等指标必须基于真实图像测量；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种生长基线差异极大（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d）→ 必须按**鱼种 + 日龄 + 水温**联合判定基线；**禁止使用通用阈值盲判**\n- 必须考虑透视畸变上下文：参照物与鱼苗不在同一水平面 / 摄像头不垂直俯拍 → 必须返回 `growth_measurement_unreliable` 并提示调整拍摄\n- 参照物未检出 / 置信度 < 0.8 / 鱼苗姿态弯曲多数 / 视野遮挡严重 → 必须返回 `growth_measurement_unreliable`，**禁止给出不可靠的生长停滞告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼苗缸 ID\n- `species` - 鱼种\n- `fry_age_days` - 鱼苗日龄\n- `reference_calibration` - 参照物校准信息（type / known_mm / pixel_per_mm / confidence）\n- `population_statistics` - 群体统计（mean / std / CV% / p10 / p50 / p90）\n- `growth_rate_mm_per_day` - 平均日增长\n- `growth_curve_image_url` - 生长曲线图 URL\n- `composite_scene` - 综合判定\n- `alert_level` - 提醒等级\n- `recommended_actions` - 建议动作（调整投喂 / 分级饲养 / 检查水质 / 联系技术员，**不含药物与品牌**）\n- `disclaimer` - 免责声明\n\nFile v1.0.8:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.8:scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.8:skill-card.md\n\n## Description:\n\nAnalyzes fish fry tank images or videos with a known-size reference object to estimate body length, growth rate, growth curves, and growth-related alerts.\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 aquaculturists, ornamental fish breeders, laboratory users, and developers use this skill to analyze periodic fry tank media, measure fry length in millimeters, compare growth over time, and generate structured growth reports.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill can send fish-tank media and report queries to external cloud or private API services.\n\nMitigation: Install only when the publisher and configured API endpoints are trusted, and avoid submitting media that should not leave the workspace.\n\nRisk: The skill can automatically create or reuse an identity, read workspace credentials, and persist returned tokens locally.\n\nMitigation: Review credential handling before use, run in an isolated workspace when possible, and remove local credentials or token databases when no longer needed.\n\nRisk: Measurements can be misleading when the reference object is missing, off-plane, low confidence, or captured from a non-vertical perspective.\n\nMitigation: Use a known-size reference object in the same plane as the fish, capture from directly overhead, and treat low-confidence or obstructed results as requiring a new image or video.\n\n## Reference(s):\n\n- [API Interface Documentation](artifact/references/api_doc.md)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-fry-growth-measurement-analysis)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance]\n\n**Output Format:** [Markdown and JSON]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Can return structured analysis, growth measurements, report links, historical report tables, and optional saved output files.]\n\n## Skill Version(s):\n\n1.0.8 (source: server release metadata; artifact frontmatter states 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, 45136 bytes\n\nFiles: references/api_doc.md (7162b), scripts/__init__.py (74b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_fish_fry_growth_measurement_analysis.py (3826b), skill-card.md (3241b), SKILL.md (17357b), 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 (160b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"smyx-fish-fry-growth-measurement-analysis\"\ndescription: \"Through fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 📏 Fish Fry Growth Rate Measurement (via Reference Object) | 鱼苗生长速度测量（通过参照物）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼苗生长速度测量（通过参照物）** |\n| 🎯 核心目标 | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FRY_GROWTH_MEASUREMENT_ANALYSIS` |\n\nThrough fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. This skill helps aquaculturists or ornamental fish breeders evaluate fry health and feed conversion ratio, and timely adjust feeding strategy. Application scenarios: fry rearing tanks, aquaculture farms, ornamental fish breeding farms, laboratories. The system automatically captures images, generates growth reports, and alerts on anomalies (such as stunted growth). Skill features: growth rate is a critical indicator for fry health and feeding optimization. AI-based periodic measurement and growth-curve plotting helps farmers detect slow growth early, adjust management and improve survival rate and yield. This skill can be integrated into smart fry tanks or aquaculture management apps.\n\n通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。该技能有助于水产养殖者或观赏鱼繁育者评估鱼苗健康状况、饲料转化率，及时调整投喂策略。应用场景：鱼苗培育缸、水产养殖场、观赏鱼繁殖场、实验室。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。技能特点：生长速率是评估鱼苗健康、优化投喂的关键指标。通过 AI 自动定期测量并绘制生长曲线，可帮助养殖者及时发现生长迟缓问题，调整管理措施，提高成活率和产量。该技能可集成到智能鱼苗缸或养殖管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水产养殖生长监测 AI。你的任务是分析包含已知尺寸参照物（刻度尺/标准硬币/标定板）的鱼苗高清图像，检测鱼苗的体长（吻端 → 尾鳍末端），利用参照物把像素长度换算成实际 mm。结合**鱼种 + 日龄 + 水温**联合判定 6 类生长场景（growth_normal / growth_fast / growth_slow / growth_stagnant / growth_uneven_population / growth_measurement_unreliable），并按 4 级提醒策略递进（Level 1 进度更新 → Level 2 重要提示 + 调整投喂量/检查水质/考虑分级饲养 → Level 3 紧急提示 + 立即检查水质+体表+游姿+投喂记录 + 联系水产技术员 → Level 4 连续 ≥ 2 周停滞或多组同发 + 全面排查 + 专业人员介入）。**核心硬约束：参照物必须与鱼苗位于同一水平面，摄像头必须严格俯拍垂直向下**，否则透视畸变会让 mm 换算失真，必须返回 `growth_measurement_unreliable`。鱼种特异性必须按基线判定（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d），**严禁通用阈值盲判**。鱼体姿态弯曲会导致体长低估，必须过滤或纠正。参照物检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡严重时必须返回 `growth_measurement_unreliable` 并建议重拍。不提供任何疾病诊断，仅输出基于视觉的体长测量值与统计；**严禁输出具体药物名称、剂量和饲料品牌推荐**（仅可中性建议如\"调整粒径/调整投喂量\"）；严禁伪造夸大体长 / 生长速率 / CV%；严禁越权代用户启停喂食器/加热棒/增氧/换水/灯光（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头**定期拍摄**（默认每日或每周，含已知尺寸参照物）高清图像，识别 6 类生长场景（growth_normal / fast / slow / stagnant / uneven_population / signal_unreliable）→ **四组指标**：参照物校准 5 项（type / known_mm / 像素长度 / pixel_per_mm / 检测置信度）+ 鱼苗测量 7 项（吻端坐标 / 尾鳍末端坐标 / 像素长度 / 实际 mm / 测量置信度 / 姿态伸直 / fry_id）+ 群体统计 6 项（measured_count / mean / std / CV% / p10 / p50 / p90）+ 生长速率 4 项（上次测量日期 / 距上次天数 / mm/day / 生长曲线点列表）→ 4 档提醒级别（info / important / urgent / warning）→ **4 级提醒策略递进**（仅入库进度更新 → 调整投喂/分级饲养 → 紧急检查水质+体表+联系技术员 → 全面排查+专业介入）→ 单日提醒上限（Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限）→ **生长报告**（按 tank_id 输出，含本次测量值 + 群体统计 + 生长曲线 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 参照物自动检测与识别（直尺刻度 / 标准硬币圆形 / 棋盘格标定板） |\n| 2 | **亚像素级 pixel_per_mm 校准** |\n| 3 | 鱼苗目标检测 |\n| 4 | 鱼苗吻端 / 尾鳍末端关键点检测 |\n| 5 | 姿态弯曲过滤（脊柱曲率 > 阈值则该样本剔除或做曲线补偿） |\n| 6 | 体长像素 → mm 换算 |\n| 7 | 群体统计（均值 / 标准差 / CV% / 分位数） |\n| 8 | 跨次时间序列存档与生长曲线绘制 |\n| 9 | 鱼种自适应基线（生长速率基线表 + 日龄修正 + 水温 Q10 修正） |\n| 10 | 用户 APP 推送 |\n| 11 | 4 级提醒递进 |\n| 12 | 单日提醒上限 |\n| 13 | 生长报告（按 tank_id + 测量时间戳输出） |\n| 14 | CV% 群体均匀度评估（驱动分级饲养建议） |\n| 15 | 连续 ≥ 2 周 Level 3 → 强烈建议联系**当地水产养殖技术员或观赏鱼繁育专家** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供含参照物（刻度尺/标准硬币/标定板）的鱼苗缸高清图像或视频 URL/文件需要分析时，默认触发本技能进行鱼苗生长速度测量 |\n| 🔎 明确分析意图 | 当用户明确提及鱼苗体长、鱼苗生长速度、生长曲线、生长停滞、生长迟缓、CV 均匀度、分级饲养等关键词，并且上传了图像/视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单、生长停滞事件清单、查询历史鱼苗测量记录、显示所有鱼苗缸生长报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_fry_growth_measurement_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_fry_growth_measurement_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_fry_growth_measurement_analysis.py`](scripts/smyx_fish_fry_growth_measurement_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；**视野内必须放置已知尺寸参照物**；**严格俯拍**（参照物与鱼苗同一水平面）；分辨率 ≥ 1080p；鱼苗短暂静止或在透明计数槽中 |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → warning），连续 ≥ 2 周停滞或多组同发进入更高级别 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限 |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **禁止**对鱼苗做\"营养不良 / 肠炎 / 寄生虫 / 应激综合征 / 遗传缺陷\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体饲料品牌名称推荐（仅可中性建议如\"调整粒径\"、\"调整投喂量\"） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼苗缸视频/图像（≤ 30 天，留生长曲线 + 关键测量帧；公共养殖场/实验室按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大体长、生长速率、CV% 等指标；所有数据必须基于真实图像测量 |\n| 🔎 使用提醒 | **必须**按**鱼种 + 日龄 + 水温**联合判定基线（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d）；**禁止使用通用阈值盲判** |\n| 🔎 使用提醒 | **必须**做透视畸变校验：参照物与鱼苗不在同一水平面 / 摄像头不垂直俯拍 → 返回 `growth_measurement_unreliable` |\n| 🔎 使用提醒 | **必须**做姿态过滤：鱼体弯曲会导致体长低估，必须过滤或纠正 |\n| 🔎 使用提醒 | **必须**在参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡严重时返回 `growth_measurement_unreliable`，**禁止给出不可靠的生长停滞告警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 周 Level 3 → 强烈建议联系**当地水产养殖技术员或观赏鱼繁育专家** |\n| 📜 报告输出 | **必须**：生长报告**按 tank_id + 测量时间戳输出**，含本次测量值 + 群体统计 + 生长曲线 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史生长记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地含参照物的鱼苗高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input /path/to/fry.jpg\n\n# 分析网络含参照物的鱼苗高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --url https://example.com/fry.jpg\n\n# 显示历史生长测量记录清单（自动触发关键词：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单等）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-fry-growth-measurement-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1787416769735\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` - 获取测量结果（体长 mm + 生长速率 mm/day + 生长曲线）\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_FRY_GROWTH_MEASUREMENT_ANALYSIS` - 鱼苗生长速度测量（通过参照物）\n\n## 输入约束\n\n- 摄像头：鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头（俯拍）\n- 分辨率 ≥ 1080p（鱼苗 5-30mm 全长，需高清才能精确测量到亚毫米级）\n- **关键硬件要求**：**视野内必须放置已知尺寸的参照物**（recognized reference object），三选一：\n    - 防水刻度尺（最佳，建议金属/塑料防水尺，黑底白刻度对比强）\n    - 标准硬币（1 元硬币 25.0mm / 5 角 20.5mm / 1 角 19.0mm；美元 quarter 24.26mm）\n    - 标定板（黑白棋盘格 5mm/10mm 已知边长）\n- 拍摄角度：**严格俯拍（垂直向下）**，参照物与鱼苗位于**同一水平面**（避免透视畸变导致换算误差）\n- 鱼苗拍摄时应**短暂静止**或在透明计数槽中（移动模糊会让吻端/尾鳍末端定位失准）\n- 多鱼苗缸场景按摄像头 ID 绑定到注册鱼苗缸 ID\n- **部署时必须录入**：鱼种、孵化日期（用于换算日龄）、参照物类型 + 已知尺寸（mm）\n- 用户必须授权部署；公共养殖场 / 实验室需公示告知\n\n## 关键观测信号\n\n### 参照物校准信号（核心）\n- `reference_type` - 参照物类型（ruler / coin / calibration_board）\n- `reference_known_length_mm` - 参照物已知尺寸（mm）\n- `reference_detected_pixel_length` - 参照物检测到的像素长度\n- `pixel_per_mm` - 校准比例（px/mm，核心换算系数）\n- `reference_detection_confidence` - 参照物检测置信度（0-1）\n\n### 鱼苗测量信号（每条 fry_id 独立）\n- `fry_id` - 鱼苗唯一标识（ReID 输出，可选）\n- `snout_xy` - 吻端 2D 像素坐标\n- `tail_tip_xy` - 尾鳍末端 2D 像素坐标\n- `body_length_px` - 吻端到尾鳍末端像素长度\n- `body_length_mm` - **实际体长（mm，= body_length_px / pixel_per_mm）**\n- `body_length_measurement_confidence` - 测量置信度（0-1，吻端/尾鳍末端定位质量）\n- `posture_is_straight` - 鱼体姿态是否伸直（弯曲会导致体长低估）\n\n### 群体统计\n- `measured_fry_count` - 本次成功测量鱼苗数\n- `body_length_mean_mm` - 平均体长\n- `body_length_std_mm` - 体长标准差\n- `body_length_cv_percent` - 变异系数（CV%，反映群体均匀度）\n- `body_length_p10` / `body_length_p50` / `body_length_p90` - 体长 10/50/90 分位数\n\n### 生长速率（结合历史数据）\n- `last_measurement_date` - 上次测量日期\n- `days_since_last_measurement` - 距上次测量天数\n- `growth_rate_mm_per_day` - 平均日增长（mm/day）\n- `growth_curve_points` - 生长曲线数据点列表（[{date, mean_mm}, ...]）\n\n## 综合判定\n\n- `growth_normal` - 生长正常（速率在鱼种基线区间内）\n- `growth_fast` - 生长偏快（>基线 1.2 倍，可能投喂过量需关注水质）\n- `growth_slow` - 生长偏慢（<基线 0.7 倍，疑似饲料质量/水质/温度问题）\n- `growth_stagnant` - **生长停滞**（连续 ≥ 2 次测量速率 < 基线 0.3 倍）\n- `growth_uneven_population` - 群体大小不均（CV% > 30%，需考虑分级饲养）\n- `growth_measurement_unreliable` - 测量不可靠（参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非健康告警）\n\n- Level 1（growth_normal / growth_fast）：仅入库 + 用户 APP 进度更新\"本次平均体长 X mm，日增长 Y mm/day，生长正常\"\n- Level 2（growth_slow / growth_uneven_population）：重要提示，建议**检查投喂量与频次 / 检查水温与水质 / 评估饲料品牌或粒径是否匹配鱼苗口径 / 考虑分级饲养均匀群体**\n- Level 3（growth_stagnant，单次）：紧急提示，建议**立即检查水质（溶氧/pH/氨氮/亚硝酸盐）+ 检查体表与游姿 + 检查投喂记录**，并联系**当地水产养殖技术员或观赏鱼繁育专家**\n- Level 4（growth_stagnant 连续 ≥ 2 周 / 同缸多组鱼苗同时停滞）：最高紧急提示 + 推送所有管理人员 + 强烈建议**全面排查（饲料 + 水质 + 病害 + 密度 + 光照周期）+ 专业人员介入**\n\n## 单日提醒上限\n\n- Level 1 不限（建议默认每天/每周 1 次测量） / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"营养不良 / 肠炎 / 寄生虫 / 应激综合征 / 遗传缺陷\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**输出具体饲料品牌名称推荐（仅可指出\"建议更换粒径\"等中性建议）\n- **禁止**长期存储完整鱼苗缸视频/图像（≤ 30 天，留生长曲线 + 关键测量帧；公共养殖场/实验室按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议）\n- 体长、生长速率、CV% 等指标必须基于真实图像测量；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种生长基线差异极大（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d）→ 必须按**鱼种 + 日龄 + 水温**联合判定基线；**禁止使用通用阈值盲判**\n- 必须考虑透视畸变上下文：参照物与鱼苗不在同一水平面 / 摄像头不垂直俯拍 → 必须返回 `growth_measurement_unreliable` 并提示调整拍摄\n- 参照物未检出 / 置信度 < 0.8 / 鱼苗姿态弯曲多数 / 视野遮挡严重 → 必须返回 `growth_measurement_unreliable`，**禁止给出不可靠的生长停滞告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼苗缸 ID\n- `species` - 鱼种\n- `fry_age_days` - 鱼苗日龄\n- `reference_calibration` - 参照物校准信息（type / known_mm / pixel_per_mm / confidence）\n- `population_statistics` - 群体统计（mean / std / CV% / p10 / p50 / p90）\n- `growth_rate_mm_per_day` - 平均日增长\n- `growth_curve_image_url` - 生长曲线图 URL\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: dev\n\nFile v1.0.7:skill-card.md\n\n## Description:\n\nAnalyzes reference-calibrated fish fry images or video to measure body length, estimate growth rate, build growth curves, and report unreliable measurements or growth concerns.\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 aquaculture operators, ornamental fish breeders, and lab users use this skill to analyze fish fry tank media that includes a known-size reference object, produce body-length and growth-rate reports, and review prior growth measurements.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill sends images, videos, or media URLs to a remote analysis service.\n\nMitigation: Use it only when the publisher and service destination are trusted, and avoid submitting sensitive or regulated media unless that transfer is approved.\n\nRisk: The skill creates or reuses an internal identity and stores API tokens in a local SQLite database.\n\nMitigation: Run it in a dedicated workspace, review local data retention expectations, and remove stored credentials or database files when access is no longer needed.\n\nRisk: The default configuration includes developer network endpoints.\n\nMitigation: Confirm the configured service URLs before production use and replace private or development endpoints with approved production endpoints.\n\nRisk: Measurement results can be unreliable when the reference object is missing, out of plane, low confidence, occluded, or captured from the wrong angle.\n\nMitigation: Require a known-size reference object in the same plane as the fish fry, use strict top-down high-resolution imagery, and return an unreliable-measurement status rather than a growth alert when confidence is insufficient.\n\nRisk: Growth-management suggestions could be mistaken for disease diagnosis, medication guidance, or automatic device control.\n\nMitigation: Limit outputs to visual measurement, neutral husbandry suggestions, and professional referral; do not provide drug names, doses, feed brands, or unauthorized equipment actions.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-fry-growth-measurement-analysis)\n- [API interface documentation](references/api_doc.md)\n- [Analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, files, guidance]\n\n**Output Format:** [Markdown or JSON analysis report with optional saved output file]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Reports may include body-length measurements, growth rates, population statistics, growth-curve links, recommended actions, and measurement-reliability status.]\n\n## Skill Version(s):\n\n1.0.7 (source: server release metadata; artifact frontmatter reports 1.0.11)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 44948 bytes\n\nFiles: references/api_doc.md (7162b), scripts/__init__.py (74b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_fish_fry_growth_measurement_analysis.py (3826b), skill-card.md (2841b), SKILL.md (17356b), 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 (160b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"smyx-fish-fry-growth-measurement-analysis\"\ndescription: \"Through fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 📏 Fish Fry Growth Rate Measurement (via Reference Object) | 鱼苗生长速度测量（通过参照物）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼苗生长速度测量（通过参照物）** |\n| 🎯 核心目标 | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FRY_GROWTH_MEASUREMENT_ANALYSIS` |\n\nThrough fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. This skill helps aquaculturists or ornamental fish breeders evaluate fry health and feed conversion ratio, and timely adjust feeding strategy. Application scenarios: fry rearing tanks, aquaculture farms, ornamental fish breeding farms, laboratories. The system automatically captures images, generates growth reports, and alerts on anomalies (such as stunted growth). Skill features: growth rate is a critical indicator for fry health and feeding optimization. AI-based periodic measurement and growth-curve plotting helps farmers detect slow growth early, adjust management and improve survival rate and yield. This skill can be integrated into smart fry tanks or aquaculture management apps.\n\n通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。该技能有助于水产养殖者或观赏鱼繁育者评估鱼苗健康状况、饲料转化率，及时调整投喂策略。应用场景：鱼苗培育缸、水产养殖场、观赏鱼繁殖场、实验室。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。技能特点：生长速率是评估鱼苗健康、优化投喂的关键指标。通过 AI 自动定期测量并绘制生长曲线，可帮助养殖者及时发现生长迟缓问题，调整管理措施，提高成活率和产量。该技能可集成到智能鱼苗缸或养殖管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水产养殖生长监测 AI。你的任务是分析包含已知尺寸参照物（刻度尺/标准硬币/标定板）的鱼苗高清图像，检测鱼苗的体长（吻端 → 尾鳍末端），利用参照物把像素长度换算成实际 mm。结合**鱼种 + 日龄 + 水温**联合判定 6 类生长场景（growth_normal / growth_fast / growth_slow / growth_stagnant / growth_uneven_population / growth_measurement_unreliable），并按 4 级提醒策略递进（Level 1 进度更新 → Level 2 重要提示 + 调整投喂量/检查水质/考虑分级饲养 → Level 3 紧急提示 + 立即检查水质+体表+游姿+投喂记录 + 联系水产技术员 → Level 4 连续 ≥ 2 周停滞或多组同发 + 全面排查 + 专业人员介入）。**核心硬约束：参照物必须与鱼苗位于同一水平面，摄像头必须严格俯拍垂直向下**，否则透视畸变会让 mm 换算失真，必须返回 `growth_measurement_unreliable`。鱼种特异性必须按基线判定（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d），**严禁通用阈值盲判**。鱼体姿态弯曲会导致体长低估，必须过滤或纠正。参照物检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡严重时必须返回 `growth_measurement_unreliable` 并建议重拍。不提供任何疾病诊断，仅输出基于视觉的体长测量值与统计；**严禁输出具体药物名称、剂量和饲料品牌推荐**（仅可中性建议如\"调整粒径/调整投喂量\"）；严禁伪造夸大体长 / 生长速率 / CV%；严禁越权代用户启停喂食器/加热棒/增氧/换水/灯光（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头**定期拍摄**（默认每日或每周，含已知尺寸参照物）高清图像，识别 6 类生长场景（growth_normal / fast / slow / stagnant / uneven_population / signal_unreliable）→ **四组指标**：参照物校准 5 项（type / known_mm / 像素长度 / pixel_per_mm / 检测置信度）+ 鱼苗测量 7 项（吻端坐标 / 尾鳍末端坐标 / 像素长度 / 实际 mm / 测量置信度 / 姿态伸直 / fry_id）+ 群体统计 6 项（measured_count / mean / std / CV% / p10 / p50 / p90）+ 生长速率 4 项（上次测量日期 / 距上次天数 / mm/day / 生长曲线点列表）→ 4 档提醒级别（info / important / urgent / warning）→ **4 级提醒策略递进**（仅入库进度更新 → 调整投喂/分级饲养 → 紧急检查水质+体表+联系技术员 → 全面排查+专业介入）→ 单日提醒上限（Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限）→ **生长报告**（按 tank_id 输出，含本次测量值 + 群体统计 + 生长曲线 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 参照物自动检测与识别（直尺刻度 / 标准硬币圆形 / 棋盘格标定板） |\n| 2 | **亚像素级 pixel_per_mm 校准** |\n| 3 | 鱼苗目标检测 |\n| 4 | 鱼苗吻端 / 尾鳍末端关键点检测 |\n| 5 | 姿态弯曲过滤（脊柱曲率 > 阈值则该样本剔除或做曲线补偿） |\n| 6 | 体长像素 → mm 换算 |\n| 7 | 群体统计（均值 / 标准差 / CV% / 分位数） |\n| 8 | 跨次时间序列存档与生长曲线绘制 |\n| 9 | 鱼种自适应基线（生长速率基线表 + 日龄修正 + 水温 Q10 修正） |\n| 10 | 用户 APP 推送 |\n| 11 | 4 级提醒递进 |\n| 12 | 单日提醒上限 |\n| 13 | 生长报告（按 tank_id + 测量时间戳输出） |\n| 14 | CV% 群体均匀度评估（驱动分级饲养建议） |\n| 15 | 连续 ≥ 2 周 Level 3 → 强烈建议联系**当地水产养殖技术员或观赏鱼繁育专家** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供含参照物（刻度尺/标准硬币/标定板）的鱼苗缸高清图像或视频 URL/文件需要分析时，默认触发本技能进行鱼苗生长速度测量 |\n| 🔎 明确分析意图 | 当用户明确提及鱼苗体长、鱼苗生长速度、生长曲线、生长停滞、生长迟缓、CV 均匀度、分级饲养等关键词，并且上传了图像/视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单、生长停滞事件清单、查询历史鱼苗测量记录、显示所有鱼苗缸生长报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_fry_growth_measurement_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_fry_growth_measurement_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_fry_growth_measurement_analysis.py`](scripts/smyx_fish_fry_growth_measurement_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；**视野内必须放置已知尺寸参照物**；**严格俯拍**（参照物与鱼苗同一水平面）；分辨率 ≥ 1080p；鱼苗短暂静止或在透明计数槽中 |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → warning），连续 ≥ 2 周停滞或多组同发进入更高级别 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限 |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **禁止**对鱼苗做\"营养不良 / 肠炎 / 寄生虫 / 应激综合征 / 遗传缺陷\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体饲料品牌名称推荐（仅可中性建议如\"调整粒径\"、\"调整投喂量\"） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼苗缸视频/图像（≤ 30 天，留生长曲线 + 关键测量帧；公共养殖场/实验室按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大体长、生长速率、CV% 等指标；所有数据必须基于真实图像测量 |\n| 🔎 使用提醒 | **必须**按**鱼种 + 日龄 + 水温**联合判定基线（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d）；**禁止使用通用阈值盲判** |\n| 🔎 使用提醒 | **必须**做透视畸变校验：参照物与鱼苗不在同一水平面 / 摄像头不垂直俯拍 → 返回 `growth_measurement_unreliable` |\n| 🔎 使用提醒 | **必须**做姿态过滤：鱼体弯曲会导致体长低估，必须过滤或纠正 |\n| 🔎 使用提醒 | **必须**在参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡严重时返回 `growth_measurement_unreliable`，**禁止给出不可靠的生长停滞告警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 周 Level 3 → 强烈建议联系**当地水产养殖技术员或观赏鱼繁育专家** |\n| 📜 报告输出 | **必须**：生长报告**按 tank_id + 测量时间戳输出**，含本次测量值 + 群体统计 + 生长曲线 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史生长记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地含参照物的鱼苗高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input /path/to/fry.jpg\n\n# 分析网络含参照物的鱼苗高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --url https://example.com/fry.jpg\n\n# 显示历史生长测量记录清单（自动触发关键词：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单等）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-fry-growth-measurement-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1786631859494\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` - 获取测量结果（体长 mm + 生长速率 mm/day + 生长曲线）\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_FRY_GROWTH_MEASUREMENT_ANALYSIS` - 鱼苗生长速度测量（通过参照物）\n\n## 输入约束\n\n- 摄像头：鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头（俯拍）\n- 分辨率 ≥ 1080p（鱼苗 5-30mm 全长，需高清才能精确测量到亚毫米级）\n- **关键硬件要求**：**视野内必须放置已知尺寸的参照物**（recognized reference object），三选一：\n    - 防水刻度尺（最佳，建议金属/塑料防水尺，黑底白刻度对比强）\n    - 标准硬币（1 元硬币 25.0mm / 5 角 20.5mm / 1 角 19.0mm；美元 quarter 24.26mm）\n    - 标定板（黑白棋盘格 5mm/10mm 已知边长）\n- 拍摄角度：**严格俯拍（垂直向下）**，参照物与鱼苗位于**同一水平面**（避免透视畸变导致换算误差）\n- 鱼苗拍摄时应**短暂静止**或在透明计数槽中（移动模糊会让吻端/尾鳍末端定位失准）\n- 多鱼苗缸场景按摄像头 ID 绑定到注册鱼苗缸 ID\n- **部署时必须录入**：鱼种、孵化日期（用于换算日龄）、参照物类型 + 已知尺寸（mm）\n- 用户必须授权部署；公共养殖场 / 实验室需公示告知\n\n## 关键观测信号\n\n### 参照物校准信号（核心）\n- `reference_type` - 参照物类型（ruler / coin / calibration_board）\n- `reference_known_length_mm` - 参照物已知尺寸（mm）\n- `reference_detected_pixel_length` - 参照物检测到的像素长度\n- `pixel_per_mm` - 校准比例（px/mm，核心换算系数）\n- `reference_detection_confidence` - 参照物检测置信度（0-1）\n\n### 鱼苗测量信号（每条 fry_id 独立）\n- `fry_id` - 鱼苗唯一标识（ReID 输出，可选）\n- `snout_xy` - 吻端 2D 像素坐标\n- `tail_tip_xy` - 尾鳍末端 2D 像素坐标\n- `body_length_px` - 吻端到尾鳍末端像素长度\n- `body_length_mm` - **实际体长（mm，= body_length_px / pixel_per_mm）**\n- `body_length_measurement_confidence` - 测量置信度（0-1，吻端/尾鳍末端定位质量）\n- `posture_is_straight` - 鱼体姿态是否伸直（弯曲会导致体长低估）\n\n### 群体统计\n- `measured_fry_count` - 本次成功测量鱼苗数\n- `body_length_mean_mm` - 平均体长\n- `body_length_std_mm` - 体长标准差\n- `body_length_cv_percent` - 变异系数（CV%，反映群体均匀度）\n- `body_length_p10` / `body_length_p50` / `body_length_p90` - 体长 10/50/90 分位数\n\n### 生长速率（结合历史数据）\n- `last_measurement_date` - 上次测量日期\n- `days_since_last_measurement` - 距上次测量天数\n- `growth_rate_mm_per_day` - 平均日增长（mm/day）\n- `growth_curve_points` - 生长曲线数据点列表（[{date, mean_mm}, ...]）\n\n## 综合判定\n\n- `growth_normal` - 生长正常（速率在鱼种基线区间内）\n- `growth_fast` - 生长偏快（>基线 1.2 倍，可能投喂过量需关注水质）\n- `growth_slow` - 生长偏慢（<基线 0.7 倍，疑似饲料质量/水质/温度问题）\n- `growth_stagnant` - **生长停滞**（连续 ≥ 2 次测量速率 < 基线 0.3 倍）\n- `growth_uneven_population` - 群体大小不均（CV% > 30%，需考虑分级饲养）\n- `growth_measurement_unreliable` - 测量不可靠（参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非健康告警）\n\n- Level 1（growth_normal / growth_fast）：仅入库 + 用户 APP 进度更新\"本次平均体长 X mm，日增长 Y mm/day，生长正常\"\n- Level 2（growth_slow / growth_uneven_population）：重要提示，建议**检查投喂量与频次 / 检查水温与水质 / 评估饲料品牌或粒径是否匹配鱼苗口径 / 考虑分级饲养均匀群体**\n- Level 3（growth_stagnant，单次）：紧急提示，建议**立即检查水质（溶氧/pH/氨氮/亚硝酸盐）+ 检查体表与游姿 + 检查投喂记录**，并联系**当地水产养殖技术员或观赏鱼繁育专家**\n- Level 4（growth_stagnant 连续 ≥ 2 周 / 同缸多组鱼苗同时停滞）：最高紧急提示 + 推送所有管理人员 + 强烈建议**全面排查（饲料 + 水质 + 病害 + 密度 + 光照周期）+ 专业人员介入**\n\n## 单日提醒上限\n\n- Level 1 不限（建议默认每天/每周 1 次测量） / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"营养不良 / 肠炎 / 寄生虫 / 应激综合征 / 遗传缺陷\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**输出具体饲料品牌名称推荐（仅可指出\"建议更换粒径\"等中性建议）\n- **禁止**长期存储完整鱼苗缸视频/图像（≤ 30 天，留生长曲线 + 关键测量帧；公共养殖场/实验室按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议）\n- 体长、生长速率、CV% 等指标必须基于真实图像测量；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种生长基线差异极大（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d）→ 必须按**鱼种 + 日龄 + 水温**联合判定基线；**禁止使用通用阈值盲判**\n- 必须考虑透视畸变上下文：参照物与鱼苗不在同一水平面 / 摄像头不垂直俯拍 → 必须返回 `growth_measurement_unreliable` 并提示调整拍摄\n- 参照物未检出 / 置信度 < 0.8 / 鱼苗姿态弯曲多数 / 视野遮挡严重 → 必须返回 `growth_measurement_unreliable`，**禁止给出不可靠的生长停滞告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼苗缸 ID\n- `species` - 鱼种\n- `fry_age_days` - 鱼苗日龄\n- `reference_calibration` - 参照物校准信息（type / known_mm / pixel_per_mm / confidence）\n- `population_statistics` - 群体统计（mean / std / CV% / p10 / p50 / p90）\n- `growth_rate_mm_per_day` - 平均日增长\n- `growth_curve_image_url` - 生长曲线图 URL\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\nThrough fixed cameras of fry tanks, this skill analyzes images or videos with a known-size reference object to measure fry body length, estimate growth rate, plot growth curves, and report measurement reliability.\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\nAquaculture operators, ornamental fish breeders, laboratory staff, and agent developers use this skill to analyze fry tank media, convert pixel measurements into millimeters using a reference object, review growth trends, and retrieve account-linked historical reports.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill sends selected local media or URLs to Life Emergence cloud services for analysis.\n\nMitigation: Use only media that the user is authorized to upload, avoid sensitive scenes, and confirm that cloud processing is acceptable before deployment.\n\nRisk: The skill can silently create or reuse an internal account identity and query account-linked history.\n\nMitigation: Deploy only where account identity handling, history access, retention, and deletion controls have been reviewed and documented.\n\nRisk: Service tokens may be stored in a local workspace SQLite database.\n\nMitigation: Restrict workspace access, rotate tokens when needed, and prefer a release that makes token storage and cleanup behavior explicit.\n\nRisk: Image quality, missing reference objects, perspective distortion, or bent fish posture can make body-length and growth estimates unreliable.\n\nMitigation: Require clear top-down media with a same-plane reference object and treat low-confidence or obstructed inputs as measurement-unreliable.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-fry-growth-measurement-analysis)\n- [API Interface Documentation](references/api_doc.md)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance]\n\n**Output Format:** [Markdown or JSON reports with measurement statistics, growth curves, alert levels, recommendations, and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Requires clear fry tank media with a same-plane reference object; unreliable images should return a measurement-unreliable result rather than growth conclusions.]\n\n## Skill Version(s):\n\n1.0.6 (source: server release metadata; artifact frontmatter reports 1.0.9)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 45066 bytes\n\nFiles: references/api_doc.md (7162b), scripts/__init__.py (74b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_fish_fry_growth_measurement_analysis.py (3826b), skill-card.md (3164b), SKILL.md (17356b), 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 (160b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: \"smyx-fish-fry-growth-measurement-analysis\"\ndescription: \"Through fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。\"\nversion: \"1.0.8\"\nlicense: \"MIT-0\"\n---\n\n# 📏 Fish Fry Growth Rate Measurement (via Reference Object) | 鱼苗生长速度测量（通过参照物）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼苗生长速度测量（通过参照物）** |\n| 🎯 核心目标 | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FRY_GROWTH_MEASUREMENT_ANALYSIS` |\n\nThrough fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. This skill helps aquaculturists or ornamental fish breeders evaluate fry health and feed conversion ratio, and timely adjust feeding strategy. Application scenarios: fry rearing tanks, aquaculture farms, ornamental fish breeding farms, laboratories. The system automatically captures images, generates growth reports, and alerts on anomalies (such as stunted growth). Skill features: growth rate is a critical indicator for fry health and feeding optimization. AI-based periodic measurement and growth-curve plotting helps farmers detect slow growth early, adjust management and improve survival rate and yield. This skill can be integrated into smart fry tanks or aquaculture management apps.\n\n通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。该技能有助于水产养殖者或观赏鱼繁育者评估鱼苗健康状况、饲料转化率，及时调整投喂策略。应用场景：鱼苗培育缸、水产养殖场、观赏鱼繁殖场、实验室。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。技能特点：生长速率是评估鱼苗健康、优化投喂的关键指标。通过 AI 自动定期测量并绘制生长曲线，可帮助养殖者及时发现生长迟缓问题，调整管理措施，提高成活率和产量。该技能可集成到智能鱼苗缸或养殖管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水产养殖生长监测 AI。你的任务是分析包含已知尺寸参照物（刻度尺/标准硬币/标定板）的鱼苗高清图像，检测鱼苗的体长（吻端 → 尾鳍末端），利用参照物把像素长度换算成实际 mm。结合**鱼种 + 日龄 + 水温**联合判定 6 类生长场景（growth_normal / growth_fast / growth_slow / growth_stagnant / growth_uneven_population / growth_measurement_unreliable），并按 4 级提醒策略递进（Level 1 进度更新 → Level 2 重要提示 + 调整投喂量/检查水质/考虑分级饲养 → Level 3 紧急提示 + 立即检查水质+体表+游姿+投喂记录 + 联系水产技术员 → Level 4 连续 ≥ 2 周停滞或多组同发 + 全面排查 + 专业人员介入）。**核心硬约束：参照物必须与鱼苗位于同一水平面，摄像头必须严格俯拍垂直向下**，否则透视畸变会让 mm 换算失真，必须返回 `growth_measurement_unreliable`。鱼种特异性必须按基线判定（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d），**严禁通用阈值盲判**。鱼体姿态弯曲会导致体长低估，必须过滤或纠正。参照物检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡严重时必须返回 `growth_measurement_unreliable` 并建议重拍。不提供任何疾病诊断，仅输出基于视觉的体长测量值与统计；**严禁输出具体药物名称、剂量和饲料品牌推荐**（仅可中性建议如\"调整粒径/调整投喂量\"）；严禁伪造夸大体长 / 生长速率 / CV%；严禁越权代用户启停喂食器/加热棒/增氧/换水/灯光（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头**定期拍摄**（默认每日或每周，含已知尺寸参照物）高清图像，识别 6 类生长场景（growth_normal / fast / slow / stagnant / uneven_population / signal_unreliable）→ **四组指标**：参照物校准 5 项（type / known_mm / 像素长度 / pixel_per_mm / 检测置信度）+ 鱼苗测量 7 项（吻端坐标 / 尾鳍末端坐标 / 像素长度 / 实际 mm / 测量置信度 / 姿态伸直 / fry_id）+ 群体统计 6 项（measured_count / mean / std / CV% / p10 / p50 / p90）+ 生长速率 4 项（上次测量日期 / 距上次天数 / mm/day / 生长曲线点列表）→ 4 档提醒级别（info / important / urgent / warning）→ **4 级提醒策略递进**（仅入库进度更新 → 调整投喂/分级饲养 → 紧急检查水质+体表+联系技术员 → 全面排查+专业介入）→ 单日提醒上限（Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限）→ **生长报告**（按 tank_id 输出，含本次测量值 + 群体统计 + 生长曲线 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 参照物自动检测与识别（直尺刻度 / 标准硬币圆形 / 棋盘格标定板） |\n| 2 | **亚像素级 pixel_per_mm 校准** |\n| 3 | 鱼苗目标检测 |\n| 4 | 鱼苗吻端 / 尾鳍末端关键点检测 |\n| 5 | 姿态弯曲过滤（脊柱曲率 > 阈值则该样本剔除或做曲线补偿） |\n| 6 | 体长像素 → mm 换算 |\n| 7 | 群体统计（均值 / 标准差 / CV% / 分位数） |\n| 8 | 跨次时间序列存档与生长曲线绘制 |\n| 9 | 鱼种自适应基线（生长速率基线表 + 日龄修正 + 水温 Q10 修正） |\n| 10 | 用户 APP 推送 |\n| 11 | 4 级提醒递进 |\n| 12 | 单日提醒上限 |\n| 13 | 生长报告（按 tank_id + 测量时间戳输出） |\n| 14 | CV% 群体均匀度评估（驱动分级饲养建议） |\n| 15 | 连续 ≥ 2 周 Level 3 → 强烈建议联系**当地水产养殖技术员或观赏鱼繁育专家** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供含参照物（刻度尺/标准硬币/标定板）的鱼苗缸高清图像或视频 URL/文件需要分析时，默认触发本技能进行鱼苗生长速度测量 |\n| 🔎 明确分析意图 | 当用户明确提及鱼苗体长、鱼苗生长速度、生长曲线、生长停滞、生长迟缓、CV 均匀度、分级饲养等关键词，并且上传了图像/视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单、生长停滞事件清单、查询历史鱼苗测量记录、显示所有鱼苗缸生长报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_fry_growth_measurement_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_fry_growth_measurement_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_fry_growth_measurement_analysis.py`](scripts/smyx_fish_fry_growth_measurement_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；**视野内必须放置已知尺寸参照物**；**严格俯拍**（参照物与鱼苗同一水平面）；分辨率 ≥ 1080p；鱼苗短暂静止或在透明计数槽中 |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → warning），连续 ≥ 2 周停滞或多组同发进入更高级别 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限 |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **禁止**对鱼苗做\"营养不良 / 肠炎 / 寄生虫 / 应激综合征 / 遗传缺陷\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体饲料品牌名称推荐（仅可中性建议如\"调整粒径\"、\"调整投喂量\"） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼苗缸视频/图像（≤ 30 天，留生长曲线 + 关键测量帧；公共养殖场/实验室按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大体长、生长速率、CV% 等指标；所有数据必须基于真实图像测量 |\n| 🔎 使用提醒 | **必须**按**鱼种 + 日龄 + 水温**联合判定基线（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d）；**禁止使用通用阈值盲判** |\n| 🔎 使用提醒 | **必须**做透视畸变校验：参照物与鱼苗不在同一水平面 / 摄像头不垂直俯拍 → 返回 `growth_measurement_unreliable` |\n| 🔎 使用提醒 | **必须**做姿态过滤：鱼体弯曲会导致体长低估，必须过滤或纠正 |\n| 🔎 使用提醒 | **必须**在参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡严重时返回 `growth_measurement_unreliable`，**禁止给出不可靠的生长停滞告警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 周 Level 3 → 强烈建议联系**当地水产养殖技术员或观赏鱼繁育专家** |\n| 📜 报告输出 | **必须**：生长报告**按 tank_id + 测量时间戳输出**，含本次测量值 + 群体统计 + 生长曲线 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史生长记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地含参照物的鱼苗高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input /path/to/fry.jpg\n\n# 分析网络含参照物的鱼苗高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --url https://example.com/fry.jpg\n\n# 显示历史生长测量记录清单（自动触发关键词：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单等）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --output result.json\n```\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-fry-growth-measurement-analysis\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1785676830996\n}\n\nFile v1.0.5:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放鱼苗生长速度测量（通过参照物）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动鱼苗生长速度测量任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取测量结果（体长 mm + 生长速率 mm/day + 生长曲线）\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_FRY_GROWTH_MEASUREMENT_ANALYSIS` - 鱼苗生长速度测量（通过参照物）\n\n## 输入约束\n\n- 摄像头：鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头（俯拍）\n- 分辨率 ≥ 1080p（鱼苗 5-30mm 全长，需高清才能精确测量到亚毫米级）\n- **关键硬件要求**：**视野内必须放置已知尺寸的参照物**（recognized reference object），三选一：\n    - 防水刻度尺（最佳，建议金属/塑料防水尺，黑底白刻度对比强）\n    - 标准硬币（1 元硬币 25.0mm / 5 角 20.5mm / 1 角 19.0mm；美元 quarter 24.26mm）\n    - 标定板（黑白棋盘格 5mm/10mm 已知边长）\n- 拍摄角度：**严格俯拍（垂直向下）**，参照物与鱼苗位于**同一水平面**（避免透视畸变导致换算误差）\n- 鱼苗拍摄时应**短暂静止**或在透明计数槽中（移动模糊会让吻端/尾鳍末端定位失准）\n- 多鱼苗缸场景按摄像头 ID 绑定到注册鱼苗缸 ID\n- **部署时必须录入**：鱼种、孵化日期（用于换算日龄）、参照物类型 + 已知尺寸（mm）\n- 用户必须授权部署；公共养殖场 / 实验室需公示告知\n\n## 关键观测信号\n\n### 参照物校准信号（核心）\n- `reference_type` - 参照物类型（ruler / coin / calibration_board）\n- `reference_known_length_mm` - 参照物已知尺寸（mm）\n- `reference_detected_pixel_length` - 参照物检测到的像素长度\n- `pixel_per_mm` - 校准比例（px/mm，核心换算系数）\n- `reference_detection_confidence` - 参照物检测置信度（0-1）\n\n### 鱼苗测量信号（每条 fry_id 独立）\n- `fry_id` - 鱼苗唯一标识（ReID 输出，可选）\n- `snout_xy` - 吻端 2D 像素坐标\n- `tail_tip_xy` - 尾鳍末端 2D 像素坐标\n- `body_length_px` - 吻端到尾鳍末端像素长度\n- `body_length_mm` - **实际体长（mm，= body_length_px / pixel_per_mm）**\n- `body_length_measurement_confidence` - 测量置信度（0-1，吻端/尾鳍末端定位质量）\n- `posture_is_straight` - 鱼体姿态是否伸直（弯曲会导致体长低估）\n\n### 群体统计\n- `measured_fry_count` - 本次成功测量鱼苗数\n- `body_length_mean_mm` - 平均体长\n- `body_length_std_mm` - 体长标准差\n- `body_length_cv_percent` - 变异系数（CV%，反映群体均匀度）\n- `body_length_p10` / `body_length_p50` / `body_length_p90` - 体长 10/50/90 分位数\n\n### 生长速率（结合历史数据）\n- `last_measurement_date` - 上次测量日期\n- `days_since_last_measurement` - 距上次测量天数\n- `growth_rate_mm_per_day` - 平均日增长（mm/day）\n- `growth_curve_points` - 生长曲线数据点列表（[{date, mean_mm}, ...]）\n\n## 综合判定\n\n- `growth_normal` - 生长正常（速率在鱼种基线区间内）\n- `growth_fast` - 生长偏快（>基线 1.2 倍，可能投喂过量需关注水质）\n- `growth_slow` - 生长偏慢（<基线 0.7 倍，疑似饲料质量/水质/温度问题）\n- `growth_stagnant` - **生长停滞**（连续 ≥ 2 次测量速率 < 基线 0.3 倍）\n- `growth_uneven_population` - 群体大小不均（CV% > 30%，需考虑分级饲养）\n- `growth_measurement_unreliable` - 测量不可靠（参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非健康告警）\n\n- Level 1（growth_normal / growth_fast）：仅入库 + 用户 APP 进度更新\"本次平均体长 X mm，日增长 Y mm/day，生长正常\"\n- Level 2（growth_slow / growth_uneven_population）：重要提示，建议**检查投喂量与频次 / 检查水温与水质 / 评估饲料品牌或粒径是否匹配鱼苗口径 / 考虑分级饲养均匀群体**\n- Level 3（growth_stagnant，单次）：紧急提示，建议**立即检查水质（溶氧/pH/氨氮/亚硝酸盐）+ 检查体表与游姿 + 检查投喂记录**，并联系**当地水产养殖技术员或观赏鱼繁育专家**\n- Level 4（growth_stagnant 连续 ≥ 2 周 / 同缸多组鱼苗同时停滞）：最高紧急提示 + 推送所有管理人员 + 强烈建议**全面排查（饲料 + 水质 + 病害 + 密度 + 光照周期）+ 专业人员介入**\n\n## 单日提醒上限\n\n- Level 1 不限（建议默认每天/每周 1 次测量） / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"营养不良 / 肠炎 / 寄生虫 / 应激综合征 / 遗传缺陷\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**输出具体饲料品牌名称推荐（仅可指出\"建议更换粒径\"等中性建议）\n- **禁止**长期存储完整鱼苗缸视频/图像（≤ 30 天，留生长曲线 + 关键测量帧；公共养殖场/实验室按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议）\n- 体长、生长速率、CV% 等指标必须基于真实图像测量；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种生长基线差异极大（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d）→ 必须按**鱼种 + 日龄 + 水温**联合判定基线；**禁止使用通用阈值盲判**\n- 必须考虑透视畸变上下文：参照物与鱼苗不在同一水平面 / 摄像头不垂直俯拍 → 必须返回 `growth_measurement_unreliable` 并提示调整拍摄\n- 参照物未检出 / 置信度 < 0.8 / 鱼苗姿态弯曲多数 / 视野遮挡严重 → 必须返回 `growth_measurement_unreliable`，**禁止给出不可靠的生长停滞告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼苗缸 ID\n- `species` - 鱼种\n- `fry_age_days` - 鱼苗日龄\n- `reference_calibration` - 参照物校准信息（type / known_mm / pixel_per_mm / confidence）\n- `population_statistics` - 群体统计（mean / std / CV% / p10 / p50 / p90）\n- `growth_rate_mm_per_day` - 平均日增长\n- `growth_curve_image_url` - 生长曲线图 URL\n- `composite_scene` - 综合判定\n- `alert_level` - 提醒等级\n- `recommended_actions` - 建议动作（调整投喂 / 分级饲养 / 检查水质 / 联系技术员，**不含药物与品牌**）\n- `disclaimer` - 免责声明\n\nFile v1.0.5:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.5:scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.5:skill-card.md\n\n## Description: <br>\nThrough fixed cameras of fry tanks with a known-size reference object in view, this skill periodically analyzes fish fry images or videos to measure body length in millimeters, calculate individual growth rate in mm/day, draw growth curves, generate growth reports, and flag anomalies such as growth stagnation. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal aquaculture operators, ornamental fish breeders, laboratory staff, and developers can use this skill to analyze fish fry tank media that includes a known-size reference object, then produce growth measurements, population statistics, growth-rate history, and action-oriented monitoring guidance. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Selected fish-tank media or media URLs may be uploaded to the configured cloud service. <br>\nMitigation: Deploy only where the upload destination, retention expectations, and permitted media types are approved and visible to operators. <br>\nRisk: The skill may silently create or reuse an internal account identity and query cloud-stored history. <br>\nMitigation: Use in environments where account identity handling and historical report access are explicitly authorized and reviewable. <br>\nRisk: Authentication tokens may be stored in the workspace data directory. <br>\nMitigation: Restrict workspace access, avoid shared workspaces for sensitive deployments, and rotate or remove stored tokens when access is no longer needed. <br>\nRisk: Visual body-length measurements can be unreliable when the reference object is missing, not on the same plane as the fish, affected by perspective distortion, or obstructed. <br>\nMitigation: Require a known-size reference object in the same plane, strict overhead capture, confidence checks, and an unreliable-result path instead of reporting precise growth metrics from poor inputs. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-fish-fry-growth-measurement-analysis) <br>\n- [API Documentation](references/api_doc.md) <br>\n- [Skill Demo](https://lifeemergence.com/sample.html) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown and JSON-style structured report text with measurement results, growth statistics, recommendations, and report links.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Can optionally write analysis output to a user-specified file and can list cloud-stored historical growth reports.] <br>\n\n## Skill Version(s): <br>\n1.0.5 (source: server release metadata; artifact frontmatter reports 1.0.8) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.5:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.5:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.4: 31 files, 44894 bytes\n\nFiles: references/api_doc.md (7162b), scripts/__init__.py (74b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (594b), scripts/smyx_fish_fry_growth_measurement_analysis.py (3826b), skill-card.md (2740b), SKILL.md (17356b), 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 (160b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: \"smyx-fish-fry-growth-measurement-analysis\"\ndescription: \"Through fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。\"\nversion: \"1.0.5\"\nlicense: \"MIT-0\"\n---\n\n# 📏 Fish Fry Growth Rate Measurement (via Reference Object) | 鱼苗生长速度测量（通过参照物）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼苗生长速度测量（通过参照物）** |\n| 🎯 核心目标 | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FRY_GROWTH_MEASUREMENT_ANALYSIS` |\n\nThrough fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. This skill helps aquaculturists or ornamental fish breeders evaluate fry health and feed conversion ratio, and timely adjust feeding strategy. Application scenarios: fry rearing tanks, aquaculture farms, ornamental fish breeding farms, laboratories. The system automatically captures images, generates growth reports, and alerts on anomalies (such as stunted growth). Skill features: growth rate is a critical indicator for fry health and feeding optimization. AI-based periodic measurement and growth-curve plotting helps farmers detect slow growth early, adjust management and improve survival rate and yield. This skill can be integrated into smart fry tanks or aquaculture management apps.\n\n通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。该技能有助于水产养殖者或观赏鱼繁育者评估鱼苗健康状况、饲料转化率，及时调整投喂策略。应用场景：鱼苗培育缸、水产养殖场、观赏鱼繁殖场、实验室。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。技能特点：生长速率是评估鱼苗健康、优化投喂的关键指标。通过 AI 自动定期测量并绘制生长曲线，可帮助养殖者及时发现生长迟缓问题，调整管理措施，提高成活率和产量。该技能可集成到智能鱼苗缸或养殖管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水产养殖生长监测 AI。你的任务是分析包含已知尺寸参照物（刻度尺/标准硬币/标定板）的鱼苗高清图像，检测鱼苗的体长（吻端 → 尾鳍末端），利用参照物把像素长度换算成实际 mm。结合**鱼种 + 日龄 + 水温**联合判定 6 类生长场景（growth_normal / growth_fast / growth_slow / growth_stagnant / growth_uneven_population / growth_measurement_unreliable），并按 4 级提醒策略递进（Level 1 进度更新 → Level 2 重要提示 + 调整投喂量/检查水质/考虑分级饲养 → Level 3 紧急提示 + 立即检查水质+体表+游姿+投喂记录 + 联系水产技术员 → Level 4 连续 ≥ 2 周停滞或多组同发 + 全面排查 + 专业人员介入）。**核心硬约束：参照物必须与鱼苗位于同一水平面，摄像头必须严格俯拍垂直向下**，否则透视畸变会让 mm 换算失真，必须返回 `growth_measurement_unreliable`。鱼种特异性必须按基线判定（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d），**严禁通用阈值盲判**。鱼体姿态弯曲会导致体长低估，必须过滤或纠正。参照物检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡严重时必须返回 `growth_measurement_unreliable` 并建议重拍。不提供任何疾病诊断，仅输出基于视觉的体长测量值与统计；**严禁输出具体药物名称、剂量和饲料品牌推荐**（仅可中性建议如\"调整粒径/调整投喂量\"）；严禁伪造夸大体长 / 生长速率 / CV%；严禁越权代用户启停喂食器/加热棒/增氧/换水/灯光（仅建议）。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头**定期拍摄**（默认每日或每周，含已知尺寸参照物）高清图像，识别 6 类生长场景（growth_normal / fast / slow / stagnant / uneven_population / signal_unreliable）→ **四组指标**：参照物校准 5 项（type / known_mm / 像素长度 / pixel_per_mm / 检测置信度）+ 鱼苗测量 7 项（吻端坐标 / 尾鳍末端坐标 / 像素长度 / 实际 mm / 测量置信度 / 姿态伸直 / fry_id）+ 群体统计 6 项（measured_count / mean / std / CV% / p10 / p50 / p90）+ 生长速率 4 项（上次测量日期 / 距上次天数 / mm/day / 生长曲线点列表）→ 4 档提醒级别（info / important / urgent / warning）→ **4 级提醒策略递进**（仅入库进度更新 → 调整投喂/分级饲养 → 紧急检查水质+体表+联系技术员 → 全面排查+专业介入）→ 单日提醒上限（Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限）→ **生长报告**（按 tank_id 输出，含本次测量值 + 群体统计 + 生长曲线 + 建议动作 + 免责声明）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 参照物自动检测与识别（直尺刻度 / 标准硬币圆形 / 棋盘格标定板） |\n| 2 | **亚像素级 pixel_per_mm 校准** |\n| 3 | 鱼苗目标检测 |\n| 4 | 鱼苗吻端 / 尾鳍末端关键点检测 |\n| 5 | 姿态弯曲过滤（脊柱曲率 > 阈值则该样本剔除或做曲线补偿） |\n| 6 | 体长像素 → mm 换算 |\n| 7 | 群体统计（均值 / 标准差 / CV% / 分位数） |\n| 8 | 跨次时间序列存档与生长曲线绘制 |\n| 9 | 鱼种自适应基线（生长速率基线表 + 日龄修正 + 水温 Q10 修正） |\n| 10 | 用户 APP 推送 |\n| 11 | 4 级提醒递进 |\n| 12 | 单日提醒上限 |\n| 13 | 生长报告（按 tank_id + 测量时间戳输出） |\n| 14 | CV% 群体均匀度评估（驱动分级饲养建议） |\n| 15 | 连续 ≥ 2 周 Level 3 → 强烈建议联系**当地水产养殖技术员或观赏鱼繁育专家** |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供含参照物（刻度尺/标准硬币/标定板）的鱼苗缸高清图像或视频 URL/文件需要分析时，默认触发本技能进行鱼苗生长速度测量 |\n| 🔎 明确分析意图 | 当用户明确提及鱼苗体长、鱼苗生长速度、生长曲线、生长停滞、生长迟缓、CV 均匀度、分级饲养等关键词，并且上传了图像/视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单、生长停滞事件清单、查询历史鱼苗测量记录、显示所有鱼苗缸生长报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_fish_fry_growth_measurement_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_fry_growth_measurement_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_fry_growth_measurement_analysis.py`](scripts/smyx_fish_fry_growth_measurement_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；**视野内必须放置已知尺寸参照物**；**严格俯拍**（参照物与鱼苗同一水平面）；分辨率 ≥ 1080p；鱼苗短暂静止或在透明计数槽中 |\n| 🔎 使用提醒 | **4 级提醒策略递进**（info → important → urgent → warning），连续 ≥ 2 周停滞或多组同发进入更高级别 |\n| 🔎 使用提醒 | 单日提醒上限：Level 1 不限 / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限 |\n| 🔎 使用提醒 | 红线约束 |\n| 🧑‍⚖️ 结果性质 | **禁止**对鱼苗做\"营养不良 / 肠炎 / 寄生虫 / 应激综合征 / 遗传缺陷\"等具体疾病诊断 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体药物名称、剂量、给药方案 |\n| 🔎 使用提醒 | **🚨 绝对禁止**输出具体饲料品牌名称推荐（仅可中性建议如\"调整粒径\"、\"调整投喂量\"） |\n| 🔎 使用提醒 | **禁止**长期存储完整鱼苗缸视频/图像（≤ 30 天，留生长曲线 + 关键测量帧；公共养殖场/实验室按管理规定） |\n| 🔎 使用提醒 | **禁止**用于商业广告 / AI 训练；禁第三方共享 |\n| 🔎 使用提醒 | **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议） |\n| 🔎 使用提醒 | **绝对禁止**伪造或夸大体长、生长速率、CV% 等指标；所有数据必须基于真实图像测量 |\n| 🔎 使用提醒 | **必须**按**鱼种 + 日龄 + 水温**联合判定基线（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d）；**禁止使用通用阈值盲判** |\n| 🔎 使用提醒 | **必须**做透视畸变校验：参照物与鱼苗不在同一水平面 / 摄像头不垂直俯拍 → 返回 `growth_measurement_unreliable` |\n| 🔎 使用提醒 | **必须**做姿态过滤：鱼体弯曲会导致体长低估，必须过滤或纠正 |\n| 🔎 使用提醒 | **必须**在参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡严重时返回 `growth_measurement_unreliable`，**禁止给出不可靠的生长停滞告警** |\n| 🔎 使用提醒 | **必须**：连续 ≥ 2 周 Level 3 → 强烈建议联系**当地水产养殖技术员或观赏鱼繁育专家** |\n| 📜 报告输出 | **必须**：生长报告**按 tank_id + 测量时间戳输出**，含本次测量值 + 群体统计 + 生长曲线 + 建议动作 + 免责声明 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史生长记录清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地含参照物的鱼苗高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input /path/to/fry.jpg\n\n# 分析网络含参照物的鱼苗高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --url https://example.com/fry.jpg\n\n# 显示历史生长测量记录清单（自动触发关键词：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单等）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --output result.json\n```\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-fry-growth-measurement-analysis\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1783909347916\n}\n\nFile v1.0.4:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放鱼苗生长速度测量（通过参照物）API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动鱼苗生长速度测量任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取测量结果（体长 mm + 生长速率 mm/day + 生长曲线）\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_FRY_GROWTH_MEASUREMENT_ANALYSIS` - 鱼苗生长速度测量（通过参照物）\n\n## 输入约束\n\n- 摄像头：鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头（俯拍）\n- 分辨率 ≥ 1080p（鱼苗 5-30mm 全长，需高清才能精确测量到亚毫米级）\n- **关键硬件要求**：**视野内必须放置已知尺寸的参照物**（recognized reference object），三选一：\n    - 防水刻度尺（最佳，建议金属/塑料防水尺，黑底白刻度对比强）\n    - 标准硬币（1 元硬币 25.0mm / 5 角 20.5mm / 1 角 19.0mm；美元 quarter 24.26mm）\n    - 标定板（黑白棋盘格 5mm/10mm 已知边长）\n- 拍摄角度：**严格俯拍（垂直向下）**，参照物与鱼苗位于**同一水平面**（避免透视畸变导致换算误差）\n- 鱼苗拍摄时应**短暂静止**或在透明计数槽中（移动模糊会让吻端/尾鳍末端定位失准）\n- 多鱼苗缸场景按摄像头 ID 绑定到注册鱼苗缸 ID\n- **部署时必须录入**：鱼种、孵化日期（用于换算日龄）、参照物类型 + 已知尺寸（mm）\n- 用户必须授权部署；公共养殖场 / 实验室需公示告知\n\n## 关键观测信号\n\n### 参照物校准信号（核心）\n- `reference_type` - 参照物类型（ruler / coin / calibration_board）\n- `reference_known_length_mm` - 参照物已知尺寸（mm）\n- `reference_detected_pixel_length` - 参照物检测到的像素长度\n- `pixel_per_mm` - 校准比例（px/mm，核心换算系数）\n- `reference_detection_confidence` - 参照物检测置信度（0-1）\n\n### 鱼苗测量信号（每条 fry_id 独立）\n- `fry_id` - 鱼苗唯一标识（ReID 输出，可选）\n- `snout_xy` - 吻端 2D 像素坐标\n- `tail_tip_xy` - 尾鳍末端 2D 像素坐标\n- `body_length_px` - 吻端到尾鳍末端像素长度\n- `body_length_mm` - **实际体长（mm，= body_length_px / pixel_per_mm）**\n- `body_length_measurement_confidence` - 测量置信度（0-1，吻端/尾鳍末端定位质量）\n- `posture_is_straight` - 鱼体姿态是否伸直（弯曲会导致体长低估）\n\n### 群体统计\n- `measured_fry_count` - 本次成功测量鱼苗数\n- `body_length_mean_mm` - 平均体长\n- `body_length_std_mm` - 体长标准差\n- `body_length_cv_percent` - 变异系数（CV%，反映群体均匀度）\n- `body_length_p10` / `body_length_p50` / `body_length_p90` - 体长 10/50/90 分位数\n\n### 生长速率（结合历史数据）\n- `last_measurement_date` - 上次测量日期\n- `days_since_last_measurement` - 距上次测量天数\n- `growth_rate_mm_per_day` - 平均日增长（mm/day）\n- `growth_curve_points` - 生长曲线数据点列表（[{date, mean_mm}, ...]）\n\n## 综合判定\n\n- `growth_normal` - 生长正常（速率在鱼种基线区间内）\n- `growth_fast` - 生长偏快（>基线 1.2 倍，可能投喂过量需关注水质）\n- `growth_slow` - 生长偏慢（<基线 0.7 倍，疑似饲料质量/水质/温度问题）\n- `growth_stagnant` - **生长停滞**（连续 ≥ 2 次测量速率 < 基线 0.3 倍）\n- `growth_uneven_population` - 群体大小不均（CV% > 30%，需考虑分级饲养）\n- `growth_measurement_unreliable` - 测量不可靠（参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非健康告警）\n\n- Level 1（growth_normal / growth_fast）：仅入库 + 用户 APP 进度更新\"本次平均体长 X mm，日增长 Y mm/day，生长正常\"\n- Level 2（growth_slow / growth_uneven_population）：重要提示，建议**检查投喂量与频次 / 检查水温与水质 / 评估饲料品牌或粒径是否匹配鱼苗口径 / 考虑分级饲养均匀群体**\n- Level 3（growth_stagnant，单次）：紧急提示，建议**立即检查水质（溶氧/pH/氨氮/亚硝酸盐）+ 检查体表与游姿 + 检查投喂记录**，并联系**当地水产养殖技术员或观赏鱼繁育专家**\n- Level 4（growth_stagnant 连续 ≥ 2 周 / 同缸多组鱼苗同时停滞）：最高紧急提示 + 推送所有管理人员 + 强烈建议**全面排查（饲料 + 水质 + 病害 + 密度 + 光照周期）+ 专业人员介入**\n\n## 单日提醒上限\n\n- Level 1 不限（建议默认每天/每周 1 次测量） / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"营养不良 / 肠炎 / 寄生虫 / 应激综合征 / 遗传缺陷\"等具体疾病诊断\n- **禁止**输出具体药物名称、剂量、给药方案\n- **禁止**输出具体饲料品牌名称推荐（仅可指出\"建议更换粒径\"等中性建议）\n- **禁止**长期存储完整鱼苗缸视频/图像（≤ 30 天，留生长曲线 + 关键测量帧；公共养殖场/实验室按管理规定）\n- **禁止**用于商业广告 / AI 训练；禁第三方共享\n- **禁止**越权代用户启停加热棒 / 增氧 / 换水 / 喂食器 / 灯光参数；任何水族设备控制变更必须由用户确认（仅可建议）\n- 体长、生长速率、CV% 等指标必须基于真实图像测量；**禁止伪造或夸大指标**\n- 鱼种特异性：不同鱼种生长基线差异极大（斑马鱼 0.3-0.5mm/d / 罗非鱼 0.8-1.5mm/d / 锦鲤幼苗 0.5-1.0mm/d / 神仙鱼 0.3-0.6mm/d）→ 必须按**鱼种 + 日龄 + 水温**联合判定基线；**禁止使用通用阈值盲判**\n- 必须考虑透视畸变上下文：参照物与鱼苗不在同一水平面 / 摄像头不垂直俯拍 → 必须返回 `growth_measurement_unreliable` 并提示调整拍摄\n- 参照物未检出 / 置信度 < 0.8 / 鱼苗姿态弯曲多数 / 视野遮挡严重 → 必须返回 `growth_measurement_unreliable`，**禁止给出不可靠的生长停滞告警**\n\n## 输出报告字段\n\n- `report_date` - 报告日期\n- `tank_id` - 鱼苗缸 ID\n- `species` - 鱼种\n- `fry_age_days` - 鱼苗日龄\n- `reference_calibration` - 参照物校准信息（type / known_mm / pixel_per_mm / confidence）\n- `population_statistics` - 群体统计（mean / std / CV% / p10 / p50 / p90）\n- `growth_rate_mm_per_day` - 平均日增长\n- `growth_curve_image_url` - 生长曲线图 URL\n- `composite_scene` - 综合判定\n- `alert_level` - 提醒等级\n- `recommended_actions` - 建议动作（调整投喂 / 分级饲养 / 检查水质 / 联系技术员，**不含药物与品牌**）\n- `disclaimer` - 免责声明\n\nFile v1.0.4:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.4:scripts/config.yaml\n\n{}\n\nFile v1.0.4:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.4:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.4:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.4:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.4:skill-card.md\n\n## Description: <br>\nMeasures fish fry body length from images or videos that include a known-size reference object, then reports growth rate, population statistics, growth curves, recommendations, and report links. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal aquaculture operators, ornamental fish breeders, lab teams, and developers use this skill to analyze reference-calibrated fry tank media, measure body length in millimeters, track growth rate over time, and review cloud-backed historica...","readmeExcerpt":"Skill: Fish Fry Growth Rate Measurement (via Reference Object) | 鱼苗生长速度测量（通过参照物） Owner: smyx-sunjinhui Summary: Through fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), ","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.smyx_fish_fry_growth_measurement_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地含参照物的鱼苗高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input /path/to/fry.jpg\n\n# 分析网络含参照物的鱼苗高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --url https://example.com/fry.jpg\n\n# 显示历史生长测量记录清单（自动触发关键词：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单等）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --output result.json"},{"language":"bash","snippet":"python -m scripts.smyx_fish_fry_growth_measurement_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地含参照物的鱼苗高清图像（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input /path/to/fry.jpg\n\n# 分析网络含参照物的鱼苗高清图像/视频（以下只是示例，禁止直接使用 作为 open-id）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --url https://example.com/fry.jpg\n\n# 显示历史生长测量记录清单（自动触发关键词：查看鱼苗生长历史报告、鱼苗缸生长曲线日志清单等）\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_fish_fry_growth_measurement_analysis --input fry.jpg --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"smyx-fish-fry-growth-measurement-analysis\"\ndescription: \"Through fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。\"\nversion: \"1.0.16\"\nlicense: \"MIT-0\"\n---\n\n# 📏 Fish Fry Growth Rate Measurement (via Reference Object) | 鱼苗生长速度测量（通过参照物）\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **鱼苗生长速度测量（通过参照物）** |\n| 🎯 核心目标 | 通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FISH_FRY_GROWTH_MEASUREMENT_ANALYSIS` |\n\nThrough fixed cameras of fry tanks (a known-size reference object such as a scale ruler, standard coin or calibration board must be placed in the view), the system periodically (e.g. daily or weekly) captures fry images and uses AI vision analysis to measure body length (from snout to tail-fin tip, in mm), record individual growth rate (mm/day) and draw the growth curve. This skill helps aquaculturists or ornamental fish breeders evaluate fry health and feed conversion ratio, and timely adjust feeding strategy. Application scenarios: fry rearing tanks, aquaculture farms, ornamental fish breeding farms, laboratories. The system automatically captures images, generates growth reports, and alerts on anomalies (such as stunted growth). Skill features: growth rate is a critical indicator for fry health and feeding optimization. AI-based periodic measurement and growth-curve plotting helps farmers detect slow growth early, adjust management and improve survival rate and yield. This skill can be integrated into smart fry tanks or aquaculture management apps.\n\n通过鱼苗缸固定摄像头（需放置已知尺寸的参照物，如刻度尺、标准硬币或标定板），定期（如每天或每周）拍摄鱼苗图像，利用 AI 视觉分析技术测量鱼苗体长（从吻端到尾鳍末端，单位 mm），记录个体的生长速率（mm/天），并绘制生长曲线。该技能有助于水产养殖者或观赏鱼繁育者评估鱼苗健康状况、饲料转化率，及时调整投喂策略。应用场景：鱼苗培育缸、水产养殖场、观赏鱼繁殖场、实验室。系统自动采集图像，生成生长报告，异常时提示（如生长停滞）。技能特点：生长速率是评估鱼苗健康、优化投喂的关键指标。通过 AI 自动定期测量并绘制生长曲线，可帮助养殖者及时发现生长迟缓问题，调整管理措施，提高成活率和产量。该技能可集成到智能鱼苗缸或养殖管理 APP 中。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的水产养殖生长监测 AI。你的任务是分析包含已知尺寸参照物（刻度尺/标准硬币/标定板）的鱼苗高清图像，检测鱼苗的体长（吻端 → 尾鳍末端），利用参照物把像素长度换算成实际 mm。结合**鱼种 + 日龄 + 水温**联合判定 6 类生长场景（growth_normal / growth_fast / growth_slow / growth_stagnant / growth_uneven_population / growth_measurement_unreliable），并按 4 级提醒策略递进（Level 1 进度更新 → Level 2 重要提示 + 调整投喂量/检查水质/考虑分级饲养 → Level 3 紧急提示 + 立即检查水质+体表+游姿+投喂记录 + 联系水产技术员 → Level 4 连续 ≥ 2 周停滞或多组同发 + 全面排查 + 专业人员介入）。**核心硬约束：参照物必须与鱼苗位于同一水平面，摄像头必须严格俯拍"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-fish-fry-growth-measurement-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1790680465654\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` - 获取测量结果（体长 mm + 生长速率 mm/day + 生长曲线）\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_FRY_GROWTH_MEASUREMENT_ANALYSIS` - 鱼苗生长速度测量（通过参照物）\n\n## 输入约束\n\n- 摄像头：鱼苗缸固定摄像头 / 智能鱼苗缸内置摄像头 / 手机微距镜头（俯拍）\n- 分辨率 ≥ 1080p（鱼苗 5-30mm 全长，需高清才能精确测量到亚毫米级）\n- **关键硬件要求**：**视野内必须放置已知尺寸的参照物**（recognized reference object），三选一：\n    - 防水刻度尺（最佳，建议金属/塑料防水尺，黑底白刻度对比强）\n    - 标准硬币（1 元硬币 25.0mm / 5 角 20.5mm / 1 角 19.0mm；美元 quarter 24.26mm）\n    - 标定板（黑白棋盘格 5mm/10mm 已知边长）\n- 拍摄角度：**严格俯拍（垂直向下）**，参照物与鱼苗位于**同一水平面**（避免透视畸变导致换算误差）\n- 鱼苗拍摄时应**短暂静止**或在透明计数槽中（移动模糊会让吻端/尾鳍末端定位失准）\n- 多鱼苗缸场景按摄像头 ID 绑定到注册鱼苗缸 ID\n- **部署时必须录入**：鱼种、孵化日期（用于换算日龄）、参照物类型 + 已知尺寸（mm）\n- 用户必须授权部署；公共养殖场 / 实验室需公示告知\n\n## 关键观测信号\n\n### 参照物校准信号（核心）\n- `reference_type` - 参照物类型（ruler / coin / calibration_board）\n- `reference_known_length_mm` - 参照物已知尺寸（mm）\n- `reference_detected_pixel_length` - 参照物检测到的像素长度\n- `pixel_per_mm` - 校准比例（px/mm，核心换算系数）\n- `reference_detection_confidence` - 参照物检测置信度（0-1）\n\n### 鱼苗测量信号（每条 fry_id 独立）\n- `fry_id` - 鱼苗唯一标识（ReID 输出，可选）\n- `snout_xy` - 吻端 2D 像素坐标\n- `tail_tip_xy` - 尾鳍末端 2D 像素坐标\n- `body_length_px` - 吻端到尾鳍末端像素长度\n- `body_length_mm` - **实际体长（mm，= body_length_px / pixel_per_mm）**\n- `body_length_measurement_confidence` - 测量置信度（0-1，吻端/尾鳍末端定位质量）\n- `posture_is_straight` - 鱼体姿态是否伸直（弯曲会导致体长低估）\n\n### 群体统计\n- `measured_fry_count` - 本次成功测量鱼苗数\n- `body_length_mean_mm` - 平均体长\n- `body_length_std_mm` - 体长标准差\n- `body_length_cv_percent` - 变异系数（CV%，反映群体均匀度）\n- `body_length_p10` / `body_length_p50` / `body_length_p90` - 体长 10/50/90 分位数\n\n### 生长速率（结合历史数据）\n- `last_measurement_date` - 上次测量日期\n- `days_since_last_measurement` - 距上次测量天数\n- `growth_rate_mm_per_day` - 平均日增长（mm/day）\n- `growth_curve_points` - 生长曲线数据点列表（[{date, mean_mm}, ...]）\n\n## 综合判定\n\n- `growth_normal` - 生长正常（速率在鱼种基线区间内）\n- `growth_fast` - 生长偏快（>基线 1.2 倍，可能投喂过量需关注水质）\n- `growth_slow` - 生长偏慢（<基线 0.7 倍，疑似饲料质量/水质/温度问题）\n- `growth_stagnant` - **生长停滞**（连续 ≥ 2 次测量速率 < 基线 0.3 倍）\n- `growth_uneven_population` - 群体大小不均（CV% > 30%，需考虑分级饲养）\n- `growth_measurement_unreliable` - 测量不可靠（参照物未检出 / 检测置信度 < 0.8 / 多数鱼姿态弯曲 / 视野遮挡）\n\n## 4 级提醒策略递进（侧重养殖管理建议，非健康告警）\n\n- Level 1（growth_normal / growth_fast）：仅入库 + 用户 APP 进度更新\"本次平均体长 X mm，日增长 Y mm/day，生长正常\"\n- Level 2（growth_slow / growth_uneven_population）：重要提示，建议**检查投喂量与频次 / 检查水温与水质 / 评估饲料品牌或粒径是否匹配鱼苗口径 / 考虑分级饲养均匀群体**\n- Level 3（growth_stagnant，单次）：紧急提示，建议**立即检查水质（溶氧/pH/氨氮/亚硝酸盐）+ 检查体表与游姿 + 检查投喂记录**，并联系**当地水产养殖技术员或观赏鱼繁育专家**\n- Level 4（growth_stagnant 连续 ≥ 2 周 / 同缸多组鱼苗同时停滞）：最高紧急提示 + 推送所有管理人员 + 强烈建议**全面排查（饲料 + 水质 + 病害 + 密度 + 光照周期）+ 专业人员介入**\n\n## 单日提醒上限\n\n- Level 1 不限（建议默认每天/每周 1 次测量） / Level 2 × 2 / Level 3 × 2 / Level 4 不设上限\n\n## 红线约束\n\n- **禁止**做\"营养"},{"path":"skills/smyx_analysis/references/api_doc.md","content":"# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |"},{"path":"scripts/config.yaml","content":"{}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1339,"uniquenessScore":39,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T04:58:58.787Z","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-10T04:58:58.787Z","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:02:22.235Z","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"}]}}}