vision-prep

vision-prep is a skill for Claude Code, Codex from znlgis/my-opencode-deepseek-config. It costs 94 tokens per session (857 once invoked), scanned A, original, MIT.

An image and PDF preparation workflow for making small text and visual details easier for a vision model to read. A vision model is software that interprets images rather than plain text.

In plain words
What is it for?
It helps convert PDF pages to images and split large images into overlapping sections before analysis.
Why use it?
It avoids unreadable details caused by large images being reduced in size and by PDFs that the model cannot accept directly.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit It helps convert PDF pages to images and split large images into overlapping sections before analysis.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/znlgis/my-opencode-deepseek-config/vision-prep
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add znlgis/my-opencode-deepseek-config --skill vision-prep
Clone the repo
git clone --depth 1 https://github.com/znlgis/my-opencode-deepseek-config

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for vision-prep

README.md
[![agentmods](https://agentmods.dev/badge/skills/znlgis/my-opencode-deepseek-config/vision-prep/github.svg)](https://agentmods.dev/skills/znlgis/my-opencode-deepseek-config/vision-prep)
Your own site
<a href="https://agentmods.dev/skills/znlgis/my-opencode-deepseek-config/vision-prep"><img src="https://agentmods.dev/badge/skills/znlgis/my-opencode-deepseek-config/vision-prep/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for vision-prep

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/my-opencode-deepseek-config/vision-prep"><img src="https://agentmods.dev/badge/skills/znlgis/my-opencode-deepseek-config/vision-prep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 857 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00094 $0.00857
Opus 5 $0.00047 $0.00428
Sonnet 5 $0.00019 $0.00171
Haiku 4.5 $0.00009 $0.00086

Measured 8d ago against content hash 39d9c892114c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

vision-prep scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/pdf2png.py, scripts/tile.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

opencode/skills/vision-prep/SKILL.md · 77 lines

How it starts

The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Vision Preprocessing (large images / PDF pages)

Prepare images and PDF pages so the DeepSeek vision model can actually read them. Two hard constraints drive this:

  1. DeepSeek rejects PDF input — only JPEG/PNG/GIF/WebP are accepted. A PDF must be rasterized to PNG first.
  2. DeepSeek downscales each image to ~800x800 pixel budget before tokenizing. Small text in a large image becomes unreadable. Slicing into overlapping tiles gives each tile its own ~800x800 budget.

When to use

  • The user attaches a large image / screenshot and small text is unreadable.
  • The user asks to read content inside a PDF (text or embedded images).
  • The vision agent reports it cannot make out details in an image.

Prerequisites

Python 3 with pymupdf and pillow (already installed). Scripts live in scripts/ next to this file.

Workflow

1. PDF -> PNG pages

python <skill_dir>/scripts/pdf2png.py <input.pdf> <output_dir> [--pages 1-3,5] [--zoom 2.0]

Renders each page (or --pages subset) to page-<n>.png. --zoom controls resolution (2.0 ≈ 144dpi, good default for text). Rasterizing preserves page layout, which matters when the goal is "what is in this image within the page context".

2. Large image / rendered page -> tiles

python <skill_dir>/scripts/tile.py <input.png> <output_dir> [--grid 2x2] [--overlap 0.10]

Slices into an NxN grid of overlapping tiles (tile-<row>-<col>.png). Use when the image's long edge exceeds ~1600px or it contains dense small text. The 10% overlap prevents text straddling a cut line from being truncated.

3. Read tiles with the vision model

Send each tile to the model separately (e.g. via the read tool / vision agent), so each tile gets its own ~800x800 budget. Extract content per tile, then merge the results in the text layer. For very dense content (e.g. 300-DPI legal documents), use a finer grid (3x3) or request tiles one at a time.

Decision guide

Input Action
Small image (< ~1600px long edge) Send directly, no prep
Large image / dense small text tile.py into 2x2 (or finer) grid
Grid size (when tiling) --grid NxN with N = ceil(long_edge / 800), so each tile stays <= ~800px
PDF (any) pdf2png.py to PNG, then tile if page is large
Byte/size limit exceeded Already handled by opencode's built-in resize; no action needed

Read the full file on GitHub · 77 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 77 lines · 94 tokens per session scan A 39d9c892114c

Subscribe to this mod's changes

vision-prep is a skill published in the GitHub repository znlgis/my-opencode-deepseek-config (58 stars, last pushed yesterday), licensed MIT. It adds 94 tokens to every session and 857 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

moe-training

Train Mixture of Experts (MoE) models using DeepSpeed or HuggingFace. Use when training large-scale models with limited compute (5× cost reduction vs dense models), implementing sparse architectures like Mixtral 8x7B or DeepSeek-V3, or scaling model capacity without proportional compute increase. Covers MoE…

davila7/claude-code-templates · 85 tokens

clawrouter

Hosted-gateway LLM router — save 84% on inference costs. A local proxy that forwards each request to the blockrun.ai gateway, which routes to the cheapest capable model across 78 models from OpenAI, Anthropic, Google, DeepSeek, xAI, Z.AI, and more. 7 free open-weight models included. Also exposes realtime market data…

BlockRunAI/ClawRouter · 222 tokens

deepseek-helper

A guide for using the DeepSeek API, a service that lets programs send requests to DeepSeek language models. It covers model choice, example requests, prompt improvements, cost estimates, and common API errors.

dongsheng123132/u-claw · 25 tokens

videodb

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- run analyzers over speech, scenes, objects, OCR, brands and activity; build searchable indexes; then search moments, ask questions about a…

video-db/skills · 144 tokens

ai4j-app-builder

Use this skill when helping users build applications with AI4J in their own Java or Spring Boot projects, including first chat, streaming, tool/function calls, MCP, RAG, memory, Agent runtime, Coding Agent CLI embedding, FlowGram integration, provider configuration, dependency selection, and troubleshooting. It guides…

LnYo-Cly/ai4j · 120 tokens

vision

Call vision models (Doubao, Qwen, DeepSeek, OpenAI) to analyze images. Use when you need to understand screenshots, UI layouts, diagrams, or any image content. Supports png/jpg/webp/gif.

xiincs/claude-code-vision-skill · 49 tokens