资讯动态

让你的deepseek V4也能看懂图片:describe-image-skill推荐

发布时间:2026/8/9 5:10:38 来源:尧图企业网站定制
让你的deepseek V4也能看懂图片describe-image-skill推荐项目地址https://github.com/foorgange/describe-image-skilldescribe-imageLet non-vision models “see” images: hand the image to a separate vision model, get its description as text, and let your host model answer from that text.让没有视觉能力的模型也能看懂图片把图片交给一个独立的视觉模型转述成文字再由你的宿主模型基于这段文字回答。目前实测支持claude code和 opencodeIf your model does not accept images (e.g. DeepSeek, some local models), pasted screenshots only appear to you as[Image: ...]/[Unsupported Image]placeholders — you never see the pixels. This skill is built for exactly that case: it forwards the image to a vision model (SiliconFlow / OpenAI / Ollama / any OpenAI-compatible endpoint) and returns the recognition result as plain text that you can reason over.如果你的模型不接收图片例如 DeepSeek、部分本地模型用户在对话里粘贴截图时你只能看到[Image: ...]、[Unsupported Image]这类占位符看不到像素。这个技能就是为这种情况准备的它把图片交给一个视觉模型SiliconFlow / OpenAI / Ollama / 任意 OpenAI 兼容端点把识别结果以纯文本返回你再用这段文本回答用户。Use cases: screenshot content recognition, transcribing text inside images, UI description, interpreting charts / documents / photos, and any “what is in this image” question.适用场景截图内容识别、图片里的文字转录、UI 界面描述、图表/文档/照片解读以及一切图片里有什么的问题。Why / 为什么需要它Your host model has no vision capability (DeepSeek, certain local models, etc.).你的宿主模型没有视觉能力DeepSeek、某些本地模型等。The user pasted an image, but all you get is a placeholder; the actual pixels only live in the session transcript.用户粘贴了图片但你能拿到的只是占位符文本图片本体只在底层会话记录里。You do not want to switch models over a single image — you just want to call a vision model on demand.你不想因为一张图换掉整个模型只想在需要的时候临时调用一个视觉模型。This skill does not require you to change models or to have a host that supports images. It only requires Python 3.8 and a reachable vision-model endpoint.本技能不要求你换模型、不要求宿主环境支持图片只要求本机有 Python 3.8 和一个可用的视觉模型端点。Features / 特性Supports any OpenAI-compatible/chat/completionsendpoint, with built-in presets: SiliconFlow, OpenAI, Moonshot/Kimi, Zhipu, Alibaba Cloud (DashScope), and local Ollama.支持任意 OpenAI 兼容的/chat/completions端点内置常见平台预设SiliconFlow、OpenAI、Moonshot/Kimi、智谱、阿里云百炼以及本地 Ollama。Interactive first-run wizard--setupthat writesconfig.json.首次使用有交互式配置向导--setup自动写入config.json。Three image sources:支持三种图片来源Explicit local path or URL.显式传入本地路径或 URL。Auto-extract pasted images from recent session transcripts (Claude Code and opencode).自动从最近的会话记录transcript提取粘贴的图片——Claude Code 与 opencode 都支持。Fallback to opencode’s pasted-image drop directory.opencode 粘贴图片的落盘目录兜底。Pure Python standard library, zero third-party dependencies.纯 Python 标准库零第三方依赖。Config precedence: environment variables config.json built-in defaults.配置优先级环境变量 config.json 内置默认值。Installation / 安装Clone (or copy) this repo into your skills directory. For Claude Code, the skills directory is~/.claude/skills/:把本仓库克隆或复制到你的技能目录。以 Claude Code 为例技能目录是~/.claude/skills/# Clone into the skills directory / 用 git 克隆到技能目录cd ~\.claude\skills git clone https://github.com/foorgange/describe-image-skill.git describe-imageFor opencode, the skills directory is~/.config/opencode/skills/— put thedescribe-imagefolder there (or rely on shared skills under~/.claude/skills, depending on whether your opencode version scans that directory).对于 opencode技能目录是~/.config/opencode/skills/同样把describe-image这个文件夹放进去即可或用~/.claude/skills下的共享技能取决于你的 opencode 版本是否扫描该目录。Expected layout / 装好后确认目录结构describe-image/ ├── SKILL.md # Skill instructions (read by the host model) / 技能说明宿主模型读取 ├── describe_image.py # Transcription script / 转述脚本 ├── config.json # Your config (contains API key, not committed) / 你的配置含 API Key不入库 ├── config.example.json # Config template / 配置模板 └── README.mdConfiguration / 配置First-run wizard / 首次配置向导cd ~\.claude\skills\describe-image python describe_image.py--setupThe wizard asks, in order / 向导会依次询问Vision-model provider (SiliconFlow / OpenAI / Moonshot / Zhipu / DashScope / Ollama / custom).视觉模型平台SiliconFlow / OpenAI / Moonshot / 智谱 / 阿里云百炼 / Ollama / 自定义。Base URL (has a default — press Enter to accept).Base URL有默认值直接回车即可。Vision model name (has a default; change it as needed).视觉模型名有默认值可改。API key (not echoed). Not required when Ollama is selected.API Key不回显。选择 Ollama 时不需要 Key。The config is written toconfig.jsonin the skill directory.This file is excluded by.gitignoreand will never be committed.配置写入技能目录下的config.json。这个文件已被.gitignore排除不会被提交。You can also configure via environment variables (highest precedence, handy when you do not want the key in a file):也可以用环境变量覆盖优先级最高适合不想把 Key 写进文件的情况$env:DESCRIBE_IMAGE_BASE_URL https://api.siliconflow.cn/v1$env:DESCRIBE_IMAGE_API_KEY sk-...$env:DESCRIBE_IMAGE_MODEL Qwen/Qwen3-VL-30B-A3B-InstructVerify the config / 验证配置python describe_image.py--testSends a built-in test image to the endpoint to confirm that the URL, key, and model all work.会用内置测试图发一次请求用来确认端点、Key、模型是否都可用。Provider reference / 支持的平台参考值Provider / 平台Base URLExample model / 示例模型Needs key / 需要 KeySiliconFlowhttps://api.siliconflow.cn/v1Qwen/Qwen3-VL-30B-A3B-InstructYes / 是OpenAIhttps://api.openai.com/v1gpt-4o-miniYes / 是Moonshothttps://api.moonshot.cn/v1kimi-latestYes / 是Zhipu AI / 智谱https://open.bigmodel.cn/api/paas/v4glm-4v-flashYes / 是Alibaba DashScope / 阿里云百炼https://dashscope.aliyuncs.com/compatible-mode/v1qwen-vl-plusYes / 是Ollama (local / 本地)http://localhost:11434/v1qwen2.5vl:7bNo / 否The model names above are only defaults — adjust them to what your provider actually offers. Any OpenAI-compatible endpoint can be connected via thecustompreset.表中模型名只是默认值按你实际的可用模型改即可。任何 OpenAI 兼容端点都能用custom预设接入。Usage / 用法Transcribe one image (explicit path) / 转述一张图片显式路径python describe_image.pyC:\path\to\image.pngpython describe_image.pyC:\a.pngC:\b.jpg# multiple images / 多张python describe_image.pyhttps://example.com/x.png# remote URL / 远程 URLTranscribe a pasted image (auto-extract) / 转述粘贴进对话的图片自动提取After you paste an image in your Claude Code / opencode session, run with no image argument:在你的 Claude Code / opencode 会话里粘贴图片后不带任何图片参数直接运行python describe_image.pyThe script scans recent session transcripts, finds the most recently pasted image, and transcribes it. This is the primary way to use the skill when you are facing an[Image: ...]placeholder.脚本会扫描最近的会话记录找到最新粘贴的那张图并转述。这样你在对话里面对[Image: ...]占位符时也能转述——这就是本技能的主要使用方式。With a specific question / 带具体问题python describe_image.py--prompt图里写的什么字请逐字转录Point at a specific transcript / 手动指定会话记录python describe_image.py--transcriptC:\Users\you\.claude\projects\your-project\session.jsonlShow current config (key masked) / 查看当前配置Key 打码python describe_image.py--print-configAuto-trigger in Claude Code / opencodeFirst use: ask your agent to record the routing rule / 首次使用让 agent 把识图路由写进记忆opencode 注意: opencode 的observer子智能体会默认尝试读取图片它假设模型带视觉。本技能是给无视觉模型用的所以opencode 下不会自动触发——需要你首次使用时主动对 agent 说一句话让它把规则写进记忆之后所有会话才会先走本技能识图。opencode note: opencode’sobserversubagent reads images by default (it assumes a vision-capable model). This skill is for non-vision models, soit does not auto-trigger in opencode. On first use, explicitly tell the agent to record the routing rule into memory; only then will every session route image recognition through this skill first.首次使用请主动对 agent 说示例把图片识别统一走 describe-image 技能先转述成文字这条规则写入你的记忆/说明文件以后任何图片都先调用它。For first use, explicitly tell your agent: “record the rule that all image recognition should go through the describe-image skill’s transcription first, so future sessions route images through it.”)On first load, the skill also tries to write a “route images through describe-image first” reminder into your host environment’s memory file on its own — the write is idempotent. In opencode, however, the observer subagent’s default behavior can bypass this, so the explicit first-use instruction above is the reliable path.首次加载时技能也会尝试自行在你的宿主环境记忆文件写入一条图片先走 describe-image 转述的提醒幂等。但 opencode 的 observer 子智能体默认行为会绕过它所以上面那句主动声明才是 opencode 下可靠的做法。自动写入: 从 v1.x 起describe_image.py每次运行都会自动检测 opencode 环境存在~/.config/opencode/并把上面的路由条目幂等写入~/.config/opencode/AGENTS.md已存在则跳过不重复追加文件/目录不存在会自动创建。也就是说只要你在 opencode 里跑过一次python describe_image.py ...规则就已经写进 AGENTS.md 了——上面的首次主动声明从此变成兜底手段而非必需步骤。Claude Code 环境检测不到~/.config/opencode/不会误写。Auto-write: since v1.x, every run ofdescribe_image.pyauto-detects opencode(checks for~/.config/opencode/) andidempotentlyappends the routing entry above to~/.config/opencode/AGENTS.md(skips if already present, never duplicates; creates file/dir if absent). So once you runpython describe_image.py ...inside opencode, the rule is already in AGENTS.md — the manual “first-use statement” above becomes a fallback, not a requirement. In Claude Code the~/.config/opencode/dir does not exist, so nothing is written.How the skill triggers / 技能如何触发本技能通过SKILL.md让宿主模型知道什么时候调用它。The skill usesSKILL.mdto tell the host model when to invoke it:When the user pastes an image, mentions an image path, says “look at this image / what is in this screenshot / recognize this image”, or the message contains[Image: ...],[Unsupported Image],[图片:placeholders, first run the script to transcribe, then answer from the text.用户贴图、提到图片路径、说看图/截图里有什么/识别这张图或者消息里出现[Image: ...]、[Unsupported Image]、[图片:占位符时先运行本脚本转述再基于文字回答。On first load, the skill tries to write a “route images through describe-image first” reminder into your host environment’s memory file, so future sessions do not miss it. The write is idempotent.首次加载技能时会尝试在你的宿主环境记忆文件里写入一条图片先走 describe-image 转述的提醒避免以后漏掉。该写入是幂等的不会重复。If your host environment (e.g. some opencode versions) does not scan~/.claude/skills, put thedescribe-imagefolder into that environment’s own skills directory.如果你的宿主环境例如某些 opencode 版本扫描不到~/.claude/skills把describe-image文件夹放进该环境自己的技能目录即可。How it works / 它是怎么工作的The host model decides “this is an image, but I cannot see it”.宿主模型判定这是一张图但我看不见。Rundescribe_image.py:运行describe_image.pyWith an explicit path/URL, use it.有显式路径/URL 就用它Otherwise, pull the pasted image’s base64 data from the most recent session transcript.否则从最近的会话记录transcript里找到粘贴图片的 base64 数据。The script sends the image and prompt to the vision model (OpenAI-compatible format).脚本把图片和提示词一起发给视觉模型OpenAI 兼容格式。The vision model returns a text description; the script prints it to stdout.视觉模型返回文字描述脚本打印到 stdout。The host model reads that text and answers the user.宿主模型读取这段文字回答用户的问题。How pasted images are located: Claude Code stores pasted images as{type:image,source:{type:base64,...}}inside~/.claude/projects/**/*.jsonlsession transcripts; opencode stores them in transcripts too and also drops image files into%LOCALAPPDATA%\Temp\opencode\. The script checks both locations and uses the newest one.提取粘贴图片的机制Claude Code 会把粘贴的图片以{type:image,source:{type:base64,...}}存在~/.claude/projects/**/*.jsonl会话记录里opencode 除了同样存在 transcript还会把图片落到%LOCALAPPDATA%\Temp\opencode\。脚本两个位置都会找取最新的。Security / 安全config.jsoncontains your API key and is excluded by.gitignore. Confirm the repo has noconfig.jsonbefore committing/pushing.config.json含你的 API Key已在.gitignore排除。提交/推送前请确认仓库里没有config.json。The script never writes the key into logs or responses.脚本不会把 Key 写进日志或响应。Images are sent to the vision endpoint over HTTPS, used only for this transcription, and are not persisted (pasted-image temp files are managed by the host environment).图片通过 HTTPS 发给视觉模型端点仅用于本次转述不落盘粘贴图片的临时文件由宿主环境管理。FAQ / 常见问题“API key not configured” / 提示未配置 API KeyRunpython describe_image.py --setup, or setDESCRIBE_IMAGE_API_KEY.先运行python describe_image.py --setup或设置DESCRIBE_IMAGE_API_KEY。“No image found in transcripts / paste directory” / 提示没在会话记录/粘贴目录中找到图片You have not pasted an image, or it is not in a recent session. Pass an explicit path, or paste the image again and retry.你还没贴图或者图不在最近的会话里。直接传入图片路径或重新粘贴后重试。--testfails /--test失败Check that the Base URL ends with/v1, the model name is valid for your provider, the key has permission, and the network can reach the endpoint.检查 Base URL 是否以/v1结尾、模型名是否对当前平台有效、Key 是否有权限、网络是否能连通该端点。The host model still does not auto-trigger / 宿主模型仍不自动触发转述Make sureSKILL.mdis loaded with the skill directory; if the environment does not scan that directory, move it to the corresponding skills directory. You can also run the script manually in the conversation.确认SKILL.md已随技能目录加载若环境不扫描该目录放到对应技能目录。也可以在对话里手动运行脚本。Development contributing / 开发与贡献Zero third-party dependencies; all logic lives in the single filedescribe_image.py.脚本零第三方依赖逻辑在describe_image.py单文件内。Self-test after changes:python describe_image.py --testand an explicit-path transcription.改动后自测python describe_image.py --test和显式路径转述。Never commitconfig.json.提交时不要带上config.json。Issues / PRs that add new provider presets are welcome.欢迎提 issue / PR 补充新的平台预设。License / 许可MIT

读完文章,也想定制专属网站?

尧图设计师 24 小时内与您沟通定制方案

免费获取报价