{"id":"a4f91c13-d5bc-4244-a34b-2cc6f33dd6ca","entityType":"agent","slug":"clawhub-smyx-sunjinhui-smyx-plant-nutrient-diagnosis-analysis","name":"Plant Nutrient Deficiency Diagnosis | 植物缺素症视觉诊断","canonicalUrl":"https://www.xpersona.co/agent/clawhub-smyx-sunjinhui-smyx-plant-nutrient-diagnosis-analysis","canonicalPath":"/agent/clawhub-smyx-sunjinhui-smyx-plant-nutrient-diagnosis-analysis","generatedAt":"2026-10-10T09:09:36.584Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T02:30:35.150Z","emptyReason":null},"description":"AI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale green/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common deficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium, iron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization. Scenarios: smart planters, home gardening, agricultural greenhouses, plant factories. | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.8K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-plant-nutrient-diagnosis-analysis","sourceUrl":"https://clawhub.ai/smyx-sunjinhui/smyx-plant-nutrient-diagnosis-analysis","homepage":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-plant-nutrient-diagnosis-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/smyx-sunjinhui/smyx-plant-nutrient-diagnosis-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-plant-nutrient-diagnosis-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":65,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Plant Nutrient Deficiency Diagnosis | 植物缺素症视觉诊断 technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T02:30:35.150Z","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-10T02:30:35.150Z","emptyReason":null},"stars":null,"forks":null,"downloads":1770,"packageName":null,"latestVersion":"1.0.12","tractionLabel":"1.8K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T02:30:35.150Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T02:30:35.150Z","lastCrawledAt":"2026-10-10T02:30:35.150Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T02:30:35.150Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.12","createdAt":"2026-10-02T14:43:26.163Z","changelog":"- Removed the file: skill-card.md - No changes to skill functionality or logic.","fileCount":31,"zipByteSize":40719},{"version":"1.0.11","createdAt":"2026-09-26T15:27:26.641Z","changelog":"- Internal cleanup: removed the outdated skill-card.md documentation file. - Minor configuration update in \"skills/smyx_common/scripts/config.yaml\". - No user-facing changes to features or behavior.","fileCount":31,"zipByteSize":40635},{"version":"1.0.10","createdAt":"2026-09-15T07:38:36.024Z","changelog":"- Removed the file skill-card.md from the project. - No new features, code, or documentation were added in this version. - All existing functionality and documentation remain unchanged aside from the file removal.","fileCount":31,"zipByteSize":40825},{"version":"1.0.9","createdAt":"2026-08-26T01:48:32.140Z","changelog":"- skill-card.md file removed for simplification; SKILL.md is now the primary documentation. - Documentation updated in SKILL.md; no core code or logic changes reported. - Version number incremented from 1.0.9 to 1.0.10.","fileCount":31,"zipByteSize":40751},{"version":"1.0.8","createdAt":"2026-08-23T04:57:32.592Z","changelog":"smyx-plant-nutrient-diagnosis-analysis v1.0.9 - Updated version number to 1.0.9. - Removed redundant file: skill-card.md. - Minor adjustments in internal configuration files to streamline documentation and script management.","fileCount":31,"zipByteSize":40759},{"version":"1.0.7","createdAt":"2026-08-10T11:07:35.385Z","changelog":"- Removed the redundant skill-card.md file for improved project organization. - SKILL.md updated: no functional changes; documentation and description remain consistent. - No changes to analysis logic, usage instructions, or feature set. - Maintenance release focusing on clean-up of documentation files.","fileCount":31,"zipByteSize":40846},{"version":"1.0.6","createdAt":"2026-08-04T22:07:28.894Z","changelog":"- skill-card.md has been removed. - SKILL.md: Bumped version to 1.0.7 and updated version field. - No changes to core features, API, workflow, or instructions. - Documentation maintained; no breaking or feature changes.","fileCount":31,"zipByteSize":40882},{"version":"1.0.5","createdAt":"2026-07-29T22:17:28.554Z","changelog":"- Version updated to 1.0.6. - Documentation refined in SKILL.md; minor formatting and metadata changes. - Outdated skill-card.md has been removed. - No functional or code logic changes; this update is documentation only.","fileCount":31,"zipByteSize":41010}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-plant-nutrient-diagnosis-analysis","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-plant-nutrient-diagnosis-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-plant-nutrient-diagnosis-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-plant-nutrient-diagnosis-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-plant-nutrient-diagnosis-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-plant-nutrient-diagnosis-analysis/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-plant-nutrient-diagnosis-analysis/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-plant-nutrient-diagnosis-analysis/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-plant-nutrient-diagnosis-analysis/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T09:09:36.580Z"}},"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-plant-nutrient-diagnosis-analysis/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-plant-nutrient-diagnosis-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-plant-nutrient-diagnosis-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-plant-nutrient-diagnosis-analysis/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T02:30:35.150Z","emptyReason":null},"readme":"Skill: Plant Nutrient Deficiency Diagnosis | 植物缺素症视觉诊断\n\nOwner: smyx-sunjinhui\n\nSummary: AI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale green/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common deficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium, iron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization. Scenarios: smart planters, home gardening, agricultural greenhouses, plant factories. | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\n\nTags: latest:1.0.12\n\nVersion history:\n\nv1.0.12 | 2026-10-02T14:43:26.163Z | auto\n\n- Removed the file: skill-card.md\n- No changes to skill functionality or logic.\n\nv1.0.11 | 2026-09-26T15:27:26.641Z | auto\n\n- Internal cleanup: removed the outdated skill-card.md documentation file.\n- Minor configuration update in \"skills/smyx_common/scripts/config.yaml\".\n- No user-facing changes to features or behavior.\n\nv1.0.10 | 2026-09-15T07:38:36.024Z | auto\n\n- Removed the file skill-card.md from the project.\n- No new features, code, or documentation were added in this version.\n- All existing functionality and documentation remain unchanged aside from the file removal.\n\nv1.0.9 | 2026-08-26T01:48:32.140Z | auto\n\n- skill-card.md file removed for simplification; SKILL.md is now the primary documentation.\n- Documentation updated in SKILL.md; no core code or logic changes reported.\n- Version number incremented from 1.0.9 to 1.0.10.\n\nv1.0.8 | 2026-08-23T04:57:32.592Z | auto\n\nsmyx-plant-nutrient-diagnosis-analysis v1.0.9\n\n- Updated version number to 1.0.9.\n- Removed redundant file: skill-card.md.\n- Minor adjustments in internal configuration files to streamline documentation and script management.\n\nv1.0.7 | 2026-08-10T11:07:35.385Z | auto\n\n- Removed the redundant skill-card.md file for improved project organization.\n- SKILL.md updated: no functional changes; documentation and description remain consistent.\n- No changes to analysis logic, usage instructions, or feature set.\n- Maintenance release focusing on clean-up of documentation files.\n\nv1.0.6 | 2026-08-04T22:07:28.894Z | auto\n\n- skill-card.md has been removed.\n- SKILL.md: Bumped version to 1.0.7 and updated version field.\n- No changes to core features, API, workflow, or instructions.  \n- Documentation maintained; no breaking or feature changes.\n\nv1.0.5 | 2026-07-29T22:17:28.554Z | auto\n\n- Version updated to 1.0.6.\n- Documentation refined in SKILL.md; minor formatting and metadata changes.\n- Outdated skill-card.md has been removed.\n- No functional or code logic changes; this update is documentation only.\n\nv1.0.4 | 2026-07-18T00:42:47.543Z | auto\n\n- Updated version to 1.0.5.\n- Removed file: skill-card.md.\n- Documentation (SKILL.md) updated; content and structure tweaks.\n- No changes to feature set or API behavior.\n\nv1.0.3 | 2026-07-10T18:03:32.531Z | auto\n\n- Updated skill version to 1.0.4.\n- Documentation improvements in SKILL.md for clarity and details.\n- Removed redundant file skill-card.md.\n- Minor script adjustments in util.py for code consistency.\n\nv1.0.2 | 2026-07-04T10:02:24.888Z | auto\n\n- Updated to version 1.0.3.\n- Documentation refreshed in SKILL.md, including minor edits for clarity and organization.\n- File structure cleanup: removed obsolete skill-card.md.\n- Minor script changes in config.py, dao.py, and util.py to support the updated documentation and internal workflows.\n\nv1.0.1 | 2026-06-27T17:58:25.482Z | auto\n\n- User identity handling is now fully automated internally; users are never prompted for, nor shown, any identity values.\n- All historical report queries are strictly routed through the cloud API—local memory or aggregation is disallowed.\n- Documentation updated for clarity, role definitions, security constraints, and workflow, with bilingual structured sections.\n- Skill version and license metadata updated.\n- Legacy scripts directory removed as part of cleanup.\n\nv1.0.0 | 2026-05-23T15:02:00.809Z | auto\n\n- Initial release of AI-powered plant nutrient deficiency diagnosis via leaf image analysis\n- Supports recognition of key leaf symptoms (color changes, interveinal chlorosis, marginal scorch, deformation) to identify likely nutrient deficiencies (N, P, K, Fe, Mg, Zn, Ca, B, Mn, Cu, S) \n- Provides confidence score and fertilization direction (without dosage advice) for precision fertilization\n- Includes automated open-id retrieval flow for user/result binding and strict cloud-based report history query\n- Supports jpg/png image and mp4/avi/mov video input up to 10MB; output includes structured diagnosis report\n- Bilingual documentation and symptom tables for both English and Chinese applications\n\nArchive index:\n\nArchive v1.0.12: 31 files, 40719 bytes\n\nFiles: references/api_doc.md (681b), scripts/__init__.py (63b), scripts/config.py (680b), scripts/config.yaml (3b), scripts/skill.py (576b), scripts/smyx_plant_nutrient_diagnosis_analysis.py (3462b), skill-card.md (2197b), SKILL.md (16080b), 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 (158b)\n\nFile v1.0.12:SKILL.md\n\n---\nname: \"smyx-plant-nutrient-diagnosis-analysis\"\ndescription: \"AI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale green/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common deficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium, iron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization. Scenarios: smart planters, home gardening, agricultural greenhouses, plant factories. | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 🧪 Plant Nutrient Deficiency Diagnosis | 植物缺素症视觉诊断\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **植物缺素症视觉诊断** |\n| 🎯 核心目标 | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` |\n\nAI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale\ngreen/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common\ndeficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium,\niron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization.\nScenarios: smart planters, home gardening, agricultural greenhouses, plant factories.\n\n通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的植物营养学AI。你的任务是分析植物叶片的图像（老叶或新叶），识别叶片颜色异常、形态畸变、失绿分布等特征，与常见缺素症状进行比对，输出最可能缺乏的营养元素类型。不要提供具体化肥浓度，仅输出缺素诊断结果及置信度。 ** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n通过植物叶片高清图像进行缺素症视觉诊断，输出最可能缺乏的营养元素类型、置信度及施肥方向建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 叶片颜色异常检测 |\n| 2 | 叶脉间失绿识别 |\n| 3 | 叶缘焦枯检测 |\n| 4 | 老叶/新叶症状区分 |\n| 5 | 常见缺素症比对（氮/磷/钾/铁/镁/锌/钙/硼/锰/铜/硫等） |\n| 6 | 置信度评分 |\n| 7 | 施肥方向建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供植物叶片图像或视频需要缺素诊断时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要植物营养诊断时，提及缺素、黄叶、叶缘焦枯、叶脉间失绿、缺氮、缺磷、缺钾、缺铁、缺镁、植物营养不良、叶片发黄等关键词，并且上传了图像或视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史缺素诊断报告、历史植物营养报告、缺素症报告清单、显示所有缺素报告、查询植物营养诊断记录 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_plant_nutrient_diagnosis_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 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行缺素诊断 | 调用 `-m scripts.smyx_plant_nutrient_diagnosis_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## 🌿 常见植物缺素症状对照表\n\n| 缺乏元素     | 典型症状                  | 症状部位 | 易发植物       |\n|----------|-----------------------|------|------------|\n| 🟡 氮(N)  | 老叶均匀黄化、植株矮小、生长缓慢      | 老叶先发 | 叶菜类、玉米、草坪  |\n| 🟣 磷(P)  | 叶片暗绿/紫红色、根系发育差、开花延迟   | 老叶先发 | 豆科、玉米、番茄   |\n| 🟤 钾(K)  | 老叶叶缘焦枯、叶尖褐变、抗逆性下降     | 老叶先发 | 马铃薯、番茄、烟草  |\n| 🟢 铁(Fe) | 新叶叶脉间失绿（黄化）、叶脉仍绿（网纹状） | 新叶先发 | 喜酸植物、柑橘、杜鹃 |\n| 🟡 镁(Mg) | 老叶叶脉间失绿、叶片卷曲、提早脱落     | 老叶先发 | 番茄、葡萄、玫瑰   |\n| ⚪ 锌(Zn)  | 新叶小而簇生（小叶病）、节间缩短      | 新叶先发 | 玉米、苹果、柑橘   |\n| 🟤 钙(Ca) | 新叶畸形/卷曲、生长点坏死、裂果      | 新叶先发 | 番茄（脐腐病）、苹果 |\n| 🟡 硼(B)  | 生长点死亡、花器发育不良、茎干裂开     | 新叶先发 | 油菜、甜菜、花椰菜  |\n| 🟢 锰(Mn) | 新叶叶脉间失绿（与缺铁相似但更细碎）    | 新叶先发 | 燕麦、大豆、苹果   |\n| 🟤 铜(Cu) | 新叶失绿萎蔫、叶尖发白卷曲         | 新叶先发 | 小麦、柑橘、洋葱   |\n| 🟡 硫(S)  | 新叶均匀黄化（与缺氮相似但出现在新叶）   | 新叶先发 | 十字花科、豆科    |\n\n## 🔍 缺素症状识别维度\n\n| 维度   | 观察重点          | 判断意义                                     |\n|------|---------------|------------------------------------------|\n| 症状部位 | 老叶 vs 新叶      | 老叶→移动性元素(N/P/K/Mg)，新叶→非移动性元素(Fe/Ca/B/Zn) |\n| 失绿模式 | 均匀失绿 vs 叶脉间失绿 | 均匀→N/S，叶脉间→Fe/Mg/Mn                      |\n| 颜色变化 | 黄化/紫红/暗绿/白化   | 紫红→P，暗绿→P，白化→Cu                          |\n| 形态畸变 | 小叶/卷曲/畸形/坏死   | 小叶→Zn，卷曲→Ca/Cu，坏死→Ca/B                   |\n| 叶缘特征 | 焦枯/褐变/正常      | 焦枯→K，正常→排除K                              |\n| 叶片质地 | 厚硬/薄软/正常      | 厚硬→缺P，薄软→缺N                              |\n\n## 📊 缺素严重程度分级\n\n| 等级    | 症状表现            | 施肥建议             |\n|-------|-----------------|------------------|\n| 🟢 轻度 | 叶片轻微失绿，局部少量变色   | 补充对应元素水溶肥，叶面喷施   |\n| 🟡 中度 | 叶片明显黄化/变色，面积扩大  | 追施对应元素肥料，根部+叶面双施 |\n| 🟠 重度 | 大面积失绿/畸形，生长严重受阻 | 紧急追肥，咨询农技专家      |\n| 🔴 严重 | 植株濒死，叶片大量枯萎脱落   | 立即综合救治，专业农技指导    |\n\n## 💡 施肥方向参考\n\n| 缺素类型  | 施肥方向                       |\n|-------|----------------------------|\n| 🟡 缺氮 | 追施尿素、高氮复合肥；叶面喷施氨基酸叶面肥      |\n| 🟣 缺磷 | 追施过磷酸钙、磷酸二铵；叶面喷施磷酸二氢钾      |\n| 🟤 缺钾 | 追施硫酸钾、氯化钾；叶面喷施磷酸二氢钾        |\n| 🟢 缺铁 | 叶面喷施EDTA-Fe/硫酸亚铁；调节土壤pH至酸性 |\n| 🟡 缺镁 | 追施硫酸镁、钙镁磷肥；叶面喷施硫酸镁溶液       |\n| ⚪ 缺锌  | 叶面喷施硫酸锌；土壤施用锌肥             |\n| 🟤 缺钙 | 追施硝酸钙、氯化钙；叶面喷施钙肥           |\n| 🟡 缺硼 | 叶面喷施硼砂/硼酸溶液；土壤施用硼肥         |\n| 🟢 缺锰 | 叶面喷施硫酸锰溶液                  |\n| 🟤 缺铜 | 叶面喷施硫酸铜溶液；注意用量防毒害          |\n| 🟡 缺硫 | 追施含硫肥料（硫酸铵、硫酸钾等）           |\n\n> ⚠️ 本技能仅提供**施肥方向建议**，**不提供具体化肥浓度与用量**；精准施肥需根据植物种类、生长阶段、土壤检测结果咨询农技专家。\n\n## 🔄 与植物病害的区分要点\n\n| 特征  | 缺素症       | 病害          |\n|-----|-----------|-------------|\n| 分布  | 全株对称、规律性强 | 局部散发、不规则    |\n| 进展  | 缓慢渐进      | 可能快速蔓延      |\n| 边界  | 渐变过渡      | 常有明显病斑边界    |\n| 附着物 | 无霉层/孢子    | 可能有霉层/孢子/菌丝 |\n| 传染性 | 不传染       | 可能传染邻近植株    |\n\n> 💡 若叶片同时出现不规则病斑、霉层或孢子堆，可能为病害而非缺素，建议同时使用植物叶片病害识别技能进行交叉验证。\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_plant_nutrient_diagnosis_analysis.py`](scripts/smyx_plant_nutrient_diagnosis_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 |\n| 🔎 使用提醒 | **拍摄要求**：近距离、光线充足、老叶新叶分别拍摄；模糊/逆光/距离过远的图像无法得出可靠结果 |\n| 🧑‍⚖️ 结果性质 | **诊断结果仅供缺素参考，不提供具体化肥浓度与用量**；精准施肥请咨询农技专家 |\n| 🔎 使用提醒 | 部分缺素症状相似（如缺铁与缺锰均表现为叶脉间失绿），AI 识别可能存在不确定性，建议结合植物种类与土壤检测结果综合判断 |\n| 🔎 使用提醒 | 同一叶片可能存在多种元素同时缺乏，需结合症状综合判定 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，API 服务会自动下载 |\n| 🧑‍⚖️ 结果性质 | 当显示历史诊断报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input /path/to/leaf.jpg\n\n# 分析网络植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --url https://example.com/leaf.jpg\n\n# 显示历史诊断报告/显示报告清单列表\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --output result.json\n```\n\nFile v1.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-plant-nutrient-diagnosis-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1790952206163\n}\n\nFile v1.0.12:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放植物缺素症视觉诊断 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动通用 AI 分析任务（植物缺素症视觉诊断）\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` - 植物缺素症视觉诊断\n\nFile v1.0.12:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.12:scripts/config.yaml\n\n{}\n\nFile v1.0.12:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.12:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.12:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.12:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.12:skill-card.md\n\n## Description:\n\nAnalyzes plant leaf images or videos to suggest likely nutrient deficiencies, confidence levels, and fertilization directions, with access to past reports.\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\nGardeners, growers, and agricultural teams use leaf images or videos to explore possible nutrient deficiencies and review prior diagnoses before deciding whether to seek soil testing or agronomic advice.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Plant images, videos, URLs, and report queries are sent to the publisher's cloud service.\n\nMitigation: Review what may be shared and avoid submitting sensitive images or account information without authorization.\n\nRisk: The skill silently creates or reuses a user identity and stores user records and service tokens locally.\n\nMitigation: Review local storage and access controls before installation, especially on shared workspaces.\n\nRisk: Similar leaf symptoms or poor images can produce uncertain diagnoses and inappropriate fertilizer decisions.\n\nMitigation: Treat results as preliminary; confirm with plant context, soil testing, or an agronomic expert before fertilizing.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/smyx-sunjinhui/skills/smyx-plant-nutrient-diagnosis-analysis)\n- [API interface documentation](references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON]\n\n**Output Format:** [Markdown diagnostic reports or JSON results]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include likely deficiencies, confidence levels, suggested actions, and report links; history requests return a report list.]\n\n## Skill Version(s):\n\n1.0.12 (source: server-resolved ClawHub release; artifact frontmatter says 1.0.10)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.12:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.12:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.11: 31 files, 40635 bytes\n\nFiles: references/api_doc.md (681b), scripts/__init__.py (63b), scripts/config.py (680b), scripts/config.yaml (3b), scripts/skill.py (576b), scripts/smyx_plant_nutrient_diagnosis_analysis.py (3462b), skill-card.md (1970b), SKILL.md (16080b), 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 (158b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: \"smyx-plant-nutrient-diagnosis-analysis\"\ndescription: \"AI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale green/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common deficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium, iron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization. Scenarios: smart planters, home gardening, agricultural greenhouses, plant factories. | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 🧪 Plant Nutrient Deficiency Diagnosis | 植物缺素症视觉诊断\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **植物缺素症视觉诊断** |\n| 🎯 核心目标 | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` |\n\nAI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale\ngreen/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common\ndeficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium,\niron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization.\nScenarios: smart planters, home gardening, agricultural greenhouses, plant factories.\n\n通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的植物营养学AI。你的任务是分析植物叶片的图像（老叶或新叶），识别叶片颜色异常、形态畸变、失绿分布等特征，与常见缺素症状进行比对，输出最可能缺乏的营养元素类型。不要提供具体化肥浓度，仅输出缺素诊断结果及置信度。 ** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n通过植物叶片高清图像进行缺素症视觉诊断，输出最可能缺乏的营养元素类型、置信度及施肥方向建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 叶片颜色异常检测 |\n| 2 | 叶脉间失绿识别 |\n| 3 | 叶缘焦枯检测 |\n| 4 | 老叶/新叶症状区分 |\n| 5 | 常见缺素症比对（氮/磷/钾/铁/镁/锌/钙/硼/锰/铜/硫等） |\n| 6 | 置信度评分 |\n| 7 | 施肥方向建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供植物叶片图像或视频需要缺素诊断时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要植物营养诊断时，提及缺素、黄叶、叶缘焦枯、叶脉间失绿、缺氮、缺磷、缺钾、缺铁、缺镁、植物营养不良、叶片发黄等关键词，并且上传了图像或视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史缺素诊断报告、历史植物营养报告、缺素症报告清单、显示所有缺素报告、查询植物营养诊断记录 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_plant_nutrient_diagnosis_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 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行缺素诊断 | 调用 `-m scripts.smyx_plant_nutrient_diagnosis_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## 🌿 常见植物缺素症状对照表\n\n| 缺乏元素     | 典型症状                  | 症状部位 | 易发植物       |\n|----------|-----------------------|------|------------|\n| 🟡 氮(N)  | 老叶均匀黄化、植株矮小、生长缓慢      | 老叶先发 | 叶菜类、玉米、草坪  |\n| 🟣 磷(P)  | 叶片暗绿/紫红色、根系发育差、开花延迟   | 老叶先发 | 豆科、玉米、番茄   |\n| 🟤 钾(K)  | 老叶叶缘焦枯、叶尖褐变、抗逆性下降     | 老叶先发 | 马铃薯、番茄、烟草  |\n| 🟢 铁(Fe) | 新叶叶脉间失绿（黄化）、叶脉仍绿（网纹状） | 新叶先发 | 喜酸植物、柑橘、杜鹃 |\n| 🟡 镁(Mg) | 老叶叶脉间失绿、叶片卷曲、提早脱落     | 老叶先发 | 番茄、葡萄、玫瑰   |\n| ⚪ 锌(Zn)  | 新叶小而簇生（小叶病）、节间缩短      | 新叶先发 | 玉米、苹果、柑橘   |\n| 🟤 钙(Ca) | 新叶畸形/卷曲、生长点坏死、裂果      | 新叶先发 | 番茄（脐腐病）、苹果 |\n| 🟡 硼(B)  | 生长点死亡、花器发育不良、茎干裂开     | 新叶先发 | 油菜、甜菜、花椰菜  |\n| 🟢 锰(Mn) | 新叶叶脉间失绿（与缺铁相似但更细碎）    | 新叶先发 | 燕麦、大豆、苹果   |\n| 🟤 铜(Cu) | 新叶失绿萎蔫、叶尖发白卷曲         | 新叶先发 | 小麦、柑橘、洋葱   |\n| 🟡 硫(S)  | 新叶均匀黄化（与缺氮相似但出现在新叶）   | 新叶先发 | 十字花科、豆科    |\n\n## 🔍 缺素症状识别维度\n\n| 维度   | 观察重点          | 判断意义                                     |\n|------|---------------|------------------------------------------|\n| 症状部位 | 老叶 vs 新叶      | 老叶→移动性元素(N/P/K/Mg)，新叶→非移动性元素(Fe/Ca/B/Zn) |\n| 失绿模式 | 均匀失绿 vs 叶脉间失绿 | 均匀→N/S，叶脉间→Fe/Mg/Mn                      |\n| 颜色变化 | 黄化/紫红/暗绿/白化   | 紫红→P，暗绿→P，白化→Cu                          |\n| 形态畸变 | 小叶/卷曲/畸形/坏死   | 小叶→Zn，卷曲→Ca/Cu，坏死→Ca/B                   |\n| 叶缘特征 | 焦枯/褐变/正常      | 焦枯→K，正常→排除K                              |\n| 叶片质地 | 厚硬/薄软/正常      | 厚硬→缺P，薄软→缺N                              |\n\n## 📊 缺素严重程度分级\n\n| 等级    | 症状表现            | 施肥建议             |\n|-------|-----------------|------------------|\n| 🟢 轻度 | 叶片轻微失绿，局部少量变色   | 补充对应元素水溶肥，叶面喷施   |\n| 🟡 中度 | 叶片明显黄化/变色，面积扩大  | 追施对应元素肥料，根部+叶面双施 |\n| 🟠 重度 | 大面积失绿/畸形，生长严重受阻 | 紧急追肥，咨询农技专家      |\n| 🔴 严重 | 植株濒死，叶片大量枯萎脱落   | 立即综合救治，专业农技指导    |\n\n## 💡 施肥方向参考\n\n| 缺素类型  | 施肥方向                       |\n|-------|----------------------------|\n| 🟡 缺氮 | 追施尿素、高氮复合肥；叶面喷施氨基酸叶面肥      |\n| 🟣 缺磷 | 追施过磷酸钙、磷酸二铵；叶面喷施磷酸二氢钾      |\n| 🟤 缺钾 | 追施硫酸钾、氯化钾；叶面喷施磷酸二氢钾        |\n| 🟢 缺铁 | 叶面喷施EDTA-Fe/硫酸亚铁；调节土壤pH至酸性 |\n| 🟡 缺镁 | 追施硫酸镁、钙镁磷肥；叶面喷施硫酸镁溶液       |\n| ⚪ 缺锌  | 叶面喷施硫酸锌；土壤施用锌肥             |\n| 🟤 缺钙 | 追施硝酸钙、氯化钙；叶面喷施钙肥           |\n| 🟡 缺硼 | 叶面喷施硼砂/硼酸溶液；土壤施用硼肥         |\n| 🟢 缺锰 | 叶面喷施硫酸锰溶液                  |\n| 🟤 缺铜 | 叶面喷施硫酸铜溶液；注意用量防毒害          |\n| 🟡 缺硫 | 追施含硫肥料（硫酸铵、硫酸钾等）           |\n\n> ⚠️ 本技能仅提供**施肥方向建议**，**不提供具体化肥浓度与用量**；精准施肥需根据植物种类、生长阶段、土壤检测结果咨询农技专家。\n\n## 🔄 与植物病害的区分要点\n\n| 特征  | 缺素症       | 病害          |\n|-----|-----------|-------------|\n| 分布  | 全株对称、规律性强 | 局部散发、不规则    |\n| 进展  | 缓慢渐进      | 可能快速蔓延      |\n| 边界  | 渐变过渡      | 常有明显病斑边界    |\n| 附着物 | 无霉层/孢子    | 可能有霉层/孢子/菌丝 |\n| 传染性 | 不传染       | 可能传染邻近植株    |\n\n> 💡 若叶片同时出现不规则病斑、霉层或孢子堆，可能为病害而非缺素，建议同时使用植物叶片病害识别技能进行交叉验证。\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_plant_nutrient_diagnosis_analysis.py`](scripts/smyx_plant_nutrient_diagnosis_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 |\n| 🔎 使用提醒 | **拍摄要求**：近距离、光线充足、老叶新叶分别拍摄；模糊/逆光/距离过远的图像无法得出可靠结果 |\n| 🧑‍⚖️ 结果性质 | **诊断结果仅供缺素参考，不提供具体化肥浓度与用量**；精准施肥请咨询农技专家 |\n| 🔎 使用提醒 | 部分缺素症状相似（如缺铁与缺锰均表现为叶脉间失绿），AI 识别可能存在不确定性，建议结合植物种类与土壤检测结果综合判断 |\n| 🔎 使用提醒 | 同一叶片可能存在多种元素同时缺乏，需结合症状综合判定 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，API 服务会自动下载 |\n| 🧑‍⚖️ 结果性质 | 当显示历史诊断报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input /path/to/leaf.jpg\n\n# 分析网络植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --url https://example.com/leaf.jpg\n\n# 显示历史诊断报告/显示报告清单列表\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --output result.json\n```\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-plant-nutrient-diagnosis-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1790436446641\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/ai-analysis/v2/start-common-ai-analysis` - 启动通用 AI 分析任务（植物缺素症视觉诊断）\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` - 植物缺素症视觉诊断\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 plant leaf images or video for possible nutrient deficiencies and returns a structured diagnosis with guidance 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\nGardeners and agricultural teams use plant images or video to investigate possible nutrient deficiencies, review suggested next steps, and retrieve prior diagnosis reports.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Plant media or URLs are sent to an external cloud service during analysis.\n\nMitigation: Obtain consent before uploading and avoid sensitive media or private URLs.\n\nRisk: Automatic identity handling and cloud report-history queries may expose records beyond the user's intended request.\n\nMitigation: Review identity and history access before use; request only reports the user is authorized to view.\n\nRisk: A local database may retain service tokens.\n\nMitigation: Protect local storage and review token retention and access before installation.\n\n## Reference(s):\n\n- [Plant nutrient diagnosis API documentation](artifact/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [Analysis, Guidance, Markdown, JSON]\n\n**Output Format:** [Structured report or Markdown table with report links; optional JSON output]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include a proposed nutrient deficiency, confidence score, and fertilization direction; results are not a substitute for soil testing or agricultural advice.]\n\n## Skill Version(s):\n\n1.0.11 (source: ClawHub release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 40825 bytes\n\nFiles: references/api_doc.md (681b), scripts/__init__.py (63b), scripts/config.py (680b), scripts/config.yaml (3b), scripts/skill.py (576b), scripts/smyx_plant_nutrient_diagnosis_analysis.py (3462b), skill-card.md (2466b), SKILL.md (16080b), 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 (158b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: \"smyx-plant-nutrient-diagnosis-analysis\"\ndescription: \"AI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale green/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common deficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium, iron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization. Scenarios: smart planters, home gardening, agricultural greenhouses, plant factories. | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 🧪 Plant Nutrient Deficiency Diagnosis | 植物缺素症视觉诊断\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **植物缺素症视觉诊断** |\n| 🎯 核心目标 | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` |\n\nAI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale\ngreen/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common\ndeficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium,\niron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization.\nScenarios: smart planters, home gardening, agricultural greenhouses, plant factories.\n\n通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的植物营养学AI。你的任务是分析植物叶片的图像（老叶或新叶），识别叶片颜色异常、形态畸变、失绿分布等特征，与常见缺素症状进行比对，输出最可能缺乏的营养元素类型。不要提供具体化肥浓度，仅输出缺素诊断结果及置信度。 ** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n通过植物叶片高清图像进行缺素症视觉诊断，输出最可能缺乏的营养元素类型、置信度及施肥方向建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 叶片颜色异常检测 |\n| 2 | 叶脉间失绿识别 |\n| 3 | 叶缘焦枯检测 |\n| 4 | 老叶/新叶症状区分 |\n| 5 | 常见缺素症比对（氮/磷/钾/铁/镁/锌/钙/硼/锰/铜/硫等） |\n| 6 | 置信度评分 |\n| 7 | 施肥方向建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供植物叶片图像或视频需要缺素诊断时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要植物营养诊断时，提及缺素、黄叶、叶缘焦枯、叶脉间失绿、缺氮、缺磷、缺钾、缺铁、缺镁、植物营养不良、叶片发黄等关键词，并且上传了图像或视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史缺素诊断报告、历史植物营养报告、缺素症报告清单、显示所有缺素报告、查询植物营养诊断记录 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_plant_nutrient_diagnosis_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 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行缺素诊断 | 调用 `-m scripts.smyx_plant_nutrient_diagnosis_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## 🌿 常见植物缺素症状对照表\n\n| 缺乏元素     | 典型症状                  | 症状部位 | 易发植物       |\n|----------|-----------------------|------|------------|\n| 🟡 氮(N)  | 老叶均匀黄化、植株矮小、生长缓慢      | 老叶先发 | 叶菜类、玉米、草坪  |\n| 🟣 磷(P)  | 叶片暗绿/紫红色、根系发育差、开花延迟   | 老叶先发 | 豆科、玉米、番茄   |\n| 🟤 钾(K)  | 老叶叶缘焦枯、叶尖褐变、抗逆性下降     | 老叶先发 | 马铃薯、番茄、烟草  |\n| 🟢 铁(Fe) | 新叶叶脉间失绿（黄化）、叶脉仍绿（网纹状） | 新叶先发 | 喜酸植物、柑橘、杜鹃 |\n| 🟡 镁(Mg) | 老叶叶脉间失绿、叶片卷曲、提早脱落     | 老叶先发 | 番茄、葡萄、玫瑰   |\n| ⚪ 锌(Zn)  | 新叶小而簇生（小叶病）、节间缩短      | 新叶先发 | 玉米、苹果、柑橘   |\n| 🟤 钙(Ca) | 新叶畸形/卷曲、生长点坏死、裂果      | 新叶先发 | 番茄（脐腐病）、苹果 |\n| 🟡 硼(B)  | 生长点死亡、花器发育不良、茎干裂开     | 新叶先发 | 油菜、甜菜、花椰菜  |\n| 🟢 锰(Mn) | 新叶叶脉间失绿（与缺铁相似但更细碎）    | 新叶先发 | 燕麦、大豆、苹果   |\n| 🟤 铜(Cu) | 新叶失绿萎蔫、叶尖发白卷曲         | 新叶先发 | 小麦、柑橘、洋葱   |\n| 🟡 硫(S)  | 新叶均匀黄化（与缺氮相似但出现在新叶）   | 新叶先发 | 十字花科、豆科    |\n\n## 🔍 缺素症状识别维度\n\n| 维度   | 观察重点          | 判断意义                                     |\n|------|---------------|------------------------------------------|\n| 症状部位 | 老叶 vs 新叶      | 老叶→移动性元素(N/P/K/Mg)，新叶→非移动性元素(Fe/Ca/B/Zn) |\n| 失绿模式 | 均匀失绿 vs 叶脉间失绿 | 均匀→N/S，叶脉间→Fe/Mg/Mn                      |\n| 颜色变化 | 黄化/紫红/暗绿/白化   | 紫红→P，暗绿→P，白化→Cu                          |\n| 形态畸变 | 小叶/卷曲/畸形/坏死   | 小叶→Zn，卷曲→Ca/Cu，坏死→Ca/B                   |\n| 叶缘特征 | 焦枯/褐变/正常      | 焦枯→K，正常→排除K                              |\n| 叶片质地 | 厚硬/薄软/正常      | 厚硬→缺P，薄软→缺N                              |\n\n## 📊 缺素严重程度分级\n\n| 等级    | 症状表现            | 施肥建议             |\n|-------|-----------------|------------------|\n| 🟢 轻度 | 叶片轻微失绿，局部少量变色   | 补充对应元素水溶肥，叶面喷施   |\n| 🟡 中度 | 叶片明显黄化/变色，面积扩大  | 追施对应元素肥料，根部+叶面双施 |\n| 🟠 重度 | 大面积失绿/畸形，生长严重受阻 | 紧急追肥，咨询农技专家      |\n| 🔴 严重 | 植株濒死，叶片大量枯萎脱落   | 立即综合救治，专业农技指导    |\n\n## 💡 施肥方向参考\n\n| 缺素类型  | 施肥方向                       |\n|-------|----------------------------|\n| 🟡 缺氮 | 追施尿素、高氮复合肥；叶面喷施氨基酸叶面肥      |\n| 🟣 缺磷 | 追施过磷酸钙、磷酸二铵；叶面喷施磷酸二氢钾      |\n| 🟤 缺钾 | 追施硫酸钾、氯化钾；叶面喷施磷酸二氢钾        |\n| 🟢 缺铁 | 叶面喷施EDTA-Fe/硫酸亚铁；调节土壤pH至酸性 |\n| 🟡 缺镁 | 追施硫酸镁、钙镁磷肥；叶面喷施硫酸镁溶液       |\n| ⚪ 缺锌  | 叶面喷施硫酸锌；土壤施用锌肥             |\n| 🟤 缺钙 | 追施硝酸钙、氯化钙；叶面喷施钙肥           |\n| 🟡 缺硼 | 叶面喷施硼砂/硼酸溶液；土壤施用硼肥         |\n| 🟢 缺锰 | 叶面喷施硫酸锰溶液                  |\n| 🟤 缺铜 | 叶面喷施硫酸铜溶液；注意用量防毒害          |\n| 🟡 缺硫 | 追施含硫肥料（硫酸铵、硫酸钾等）           |\n\n> ⚠️ 本技能仅提供**施肥方向建议**，**不提供具体化肥浓度与用量**；精准施肥需根据植物种类、生长阶段、土壤检测结果咨询农技专家。\n\n## 🔄 与植物病害的区分要点\n\n| 特征  | 缺素症       | 病害          |\n|-----|-----------|-------------|\n| 分布  | 全株对称、规律性强 | 局部散发、不规则    |\n| 进展  | 缓慢渐进      | 可能快速蔓延      |\n| 边界  | 渐变过渡      | 常有明显病斑边界    |\n| 附着物 | 无霉层/孢子    | 可能有霉层/孢子/菌丝 |\n| 传染性 | 不传染       | 可能传染邻近植株    |\n\n> 💡 若叶片同时出现不规则病斑、霉层或孢子堆，可能为病害而非缺素，建议同时使用植物叶片病害识别技能进行交叉验证。\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_plant_nutrient_diagnosis_analysis.py`](scripts/smyx_plant_nutrient_diagnosis_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 |\n| 🔎 使用提醒 | **拍摄要求**：近距离、光线充足、老叶新叶分别拍摄；模糊/逆光/距离过远的图像无法得出可靠结果 |\n| 🧑‍⚖️ 结果性质 | **诊断结果仅供缺素参考，不提供具体化肥浓度与用量**；精准施肥请咨询农技专家 |\n| 🔎 使用提醒 | 部分缺素症状相似（如缺铁与缺锰均表现为叶脉间失绿），AI 识别可能存在不确定性，建议结合植物种类与土壤检测结果综合判断 |\n| 🔎 使用提醒 | 同一叶片可能存在多种元素同时缺乏，需结合症状综合判定 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，API 服务会自动下载 |\n| 🧑‍⚖️ 结果性质 | 当显示历史诊断报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input /path/to/leaf.jpg\n\n# 分析网络植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --url https://example.com/leaf.jpg\n\n# 显示历史诊断报告/显示报告清单列表\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-plant-nutrient-diagnosis-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1789457916024\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/ai-analysis/v2/start-common-ai-analysis` - 启动通用 AI 分析任务（植物缺素症视觉诊断）\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` - 植物缺素症视觉诊断\n\nFile v1.0.10:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.10:scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.10:skill-card.md\n\n## Description:\n\nDiagnoses likely plant nutrient deficiencies from plant leaf images or videos and returns structured findings, confidence, guidance, 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 users, gardeners, growers, and agricultural operators use this skill to analyze plant leaf media for likely nutrient deficiencies and receive structured diagnostic output. Developers and agents can also use it to call the packaged analysis workflow or retrieve cloud-hosted report history.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Plant images, videos, or URLs may be sent to LifeEmergence cloud APIs for analysis.\n\nMitigation: Review cloud data handling before installation and use only with media approved for that external service.\n\nRisk: The security scan reports automatic account or identity association, cloud report-history lookups, and local SQLite storage of service tokens.\n\nMitigation: Deploy in an isolated environment until identity handling, token retention, and logout or revocation behavior are reviewed.\n\nRisk: The security scan reports that the implementation does not fully match the advertised leaf-image diagnosis scope.\n\nMitigation: Confirm the packaged behavior against the plant diagnosis workflow before relying on results in production.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-plant-nutrient-diagnosis-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [Plant Nutrient Diagnosis API doc](references/api_doc.md)\n- [Shared AI Analysis API doc](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown and structured JSON-like text with optional report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May write the generated analysis output to a local file when an output path is provided.]\n\n## Skill Version(s):\n\n1.0.10 (source: frontmatter and server release evidence)\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, 40751 bytes\n\nFiles: references/api_doc.md (681b), scripts/__init__.py (63b), scripts/config.py (680b), scripts/config.yaml (3b), scripts/skill.py (576b), scripts/smyx_plant_nutrient_diagnosis_analysis.py (3462b), skill-card.md (2330b), SKILL.md (16080b), 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 (157b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: \"smyx-plant-nutrient-diagnosis-analysis\"\ndescription: \"AI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale green/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common deficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium, iron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization. Scenarios: smart planters, home gardening, agricultural greenhouses, plant factories. | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 🧪 Plant Nutrient Deficiency Diagnosis | 植物缺素症视觉诊断\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **植物缺素症视觉诊断** |\n| 🎯 核心目标 | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` |\n\nAI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale\ngreen/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common\ndeficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium,\niron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization.\nScenarios: smart planters, home gardening, agricultural greenhouses, plant factories.\n\n通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的植物营养学AI。你的任务是分析植物叶片的图像（老叶或新叶），识别叶片颜色异常、形态畸变、失绿分布等特征，与常见缺素症状进行比对，输出最可能缺乏的营养元素类型。不要提供具体化肥浓度，仅输出缺素诊断结果及置信度。 ** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n通过植物叶片高清图像进行缺素症视觉诊断，输出最可能缺乏的营养元素类型、置信度及施肥方向建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 叶片颜色异常检测 |\n| 2 | 叶脉间失绿识别 |\n| 3 | 叶缘焦枯检测 |\n| 4 | 老叶/新叶症状区分 |\n| 5 | 常见缺素症比对（氮/磷/钾/铁/镁/锌/钙/硼/锰/铜/硫等） |\n| 6 | 置信度评分 |\n| 7 | 施肥方向建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供植物叶片图像或视频需要缺素诊断时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要植物营养诊断时，提及缺素、黄叶、叶缘焦枯、叶脉间失绿、缺氮、缺磷、缺钾、缺铁、缺镁、植物营养不良、叶片发黄等关键词，并且上传了图像或视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史缺素诊断报告、历史植物营养报告、缺素症报告清单、显示所有缺素报告、查询植物营养诊断记录 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_plant_nutrient_diagnosis_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 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行缺素诊断 | 调用 `-m scripts.smyx_plant_nutrient_diagnosis_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## 🌿 常见植物缺素症状对照表\n\n| 缺乏元素     | 典型症状                  | 症状部位 | 易发植物       |\n|----------|-----------------------|------|------------|\n| 🟡 氮(N)  | 老叶均匀黄化、植株矮小、生长缓慢      | 老叶先发 | 叶菜类、玉米、草坪  |\n| 🟣 磷(P)  | 叶片暗绿/紫红色、根系发育差、开花延迟   | 老叶先发 | 豆科、玉米、番茄   |\n| 🟤 钾(K)  | 老叶叶缘焦枯、叶尖褐变、抗逆性下降     | 老叶先发 | 马铃薯、番茄、烟草  |\n| 🟢 铁(Fe) | 新叶叶脉间失绿（黄化）、叶脉仍绿（网纹状） | 新叶先发 | 喜酸植物、柑橘、杜鹃 |\n| 🟡 镁(Mg) | 老叶叶脉间失绿、叶片卷曲、提早脱落     | 老叶先发 | 番茄、葡萄、玫瑰   |\n| ⚪ 锌(Zn)  | 新叶小而簇生（小叶病）、节间缩短      | 新叶先发 | 玉米、苹果、柑橘   |\n| 🟤 钙(Ca) | 新叶畸形/卷曲、生长点坏死、裂果      | 新叶先发 | 番茄（脐腐病）、苹果 |\n| 🟡 硼(B)  | 生长点死亡、花器发育不良、茎干裂开     | 新叶先发 | 油菜、甜菜、花椰菜  |\n| 🟢 锰(Mn) | 新叶叶脉间失绿（与缺铁相似但更细碎）    | 新叶先发 | 燕麦、大豆、苹果   |\n| 🟤 铜(Cu) | 新叶失绿萎蔫、叶尖发白卷曲         | 新叶先发 | 小麦、柑橘、洋葱   |\n| 🟡 硫(S)  | 新叶均匀黄化（与缺氮相似但出现在新叶）   | 新叶先发 | 十字花科、豆科    |\n\n## 🔍 缺素症状识别维度\n\n| 维度   | 观察重点          | 判断意义                                     |\n|------|---------------|------------------------------------------|\n| 症状部位 | 老叶 vs 新叶      | 老叶→移动性元素(N/P/K/Mg)，新叶→非移动性元素(Fe/Ca/B/Zn) |\n| 失绿模式 | 均匀失绿 vs 叶脉间失绿 | 均匀→N/S，叶脉间→Fe/Mg/Mn                      |\n| 颜色变化 | 黄化/紫红/暗绿/白化   | 紫红→P，暗绿→P，白化→Cu                          |\n| 形态畸变 | 小叶/卷曲/畸形/坏死   | 小叶→Zn，卷曲→Ca/Cu，坏死→Ca/B                   |\n| 叶缘特征 | 焦枯/褐变/正常      | 焦枯→K，正常→排除K                              |\n| 叶片质地 | 厚硬/薄软/正常      | 厚硬→缺P，薄软→缺N                              |\n\n## 📊 缺素严重程度分级\n\n| 等级    | 症状表现            | 施肥建议             |\n|-------|-----------------|------------------|\n| 🟢 轻度 | 叶片轻微失绿，局部少量变色   | 补充对应元素水溶肥，叶面喷施   |\n| 🟡 中度 | 叶片明显黄化/变色，面积扩大  | 追施对应元素肥料，根部+叶面双施 |\n| 🟠 重度 | 大面积失绿/畸形，生长严重受阻 | 紧急追肥，咨询农技专家      |\n| 🔴 严重 | 植株濒死，叶片大量枯萎脱落   | 立即综合救治，专业农技指导    |\n\n## 💡 施肥方向参考\n\n| 缺素类型  | 施肥方向                       |\n|-------|----------------------------|\n| 🟡 缺氮 | 追施尿素、高氮复合肥；叶面喷施氨基酸叶面肥      |\n| 🟣 缺磷 | 追施过磷酸钙、磷酸二铵；叶面喷施磷酸二氢钾      |\n| 🟤 缺钾 | 追施硫酸钾、氯化钾；叶面喷施磷酸二氢钾        |\n| 🟢 缺铁 | 叶面喷施EDTA-Fe/硫酸亚铁；调节土壤pH至酸性 |\n| 🟡 缺镁 | 追施硫酸镁、钙镁磷肥；叶面喷施硫酸镁溶液       |\n| ⚪ 缺锌  | 叶面喷施硫酸锌；土壤施用锌肥             |\n| 🟤 缺钙 | 追施硝酸钙、氯化钙；叶面喷施钙肥           |\n| 🟡 缺硼 | 叶面喷施硼砂/硼酸溶液；土壤施用硼肥         |\n| 🟢 缺锰 | 叶面喷施硫酸锰溶液                  |\n| 🟤 缺铜 | 叶面喷施硫酸铜溶液；注意用量防毒害          |\n| 🟡 缺硫 | 追施含硫肥料（硫酸铵、硫酸钾等）           |\n\n> ⚠️ 本技能仅提供**施肥方向建议**，**不提供具体化肥浓度与用量**；精准施肥需根据植物种类、生长阶段、土壤检测结果咨询农技专家。\n\n## 🔄 与植物病害的区分要点\n\n| 特征  | 缺素症       | 病害          |\n|-----|-----------|-------------|\n| 分布  | 全株对称、规律性强 | 局部散发、不规则    |\n| 进展  | 缓慢渐进      | 可能快速蔓延      |\n| 边界  | 渐变过渡      | 常有明显病斑边界    |\n| 附着物 | 无霉层/孢子    | 可能有霉层/孢子/菌丝 |\n| 传染性 | 不传染       | 可能传染邻近植株    |\n\n> 💡 若叶片同时出现不规则病斑、霉层或孢子堆，可能为病害而非缺素，建议同时使用植物叶片病害识别技能进行交叉验证。\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_plant_nutrient_diagnosis_analysis.py`](scripts/smyx_plant_nutrient_diagnosis_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 |\n| 🔎 使用提醒 | **拍摄要求**：近距离、光线充足、老叶新叶分别拍摄；模糊/逆光/距离过远的图像无法得出可靠结果 |\n| 🧑‍⚖️ 结果性质 | **诊断结果仅供缺素参考，不提供具体化肥浓度与用量**；精准施肥请咨询农技专家 |\n| 🔎 使用提醒 | 部分缺素症状相似（如缺铁与缺锰均表现为叶脉间失绿），AI 识别可能存在不确定性，建议结合植物种类与土壤检测结果综合判断 |\n| 🔎 使用提醒 | 同一叶片可能存在多种元素同时缺乏，需结合症状综合判定 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，API 服务会自动下载 |\n| 🧑‍⚖️ 结果性质 | 当显示历史诊断报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input /path/to/leaf.jpg\n\n# 分析网络植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --url https://example.com/leaf.jpg\n\n# 显示历史诊断报告/显示报告清单列表\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-plant-nutrient-diagnosis-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1787708912140\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/ai-analysis/v2/start-common-ai-analysis` - 启动通用 AI 分析任务（植物缺素症视觉诊断）\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` - 植物缺素症视觉诊断\n\nFile v1.0.9:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.9:scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.9:skill-card.md\n\n## Description:\n\nAnalyzes plant leaf images or videos to identify likely nutrient deficiencies and return a confidence-scored diagnosis with fertilization direction guidance.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users, gardeners, growers, and developers use this skill to submit plant leaf media for nutrient deficiency diagnosis and retrieve current or historical reports.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Plant media or media URLs may be sent to an external service for analysis.\n\nMitigation: Use only with media the user is permitted to upload and disclose external processing before deployment.\n\nRisk: The skill can silently create or reuse an identity, query cloud history, and store tokens or profile data in a local workspace database.\n\nMitigation: Review identity, retention, token storage, and history-query behavior with the publisher before use.\n\nRisk: The evidence reports private development API endpoints in the packaged configuration.\n\nMitigation: Correct configuration to production HTTPS endpoints and verify endpoint ownership before installation.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-plant-nutrient-diagnosis-analysis)\n- [Plant nutrient diagnosis API documentation](references/api_doc.md)\n- [Common 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, Files, Guidance]\n\n**Output Format:** [Markdown or JSON diagnosis reports, with optional saved output files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include nutrient labels, confidence scores, fertilization direction guidance, report links, and historical report tables.]\n\n## Skill Version(s):\n\n1.0.9 (source: server release metadata; artifact frontmatter reports 1.0.10)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 40759 bytes\n\nFiles: references/api_doc.md (681b), scripts/__init__.py (63b), scripts/config.py (680b), scripts/config.yaml (3b), scripts/skill.py (576b), scripts/smyx_plant_nutrient_diagnosis_analysis.py (3462b), skill-card.md (2299b), SKILL.md (16079b), 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 (157b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"smyx-plant-nutrient-diagnosis-analysis\"\ndescription: \"AI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale green/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common deficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium, iron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization. Scenarios: smart planters, home gardening, agricultural greenhouses, plant factories. | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 🧪 Plant Nutrient Deficiency Diagnosis | 植物缺素症视觉诊断\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **植物缺素症视觉诊断** |\n| 🎯 核心目标 | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` |\n\nAI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale\ngreen/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common\ndeficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium,\niron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization.\nScenarios: smart planters, home gardening, agricultural greenhouses, plant factories.\n\n通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的植物营养学AI。你的任务是分析植物叶片的图像（老叶或新叶），识别叶片颜色异常、形态畸变、失绿分布等特征，与常见缺素症状进行比对，输出最可能缺乏的营养元素类型。不要提供具体化肥浓度，仅输出缺素诊断结果及置信度。 ** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n通过植物叶片高清图像进行缺素症视觉诊断，输出最可能缺乏的营养元素类型、置信度及施肥方向建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 叶片颜色异常检测 |\n| 2 | 叶脉间失绿识别 |\n| 3 | 叶缘焦枯检测 |\n| 4 | 老叶/新叶症状区分 |\n| 5 | 常见缺素症比对（氮/磷/钾/铁/镁/锌/钙/硼/锰/铜/硫等） |\n| 6 | 置信度评分 |\n| 7 | 施肥方向建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供植物叶片图像或视频需要缺素诊断时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要植物营养诊断时，提及缺素、黄叶、叶缘焦枯、叶脉间失绿、缺氮、缺磷、缺钾、缺铁、缺镁、植物营养不良、叶片发黄等关键词，并且上传了图像或视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史缺素诊断报告、历史植物营养报告、缺素症报告清单、显示所有缺素报告、查询植物营养诊断记录 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_plant_nutrient_diagnosis_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 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行缺素诊断 | 调用 `-m scripts.smyx_plant_nutrient_diagnosis_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## 🌿 常见植物缺素症状对照表\n\n| 缺乏元素     | 典型症状                  | 症状部位 | 易发植物       |\n|----------|-----------------------|------|------------|\n| 🟡 氮(N)  | 老叶均匀黄化、植株矮小、生长缓慢      | 老叶先发 | 叶菜类、玉米、草坪  |\n| 🟣 磷(P)  | 叶片暗绿/紫红色、根系发育差、开花延迟   | 老叶先发 | 豆科、玉米、番茄   |\n| 🟤 钾(K)  | 老叶叶缘焦枯、叶尖褐变、抗逆性下降     | 老叶先发 | 马铃薯、番茄、烟草  |\n| 🟢 铁(Fe) | 新叶叶脉间失绿（黄化）、叶脉仍绿（网纹状） | 新叶先发 | 喜酸植物、柑橘、杜鹃 |\n| 🟡 镁(Mg) | 老叶叶脉间失绿、叶片卷曲、提早脱落     | 老叶先发 | 番茄、葡萄、玫瑰   |\n| ⚪ 锌(Zn)  | 新叶小而簇生（小叶病）、节间缩短      | 新叶先发 | 玉米、苹果、柑橘   |\n| 🟤 钙(Ca) | 新叶畸形/卷曲、生长点坏死、裂果      | 新叶先发 | 番茄（脐腐病）、苹果 |\n| 🟡 硼(B)  | 生长点死亡、花器发育不良、茎干裂开     | 新叶先发 | 油菜、甜菜、花椰菜  |\n| 🟢 锰(Mn) | 新叶叶脉间失绿（与缺铁相似但更细碎）    | 新叶先发 | 燕麦、大豆、苹果   |\n| 🟤 铜(Cu) | 新叶失绿萎蔫、叶尖发白卷曲         | 新叶先发 | 小麦、柑橘、洋葱   |\n| 🟡 硫(S)  | 新叶均匀黄化（与缺氮相似但出现在新叶）   | 新叶先发 | 十字花科、豆科    |\n\n## 🔍 缺素症状识别维度\n\n| 维度   | 观察重点          | 判断意义                                     |\n|------|---------------|------------------------------------------|\n| 症状部位 | 老叶 vs 新叶      | 老叶→移动性元素(N/P/K/Mg)，新叶→非移动性元素(Fe/Ca/B/Zn) |\n| 失绿模式 | 均匀失绿 vs 叶脉间失绿 | 均匀→N/S，叶脉间→Fe/Mg/Mn                      |\n| 颜色变化 | 黄化/紫红/暗绿/白化   | 紫红→P，暗绿→P，白化→Cu                          |\n| 形态畸变 | 小叶/卷曲/畸形/坏死   | 小叶→Zn，卷曲→Ca/Cu，坏死→Ca/B                   |\n| 叶缘特征 | 焦枯/褐变/正常      | 焦枯→K，正常→排除K                              |\n| 叶片质地 | 厚硬/薄软/正常      | 厚硬→缺P，薄软→缺N                              |\n\n## 📊 缺素严重程度分级\n\n| 等级    | 症状表现            | 施肥建议             |\n|-------|-----------------|------------------|\n| 🟢 轻度 | 叶片轻微失绿，局部少量变色   | 补充对应元素水溶肥，叶面喷施   |\n| 🟡 中度 | 叶片明显黄化/变色，面积扩大  | 追施对应元素肥料，根部+叶面双施 |\n| 🟠 重度 | 大面积失绿/畸形，生长严重受阻 | 紧急追肥，咨询农技专家      |\n| 🔴 严重 | 植株濒死，叶片大量枯萎脱落   | 立即综合救治，专业农技指导    |\n\n## 💡 施肥方向参考\n\n| 缺素类型  | 施肥方向                       |\n|-------|----------------------------|\n| 🟡 缺氮 | 追施尿素、高氮复合肥；叶面喷施氨基酸叶面肥      |\n| 🟣 缺磷 | 追施过磷酸钙、磷酸二铵；叶面喷施磷酸二氢钾      |\n| 🟤 缺钾 | 追施硫酸钾、氯化钾；叶面喷施磷酸二氢钾        |\n| 🟢 缺铁 | 叶面喷施EDTA-Fe/硫酸亚铁；调节土壤pH至酸性 |\n| 🟡 缺镁 | 追施硫酸镁、钙镁磷肥；叶面喷施硫酸镁溶液       |\n| ⚪ 缺锌  | 叶面喷施硫酸锌；土壤施用锌肥             |\n| 🟤 缺钙 | 追施硝酸钙、氯化钙；叶面喷施钙肥           |\n| 🟡 缺硼 | 叶面喷施硼砂/硼酸溶液；土壤施用硼肥         |\n| 🟢 缺锰 | 叶面喷施硫酸锰溶液                  |\n| 🟤 缺铜 | 叶面喷施硫酸铜溶液；注意用量防毒害          |\n| 🟡 缺硫 | 追施含硫肥料（硫酸铵、硫酸钾等）           |\n\n> ⚠️ 本技能仅提供**施肥方向建议**，**不提供具体化肥浓度与用量**；精准施肥需根据植物种类、生长阶段、土壤检测结果咨询农技专家。\n\n## 🔄 与植物病害的区分要点\n\n| 特征  | 缺素症       | 病害          |\n|-----|-----------|-------------|\n| 分布  | 全株对称、规律性强 | 局部散发、不规则    |\n| 进展  | 缓慢渐进      | 可能快速蔓延      |\n| 边界  | 渐变过渡      | 常有明显病斑边界    |\n| 附着物 | 无霉层/孢子    | 可能有霉层/孢子/菌丝 |\n| 传染性 | 不传染       | 可能传染邻近植株    |\n\n> 💡 若叶片同时出现不规则病斑、霉层或孢子堆，可能为病害而非缺素，建议同时使用植物叶片病害识别技能进行交叉验证。\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_plant_nutrient_diagnosis_analysis.py`](scripts/smyx_plant_nutrient_diagnosis_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 |\n| 🔎 使用提醒 | **拍摄要求**：近距离、光线充足、老叶新叶分别拍摄；模糊/逆光/距离过远的图像无法得出可靠结果 |\n| 🧑‍⚖️ 结果性质 | **诊断结果仅供缺素参考，不提供具体化肥浓度与用量**；精准施肥请咨询农技专家 |\n| 🔎 使用提醒 | 部分缺素症状相似（如缺铁与缺锰均表现为叶脉间失绿），AI 识别可能存在不确定性，建议结合植物种类与土壤检测结果综合判断 |\n| 🔎 使用提醒 | 同一叶片可能存在多种元素同时缺乏，需结合症状综合判定 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，API 服务会自动下载 |\n| 🧑‍⚖️ 结果性质 | 当显示历史诊断报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input /path/to/leaf.jpg\n\n# 分析网络植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --url https://example.com/leaf.jpg\n\n# 显示历史诊断报告/显示报告清单列表\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-plant-nutrient-diagnosis-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1787461052592\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/ai-analysis/v2/start-common-ai-analysis` - 启动通用 AI 分析任务（植物缺素症视觉诊断）\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` - 植物缺素症视觉诊断\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\nAI-powered plant nutrient deficiency diagnosis from leaf images that analyzes color and morphology changes, compares them with common nutrient-deficiency symptoms, and returns likely deficient nutrients with confidence and guidance.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users, growers, home gardeners, greenhouse operators, and agents use this skill to diagnose likely plant nutrient deficiencies from leaf images or videos and to retrieve prior cloud analysis reports.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Uploaded plant media, supplied media URLs, and report-history requests are sent to the publisher's backend services.\n\nMitigation: Use only media that is appropriate for third-party processing, review configured endpoints before deployment, and avoid submitting sensitive images or URLs.\n\nRisk: The skill can silently create or reuse a local identity and persist account tokens or report history in workspace data.\n\nMitigation: Clear local smyx data and tokens when persistent account association is not desired, and run the skill in a workspace with appropriate data-retention controls.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-plant-nutrient-diagnosis-analysis)\n- [Plant Nutrient Diagnosis API Documentation](references/api_doc.md)\n- [Common Analysis API Documentation](skills/smyx_analysis/references/api_doc.md)\n- [Skill Usage Demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance]\n\n**Output Format:** [Markdown and JSON text with report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May write the returned report text to a user-specified output file.]\n\n## Skill Version(s):\n\n1.0.8 (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.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, 40846 bytes\n\nFiles: references/api_doc.md (681b), scripts/__init__.py (63b), scripts/config.py (680b), scripts/config.yaml (3b), scripts/skill.py (576b), scripts/smyx_plant_nutrient_diagnosis_analysis.py (3462b), skill-card.md (2560b), SKILL.md (16079b), 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 (157b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"smyx-plant-nutrient-diagnosis-analysis\"\ndescription: \"AI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale green/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common deficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium, iron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization. Scenarios: smart planters, home gardening, agricultural greenhouses, plant factories. | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\"\nversion: \"1.0.8\"\nlicense: \"MIT-0\"\n---\n\n# 🧪 Plant Nutrient Deficiency Diagnosis | 植物缺素症视觉诊断\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **植物缺素症视觉诊断** |\n| 🎯 核心目标 | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` |\n\nAI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale\ngreen/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common\ndeficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium,\niron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization.\nScenarios: smart planters, home gardening, agricultural greenhouses, plant factories.\n\n通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的植物营养学AI。你的任务是分析植物叶片的图像（老叶或新叶），识别叶片颜色异常、形态畸变、失绿分布等特征，与常见缺素症状进行比对，输出最可能缺乏的营养元素类型。不要提供具体化肥浓度，仅输出缺素诊断结果及置信度。 ** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n通过植物叶片高清图像进行缺素症视觉诊断，输出最可能缺乏的营养元素类型、置信度及施肥方向建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 叶片颜色异常检测 |\n| 2 | 叶脉间失绿识别 |\n| 3 | 叶缘焦枯检测 |\n| 4 | 老叶/新叶症状区分 |\n| 5 | 常见缺素症比对（氮/磷/钾/铁/镁/锌/钙/硼/锰/铜/硫等） |\n| 6 | 置信度评分 |\n| 7 | 施肥方向建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供植物叶片图像或视频需要缺素诊断时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要植物营养诊断时，提及缺素、黄叶、叶缘焦枯、叶脉间失绿、缺氮、缺磷、缺钾、缺铁、缺镁、植物营养不良、叶片发黄等关键词，并且上传了图像或视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史缺素诊断报告、历史植物营养报告、缺素症报告清单、显示所有缺素报告、查询植物营养诊断记录 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_plant_nutrient_diagnosis_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 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行缺素诊断 | 调用 `-m scripts.smyx_plant_nutrient_diagnosis_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## 🌿 常见植物缺素症状对照表\n\n| 缺乏元素     | 典型症状                  | 症状部位 | 易发植物       |\n|----------|-----------------------|------|------------|\n| 🟡 氮(N)  | 老叶均匀黄化、植株矮小、生长缓慢      | 老叶先发 | 叶菜类、玉米、草坪  |\n| 🟣 磷(P)  | 叶片暗绿/紫红色、根系发育差、开花延迟   | 老叶先发 | 豆科、玉米、番茄   |\n| 🟤 钾(K)  | 老叶叶缘焦枯、叶尖褐变、抗逆性下降     | 老叶先发 | 马铃薯、番茄、烟草  |\n| 🟢 铁(Fe) | 新叶叶脉间失绿（黄化）、叶脉仍绿（网纹状） | 新叶先发 | 喜酸植物、柑橘、杜鹃 |\n| 🟡 镁(Mg) | 老叶叶脉间失绿、叶片卷曲、提早脱落     | 老叶先发 | 番茄、葡萄、玫瑰   |\n| ⚪ 锌(Zn)  | 新叶小而簇生（小叶病）、节间缩短      | 新叶先发 | 玉米、苹果、柑橘   |\n| 🟤 钙(Ca) | 新叶畸形/卷曲、生长点坏死、裂果      | 新叶先发 | 番茄（脐腐病）、苹果 |\n| 🟡 硼(B)  | 生长点死亡、花器发育不良、茎干裂开     | 新叶先发 | 油菜、甜菜、花椰菜  |\n| 🟢 锰(Mn) | 新叶叶脉间失绿（与缺铁相似但更细碎）    | 新叶先发 | 燕麦、大豆、苹果   |\n| 🟤 铜(Cu) | 新叶失绿萎蔫、叶尖发白卷曲         | 新叶先发 | 小麦、柑橘、洋葱   |\n| 🟡 硫(S)  | 新叶均匀黄化（与缺氮相似但出现在新叶）   | 新叶先发 | 十字花科、豆科    |\n\n## 🔍 缺素症状识别维度\n\n| 维度   | 观察重点          | 判断意义                                     |\n|------|---------------|------------------------------------------|\n| 症状部位 | 老叶 vs 新叶      | 老叶→移动性元素(N/P/K/Mg)，新叶→非移动性元素(Fe/Ca/B/Zn) |\n| 失绿模式 | 均匀失绿 vs 叶脉间失绿 | 均匀→N/S，叶脉间→Fe/Mg/Mn                      |\n| 颜色变化 | 黄化/紫红/暗绿/白化   | 紫红→P，暗绿→P，白化→Cu                          |\n| 形态畸变 | 小叶/卷曲/畸形/坏死   | 小叶→Zn，卷曲→Ca/Cu，坏死→Ca/B                   |\n| 叶缘特征 | 焦枯/褐变/正常      | 焦枯→K，正常→排除K                              |\n| 叶片质地 | 厚硬/薄软/正常      | 厚硬→缺P，薄软→缺N                              |\n\n## 📊 缺素严重程度分级\n\n| 等级    | 症状表现            | 施肥建议             |\n|-------|-----------------|------------------|\n| 🟢 轻度 | 叶片轻微失绿，局部少量变色   | 补充对应元素水溶肥，叶面喷施   |\n| 🟡 中度 | 叶片明显黄化/变色，面积扩大  | 追施对应元素肥料，根部+叶面双施 |\n| 🟠 重度 | 大面积失绿/畸形，生长严重受阻 | 紧急追肥，咨询农技专家      |\n| 🔴 严重 | 植株濒死，叶片大量枯萎脱落   | 立即综合救治，专业农技指导    |\n\n## 💡 施肥方向参考\n\n| 缺素类型  | 施肥方向                       |\n|-------|----------------------------|\n| 🟡 缺氮 | 追施尿素、高氮复合肥；叶面喷施氨基酸叶面肥      |\n| 🟣 缺磷 | 追施过磷酸钙、磷酸二铵；叶面喷施磷酸二氢钾      |\n| 🟤 缺钾 | 追施硫酸钾、氯化钾；叶面喷施磷酸二氢钾        |\n| 🟢 缺铁 | 叶面喷施EDTA-Fe/硫酸亚铁；调节土壤pH至酸性 |\n| 🟡 缺镁 | 追施硫酸镁、钙镁磷肥；叶面喷施硫酸镁溶液       |\n| ⚪ 缺锌  | 叶面喷施硫酸锌；土壤施用锌肥             |\n| 🟤 缺钙 | 追施硝酸钙、氯化钙；叶面喷施钙肥           |\n| 🟡 缺硼 | 叶面喷施硼砂/硼酸溶液；土壤施用硼肥         |\n| 🟢 缺锰 | 叶面喷施硫酸锰溶液                  |\n| 🟤 缺铜 | 叶面喷施硫酸铜溶液；注意用量防毒害          |\n| 🟡 缺硫 | 追施含硫肥料（硫酸铵、硫酸钾等）           |\n\n> ⚠️ 本技能仅提供**施肥方向建议**，**不提供具体化肥浓度与用量**；精准施肥需根据植物种类、生长阶段、土壤检测结果咨询农技专家。\n\n## 🔄 与植物病害的区分要点\n\n| 特征  | 缺素症       | 病害          |\n|-----|-----------|-------------|\n| 分布  | 全株对称、规律性强 | 局部散发、不规则    |\n| 进展  | 缓慢渐进      | 可能快速蔓延      |\n| 边界  | 渐变过渡      | 常有明显病斑边界    |\n| 附着物 | 无霉层/孢子    | 可能有霉层/孢子/菌丝 |\n| 传染性 | 不传染       | 可能传染邻近植株    |\n\n> 💡 若叶片同时出现不规则病斑、霉层或孢子堆，可能为病害而非缺素，建议同时使用植物叶片病害识别技能进行交叉验证。\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_plant_nutrient_diagnosis_analysis.py`](scripts/smyx_plant_nutrient_diagnosis_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 |\n| 🔎 使用提醒 | **拍摄要求**：近距离、光线充足、老叶新叶分别拍摄；模糊/逆光/距离过远的图像无法得出可靠结果 |\n| 🧑‍⚖️ 结果性质 | **诊断结果仅供缺素参考，不提供具体化肥浓度与用量**；精准施肥请咨询农技专家 |\n| 🔎 使用提醒 | 部分缺素症状相似（如缺铁与缺锰均表现为叶脉间失绿），AI 识别可能存在不确定性，建议结合植物种类与土壤检测结果综合判断 |\n| 🔎 使用提醒 | 同一叶片可能存在多种元素同时缺乏，需结合症状综合判定 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，API 服务会自动下载 |\n| 🧑‍⚖️ 结果性质 | 当显示历史诊断报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input /path/to/leaf.jpg\n\n# 分析网络植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --url https://example.com/leaf.jpg\n\n# 显示历史诊断报告/显示报告清单列表\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-plant-nutrient-diagnosis-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1786360055385\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/ai-analysis/v2/start-common-ai-analysis` - 启动通用 AI 分析任务（植物缺素症视觉诊断）\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` - 植物缺素症视觉诊断\n\nFile v1.0.7:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.7:scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.7:skill-card.md\n\n## Description:\n\nDiagnoses likely plant nutrient deficiencies from plant leaf images or videos, returning likely deficient nutrient elements, confidence, and fertilization direction guidance.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to submit plant leaf media for cloud-based nutrient deficiency diagnosis and to retrieve account-linked diagnosis history.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Plant media files or media URLs are sent to the Life Emergence cloud service for analysis.\n\nMitigation: Use only media and URLs approved for external processing; avoid sensitive local files and private or internal URLs.\n\nRisk: The skill creates or reuses a persistent local identity and stores service tokens in workspace data.\n\nMitigation: Run it only in workspaces where persistent local account data is acceptable, and clear local data or isolate workspaces between users.\n\nRisk: History lookup can return account-linked diagnosis reports.\n\nMitigation: Treat history results as user or account data and invoke history lookup only when the user asks for prior reports.\n\nRisk: Nutrient deficiency symptoms can overlap, so diagnosis and fertilization guidance may be uncertain.\n\nMitigation: Use results as advisory input and confirm with plant context, soil testing, or an agricultural expert before making treatment decisions.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-plant-nutrient-diagnosis-analysis)\n- [API documentation](references/api_doc.md)\n- [Shared 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, Files, Guidance]\n\n**Output Format:** [Markdown or JSON text, with an optional saved result file.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include report export links and account-linked history lists; local media inputs are size-limited to 10 MB.]\n\n## Skill Version(s):\n\n1.0.7 (source: server release metadata; artifact frontmatter says 1.0.8)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 40882 bytes\n\nFiles: references/api_doc.md (681b), scripts/__init__.py (63b), scripts/config.py (680b), scripts/config.yaml (3b), scripts/skill.py (576b), scripts/smyx_plant_nutrient_diagnosis_analysis.py (3462b), skill-card.md (2663b), SKILL.md (16079b), 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 (157b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"smyx-plant-nutrient-diagnosis-analysis\"\ndescription: \"AI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale green/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common deficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium, iron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization. Scenarios: smart planters, home gardening, agricultural greenhouses, plant factories. | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\"\nversion: \"1.0.7\"\nlicense: \"MIT-0\"\n---\n\n# 🧪 Plant Nutrient Deficiency Diagnosis | 植物缺素症视觉诊断\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **植物缺素症视觉诊断** |\n| 🎯 核心目标 | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` |\n\nAI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale\ngreen/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common\ndeficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium,\niron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization.\nScenarios: smart planters, home gardening, agricultural greenhouses, plant factories.\n\n通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的植物营养学AI。你的任务是分析植物叶片的图像（老叶或新叶），识别叶片颜色异常、形态畸变、失绿分布等特征，与常见缺素症状进行比对，输出最可能缺乏的营养元素类型。不要提供具体化肥浓度，仅输出缺素诊断结果及置信度。 ** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n通过植物叶片高清图像进行缺素症视觉诊断，输出最可能缺乏的营养元素类型、置信度及施肥方向建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 叶片颜色异常检测 |\n| 2 | 叶脉间失绿识别 |\n| 3 | 叶缘焦枯检测 |\n| 4 | 老叶/新叶症状区分 |\n| 5 | 常见缺素症比对（氮/磷/钾/铁/镁/锌/钙/硼/锰/铜/硫等） |\n| 6 | 置信度评分 |\n| 7 | 施肥方向建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供植物叶片图像或视频需要缺素诊断时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要植物营养诊断时，提及缺素、黄叶、叶缘焦枯、叶脉间失绿、缺氮、缺磷、缺钾、缺铁、缺镁、植物营养不良、叶片发黄等关键词，并且上传了图像或视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史缺素诊断报告、历史植物营养报告、缺素症报告清单、显示所有缺素报告、查询植物营养诊断记录 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_plant_nutrient_diagnosis_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 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行缺素诊断 | 调用 `-m scripts.smyx_plant_nutrient_diagnosis_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## 🌿 常见植物缺素症状对照表\n\n| 缺乏元素     | 典型症状                  | 症状部位 | 易发植物       |\n|----------|-----------------------|------|------------|\n| 🟡 氮(N)  | 老叶均匀黄化、植株矮小、生长缓慢      | 老叶先发 | 叶菜类、玉米、草坪  |\n| 🟣 磷(P)  | 叶片暗绿/紫红色、根系发育差、开花延迟   | 老叶先发 | 豆科、玉米、番茄   |\n| 🟤 钾(K)  | 老叶叶缘焦枯、叶尖褐变、抗逆性下降     | 老叶先发 | 马铃薯、番茄、烟草  |\n| 🟢 铁(Fe) | 新叶叶脉间失绿（黄化）、叶脉仍绿（网纹状） | 新叶先发 | 喜酸植物、柑橘、杜鹃 |\n| 🟡 镁(Mg) | 老叶叶脉间失绿、叶片卷曲、提早脱落     | 老叶先发 | 番茄、葡萄、玫瑰   |\n| ⚪ 锌(Zn)  | 新叶小而簇生（小叶病）、节间缩短      | 新叶先发 | 玉米、苹果、柑橘   |\n| 🟤 钙(Ca) | 新叶畸形/卷曲、生长点坏死、裂果      | 新叶先发 | 番茄（脐腐病）、苹果 |\n| 🟡 硼(B)  | 生长点死亡、花器发育不良、茎干裂开     | 新叶先发 | 油菜、甜菜、花椰菜  |\n| 🟢 锰(Mn) | 新叶叶脉间失绿（与缺铁相似但更细碎）    | 新叶先发 | 燕麦、大豆、苹果   |\n| 🟤 铜(Cu) | 新叶失绿萎蔫、叶尖发白卷曲         | 新叶先发 | 小麦、柑橘、洋葱   |\n| 🟡 硫(S)  | 新叶均匀黄化（与缺氮相似但出现在新叶）   | 新叶先发 | 十字花科、豆科    |\n\n## 🔍 缺素症状识别维度\n\n| 维度   | 观察重点          | 判断意义                                     |\n|------|---------------|------------------------------------------|\n| 症状部位 | 老叶 vs 新叶      | 老叶→移动性元素(N/P/K/Mg)，新叶→非移动性元素(Fe/Ca/B/Zn) |\n| 失绿模式 | 均匀失绿 vs 叶脉间失绿 | 均匀→N/S，叶脉间→Fe/Mg/Mn                      |\n| 颜色变化 | 黄化/紫红/暗绿/白化   | 紫红→P，暗绿→P，白化→Cu                          |\n| 形态畸变 | 小叶/卷曲/畸形/坏死   | 小叶→Zn，卷曲→Ca/Cu，坏死→Ca/B                   |\n| 叶缘特征 | 焦枯/褐变/正常      | 焦枯→K，正常→排除K                              |\n| 叶片质地 | 厚硬/薄软/正常      | 厚硬→缺P，薄软→缺N                              |\n\n## 📊 缺素严重程度分级\n\n| 等级    | 症状表现            | 施肥建议             |\n|-------|-----------------|------------------|\n| 🟢 轻度 | 叶片轻微失绿，局部少量变色   | 补充对应元素水溶肥，叶面喷施   |\n| 🟡 中度 | 叶片明显黄化/变色，面积扩大  | 追施对应元素肥料，根部+叶面双施 |\n| 🟠 重度 | 大面积失绿/畸形，生长严重受阻 | 紧急追肥，咨询农技专家      |\n| 🔴 严重 | 植株濒死，叶片大量枯萎脱落   | 立即综合救治，专业农技指导    |\n\n## 💡 施肥方向参考\n\n| 缺素类型  | 施肥方向                       |\n|-------|----------------------------|\n| 🟡 缺氮 | 追施尿素、高氮复合肥；叶面喷施氨基酸叶面肥      |\n| 🟣 缺磷 | 追施过磷酸钙、磷酸二铵；叶面喷施磷酸二氢钾      |\n| 🟤 缺钾 | 追施硫酸钾、氯化钾；叶面喷施磷酸二氢钾        |\n| 🟢 缺铁 | 叶面喷施EDTA-Fe/硫酸亚铁；调节土壤pH至酸性 |\n| 🟡 缺镁 | 追施硫酸镁、钙镁磷肥；叶面喷施硫酸镁溶液       |\n| ⚪ 缺锌  | 叶面喷施硫酸锌；土壤施用锌肥             |\n| 🟤 缺钙 | 追施硝酸钙、氯化钙；叶面喷施钙肥           |\n| 🟡 缺硼 | 叶面喷施硼砂/硼酸溶液；土壤施用硼肥         |\n| 🟢 缺锰 | 叶面喷施硫酸锰溶液                  |\n| 🟤 缺铜 | 叶面喷施硫酸铜溶液；注意用量防毒害          |\n| 🟡 缺硫 | 追施含硫肥料（硫酸铵、硫酸钾等）           |\n\n> ⚠️ 本技能仅提供**施肥方向建议**，**不提供具体化肥浓度与用量**；精准施肥需根据植物种类、生长阶段、土壤检测结果咨询农技专家。\n\n## 🔄 与植物病害的区分要点\n\n| 特征  | 缺素症       | 病害          |\n|-----|-----------|-------------|\n| 分布  | 全株对称、规律性强 | 局部散发、不规则    |\n| 进展  | 缓慢渐进      | 可能快速蔓延      |\n| 边界  | 渐变过渡      | 常有明显病斑边界    |\n| 附着物 | 无霉层/孢子    | 可能有霉层/孢子/菌丝 |\n| 传染性 | 不传染       | 可能传染邻近植株    |\n\n> 💡 若叶片同时出现不规则病斑、霉层或孢子堆，可能为病害而非缺素，建议同时使用植物叶片病害识别技能进行交叉验证。\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_plant_nutrient_diagnosis_analysis.py`](scripts/smyx_plant_nutrient_diagnosis_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 |\n| 🔎 使用提醒 | **拍摄要求**：近距离、光线充足、老叶新叶分别拍摄；模糊/逆光/距离过远的图像无法得出可靠结果 |\n| 🧑‍⚖️ 结果性质 | **诊断结果仅供缺素参考，不提供具体化肥浓度与用量**；精准施肥请咨询农技专家 |\n| 🔎 使用提醒 | 部分缺素症状相似（如缺铁与缺锰均表现为叶脉间失绿），AI 识别可能存在不确定性，建议结合植物种类与土壤检测结果综合判断 |\n| 🔎 使用提醒 | 同一叶片可能存在多种元素同时缺乏，需结合症状综合判定 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，API 服务会自动下载 |\n| 🧑‍⚖️ 结果性质 | 当显示历史诊断报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input /path/to/leaf.jpg\n\n# 分析网络植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --url https://example.com/leaf.jpg\n\n# 显示历史诊断报告/显示报告清单列表\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-plant-nutrient-diagnosis-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1785881248894\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/ai-analysis/v2/start-common-ai-analysis` - 启动通用 AI 分析任务（植物缺素症视觉诊断）\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` - 植物缺素症视觉诊断\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\nThis skill analyzes plant leaf images or videos to identify likely nutrient deficiencies, confidence scores, and fertilization direction guidance.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users, gardening assistants, and agricultural operators use this skill to evaluate plant leaf media for likely nutrient deficiencies and receive concise diagnostic results, confidence information, and fertilization direction guidance.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Plant images, videos, or URLs may be sent to Lifeemergence-hosted services for analysis.\n\nMitigation: Use only with media the user is comfortable uploading, and confirm the publisher's data retention, deletion, and consent practices before deployment.\n\nRisk: Report history is associated with an automatically created or reused identity.\n\nMitigation: Review user identity handling and history retrieval behavior before enabling the skill in shared or regulated environments.\n\nRisk: Local token-bearing state may be stored in the workspace data directory.\n\nMitigation: Limit workspace access, rotate or delete local state when users change, and review token handling expectations before installation.\n\nRisk: Plant nutrient symptoms can overlap, so diagnostic output may be uncertain or incomplete.\n\nMitigation: Treat results as advisory and combine them with plant species context, image quality checks, soil testing, or expert review for high-impact decisions.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-plant-nutrient-diagnosis-analysis)\n- [API documentation](references/api_doc.md)\n- [Shared analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n- [Skill usage demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, guidance]\n\n**Output Format:** [Markdown text with structured analysis results, confidence information, suggestions, and report links.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Can save results to a file and can return history reports as Markdown tables.]\n\n## Skill Version(s):\n\n1.0.6 (source: server release evidence; artifact frontmatter reports 1.0.7)\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, 41010 bytes\n\nFiles: references/api_doc.md (681b), scripts/__init__.py (63b), scripts/config.py (680b), scripts/config.yaml (3b), scripts/skill.py (576b), scripts/smyx_plant_nutrient_diagnosis_analysis.py (3462b), skill-card.md (2915b), SKILL.md (16079b), 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 (157b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: \"smyx-plant-nutrient-diagnosis-analysis\"\ndescription: \"AI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale green/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common deficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium, iron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization. Scenarios: smart planters, home gardening, agricultural greenhouses, plant factories. | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\"\nversion: \"1.0.6\"\nlicense: \"MIT-0\"\n---\n\n# 🧪 Plant Nutrient Deficiency Diagnosis | 植物缺素症视觉诊断\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **植物缺素症视觉诊断** |\n| 🎯 核心目标 | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` |\n\nAI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale\ngreen/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common\ndeficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium,\niron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization.\nScenarios: smart planters, home gardening, agricultural greenhouses, plant factories.\n\n通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的植物营养学AI。你的任务是分析植物叶片的图像（老叶或新叶），识别叶片颜色异常、形态畸变、失绿分布等特征，与常见缺素症状进行比对，输出最可能缺乏的营养元素类型。不要提供具体化肥浓度，仅输出缺素诊断结果及置信度。 ** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n通过植物叶片高清图像进行缺素症视觉诊断，输出最可能缺乏的营养元素类型、置信度及施肥方向建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 叶片颜色异常检测 |\n| 2 | 叶脉间失绿识别 |\n| 3 | 叶缘焦枯检测 |\n| 4 | 老叶/新叶症状区分 |\n| 5 | 常见缺素症比对（氮/磷/钾/铁/镁/锌/钙/硼/锰/铜/硫等） |\n| 6 | 置信度评分 |\n| 7 | 施肥方向建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供植物叶片图像或视频需要缺素诊断时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要植物营养诊断时，提及缺素、黄叶、叶缘焦枯、叶脉间失绿、缺氮、缺磷、缺钾、缺铁、缺镁、植物营养不良、叶片发黄等关键词，并且上传了图像或视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史缺素诊断报告、历史植物营养报告、缺素症报告清单、显示所有缺素报告、查询植物营养诊断记录 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_plant_nutrient_diagnosis_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 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行缺素诊断 | 调用 `-m scripts.smyx_plant_nutrient_diagnosis_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## 🌿 常见植物缺素症状对照表\n\n| 缺乏元素     | 典型症状                  | 症状部位 | 易发植物       |\n|----------|-----------------------|------|------------|\n| 🟡 氮(N)  | 老叶均匀黄化、植株矮小、生长缓慢      | 老叶先发 | 叶菜类、玉米、草坪  |\n| 🟣 磷(P)  | 叶片暗绿/紫红色、根系发育差、开花延迟   | 老叶先发 | 豆科、玉米、番茄   |\n| 🟤 钾(K)  | 老叶叶缘焦枯、叶尖褐变、抗逆性下降     | 老叶先发 | 马铃薯、番茄、烟草  |\n| 🟢 铁(Fe) | 新叶叶脉间失绿（黄化）、叶脉仍绿（网纹状） | 新叶先发 | 喜酸植物、柑橘、杜鹃 |\n| 🟡 镁(Mg) | 老叶叶脉间失绿、叶片卷曲、提早脱落     | 老叶先发 | 番茄、葡萄、玫瑰   |\n| ⚪ 锌(Zn)  | 新叶小而簇生（小叶病）、节间缩短      | 新叶先发 | 玉米、苹果、柑橘   |\n| 🟤 钙(Ca) | 新叶畸形/卷曲、生长点坏死、裂果      | 新叶先发 | 番茄（脐腐病）、苹果 |\n| 🟡 硼(B)  | 生长点死亡、花器发育不良、茎干裂开     | 新叶先发 | 油菜、甜菜、花椰菜  |\n| 🟢 锰(Mn) | 新叶叶脉间失绿（与缺铁相似但更细碎）    | 新叶先发 | 燕麦、大豆、苹果   |\n| 🟤 铜(Cu) | 新叶失绿萎蔫、叶尖发白卷曲         | 新叶先发 | 小麦、柑橘、洋葱   |\n| 🟡 硫(S)  | 新叶均匀黄化（与缺氮相似但出现在新叶）   | 新叶先发 | 十字花科、豆科    |\n\n## 🔍 缺素症状识别维度\n\n| 维度   | 观察重点          | 判断意义                                     |\n|------|---------------|------------------------------------------|\n| 症状部位 | 老叶 vs 新叶      | 老叶→移动性元素(N/P/K/Mg)，新叶→非移动性元素(Fe/Ca/B/Zn) |\n| 失绿模式 | 均匀失绿 vs 叶脉间失绿 | 均匀→N/S，叶脉间→Fe/Mg/Mn                      |\n| 颜色变化 | 黄化/紫红/暗绿/白化   | 紫红→P，暗绿→P，白化→Cu                          |\n| 形态畸变 | 小叶/卷曲/畸形/坏死   | 小叶→Zn，卷曲→Ca/Cu，坏死→Ca/B                   |\n| 叶缘特征 | 焦枯/褐变/正常      | 焦枯→K，正常→排除K                              |\n| 叶片质地 | 厚硬/薄软/正常      | 厚硬→缺P，薄软→缺N                              |\n\n## 📊 缺素严重程度分级\n\n| 等级    | 症状表现            | 施肥建议             |\n|-------|-----------------|------------------|\n| 🟢 轻度 | 叶片轻微失绿，局部少量变色   | 补充对应元素水溶肥，叶面喷施   |\n| 🟡 中度 | 叶片明显黄化/变色，面积扩大  | 追施对应元素肥料，根部+叶面双施 |\n| 🟠 重度 | 大面积失绿/畸形，生长严重受阻 | 紧急追肥，咨询农技专家      |\n| 🔴 严重 | 植株濒死，叶片大量枯萎脱落   | 立即综合救治，专业农技指导    |\n\n## 💡 施肥方向参考\n\n| 缺素类型  | 施肥方向                       |\n|-------|----------------------------|\n| 🟡 缺氮 | 追施尿素、高氮复合肥；叶面喷施氨基酸叶面肥      |\n| 🟣 缺磷 | 追施过磷酸钙、磷酸二铵；叶面喷施磷酸二氢钾      |\n| 🟤 缺钾 | 追施硫酸钾、氯化钾；叶面喷施磷酸二氢钾        |\n| 🟢 缺铁 | 叶面喷施EDTA-Fe/硫酸亚铁；调节土壤pH至酸性 |\n| 🟡 缺镁 | 追施硫酸镁、钙镁磷肥；叶面喷施硫酸镁溶液       |\n| ⚪ 缺锌  | 叶面喷施硫酸锌；土壤施用锌肥             |\n| 🟤 缺钙 | 追施硝酸钙、氯化钙；叶面喷施钙肥           |\n| 🟡 缺硼 | 叶面喷施硼砂/硼酸溶液；土壤施用硼肥         |\n| 🟢 缺锰 | 叶面喷施硫酸锰溶液                  |\n| 🟤 缺铜 | 叶面喷施硫酸铜溶液；注意用量防毒害          |\n| 🟡 缺硫 | 追施含硫肥料（硫酸铵、硫酸钾等）           |\n\n> ⚠️ 本技能仅提供**施肥方向建议**，**不提供具体化肥浓度与用量**；精准施肥需根据植物种类、生长阶段、土壤检测结果咨询农技专家。\n\n## 🔄 与植物病害的区分要点\n\n| 特征  | 缺素症       | 病害          |\n|-----|-----------|-------------|\n| 分布  | 全株对称、规律性强 | 局部散发、不规则    |\n| 进展  | 缓慢渐进      | 可能快速蔓延      |\n| 边界  | 渐变过渡      | 常有明显病斑边界    |\n| 附着物 | 无霉层/孢子    | 可能有霉层/孢子/菌丝 |\n| 传染性 | 不传染       | 可能传染邻近植株    |\n\n> 💡 若叶片同时出现不规则病斑、霉层或孢子堆，可能为病害而非缺素，建议同时使用植物叶片病害识别技能进行交叉验证。\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_plant_nutrient_diagnosis_analysis.py`](scripts/smyx_plant_nutrient_diagnosis_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 |\n| 🔎 使用提醒 | **拍摄要求**：近距离、光线充足、老叶新叶分别拍摄；模糊/逆光/距离过远的图像无法得出可靠结果 |\n| 🧑‍⚖️ 结果性质 | **诊断结果仅供缺素参考，不提供具体化肥浓度与用量**；精准施肥请咨询农技专家 |\n| 🔎 使用提醒 | 部分缺素症状相似（如缺铁与缺锰均表现为叶脉间失绿），AI 识别可能存在不确定性，建议结合植物种类与土壤检测结果综合判断 |\n| 🔎 使用提醒 | 同一叶片可能存在多种元素同时缺乏，需结合症状综合判定 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，API 服务会自动下载 |\n| 🧑‍⚖️ 结果性质 | 当显示历史诊断报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input /path/to/leaf.jpg\n\n# 分析网络植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --url https://example.com/leaf.jpg\n\n# 显示历史诊断报告/显示报告清单列表\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --output result.json\n```\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-plant-nutrient-diagnosis-analysis\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1785363448554\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/ai-analysis/v2/start-common-ai-analysis` - 启动通用 AI 分析任务（植物缺素症视觉诊断）\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` - 植物缺素症视觉诊断\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>\nAnalyzes plant leaf images, videos, or URLs to identify likely nutrient deficiencies, confidence, fertilization direction, 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 users and agents use this skill to submit plant leaf media for nutrient-deficiency diagnosis and retrieve structured cloud analysis results. It is intended for gardening, greenhouse, planter, and plant-factory workflows where users need a likely deficiency class and practical next-step guidance. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Plant images, videos, or URLs are sent to a cloud analysis service. <br>\nMitigation: Use only media that may be shared with the service, avoid sensitive background content, and confirm any retention or deletion expectations before deployment. <br>\nRisk: The skill automatically creates or reuses an identity and stores service tokens in a local SQLite database. <br>\nMitigation: Run in a controlled environment, restrict filesystem access to token storage, and rotate or remove stored credentials when the skill is no longer needed. <br>\nRisk: Cloud report history can be retrieved for the associated identity without clear user confirmation. <br>\nMitigation: Require user confirmation before history retrieval in agent workflows and review returned reports before sharing them further. <br>\nRisk: Nutrient-deficiency results may be uncertain or incomplete, especially when symptoms resemble plant disease or when image quality is poor. <br>\nMitigation: Treat outputs as decision support, verify with plant species context and soil testing, and consult an agricultural expert before applying specific treatments. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-plant-nutrient-diagnosis-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:** [Structured text or JSON rendered in Markdown, with optional saved report files and report links.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include cloud report-history listings and exported report image links.] <br>\n\n## Skill Version(s): <br>\n1.0.5 (source: server-resolved release metadata; artifact frontmatter says 1.0.6) <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, 40910 bytes\n\nFiles: references/api_doc.md (681b), scripts/__init__.py (63b), scripts/config.py (680b), scripts/config.yaml (3b), scripts/skill.py (576b), scripts/smyx_plant_nutrient_diagnosis_analysis.py (3462b), skill-card.md (2787b), SKILL.md (16079b), 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 (157b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: \"smyx-plant-nutrient-diagnosis-analysis\"\ndescription: \"AI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale green/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common deficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium, iron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization. Scenarios: smart planters, home gardening, agricultural greenhouses, plant factories. | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\"\nversion: \"1.0.5\"\nlicense: \"MIT-0\"\n---\n\n# 🧪 Plant Nutrient Deficiency Diagnosis | 植物缺素症视觉诊断\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **植物缺素症视觉诊断** |\n| 🎯 核心目标 | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` |\n\nAI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale\ngreen/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common\ndeficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium,\niron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization.\nScenarios: smart planters, home gardening, agricultural greenhouses, plant factories.\n\n通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的植物营养学AI。你的任务是分析植物叶片的图像（老叶或新叶），识别叶片颜色异常、形态畸变、失绿分布等特征，与常见缺素症状进行比对，输出最可能缺乏的营养元素类型。不要提供具体化肥浓度，仅输出缺素诊断结果及置信度。 ** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n通过植物叶片高清图像进行缺素症视觉诊断，输出最可能缺乏的营养元素类型、置信度及施肥方向建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 叶片颜色异常检测 |\n| 2 | 叶脉间失绿识别 |\n| 3 | 叶缘焦枯检测 |\n| 4 | 老叶/新叶症状区分 |\n| 5 | 常见缺素症比对（氮/磷/钾/铁/镁/锌/钙/硼/锰/铜/硫等） |\n| 6 | 置信度评分 |\n| 7 | 施肥方向建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供植物叶片图像或视频需要缺素诊断时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要植物营养诊断时，提及缺素、黄叶、叶缘焦枯、叶脉间失绿、缺氮、缺磷、缺钾、缺铁、缺镁、植物营养不良、叶片发黄等关键词，并且上传了图像或视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史缺素诊断报告、历史植物营养报告、缺素症报告清单、显示所有缺素报告、查询植物营养诊断记录 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_plant_nutrient_diagnosis_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 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行缺素诊断 | 调用 `-m scripts.smyx_plant_nutrient_diagnosis_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## 🌿 常见植物缺素症状对照表\n\n| 缺乏元素     | 典型症状                  | 症状部位 | 易发植物       |\n|----------|-----------------------|------|------------|\n| 🟡 氮(N)  | 老叶均匀黄化、植株矮小、生长缓慢      | 老叶先发 | 叶菜类、玉米、草坪  |\n| 🟣 磷(P)  | 叶片暗绿/紫红色、根系发育差、开花延迟   | 老叶先发 | 豆科、玉米、番茄   |\n| 🟤 钾(K)  | 老叶叶缘焦枯、叶尖褐变、抗逆性下降     | 老叶先发 | 马铃薯、番茄、烟草  |\n| 🟢 铁(Fe) | 新叶叶脉间失绿（黄化）、叶脉仍绿（网纹状） | 新叶先发 | 喜酸植物、柑橘、杜鹃 |\n| 🟡 镁(Mg) | 老叶叶脉间失绿、叶片卷曲、提早脱落     | 老叶先发 | 番茄、葡萄、玫瑰   |\n| ⚪ 锌(Zn)  | 新叶小而簇生（小叶病）、节间缩短      | 新叶先发 | 玉米、苹果、柑橘   |\n| 🟤 钙(Ca) | 新叶畸形/卷曲、生长点坏死、裂果      | 新叶先发 | 番茄（脐腐病）、苹果 |\n| 🟡 硼(B)  | 生长点死亡、花器发育不良、茎干裂开     | 新叶先发 | 油菜、甜菜、花椰菜  |\n| 🟢 锰(Mn) | 新叶叶脉间失绿（与缺铁相似但更细碎）    | 新叶先发 | 燕麦、大豆、苹果   |\n| 🟤 铜(Cu) | 新叶失绿萎蔫、叶尖发白卷曲         | 新叶先发 | 小麦、柑橘、洋葱   |\n| 🟡 硫(S)  | 新叶均匀黄化（与缺氮相似但出现在新叶）   | 新叶先发 | 十字花科、豆科    |\n\n## 🔍 缺素症状识别维度\n\n| 维度   | 观察重点          | 判断意义                                     |\n|------|---------------|------------------------------------------|\n| 症状部位 | 老叶 vs 新叶      | 老叶→移动性元素(N/P/K/Mg)，新叶→非移动性元素(Fe/Ca/B/Zn) |\n| 失绿模式 | 均匀失绿 vs 叶脉间失绿 | 均匀→N/S，叶脉间→Fe/Mg/Mn                      |\n| 颜色变化 | 黄化/紫红/暗绿/白化   | 紫红→P，暗绿→P，白化→Cu                          |\n| 形态畸变 | 小叶/卷曲/畸形/坏死   | 小叶→Zn，卷曲→Ca/Cu，坏死→Ca/B                   |\n| 叶缘特征 | 焦枯/褐变/正常      | 焦枯→K，正常→排除K                              |\n| 叶片质地 | 厚硬/薄软/正常      | 厚硬→缺P，薄软→缺N                              |\n\n## 📊 缺素严重程度分级\n\n| 等级    | 症状表现            | 施肥建议             |\n|-------|-----------------|------------------|\n| 🟢 轻度 | 叶片轻微失绿，局部少量变色   | 补充对应元素水溶肥，叶面喷施   |\n| 🟡 中度 | 叶片明显黄化/变色，面积扩大  | 追施对应元素肥料，根部+叶面双施 |\n| 🟠 重度 | 大面积失绿/畸形，生长严重受阻 | 紧急追肥，咨询农技专家      |\n| 🔴 严重 | 植株濒死，叶片大量枯萎脱落   | 立即综合救治，专业农技指导    |\n\n## 💡 施肥方向参考\n\n| 缺素类型  | 施肥方向                       |\n|-------|----------------------------|\n| 🟡 缺氮 | 追施尿素、高氮复合肥；叶面喷施氨基酸叶面肥      |\n| 🟣 缺磷 | 追施过磷酸钙、磷酸二铵；叶面喷施磷酸二氢钾      |\n| 🟤 缺钾 | 追施硫酸钾、氯化钾；叶面喷施磷酸二氢钾        |\n| 🟢 缺铁 | 叶面喷施EDTA-Fe/硫酸亚铁；调节土壤pH至酸性 |\n| 🟡 缺镁 | 追施硫酸镁、钙镁磷肥；叶面喷施硫酸镁溶液       |\n| ⚪ 缺锌  | 叶面喷施硫酸锌；土壤施用锌肥             |\n| 🟤 缺钙 | 追施硝酸钙、氯化钙；叶面喷施钙肥           |\n| 🟡 缺硼 | 叶面喷施硼砂/硼酸溶液；土壤施用硼肥         |\n| 🟢 缺锰 | 叶面喷施硫酸锰溶液                  |\n| 🟤 缺铜 | 叶面喷施硫酸铜溶液；注意用量防毒害          |\n| 🟡 缺硫 | 追施含硫肥料（硫酸铵、硫酸钾等）           |\n\n> ⚠️ 本技能仅提供**施肥方向建议**，**不提供具体化肥浓度与用量**；精准施肥需根据植物种类、生长阶段、土壤检测结果咨询农技专家。\n\n## 🔄 与植物病害的区分要点\n\n| 特征  | 缺素症       | 病害          |\n|-----|-----------|-------------|\n| 分布  | 全株对称、规律性强 | 局部散发、不规则    |\n| 进展  | 缓慢渐进      | 可能快速蔓延      |\n| 边界  | 渐变过渡      | 常有明显病斑边界    |\n| 附着物 | 无霉层/孢子    | 可能有霉层/孢子/菌丝 |\n| 传染性 | 不传染       | 可能传染邻近植株    |\n\n> 💡 若叶片同时出现不规则病斑、霉层或孢子堆，可能为病害而非缺素，建议同时使用植物叶片病害识别技能进行交叉验证。\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_plant_nutrient_diagnosis_analysis.py`](scripts/smyx_plant_nutrient_diagnosis_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 |\n| 🔎 使用提醒 | **拍摄要求**：近距离、光线充足、老叶新叶分别拍摄；模糊/逆光/距离过远的图像无法得出可靠结果 |\n| 🧑‍⚖️ 结果性质 | **诊断结果仅供缺素参考，不提供具体化肥浓度与用量**；精准施肥请咨询农技专家 |\n| 🔎 使用提醒 | 部分缺素症状相似（如缺铁与缺锰均表现为叶脉间失绿），AI 识别可能存在不确定性，建议结合植物种类与土壤检测结果综合判断 |\n| 🔎 使用提醒 | 同一叶片可能存在多种元素同时缺乏，需结合症状综合判定 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，API 服务会自动下载 |\n| 🧑‍⚖️ 结果性质 | 当显示历史诊断报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input /path/to/leaf.jpg\n\n# 分析网络植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --url https://example.com/leaf.jpg\n\n# 显示历史诊断报告/显示报告清单列表\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --output result.json\n```\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-plant-nutrient-diagnosis-analysis\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1784335367543\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/ai-analysis/v2/start-common-ai-analysis` - 启动通用 AI 分析任务（植物缺素症视觉诊断）\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` - 植物缺素症视觉诊断\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>\nDiagnoses likely plant nutrient deficiencies from leaf images or videos, returning structured findings, confidence scores, fertilization direction guidance, 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 users, developers, and gardening or agriculture operators use this skill to analyze plant leaf media for likely nutrient deficiencies and retrieve prior diagnosis reports. It supports smart planters, home gardening, greenhouses, and plant factory workflows where users need diagnostic guidance without exact fertilizer concentration recommendations. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill uploads plant media and report metadata to the publisher's remote service. <br>\nMitigation: Use only with media that may be shared with the publisher's service, and avoid sensitive workspace or personal data in inputs. <br>\nRisk: The skill can create or reuse a local account identity and store tokens or report context in the workspace. <br>\nMitigation: Review token storage and user separation before using it in shared workspaces. <br>\nRisk: Historical report retrieval can be triggered automatically and may expose prior report data. <br>\nMitigation: Review who can invoke history queries and confirm the workspace is appropriate for report retrieval. <br>\nRisk: Nutrient deficiency symptoms can overlap with plant disease or multiple simultaneous deficiencies. <br>\nMitigation: Treat results as reference guidance and combine them with plant context, soil testing, and qualified agricultural advice. <br>\n\n\n## Reference(s): <br>\n- [API documentation](references/api_doc.md) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-plant-nutrient-diagnosis-analysis) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Analysis, Markdown, JSON, Shell commands, Guidance] <br>\n**Output Format:** [Markdown or JSON structured diagnosis report with confidence scores, recommendations, and report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May write the returned report to a user-specified output file.] <br>\n\n## Skill Version(s): <br>\n1.0.4 (source: server release metadata; artifact frontmatter reports 1.0.5) <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.4:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.4:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.3: 31 files, 40824 bytes\n\nFiles: references/api_doc.md (681b), scripts/__init__.py (63b), scripts/config.py (680b), scripts/config.yaml (3b), scripts/skill.py (576b), scripts/smyx_plant_nutrient_diagnosis_analysis.py (3462b), skill-card.md (2609b), SKILL.md (16079b), 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 (157b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: \"smyx-plant-nutrient-diagnosis-analysis\"\ndescription: \"AI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale green/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common deficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium, iron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization. Scenarios: smart planters, home gardening, agricultural greenhouses, plant factories. | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\"\nversion: \"1.0.4\"\nlicense: \"MIT-0\"\n---\n\n# 🧪 Plant Nutrient Deficiency Diagnosis | 植物缺素症视觉诊断\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **植物缺素症视觉诊断** |\n| 🎯 核心目标 | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` |\n\nAI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale\ngreen/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common\ndeficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium,\niron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization.\nScenarios: smart planters, home gardening, agricultural greenhouses, plant factories.\n\n通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的植物营养学AI。你的任务是分析植物叶片的图像（老叶或新叶），识别叶片颜色异常、形态畸变、失绿分布等特征，与常见缺素症状进行比对，输出最可能缺乏的营养元素类型。不要提供具体化肥浓度，仅输出缺素诊断结果及置信度。 ** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n通过植物叶片高清图像进行缺素症视觉诊断，输出最可能缺乏的营养元素类型、置信度及施肥方向建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 叶片颜色异常检测 |\n| 2 | 叶脉间失绿识别 |\n| 3 | 叶缘焦枯检测 |\n| 4 | 老叶/新叶症状区分 |\n| 5 | 常见缺素症比对（氮/磷/钾/铁/镁/锌/钙/硼/锰/铜/硫等） |\n| 6 | 置信度评分 |\n| 7 | 施肥方向建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供植物叶片图像或视频需要缺素诊断时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要植物营养诊断时，提及缺素、黄叶、叶缘焦枯、叶脉间失绿、缺氮、缺磷、缺钾、缺铁、缺镁、植物营养不良、叶片发黄等关键词，并且上传了图像或视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史缺素诊断报告、历史植物营养报告、缺素症报告清单、显示所有缺素报告、查询植物营养诊断记录 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_plant_nutrient_diagnosis_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 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行缺素诊断 | 调用 `-m scripts.smyx_plant_nutrient_diagnosis_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## 🌿 常见植物缺素症状对照表\n\n| 缺乏元素     | 典型症状                  | 症状部位 | 易发植物       |\n|----------|-----------------------|------|------------|\n| 🟡 氮(N)  | 老叶均匀黄化、植株矮小、生长缓慢      | 老叶先发 | 叶菜类、玉米、草坪  |\n| 🟣 磷(P)  | 叶片暗绿/紫红色、根系发育差、开花延迟   | 老叶先发 | 豆科、玉米、番茄   |\n| 🟤 钾(K)  | 老叶叶缘焦枯、叶尖褐变、抗逆性下降     | 老叶先发 | 马铃薯、番茄、烟草  |\n| 🟢 铁(Fe) | 新叶叶脉间失绿（黄化）、叶脉仍绿（网纹状） | 新叶先发 | 喜酸植物、柑橘、杜鹃 |\n| 🟡 镁(Mg) | 老叶叶脉间失绿、叶片卷曲、提早脱落     | 老叶先发 | 番茄、葡萄、玫瑰   |\n| ⚪ 锌(Zn)  | 新叶小而簇生（小叶病）、节间缩短      | 新叶先发 | 玉米、苹果、柑橘   |\n| 🟤 钙(Ca) | 新叶畸形/卷曲、生长点坏死、裂果      | 新叶先发 | 番茄（脐腐病）、苹果 |\n| 🟡 硼(B)  | 生长点死亡、花器发育不良、茎干裂开     | 新叶先发 | 油菜、甜菜、花椰菜  |\n| 🟢 锰(Mn) | 新叶叶脉间失绿（与缺铁相似但更细碎）    | 新叶先发 | 燕麦、大豆、苹果   |\n| 🟤 铜(Cu) | 新叶失绿萎蔫、叶尖发白卷曲         | 新叶先发 | 小麦、柑橘、洋葱   |\n| 🟡 硫(S)  | 新叶均匀黄化（与缺氮相似但出现在新叶）   | 新叶先发 | 十字花科、豆科    |\n\n## 🔍 缺素症状识别维度\n\n| 维度   | 观察重点          | 判断意义                                     |\n|------|---------------|------------------------------------------|\n| 症状部位 | 老叶 vs 新叶      | 老叶→移动性元素(N/P/K/Mg)，新叶→非移动性元素(Fe/Ca/B/Zn) |\n| 失绿模式 | 均匀失绿 vs 叶脉间失绿 | 均匀→N/S，叶脉间→Fe/Mg/Mn                      |\n| 颜色变化 | 黄化/紫红/暗绿/白化   | 紫红→P，暗绿→P，白化→Cu                          |\n| 形态畸变 | 小叶/卷曲/畸形/坏死   | 小叶→Zn，卷曲→Ca/Cu，坏死→Ca/B                   |\n| 叶缘特征 | 焦枯/褐变/正常      | 焦枯→K，正常→排除K                              |\n| 叶片质地 | 厚硬/薄软/正常      | 厚硬→缺P，薄软→缺N                              |\n\n## 📊 缺素严重程度分级\n\n| 等级    | 症状表现            | 施肥建议             |\n|-------|-----------------|------------------|\n| 🟢 轻度 | 叶片轻微失绿，局部少量变色   | 补充对应元素水溶肥，叶面喷施   |\n| 🟡 中度 | 叶片明显黄化/变色，面积扩大  | 追施对应元素肥料，根部+叶面双施 |\n| 🟠 重度 | 大面积失绿/畸形，生长严重受阻 | 紧急追肥，咨询农技专家      |\n| 🔴 严重 | 植株濒死，叶片大量枯萎脱落   | 立即综合救治，专业农技指导    |\n\n## 💡 施肥方向参考\n\n| 缺素类型  | 施肥方向                       |\n|-------|----------------------------|\n| 🟡 缺氮 | 追施尿素、高氮复合肥；叶面喷施氨基酸叶面肥      |\n| 🟣 缺磷 | 追施过磷酸钙、磷酸二铵；叶面喷施磷酸二氢钾      |\n| 🟤 缺钾 | 追施硫酸钾、氯化钾；叶面喷施磷酸二氢钾        |\n| 🟢 缺铁 | 叶面喷施EDTA-Fe/硫酸亚铁；调节土壤pH至酸性 |\n| 🟡 缺镁 | 追施硫酸镁、钙镁磷肥；叶面喷施硫酸镁溶液       |\n| ⚪ 缺锌  | 叶面喷施硫酸锌；土壤施用锌肥             |\n| 🟤 缺钙 | 追施硝酸钙、氯化钙；叶面喷施钙肥           |\n| 🟡 缺硼 | 叶面喷施硼砂/硼酸溶液；土壤施用硼肥         |\n| 🟢 缺锰 | 叶面喷施硫酸锰溶液                  |\n| 🟤 缺铜 | 叶面喷施硫酸铜溶液；注意用量防毒害          |\n| 🟡 缺硫 | 追施含硫肥料（硫酸铵、硫酸钾等）           |\n\n> ⚠️ 本技能仅提供**施肥方向建议**，**不提供具体化肥浓度与用量**；精准施肥需根据植物种类、生长阶段、土壤检测结果咨询农技专家。\n\n## 🔄 与植物病害的区分要点\n\n| 特征  | 缺素症       | 病害          |\n|-----|-----------|-------------|\n| 分布  | 全株对称、规律性强 | 局部散发、不规则    |\n| 进展  | 缓慢渐进      | 可能快速蔓延      |\n| 边界  | 渐变过渡      | 常有明显病斑边界    |\n| 附着物 | 无霉层/孢子    | 可能有霉层/孢子/菌丝 |\n| 传染性 | 不传染       | 可能传染邻近植株    |\n\n> 💡 若叶片同时出现不规则病斑、霉层或孢子堆，可能为病害而非缺素，建议同时使用植物叶片病害识别技能进行交叉验证。\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_plant_nutrient_diagnosis_analysis.py`](scripts/smyx_plant_nutrient_diagnosis_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 |\n| 🔎 使用提醒 | **拍摄要求**：近距离、光线充足、老叶新叶分别拍摄；模糊/逆光/距离过远的图像无法得出可靠结果 |\n| 🧑‍⚖️ 结果性质 | **诊断结果仅供缺素参考，不提供具体化肥浓度与用量**；精准施肥请咨询农技专家 |\n| 🔎 使用提醒 | 部分缺素症状相似（如缺铁与缺锰均表现为叶脉间失绿），AI 识别可能存在不确定性，建议结合植物种类与土壤检测结果综合判断 |\n| 🔎 使用提醒 | 同一叶片可能存在多种元素同时缺乏，需结合症状综合判定 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，API 服务会自动下载 |\n| 🧑‍⚖️ 结果性质 | 当显示历史诊断报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input /path/to/leaf.jpg\n\n# 分析网络植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --url https://example.com/leaf.jpg\n\n# 显示历史诊断报告/显示报告清单列表\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --output result.json\n```\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-plant-nutrient-diagnosis-analysis\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1783706612531\n}\n\nFile v1.0.3: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/ai-analysis/v2/start-common-ai-analysis` - 启动通用 AI 分析任务（植物缺素症视觉诊断）\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` - 植物缺素症视觉诊断\n\nFile v1.0.3: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.3:scripts/config.yaml\n\n{}\n\nFile v1.0.3:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.3: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.3: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.3: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.3:skill-card.md\n\n## Description: <br>\nDiagnoses likely plant nutrient deficiencies from plant leaf images, videos, local files, or URLs and returns structured findings with confidence and fertilization-direction guidance. <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>\nGardeners, greenhouse operators, plant-factory teams, and agent builders use this skill to analyze plant leaf media for likely nutrient deficiencies and retrieve prior cloud-stored diagnosis reports. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill may send plant images, videos, or provided URLs to the publisher's cloud service for analysis. <br>\nMitigation: Use only inputs that are acceptable to share with the publisher's cloud service, and avoid sensitive files or private intranet URLs. <br>\nRisk: The skill can create or reuse a local identity and token cache to support report history. <br>\nMitigation: Review and clear the workspace data directory when persistent account linkage or historical report access is not desired. <br>\nRisk: Cloud-backed report history may expose prior analysis records associated with the local identity. <br>\nMitigation: Install and run the skill only where the publisher's cloud report history behavior is acceptable for the intended users. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-plant-nutrient-diagnosis-analysis) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [Plant nutrient diagnosis API documentation](references/api_doc.md) <br>\n- [Shared analysis API documentation](skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, JSON, guidance] <br>\n**Output Format:** [Markdown summary or JSON result, optionally written to a file] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Can include likely deficient nutrient, confidence score, diagnosis details, fertilization-direction guidance, report links, and historical report listings.] <br>\n\n## Skill Version(s): <br>\n1.0.3 (source: server release metadata; artifact frontmatter declares 1.0.4) <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.3:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.3:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3","readmeExcerpt":"Skill: Plant Nutrient Deficiency Diagnosis | 植物缺素症视觉诊断 Owner: smyx-sunjinhui Summary: AI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale green/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common deficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, p","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.smyx_plant_nutrient_diagnosis_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input /path/to/leaf.jpg\n\n# 分析网络植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --url https://example.com/leaf.jpg\n\n# 显示历史诊断报告/显示报告清单列表\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --output result.json"},{"language":"bash","snippet":"python -m scripts.smyx_plant_nutrient_diagnosis_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input /path/to/leaf.jpg\n\n# 分析网络植物叶片图像\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --url https://example.com/leaf.jpg\n\n# 显示历史诊断报告/显示报告清单列表\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_plant_nutrient_diagnosis_analysis --input leaf.jpg --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"smyx-plant-nutrient-diagnosis-analysis\"\ndescription: \"AI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale green/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common deficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium, iron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization. Scenarios: smart planters, home gardening, agricultural greenhouses, plant factories. | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 🧪 Plant Nutrient Deficiency Diagnosis | 植物缺素症视觉诊断\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **植物缺素症视觉诊断** |\n| 🎯 核心目标 | 通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` |\n\nAI-powered plant nutrient deficiency diagnosis from leaf images. Detects leaf color, morphology changes (pale\ngreen/yellow-green/purple-red, marginal scorch, interveinal chlorosis) via computer vision, matches against common\ndeficiency symptom databases, and outputs the most likely deficient nutrient element (nitrogen, phosphorus, potassium,\niron, magnesium, zinc, etc.) with confidence score. Enables precision fertilization, avoids blind over-fertilization.\nScenarios: smart planters, home gardening, agricultural greenhouses, plant factories.\n\n通过智能花盆、农业大棚或手机拍摄的植物叶片高清图像，利用AI视觉分析技术识别叶片颜色、形态变化（如叶色浅绿/黄绿/紫红、叶缘焦枯、叶脉间失绿等），与常见营养缺乏症特征库比对，输出最可能缺乏的营养元素（氮、磷、钾、铁、镁、锌等）及置信度。有助于精准施肥，避免盲目用肥造成浪费或伤害。应用场景：智能花盆、家庭园艺、农业大棚、植物工厂。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的植物营养学AI。你的任务是分析植物叶片的图像（老叶或新叶），识别叶片颜色异常、形态畸变、失绿分布等特征，与常见缺素症状进行比对，输出最可能缺乏的营养元素类型。不要提供具体化肥浓度，仅输出缺素诊断结果及置信度。 ** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n通过植物叶片高清图像进行缺素症视觉诊断，输出最可能缺乏的营养元素类型、置信度及施肥方向建议\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 叶片颜色异常检测 |\n| 2 | 叶脉间失绿识别 |\n| 3 | 叶缘焦枯检测 |\n| 4 | 老叶/新叶症状区分 |\n| 5 | 常见缺素症比对（氮/磷/钾/铁/镁/锌/钙/硼/锰/铜/硫等） |\n| 6 | 置信度评分 |\n| 7 | 施肥方向建议 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供植物叶片图像或视频需要缺素诊断时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要植物营养诊断时，提及缺素、黄叶、叶缘焦枯、叶脉间失绿、缺氮、缺磷、缺钾、缺铁、缺镁、植物营养不良、叶片发黄等关键词，并且上传了图像或视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史缺素诊断报告、历史植物营养报告、缺素症报告清单、显示所有缺素报告、查询植物营养诊断记录 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-plant-nutrient-diagnosis-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1790952206163\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/ai-analysis/v2/start-common-ai-analysis` - 启动通用 AI 分析任务（植物缺素症视觉诊断）\n2. `/web/ai-analysis/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_PLANT_NUTRIENT_DIAGNOSIS_ANALYSIS` - 植物缺素症视觉诊断"},{"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":928,"uniquenessScore":44,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T02:30:35.150Z","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-10T02:30:35.150Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T09:09:36.584Z","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"}]}}}