vision-prep

vision-prep is a skill for Claude Code, Codex from znlgis/my-opencode-deepseek-config. It costs 94 tokens per session (885 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 885 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.00885
Opus 5.5 $0.00038 $0.00354
Sonnet 5.5 $0.00019 $0.00177
Haiku 4.5 $0.00009 $0.00089

Measured 1mo ago against content hash e07b9100aa7a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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 · 78 lines

How it starts

The opening of the file, as written. The whole thing — 78 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 this repo's media.image resize (1600px / 2 MiB); no action needed

Read the full file on GitHub · 78 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. 1mo ago Changed e07b9100aa7a
  2. 2mo ago Changed · +1 lines 9377a2143a5f
  3. 2mo 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 (65 stars, last pushed yesterday), licensed MIT. It adds 94 tokens to every session and 885 once invoked, about $0.0004 per session on Opus 5.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

vision-prep compared with skills from other repositories

vision-prep next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
vision-prepznlgis/my-opencode-deepseek-configSkill65yesterdayMITA94Claude Code, Codex
clawrouterBlockRunAI/ClawRouterSkill6.7ktodayMITA171Claude Code, Codex
openai-docsHaohao-end/openagentSkill7557d agoMITA74Codex
videodbvideo-db/skillsSkill159todayMITA123Claude Code
ai4j-app-builderLnYo-Cly/ai4jSkill4438d agoApache-2.0A120Codex
colabLnYo-Cly/ai4jSkill4438d agoApache-2.0A26Claude Code, Codex
solon-development-skillopensolon/soloncodeSkill199yesterdayMITA173Claude Code, Codex