跪拜 Guibai
← All articles
AI Coding · DeepSeek

Give DeepSeek Eyes: A Zero-Dependency Skill for Screenshots in Claude Code, Codex, and Pi

By princed ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Many developers have switched coding agents to DeepSeek for cost or performance but lose the ability to paste error screenshots and UI mockups. This skill restores that workflow with free infrastructure and zero new dependencies, avoiding the complexity of running a persistent local proxy.

Summary

DeepSeek's official API accepts only text, so coding agents like Claude Code, Codex, and Pi cannot process screenshots when using DeepSeek as the backend. The `glm-vision` skill splits the problem: Zhipu GLM's free Flash vision models act as the eyes, converting local images into text descriptions, while DeepSeek remains the brain for reasoning and code generation. A single Python script using only the standard library handles base64 encoding, retries with exponential backoff, and automatic fallback across a configurable model queue. The skill constrains the agent to run the script before responding, forbidding pixel hallucination. Installation is a symlink and an env file; no extra Python packages, no proxy process, and no changes to DeepSeek's authentication or network path. The trade-off is lossy compression — details the vision model misses cannot be recovered — so the query prompt must carry the user's exact task.

Takeaways
DeepSeek's managed API is text-only and rejects image blocks, so coding agents cannot natively process screenshots.
The skill routes images to Zhipu GLM vision models (glm-4.6v-flash is free) and returns a text description to DeepSeek.
Only Python standard library is used; no pip install required.
Retry logic tries the same model up to 1 + VISION_RETRIES times with exponential backoff before falling back to the next model in the queue.
Format errors (e.g., base64 not supported) stop fallback immediately to avoid hammering every model with a bad request.
Installation is a symlink into the agent's skills directory and a single env file at ~/.config/glm-vision/env.
Pasted images without a file path cannot be handled; the user must save the image first.
The approach is lossy: details the vision model omits are invisible to DeepSeek, so the query prompt must be task-specific.
Conclusions

Separating vision and reasoning across two models is a pragmatic stopgap that works today, but it introduces a single point of descriptive failure — if GLM misreads a critical error code, DeepSeek has no way to double-check.

The design choice to forbid agent-level retry wrapping (no sleep && retry in SKILL.md) is a quiet but important constraint that prevents cascading timeouts when the vision API is already rate-limited.

Prioritizing a free model that supports local base64 at the front of the queue, and demoting an older model that only accepts public URLs to the end, reflects real-world API quirks that documentation alone wouldn't surface.

Concepts & terms
Skill (Claude Code / Codex / Pi)
A directory containing a SKILL.md file that instructs the coding agent when and how to invoke external tools or scripts. The agent reads the skill at startup and follows its constraints during conversations.
Data URL (base64 image)
An inline encoding of a file as a base64 string prefixed with a MIME type (e.g., data:image/png;base64,...), allowing an image to be embedded directly in an HTTP request body without requiring a publicly accessible URL.
Vision proxy
A local intermediary service that intercepts API requests from a coding agent, extracts images, converts them to text via a vision model, and forwards the modified request to the main LLM. It enables paste-to-view but requires changing the agent's base_url and running a persistent process.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗