agentleFS
MJorginMJorgin/dsh-media-skills/skills/vision-review/SKILL.md

vision-review

Skill25 starsChanged 57 days agoMITView on GitHub

图像理解、OCR 与截图视觉 QA。用户要求分析、识别、描述图片或截图,检查 UI 文字重叠、溢出、错位、水印、Logo 或视觉 bug,或输出结构化视觉证据时使用。通过用户自配的智谱 GLM-4V-Flash、可选 DeepSeek、SiliconFlow、SenseNova、Gemini 或 OpenAI 兼容引擎故障转移;密钥只从环境变量、DSH 凭据或本地 secrets 读取。

  • Reads credentials
  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. CarriedWorldUniverse/nexus★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

Files
SKILL.md

Vision Review(读图 / OCR / 视觉检查)

用于显式视觉审查工作流:截图 QA、图片内容描述、OCR、水印/Logo 检测、界面布局问题检查,以及给程序化流程输出结构化证据。

DSH 桌面端 0.2.0-rc.2 / v0.1.6+ 兼容性:原生图片附件要求当前会话模型的 inputModalities 包含 image;默认 deepseek-flash 支持图片。纯文本模型会拒绝附件(MODEL_DOES_NOT_SUPPORT_IMAGES),不会触发旧版“自动转写成文字再喂给当前模型”的管道。此时可切换到视觉模型路由,或把本地图片路径传给本技能脚本进行审查。上游最新 tag dsh-v0.2.1-alpha.2 的源码仍保留这套 provider/附件契约。本技能适合需要脚本、故障转移链或 JSON 证据时使用。

用法

从本技能目录运行:

python3 scripts/vision.py <图片路径...> [--prompt="..."] [--provider=NAME] [--structured] [--doctor]

常用示例:

python3 scripts/vision.py screenshot.png
python3 scripts/vision.py a.png b.png --structured
python3 scripts/vision.py page.png --provider=siliconflow-qwen
python3 scripts/vision.py page.png --prompt="检查标题、按钮和图表是否重叠,并指出位置"
python3 scripts/vision.py --doctor

行为

  • 可一次传多张图;每张图会压缩成 JPEG,边长随批内张数自适应:1–2 张 1024px,3–4 张 768px,5 张 512px。
  • GLM-4V-Flash 单请求最多 5 张图;超过 5 张自动分批。
  • 默认 prompt 检查渲染完整性、文字重叠/溢出/错位、配色层次、水印和明显视觉 bug。
  • --structured 输出结构化 JSON:summary、ocr.full_text、layout.regions、semantics、visual、uncertainty;多批时输出 results 数组。
  • --provider=NAME 固定单个引擎,不做故障转移。可用名包括 zhipu-glm、deepseek、siliconflow-qwen、sensenova、gemini 和自定义 fallback 名称。
  • --doctor 检查 Pillow、已配置 key、候选模型和端点连通性。遇到引擎异常时先运行它。

引擎链

脚本按以下顺序尝试;可选引擎只有检测到对应 key 时才加入:

  1. 智谱 glm-4v-flash(主引擎,GLM_API_KEY;输出上限 1024)。
  2. DeepSeek 视觉模型(DEEPSEEK_API_KEY,付费可选;默认 deepseek-v4-flash-vision-exp,可用 DEEPSEEK_VISION_MODEL 覆盖)。
  3. SiliconFlow Qwen3-VL(SILICONFLOW_API_KEY;默认 Qwen/Qwen3-VL-8B-Instruct,可用 SILICONFLOW_VISION_MODEL 覆盖)。
  4. SenseNova(SENSENOVA_API_KEY;默认 sensenova-6.8-flash-lite,可用 SENSENOVA_VISION_MODEL 覆盖)。
  5. Gemini OpenAI-compatible endpoint(GEMINI_API_KEY;默认 gemini-3.6-flash,可用 GEMINI_MODEL 覆盖)。
  6. VISION_FALLBACKS 中声明的任意 OpenAI 兼容多模态引擎。

VISION_FALLBACKS 是 JSON 数组,每项包含 name、baseUrl、model,可选 apiKeyEnv、maxTokens、jsonObject。

密钥来源

按顺序读取:

  1. 进程环境变量;
  2. ~/.dsh/secrets/media-tools.env;
  3. ~/.codex/secrets/media-tools.env(历史兼容);
  4. ~/.dsh/.credentials.yaml 中的顶层 key 或 refs 子映射。

Secrets 文件每行一个 KEY=value,建议权限 600。永远不要把 key 提交到仓库、写入技能文件或粘贴到公开产物中。

网络和隐私

  • 图片只发送给实际调用的服务商 API;本仓库和插件本身不提供中转端点。
  • Gemini 可通过 GEMINI_PROXY 或 HTTPS_PROXY 走代理;其他引擎仍可直连。
  • Google AI Studio 免费档的数据条款可能允许用请求改进产品;内部文档、证件、客户资料等敏感图片应优先使用组织批准的国内引擎。
  • 不要在公开仓库或摘要中复现图片里的个人信息、证件号、电话、客户数据或内部材料。

依赖

Python 3.9+。图片压缩使用 Pillow;缺失时脚本会提示安装:

python3 -m pip install Pillow

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.