agentleFS
godot-fungodot-fun/gai/.agents/skills/image-to-png/SKILL.md

image-to-png

Skill210 starsChanged 2 days agoMITView on GitHub

Converts image files to PNG using FFmpeg while preserving dimensions and alpha. Use when the user wants to convert images to PNG, transcode JPG/WebP/GIF/BMP/TIFF to PNG, export a game/UI texture as PNG, or mentions PNG conversion without background removal.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

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

    When this skill applies, read and follow dependency-manager — run scripts as documented, install missing tools into .dependency/.

    line 12
  2. Very specific:

    Run convert.py through the bundled script — do not hand-write ffmpeg -i … commands.

    line 14
  3. Very specific:

    Use bin/ffmpeg on Unix (no .exe).

    line 35
  4. Distinctive:

    Use the bundled script, not hand-written FFmpeg commands.

    line 86

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “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 to PNG

Convert a single image file to lossless PNG via FFmpeg. Defaults preserve source quality — dimensions unchanged, alpha channel kept when present.

Rules

When this skill applies, read and follow dependency-manager — run scripts as documented, install missing tools into .dependency/.

  • Run convert.py through the bundled script — do not hand-write ffmpeg -i … commands.
  • Single file only. Pass one image with --image; directories are not supported.
  • Never overwrite source files. Output goes to image-to-png/ (or --output) by default.
  • Do not resize or recompress unless the user explicitly asks — omit quality/size overrides.
  • populated: false for ffmpeg is not a reason to skip. Install first, set populated: true, retry the same command.

Setup (first run)

  1. Download FFmpeg and extract to .dependency/ffmpeg/ (see dependency-manager).

    Windows result example: .dependency/ffmpeg/bin/ffmpeg.exe

  2. Register in .dependency/manifest.json:
"ffmpeg": {
  "populated": true,
  "bin": ".dependency/ffmpeg/bin/ffmpeg.exe"
}

Use bin/ffmpeg on Unix (no .exe).

Quick Start

Default: create an image-to-png/ folder beside the input file and write the PNG there:

# assets/ui/icon.webp → assets/ui/image-to-png/icon.png
.dependency/python/python .ai/image-to-png/convert.py --image assets/ui/icon.webp

Custom output path:

.dependency/python/python .ai/image-to-png/convert.py --image assets/ui/icon.webp -o assets/ui_png

Strip alpha (RGB output):

.dependency/python/python .ai/image-to-png/convert.py --image assets/sprites/hero.webp --strip-alpha

Format Defaults

SettingDefaultNotes
DimensionsPreserve sourceNo resize unless user asks separately
AlphaPreserveRGBA when source has transparency
Already PNGStream copyBit-perfect when --strip-alpha is off
Animated GIFFirst frameMulti-frame GIF export not supported

Defaults

OptionDefaultNotes
--imageRequiredSingle supported image file
Output<image-dir>/image-to-png/<name>.pngUse -o / --output for custom file or directory
--strip-alphaoffForce RGB PNG without alpha

Supported inputs: .jpg, .jpeg, .png, .webp, .gif, .bmp, .tif, .tiff, .avif, .ico.

Agent Workflow

  1. Paths — Pass whatever image path the user gives. Output lands in image-to-png/ next to that file by default.
  2. One file per run — convert one image, verify the result, then repeat for additional files if needed.
  3. Already PNG? Stream-copied by default (no generation loss) unless --strip-alpha is set.
  4. Revert — delete output file or git restore; sources are never modified.

Agent Notes

  1. Use the bundled script, not hand-written FFmpeg commands.
  2. Missing Python/FFmpeg → populate .dependency/ per dependency-manager, retry same command.
  3. Do not copy, move, or replace the source with converted output — tell the user where the output file is.
  4. Need transparent cutouts → use image-remove-background, not this skill.
  5. Need resize after conversion → image-resize.
  6. FFmpeg codec and probing details: reference.md

Troubleshooting

IssueFix
ffmpeg missing in manifestFollow Setup; update manifest
Directory passed to --imageRun once per file; this skill accepts image files only
Output already existsDelete the existing output or choose a different -o path
Animated GIFOnly first frame is exported by default
Need RGB onlyAdd --strip-alpha

CLI

Copy-paste commands: cli/image-to-png.md

Related

  • Resize after conversion: image-resize
  • Transparent cutouts: image-remove-background

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.