executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
dpi-upscaler-checkerCheck if images meet 300 DPI printing standards, and intelligently restore blurry low-resolution images using AI super-resolution technology.
Independent GitHub snapshot · Automated classification · Original documentation governs
Check if images meet 300 DPI printing standards, and intelligently restore blurry low-resolution images using AI super-resolution technology.
This skill accepts: image files (JPG, PNG, TIFF, BMP, WebP) or folder paths for DPI checking and/or AI super-resolution upscaling.
If the user's request does not involve image DPI checking or upscaling — for example, asking to analyze text documents, process audio files, or perform general data analysis — do not proceed with the workflow. Instead respond:
"dpi-upscaler-checker is designed to check image DPI standards and restore low-resolution images. Your request appears to be outside this scope. Please provide an image file path or folder, or use a more appropriate tool for your task."
Do not continue the workflow when the request is out of scope, missing a critical input (--input path), or would require unsupported assumptions. For missing inputs, state exactly which fields are missing.
python -m py_compile scripts/main.py
python scripts/main.py --help
python scripts/main.py --demo
python -c "import PIL; print('Pillow OK')"
python scripts/main.py check --input image.jpg --json
--input path is provided before any processing.python scripts/main.py check --input image.jpg
python scripts/main.py check --input image.jpg --json # JSON to stdout for agent consumption
python scripts/main.py check --input ./images/ --output report.json
python scripts/main.py upscale --input image.jpg --output upscaled.jpg --scale 4
python scripts/main.py upscale --input ./images/ --output ./output/ --min-dpi 300 --scale 2
python scripts/main.py --demo
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
--input | string | - | Yes | Input image path or folder |
--output | string | stdout | No | Output report path |
--target-dpi | int | 300 | No | Target DPI threshold |
--json | flag | false | No | Output results as JSON to stdout |
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
--input | string | - | Yes | Input image path or folder |
--output | string | - | Yes | Output path |
--scale | int | 2 | No | Scale factor (2/3/4) |
--min-dpi | int | - | No | Only process images below this DPI |
--denoise | int | 0 | No | Denoise level (0-3) |
--face-enhance | flag | false | No | Enable face enhancement |
{
"file": "image.jpg",
"dpi": [72, 72],
"width_px": 1920,
"height_px": 1080,
"print_width_cm": 67.7,
"print_height_cm": 38.1,
"meets_300dpi": false,
"recommended_scale": 4.17
}
<original_filename>_upscaled.<extension>print_size_cm = (pixel_count / dpi) * 2.54; recommended_scale = target_dpi / avg_dpi--output)except (AttributeError, KeyError, TypeError, ZeroDivisionError) — bare except replaced with specific exception typesquality=95; PNG: compress_level=6)Path.rglob; resolve paths with path.resolve() before processing to avoid unexpected directory traversal via symlinksIf scripts/main.py fails or required inputs are incomplete:
from PIL import Image; img = Image.open('file.jpg'); print(img.info.get('dpi')).scripts/main.py fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.pip install -r requirements.txt