agentleFS
pmatospmatos/skills/upscale/SKILL.md

upscale

Skill2 starsChanged 4 months agoMITView on GitHub

Upscale raster images with a local OpenCV EDSR super-resolution model, then produce an exact target pixel size. Use when the user asks to upscale, enlarge, super-resolve, make a higher-resolution version, or create a wallpaper/print-size raster from an existing image while preserving the original artwork.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 7

    Distinctive

    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. Distinctive:

    Create a real local super-resolution upscale from an existing raster image.

    line 10
  2. Distinctive:

    If the user gives dimensions, use them exactly.

    line 16
  3. Very specific:

    If they give only a multiplier, use --factor.

    line 17
  4. Very specific:

    If the requested aspect ratio differs from the source, choose --fit stretch only when exact full-frame dimensions matter and the mismatch …

    line 18
  5. Distinctive:

    Run the bundled script:

    line 19
  6. Distinctive:

    Verify the final file:

    line 32
  7. Very specific:

    Default model selection is auto: it chooses the smallest EDSR scale (x2, x3, or x4) that exceeds the requested target dimensions before …

    line 44
  8. Distinctive:

    Do not call a plain ImageMagick resize a real upscale.

    line 50
  9. Distinctive:

    Do not silently trust requested dimensions.

    line 51
  10. Distinctive:

    If a faster model or Real-ESRGAN introduces block/tile artifacts, reject that output and keep the cleaner EDSR result.

    line 52

“Common” is measured: kept by at least 6 in 10 of the 4 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

Upscale

Create a real local super-resolution upscale from an existing raster image. Prefer this over image generation when the user wants the same image at a larger, verified pixel size.

Workflow

  1. Identify the source image path. If the image was attached in the current conversation, use the local image path from the session context.
  2. Pick the exact output size:
    • If the user gives dimensions, use them exactly.
    • If they give only a multiplier, use --factor.
    • If the requested aspect ratio differs from the source, choose --fit stretch only when exact full-frame dimensions matter and the mismatch is small. Use --fit cover to preserve aspect by cropping, or --fit contain to preserve aspect by padding.
  3. Run the bundled script:
uv run "/path/to/upscale/scripts/upscale_image.py" \
  "/path/to/source.png" \
  --size 5120x2160 \
  --output "/path/to/output.png" \
  --fit stretch \
  --keep-raw

Resolve /path/to/upscale relative to this skill directory. If uv is unavailable, create a temporary Python venv, install opencv-contrib-python-headless pillow numpy, and run the script with that venv's Python.

  1. Verify the final file:
magick identify -format '%f %wx%h %[colorspace] %[channels]\n' "/path/to/output.png"
file "/path/to/output.png"

Report the final path and the verified dimensions. If --keep-raw was used, mention the raw EDSR output path when useful.

Script Notes

  • The script downloads EDSR .pb models into ~/.cache/codex-upscale/models/ on first use.
  • Default model selection is auto: it chooses the smallest EDSR scale (x2, x3, or x4) that exceeds the requested target dimensions before final resizing.
  • It processes large images in overlapping tiles to avoid huge memory spikes and reduce visible tile seams.
  • The previous RR880 workflow used OpenCV dnn_superres with EDSR_x3, wrote a raw SR image, then resized to exactly 5120x2160.

Quality Rules

  • Do not call a plain ImageMagick resize a real upscale. Use the EDSR script first, then resize to exact dimensions.
  • Do not silently trust requested dimensions. Always inspect the generated file after writing it.
  • If a faster model or Real-ESRGAN introduces block/tile artifacts, reject that output and keep the cleaner EDSR result.
  • Preserve the source file; write outputs to a new path.

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.

Reviews can't be read right now.

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.