img-convert

img-convert is a skill for Claude Code, Codex from dutchbase/img-converter. It costs 73 tokens per session (4,294 once invoked), scanned A, original, MIT.

Instructions for using img-convert, a tool for inspecting and processing images through a command line, Node.js, or an MCP connection. It supports common format, size, rotation, color, and metadata operations.

In plain words
What is it for?
Converting, resizing, rotating, optimizing, inspecting, and batch-processing images in scripts, applications, or agent workflows.
Why use it?
It helps choose the right image-processing interface and inspect files before making conversions that could affect quality or metadata.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions Claude Code.

Good fit Converting, resizing, rotating, optimizing, inspecting, and batch-processing images in scripts, applications, or agent workflows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dutchbase/img-converter/img-converter
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 dutchbase/img-converter --skill img-converter
Clone the repo
git clone --depth 1 https://github.com/dutchbase/img-converter

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 img-convert

README.md
[![agentmods](https://agentmods.dev/badge/skills/dutchbase/img-converter/img-converter/github.svg)](https://agentmods.dev/skills/dutchbase/img-converter/img-converter)
Your own site
<a href="https://agentmods.dev/skills/dutchbase/img-converter/img-converter"><img src="https://agentmods.dev/badge/skills/dutchbase/img-converter/img-converter/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 img-convert

Your own site · 80×15
<a href="https://agentmods.dev/skills/dutchbase/img-converter/img-converter"><img src="https://agentmods.dev/badge/skills/dutchbase/img-converter/img-converter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,294 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00073 $0.04294
Opus 5 $0.00036 $0.02147
Sonnet 5 $0.00015 $0.00859
Haiku 4.5 $0.00007 $0.00429

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

Security

Grade A, and why

img-convert scanned grade A with 1 finding 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 11d ago.

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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

const stdout = execSync('img-convert batch jobs.json --json 2>/dev/null', { encoding: 'utf8' })
SKILL.md · 532 lines

How it starts

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

img-convert Skill

img-convert is a Sharp-based image conversion tool available as a CLI, Node.js API, and MCP server. This skill covers how to use each interface correctly, choose between them, and build reliable agent workflows.


Interface Selection

Choose the right interface for the context:

Situation Use
Shell task, build script, CI pipeline CLI (img-convert)
Node.js code that needs the output buffer Node.js API (import { convert } from '@dutchbase/img-convert')
Claude Code or MCP-enabled AI agent MCP tools (convert_image, get_image_info)
Browser or external HTTP client REST API (POST /api/convert)
Multiple files with different settings each CLI batch subcommand or API batch()

Inspect Before Converting

Always run info first on unknown images. It reveals format, dimensions, alpha, EXIF, animation, and color space — all of which affect conversion decisions.

img-convert info photo.jpg
{
  "format": "jpeg",
  "width": 4032,
  "height": 3024,
  "filesize": 3891200,
  "hasAlpha": false,
  "hasExif": true,
  "colorSpace": "srgb",
  "isAnimated": false,
  "channels": 3,
  "density": 72
}

Key decisions driven by info:

  • hasAlpha: true + converting to JPEG → must pass --background "#ffffff" or pixels go black
  • isAnimated: true → only GIF→WebP preserves animation; all other targets capture frame 1 only
  • colorSpace: "cmyk" → convert to srgb first for web use
  • width × height > 25_000_000 → tool will reject with IMAGE_TOO_LARGE; resize first

CLI Reference

Convert (default command)

img-convert [files...] -f <format> [options]

files accepts paths, glob patterns, and HTTP/HTTPS URLs.

All flags
Flag Default Description
-f, --format Required. jpeg png webp avif gif tiff
-q, --quality <n> 85 1–100. JPEG/WebP/AVIF/TIFF. PNG uses derived compression. GIF ignores it.
--width <n> Resize width in pixels. Maintains aspect ratio.
--height <n> Resize height in pixels. Maintains aspect ratio.
--no-metadata Strip EXIF/XMP/IPTC. ICC profile always kept.
-o, --output <dir> input dir Output directory. Created if absent.
-c, --concurrency <n> 4 Parallel workers.
--json Data → stdout as JSON. Progress/errors → stderr.
--dry-run Preview without writing.
--quiet Suppress per-file lines.
--grayscale Desaturate to greyscale.
--rotate <n> Rotate by degrees. Empty corners filled with --background.
--flip Horizontal mirror (left–right).
--flop Vertical mirror (top–bottom).
--background <color> Fill color: #ffffff, rgba(0,0,0,0), etc.
--blur <sigma> Gaussian blur, sigma 0.3–1000.
--sharpen Unsharp mask with default parameters.
--normalize Stretch contrast to full range. Good for scans.
--trim Remove uniform-color border pixels.

Read the full file on GitHub · 532 lines

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. 11d ago First seen · 532 lines · 73 tokens per session scan A f5ac1c0bb007

Subscribe to this mod's changes

img-convert is a skill published in the GitHub repository dutchbase/img-converter (3 stars, last pushed 4d ago), licensed MIT. It adds 73 tokens to every session and 4,294 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

ppt-orchestrator

A dispatcher for creating presentations, slide decks, long images, and weekly reports. It chooses a visual style and output format, then sends the work to a more specialised add-on.

huangrichao2020/pretty-skills · 160 tokens

zhongguose-html-skill

An HTML-only presentation system using traditional Chinese colours and Chinese-style visual design. It helps organise source material into a report structure and produces a self-contained HTML file with its assets.

huangrichao2020/pretty-skills · 232 tokens

dashiai-ppt

A presentation-making add-on that creates an HTML slide deck from preset visual page designs. The result can open offline in a browser and can be exported as a PowerPoint or PDF file.

huangrichao2020/pretty-skills · 62 tokens

wechat-delivery

A workflow for preparing WeChat Official Account articles, images, covers, and publishing files in Chinese. WeChat Official Accounts are channels used by organizations to publish articles to followers.

huangrichao2020/pretty-skills · 129 tokens

ai-image-to-pptx

A workflow that creates a set of related images with AI and places them into a real PowerPoint file. The resulting .pptx file can be opened and edited in PowerPoint, Keynote, or WPS.

huangrichao2020/pretty-skills · 93 tokens

html-ppt-viewer

A simple HTML viewer that presents a set of existing images like a slide deck. It includes a side panel, large image display, page controls, and keyboard navigation, but does not create the images.

huangrichao2020/pretty-skills · 93 tokens