agentleFS
timelapsetechtimelapsetech/mediaskills/.agents/skills/image/SKILL.md

image

Skill1 starsChanged 3 months agoMITView on GitHub

Convert, resize, crop, rotate, flip, optimize, read EXIF, strip metadata, and OCR images using ImageMagick, exiftool, and Tesseract. Use when you need to transform still images, reduce file size, inspect camera metadata, remove sensitive EXIF before sharing, or extract text from screenshots and scans.

  • Installs packages

50 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use popups, free-tools and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CesarjoquinSkill

    popups

    When the user wants to create or optimize popups, modals, overlays, slide-ins, or banners for conversion purposes. Also use when the user mentions "exit intent," "popup conversions," "modal optimization," "lead capture popup," "email popup," "announcement banner," "overlay," "collect emails with a popup," "exit popup," "scroll trigger," "sticky bar," or "notification bar." Use this for any overlay or interrupt-style conversion element. For forms outside of popups, see cro. For general page conversion optimization, see cro.

    Also in 16 projects that use this

  • CesarjoquinSkill

    free-tools

    When the user wants to plan, evaluate, or build a free tool for marketing purposes — lead generation, SEO value, or brand awareness. Also use when the user mentions "engineering as marketing," "free tool," "marketing tool," "calculator," "generator," "interactive tool," "lead gen tool," "build a tool for leads," "free resource," "ROI calculator," "grader tool," "audit tool," "should I build a free tool," or "tools for lead gen." Use this whenever someone wants to build something useful and give it away to attract leads or earn links. For downloadable content lead magnets (ebooks, checklists, templates), see lead-magnets.

    Also in 17 projects that use this

  • coreyhaines31Skill

    marketing-council

    When the user wants multiple expert perspectives on a marketing question — a simulated board of advisors staffed by legendary marketers (Seth Godin, David Ogilvy, Eugene Schwartz, April Dunford, Rory Sutherland, Alex Hormozi, Byron Sharp, and more). Also use when the user mentions 'marketing council,' 'board of advisors,' 'advisory board,' 'what would Seth Godin say,' 'what would Ogilvy think,' 'channel Hormozi,' 'get multiple perspectives,' 'debate this,' 'have the council review,' 'marketing mentors,' or asks how a famous marketer would approach their problem. The council gives each advisor's take through their documented frameworks, surfaces where they disagree, and synthesizes a recommendation. For executing the winning direction, hand off to positioning, offers, copywriting, ads, or the relevant skill.

    Also in 11 projects that use this

  • roerohanSkill

    prospecting

    When the user wants to find, qualify, and build a list of prospects to reach out to — across B2B SaaS, general B2B, or local small businesses. Also use when the user mentions "prospecting," "build a prospect list," "find prospects," "find leads," "lead gen list," "find SaaS companies that," "find B2B companies," "find local businesses," "ICP-fit accounts," "who should we go after," "outbound list," "target account list," "find clients near me," "businesses without websites," "prospect research," "qualified leads," "find my first customers," "early adopters," "design partners," "beta users," or "who has this problem." Use this for the list-building and qualification phase. For writing the outbound copy after the list is built, see cold-email. For deep competitive research on specific accounts, see competitor-profiling.

    Also in 16 projects that use this

  • coreyhaines31Skill

    marketing-loops

    When the user wants to set up a recurring, self-running marketing workflow — a repeatable loop an AI agent runs on a cadence (weekly, daily, on a trigger) rather than a one-off task. Also use when the user mentions 'marketing loop,' 'recurring marketing workflow,' 'automate my marketing,' 'marketing on autopilot,' 'weekly marketing review,' 'ad fatigue check,' 'weekly ads check,' 'content refresh loop,' 'churn watch,' 'ranking drop alert,' 'run my SEO,' 'SEO operator,' 'daily SEO agent,' 'run my outbound,' 'AI SDR,' 'reply triage,' 'always-on marketing,' 'marketing automation workflow,' or 'run this every week.' Use this to pick, adapt, and schedule an ongoing marketing loop that orchestrates the other marketing skills. For one-off marketing ideas, see marketing-ideas. For the experimentation loop specifically, see ab-testing.

    Also in 9 projects that use this

  • +7 more from Cesarjoquin

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 43 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If your tools showed a filesystem path when loading this SKILL.md, strip SKILL.md and use that folder.

    line 43
  2. Very specific:

    If you already ran another mediaskills script (for example .../audio/scripts/extract.py), this skill is a sibling of that folder: same …

    line 44
  3. Very specific:

    Prefer absolute paths for --input / --output when cwd is uncertain.

    line 67
  4. Distinctive:

    Before running any script, treat these two failures differently:

    line 72
  5. Very specific:

    Only escalate sandbox permissions if the error is explicitly a permission denial (e.g.

    line 75

“Common” is measured: kept by at least 6 in 10 of the 43 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Image

Still-image processing with ImageMagick, exiftool, and Tesseract. Use this skill when you need to modify or inspect raster images (PNG, JPEG, WebP, TIFF, etc.).

When to use

  • This skill — format conversion, geometry edits (resize/crop/rotate/flip), compression, EXIF read/strip, OCR.
  • inspect — probe video/audio/image containers with ffprobe without changing files. Run first if you are unsure of dimensions or format.
  • download — fetch remote media before local image processing.

Gotchas

  • ImageMagick v7 — some systems expose magick instead of convert. These scripts call convert; install the imagemagick package or symlink convert → magick if needed.
  • Resize without height — --width 800 with no --height preserves aspect ratio (800x geometry). Specifying both forces exact dimensions (may distort).
  • Crop geometry — width x height + x + y is in pixels from the top-left. Values outside the image bounds fail or return partial crops depending on ImageMagick policy.
  • Optimize outputs JPEG — optimize.py always writes JPEG at quality 85 with metadata stripped. Use convert.py for lossless PNG/WebP output.
  • EXIF on PNG/WebP — read_exif.py returns whatever exiftool finds; synthetic or ffmpeg-generated images often have minimal metadata.
  • OCR quality — Tesseract works best on high-contrast, deskewed text. Preprocess with convert (grayscale, threshold) for noisy scans. Use --lang for non-English (e.g. deu, fra).
  • Policy restrictions — ImageMagick policy.xml may block PDF/PS reads on some Linux installs. Error mentions "not authorized".

Running scripts

This skill's scripts live in scripts/ alongside this file. Before running any script, resolve its absolute path from this skill's own directory — do not assume the shell cwd is the skill folder, the repo root, or the workspace. Stay in the workspace (so media paths resolve) and pass the absolute script path to uv run:

uv run <skill_directory>/scripts/convert.py --input "<path-to-image>" --format jpg

<skill_directory> is a placeholder. Never pass those angle brackets to the shell — the command will fail. Replace it with a real absolute directory before invoking uv run.

How to get that directory (do this yourself; do not ask the user first; do not skip the skill):

  1. If your tools showed a filesystem path when loading this SKILL.md, strip SKILL.md and use that folder.
  2. If you already ran another mediaskills script (for example .../audio/scripts/extract.py), this skill is a sibling of that folder: same parent, directory name image.
  3. Otherwise search standard install locations and confirm the script exists:
NAME=image
for d in \
  "$HOME/.agents/skills/$NAME" \
  "$HOME/.cursor/skills/$NAME" \
  "$HOME/.codex/skills/$NAME" \
  "$HOME/.claude/skills/$NAME" \
  "$PWD/.agents/skills/$NAME" \
  "$PWD/.cursor/skills/$NAME" \
  "$PWD/skills/$NAME"
do
  if [ -f "$d/SKILL.md" ] && [ -e "$d/scripts/convert.py" ]; then
    SKILL_DIR=$(cd "$d" && pwd)
    break
  fi
done
[ -n "$SKILL_DIR" ] || { echo "mediaskills: $NAME not found" >&2; exit 1; }
uv run "$SKILL_DIR/scripts/convert.py" --input "<path-to-image>" --format jpg

Prefer absolute paths for --input / --output when cwd is uncertain.

Missing binaries vs permissions

Before running any script, treat these two failures differently:

  • If a required binary (uv, convert, exiftool, tesseract) reports No such file or directory or command not found: this is a missing or unreachable binary, not a permissions issue. Escalating sandbox permissions will not fix it. Run command -v uv, command -v convert, command -v exiftool, and command -v tesseract to see whether they resolve at all. If not, install or re-link them (install-media-tools doctor/install) rather than retrying with wider permissions. tesseract is required for ocr.py; other scripts need ImageMagick convert and/or exiftool.
  • Only escalate sandbox permissions if the error is explicitly a permission denial (e.g. Operation not permitted, Permission denied).

Recipes

Convert PNG to JPEG

uv run <skill_directory>/scripts/convert.py --input photo.png --format jpg

Resize for web (max width 1200, keep aspect)

uv run <skill_directory>/scripts/resize.py --input hero.png --width 1200

Crop a thumbnail from coordinates

uv run <skill_directory>/scripts/crop.py --input photo.jpg --width 400 --height 400 --x 100 --y 50

Rotate 90° clockwise

uv run <skill_directory>/scripts/rotate.py --input scan.png --degrees 90

Mirror horizontally

uv run <skill_directory>/scripts/flip.py --input photo.png --direction horizontal

Shrink file size for sharing

uv run <skill_directory>/scripts/optimize.py --input large.png

Read camera metadata before editing

uv run <skill_directory>/scripts/read_exif.py --input IMG_1234.jpg

Strip GPS and camera info before upload

uv run <skill_directory>/scripts/strip_metadata.py --input IMG_1234.jpg

OCR text from a screenshot

uv run <skill_directory>/scripts/ocr.py --input screenshot.png

Troubleshooting

Error / symptomLikely causeAction
convert not foundImageMagick not installedRun install-media-tools or brew install imagemagick
exiftool not foundexiftool missingbrew install exiftool / apt install libimage-exiftool-perl
tesseract not foundOCR binary missingbrew install tesseract / apt install tesseract-ocr
not authorizedImageMagick policy blockEdit /etc/ImageMagick-*/policy.xml or use a different input format
Empty OCR textLow contrast or wrong languagePreprocess image; try --lang
Distorted resizeBoth width and height setOmit --height to preserve aspect ratio

Available scripts

ScriptPurpose
scripts/convert.pyChange image format
scripts/resize.pyScale to width/height
scripts/crop.pyExtract rectangular region
scripts/rotate.pyRotate by degrees
scripts/flip.pyMirror horizontal or vertical
scripts/optimize.pyCompress to JPEG, strip metadata
scripts/read_exif.pyRead metadata as JSON
scripts/strip_metadata.pyRemove metadata, write clean copy
scripts/ocr.pyExtract text with Tesseract

Acceptance checks (agent must pass before delivery)

  1. Contract: exit 0, ok: true, every output_paths entry exists and is non-empty.
  2. Spot-check: open the output still — dimensions/format match request; OCR text is readable for the intended region when using ocr.py.
  3. On failure: fix or escalate; do not present zero-byte or wrong-geometry images as complete.

Do not use for

  • Video timeline edits (use video-transformation)
  • PDF or vector graphics
  • RAW/developed photo workflows (develop first, then convert.py)

Related skills

  • inspect — probe dimensions and format before editing
  • download — fetch images from URLs
  • install-media-tools — install ImageMagick, exiftool, tesseract

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.