glm-vision
Skill32 starsChanged 6 days agoMITView on GitHub
智谱 GLM-5.3-flash 视觉理解 CLI。输入图片(本地路径 / URL / 多图)+ 提问,输出文字或 JSON 分析。模型、端点、API Key 全部走 config.json 可换。用于截图理解、图表解读、图片问答、OCR 式提取。
- Reads credentials
In this repository20 other files it gives its agents.
- baidu-hot-cnSkill
- coze_workflowSkill
- douyin-hot-trendSkill
- ec_creatorSkill
- geopulseSkill
- glm-asrSkill
- image_gen_cozeSkill
- longtask_systemSkill
- minimax-avSkill
- rss_fetcherSkill
- scribeSkill
- skills-hubSkill
- style-fingerprintSkill
- toutiao-news-trendsSkill
- web-region-captureSkill
- weibo-hot-searchSkill
- weibo-publisherSkill
- weixin-connectorSkill
- xhs-dlSkill
- zhihu-fetcherSkill
The file
Files
glm-vision 视觉理解
场景
- 截图/界面理解(UI 描述、元素识别、转代码前置分析)
- 图表/数据图解读
- 图片内容问答、信息提取(--json 结构化输出)
- 多图对比(≤5 张)
触发条件
用户给出图片(路径或 URL)并要求理解、描述、分析或提取信息时。
输入
- 图片:本地路径(自动转 Base64)或 URL(智谱服务端拉取);jpg/png/webp/gif,单张 ≤10MB
- 视频:本地文件(mp4/mov/avi/mkv/webm,≤50MB,自动转 Base64)或 URL 直传
- 提问:
--prompt(默认"详细描述这张图片的内容") --json:要求模型只输出合法 JSON--max-tokens N:覆盖 config(reasoning 也占此预算,复杂问题适当调大)--download:图片 URL 强制本地下载转 Base64(智谱服务端拉取国外源失败时用)
步骤
- 确认图片路径/URL 有效
python3 scripts/glm_vision.py <图片...> [--prompt "..."] [--json]- stdout 取结果;stderr 看诊断(--show-usage 可打印 token 用量与延迟)
判断标准
- 输出为空 → stderr 会有明确错误(401 key / 429 限流 / 空回答提示加大 max_tokens)
- 多图 >5 张会提示质量风险
输出
stdout:模型回答文本(或 JSON 字符串)。错误写 stderr 且退出码非 0。
异常处理
| 症状 | 处理 |
| 401 | key 无效 → 检查 config.json 或环境变量 GLM_VISION_API_KEY |
| 429 | 限流(实测上限约 5 QPS)→ 间隔 1-2s 重试 |
| 1210 图片解析错误 | 图片文件损坏或非图片(先 magic bytes 验证);或 URL 是国外源智谱拉不动 → 加 --download |
| URL 图报"type 参数非法" | 智谱服务端拉取该 URL 失败的误导性报错(多为国外源)→ 加 --download 本地下载 |
| 空回答 | max_tokens 被 reasoning 吃满 → 加大 max_tokens |
实测边界(2026-09-02)
- URL 直传依赖智谱服务端能访问目标 URL:国内源(bigmodel.cn CDN 等)稳定通过;国外源(httpbin.org/wikimedia)拉取失败(报 1210 或误导性的"type 参数非法")——此时加
--download自动绕过 - 视频:
video_url块,Base64 Data URL 和 URL 直传均可用(Base64 实测通过)
数据回流
2026-09-02 实测:content 多为 null,正文在 reasoning_content(thinking 默认 enabled)——脚本已内置兼容(content 非空时优先)。若智谱未来修复,无需改代码。
版本
v1.2 · 2026-09-02 · 视频支持(video_url)+ URL 策略修正(国外源自动降级) v1.0/v1.1 · 2026-09-02 · 项项(skill-creator-exflower 流程)
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
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.

