病害知识库流程编排技能
v1.0.0病害知识库流程编排技能,负责串联图片检测、特征提取、向量检索、图文匹配全流程,输出完整的病害诊断结果和解决方案。
MIT-0
Security Scan
OpenClaw
Suspicious
high confidencePurpose & Capability
The SKILL.md shows using scripts.orchestrator.DiseasePipeline, but there is no scripts/orchestrator.py in the bundle. The included files are mostly index-building/init scripts, not a runtime orchestrator. Several config paths and model names are present, but the actual provided code does not implement the promised end-to-end pipeline class.
Instruction Scope
SKILL.md usage examples assume a local DiseasePipeline class and local image inputs, but the provided scripts traverse and read absolute workspace directories (e.g. /root/.OpenClaw/workspace/knowledge_base, /root/.OpenClaw/workspace/indexes). The SKILL.md does not mention these workspace-wide reads or cross-skill imports, so the instructions under-describe the actual file reads and system access.
Install Mechanism
No install spec in the registry (instruction-only). SKILL.md recommends pip installing common libraries (pydantic, aiohttp, tenacity). The code will also trigger model downloads via transformers.from_pretrained (Hugging Face) at runtime — network downloads are expected but may be large and should be allowed explicitly.
Credentials
The skill declares no required env vars or credentials, which matches the manifest, but the scripts use hard-coded absolute paths under /root/.OpenClaw/workspace and append that workspace to sys.path to import skills.image_embedding.scripts.embedding — this allows execution of code from other skills and reading arbitrary workspace files despite no explicit credentials.
Persistence & Privilege
always:false and no explicit changes to other skills' configs. However, the code writes index files under workspace paths and imports/executes code from other skills' directories, which increases its effective privilege surface if run in the agent workspace.
What to consider before installing
Key issues to consider before installing:
- Missing runtime: The README shows using scripts.orchestrator.DiseasePipeline, but that file/class is not included — ask the author for the orchestrator implementation.
- Inconsistent paths and dims: Multiple scripts use different index paths and vector dimensions (768 vs 1024) — this will cause runtime errors and indicates sloppy packaging.
- Cross-skill imports and wide file reads: Scripts append /root/.OpenClaw/workspace to sys.path and walk workspace directories to read images/text and metadata. That means the skill can read and execute code from other skills and access arbitrary files in the agent workspace. Confirm you trust the workspace contents.
- Network/model downloads: Transformers.from_pretrained will fetch models from external hosts (Hugging Face). Be prepared for large downloads and verify which models will be fetched.
- Recommended actions: do not run this in an unrestricted production agent. Request the missing orchestrator file and a clear README of which workspace paths are needed. Verify and harmonize index paths/dimensions, remove or document any cross-skill imports, and test in a sandboxed environment with network and filesystem restrictions enabled. If you must run it, inspect the orchestrator implementation and dependent embedding code (skills.image_embedding) first.scripts/build_indexes.py:28
Dynamic code execution detected.
Patterns worth reviewing
These patterns may indicate risky behavior. Check the VirusTotal and OpenClaw results above for context-aware analysis before installing.Like a lobster shell, security has layers — review code before you run it.
latest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
病害知识库流程编排技能
核心功能
- 串联病害检测、图片嵌入、向量检索、文本检索全流程,无需人工干预
- 支持自定义编排规则,适配农作物、工业、建筑等不同场景的诊断需求
- 自动融合图文多模态检索结果,进行rerank排序,输出最匹配的诊断结果
- 支持异步批量处理,单批最大支持1000张图片的并发诊断
- 内置结果校验机制,自动过滤低置信度结果,支持人工审核回调
依赖安装
pip install pydantic>=2.0 aiohttp>=3.8 tenacity>=8.2
使用方式
单图诊断
from scripts.orchestrator import DiseasePipeline
pipeline = DiseasePipeline(config_path="./config/pipeline.yaml")
diagnosis_report = pipeline.run(
image_path="./corn_disease.jpg",
user_query="玉米叶子有黄褐色斑点,背面有霉层是什么病?"
)
批量诊断
reports = pipeline.batch_run(
image_paths=["./img1.jpg", "./img2.jpg"],
queries=["第一个图是什么病", "第二个图怎么防治"]
)
输出格式
返回完整结构化诊断报告,包含:
- 病害基本信息:名称、别名、病原、分类
- 症状描述:典型症状、易发部位
- 发生规律:发病条件、传播途径
- 防治方案:农业防治、物理防治、化学防治、生物防治
- 相似病害参考:3个易混淆病害的区分要点
- 置信度:综合诊断置信度得分(0-1)
- 处理建议:是否需要人工复核
Files
13 totalSelect a file
Select a file to preview.
Comments
Loading comments…
