image-enhancer
Skill8 starsChanged 3 months agoApache-2.0View on GitHub
Improve image and screenshot quality including resolution upscaling, sharpness correction, noise reduction, color grading, and formatting optimization for documentation, presentations, and web. This skill should be used when Cline needs to enhance, resize, reformat, or otherwise improve the visual quality of images and screenshots.
- Installs packages
We split this skill into the rules it gives an agent
7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 37 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Before processing, assess the image:
- Distinctive: line 284
Unsupported format: Check format before processing.
- Distinctive: line 287
EXIF orientation: Always honor EXIF rotation data before processing
- Very specific: line 289
Font not found: Always fall back to ImageFont.load_default() when custom fonts unavailable
- Distinctive: line 302
Always analyze first: Check image properties and quality issues before processing
- Distinctive: line 303
Preserve originals: Never overwrite source files — always save to a new path
- Distinctive: line 305
Use LANCZOS for photos, NEAREST for pixel art/screenshots: when upscaling
“Common” is measured: kept by at least 6 in 10 of the 37 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.
Files
Image Enhancer
This skill improves the visual quality of images and screenshots through resolution upscaling, sharpness correction, noise reduction, color optimization, and format conversion. It produces professional-grade results suitable for documentation, presentations, web publishing, and print.
When to Use This Skill
- Upscaling low-resolution screenshots or images
- Sharpening blurry photos or captured screens
- Reducing noise from compressed or low-light images
- Converting between image formats (PNG, JPEG, WebP, SVG, TIFF)
- Optimizing images for web (file size reduction while preserving quality)
- Preparing images for documentation or presentations
- Adding watermarks or annotations
- Batch processing multiple images with consistent settings
- Cropping and resizing for specific aspect ratios or dimensions
What This Skill Does
- Resolution Enhancement: Upscales images while preserving detail and minimizing artifacts
- Sharpness Correction: Applies targeted sharpening to recover detail from soft images
- Noise Reduction: Removes compression artifacts and sensor noise
- Color Optimization: Adjusts brightness, contrast, saturation, and white balance
- Format Conversion: Converts between formats with optimal compression settings
- Batch Processing: Applies consistent enhancements across multiple files
Process
Step 1: Analyze the Source Image
Before processing, assess the image:
- Resolution: Current dimensions and target dimensions
- Quality issues: Blur, noise, compression artifacts, poor lighting
- Format: Current format and whether conversion is needed
- Use case: Documentation, web, presentation, print, social media
from PIL import Image
import os
def analyze_image(filepath):
"""Analyze image properties and quality indicators."""
img = Image.open(filepath)
info = {
"filename": os.path.basename(filepath),
"format": img.format,
"mode": img.mode,
"size": img.size,
"width": img.width,
"height": img.height,
"dpi": img.info.get("dpi", (72, 72)),
"file_size_kb": os.path.getsize(filepath) / 1024,
}
# Detect potential quality issues
if img.width < 800 or img.height < 600:
info["issue"] = "low_resolution"
elif img.mode == "P":
info["issue"] = "palette_mode_limited_colors"
return infoStep 2: Apply Resolution Enhancement
Upscale images using appropriate interpolation:
from PIL import Image
def upscale_image(filepath, target_width=None, target_height=None, scale_factor=2):
"""Upscale image with high-quality interpolation."""
img = Image.open(filepath)
if target_width and target_height:
new_size = (target_width, target_height)
else:
new_size = (img.width * scale_factor, img.height * scale_factor)
# LANCZOS is best for upscaling — preserves detail and reduces aliasing
upscaled = img.resize(new_size, Image.LANCZOS)
return upscaledFor screenshot-specific upscaling (pixel art, UI elements):
def upscale_screenshot(filepath, scale_factor=2):
"""Upscale screenshots preserving pixel clarity."""
img = Image.open(filepath)
new_size = (img.width * scale_factor, img.height * scale_factor)
# NEAREST preserves hard pixel edges for UI screenshots
return img.resize(new_size, Image.NEAREST)Step 3: Sharpen and Denoise
Apply sharpening and noise reduction in the correct order:
from PIL import Image, ImageFilter, ImageEnhance
def enhance_sharpness(img, factor=1.5):
"""Apply controlled sharpening without over-sharpening."""
# For screenshots — use UnsharpMask for control
return img.filter(ImageFilter.UnsharpMask(radius=2, percent=150, threshold=3))
def reduce_noise(img, strength=1):
"""Reduce noise while preserving edges."""
# Mild median filter for noise without destroying detail
return img.filter(ImageFilter.MedianFilter(size=strength))
def enhance_for_docs(filepath, sharpness=1.3, contrast=1.1, brightness=1.05):
"""Full enhancement pipeline for documentation images."""
img = Image.open(filepath)
# Order matters: denoise → sharpen → adjust → color
img = reduce_noise(img, strength=1)
img = enhance_sharpness(img, factor=sharpness)
enhancer = ImageEnhance.Contrast(img)
img = enhancer.enhance(contrast)
enhancer = ImageEnhance.Brightness(img)
img = enhancer.enhance(brightness)
return imgStep 4: Format Conversion and Optimization
Convert between formats with appropriate settings:
def convert_format(img, output_format, output_path, quality=85):
"""Convert image to specified format with optimal settings."""
format_config = {
"JPEG": {"format": "JPEG", "quality": quality, "optimize": True},
"PNG": {"format": "PNG", "optimize": True},
"WEBP": {"format": "WEBP", "quality": quality, "method": 6},
"TIFF": {"format": "TIFF", "compression": "tiff_lzw"},
}
config = format_config.get(output_format.upper())
if not config:
raise ValueError(f"Unsupported format: {output_format}")
# Convert RGBA to RGB for JPEG (no alpha support)
if output_format.upper() == "JPEG" and img.mode in ("RGBA", "LA", "P"):
background = Image.new("RGB", img.size, (255, 255, 255))
if img.mode == "P":
img = img.convert("RGBA")
background.paste(img, mask=img.split()[-1])
img = background
img.save(output_path, **config)
return output_pathFormat selection guide:
| Use Case | Format | Quality | Notes |
| Documentation | PNG | Lossless | Crisp text, screenshots |
| Web photos | WebP | 80-85 | Smaller than JPEG, good quality |
| Web graphics | PNG | Lossless | Sharp edges, transparency |
| Presentations | PNG/JPEG | 90+ | High quality display |
| TIFF/PNG | Lossless | Maximum quality | |
| Social media | JPEG | 82-88 | Good quality, manageable size |
| JPEG | 75-80 | Small file size priority |
Step 5: Optimize for Specific Use Cases
def optimize_for_docs(filepath, output_path, max_width=1200):
"""Optimize image for technical documentation."""
img = Image.open(filepath)
# Resize if wider than max_width
if img.width > max_width:
ratio = max_width / img.width
new_size = (max_width, int(img.height * ratio))
img = img.resize(new_size, Image.LANCZOS)
# Ensure PNG for documentation (sharp text)
if output_path.endswith('.png'):
img.save(output_path, format="PNG", optimize=True)
else:
img.save(output_path, format="JPEG", quality=90, optimize=True)
return output_path
def optimize_for_web(filepath, output_path, target_size_kb=200):
"""Optimize image for web with target file size."""
img = Image.open(filepath)
# Try WebP first — best compression for web
quality = 85
while quality >= 50:
img.save(output_path, format="WEBP", quality=quality, method=6)
if os.path.getsize(output_path) / 1024 <= target_size_kb:
break
quality -= 5
return output_pathStep 6: Batch Processing
import os
from pathlib import Path
def batch_enhance(input_dir, output_dir, config=None):
"""Apply consistent enhancements to all images in a directory."""
config = config or {"sharpness": 1.3, "contrast": 1.1, "max_width": 1200}
os.makedirs(output_dir, exist_ok=True)
supported = (".png", ".jpg", ".jpeg", ".webp", ".tiff", ".bmp")
results = []
for filepath in Path(input_dir).iterdir():
if filepath.suffix.lower() not in supported:
continue
output_path = Path(output_dir) / filepath.name
img = Image.open(filepath)
# Apply enhancements
img = reduce_noise(img, strength=1)
img = enhance_sharpness(img, factor=config.get("sharpness", 1.3))
enhancer = ImageEnhance.Contrast(img)
img = enhancer.enhance(config.get("contrast", 1.1))
if config.get("max_width") and img.width > config["max_width"]:
ratio = config["max_width"] / img.width
img = img.resize((config["max_width"], int(img.height * ratio)), Image.LANCZOS)
img.save(str(output_path), format=filepath.suffix.lstrip(".").upper(), quality=90)
results.append(str(output_path))
return resultsStep 7: Add Watermarks and Annotations
from PIL import Image, ImageDraw, ImageFont
def add_watermark(img, text="CONFIDENTIAL", position="bottom-right", opacity=128):
"""Add a text watermark to an image."""
img = img.convert("RGBA")
overlay = Image.new("RGBA", img.size, (255, 255, 255, 0))
draw = ImageDraw.Draw(overlay)
try:
font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", 24)
except (OSError, IOError):
font = ImageFont.load_default()
bbox = draw.textbbox((0, 0), text, font=font)
text_width, text_height = bbox[2] - bbox[0], bbox[3] - bbox[1]
margin = 20
positions = {
"bottom-right": (img.width - text_width - margin, img.height - text_height - margin),
"bottom-left": (margin, img.height - text_height - margin),
"top-right": (img.width - text_width - margin, margin),
"top-left": (margin, margin),
"center": ((img.width - text_width) // 2, (img.height - text_height) // 2),
}
pos = positions.get(position, positions["bottom-right"])
draw.text(pos, text, fill=(200, 200, 200, opacity), font=font)
return Image.alpha_composite(img, overlay).convert("RGB")Error Handling
- Unsupported format: Check format before processing; provide clear error with supported format list
- Memory errors on large images: Process in tiles or reduce resolution first; warn user before processing images >50MP
- Transparency loss: Convert RGBA → RGB with white background for JPEG; warn about alpha channel loss
- EXIF orientation: Always honor EXIF rotation data before processing
- Corrupted files: Catch
PIL.UnidentifiedImageErrorand report without crashing - Font not found: Always fall back to
ImageFont.load_default()when custom fonts unavailable
Common Pitfalls
- ❌ Over-sharpening — creates halos and unnatural edges. Use moderate values (1.2-1.5x)
- ❌ Upscaling beyond 4x — results become soft regardless of interpolation method
- ❌ Saving JPEG with quality >95 — negligible visual gain, much larger files
- ❌ Ignoring color profiles — images may look different across devices
- ❌ Re-compressing JPEGs multiple times — generation loss degrades quality each time
Cline Workflow Notes
- Install location: Copy this skill directory to
.cline/skills/image-enhancer/(project-level) or~/.cline/skills/image-enhancer/(global) - Always analyze first: Check image properties and quality issues before processing
- Preserve originals: Never overwrite source files — always save to a new path
- Pipeline order: Denoise → Sharpen → Adjust brightness/contrast → Color correct → Convert format
- Use LANCZOS for photos, NEAREST for pixel art/screenshots when upscaling
- Report before/after: Show file size, dimensions, and format changes to the user
- Batch operations: Process all images in a directory with consistent settings when requested
Dependencies
pip install Pillow
# Optional for advanced operations:
pip install piexif # EXIF handling
pip install imagehash # Perceptual image comparisonOther versions41 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 41
- ComposioHQ/awesome-claude-skills★ 75ksame name
- ComposioHQ/awesome-codex-skills★ 17ksame name
- composio-community/awesome-codex-skills★ 16ksame name
- Prat011/awesome-llm-skills★ 1.7ksame name
- happycapy-ai/Happycapy-skills★ 137same name
- ArogyaReddy/ComposioHQ-awesome-claude-skills★ 45same name
- frostant/awesome-claude-skills★ 44same name
- ammosu/awesome-claude-skills-zh-TW★ 27same name
- leadgenjay/claude-skills★ 22same name
- Hassaan146/claude-skills★ 18same name
31 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use agent-deep-links, helium-mcp and 9 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.
ComposioHQSkillagent-deep-links
Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.
Also in 3 projects that use this
ComposioHQSkillhelium-mcp
Search real-time news with bias scoring, get live stock/ETF/crypto data with AI analysis, ML options pricing, balanced news synthesis, and meme search via the Helium MCP server.
Also in 3 projects that use this
petestewartSkilldatadog-logs
Query Datadog logs via the Logs Search API v2. Use when the user asks to "check the logs", "search logs", "find errors in Datadog", "look up logs for", "show me production logs", "check for errors", "search Datadog", or any request involving log search, error investigation, or production debugging that requires Datadog log data.
Also in 3 projects that use this
ammosuSkillvideo-downloader
Downloads videos from YouTube and other platforms for offline viewing, editing, or archival. Handles various formats and quality options.
Also in 9 projects that use this
- +7 more from ComposioHQ
In this repository49 other files it gives its agents.
- a-b-testingSkill
- api-devSkill
- article-extractorSkill
- audio-genSkill
- blog-writerSkill
- brainstormingSkill
- brand-guidelinesSkill
- canvas-designSkill
- changelog-generatorSkill
- code-refactorerSkill
- competitive-ads-extractorSkill
- content-research-writerSkill
- database-managerSkill
- docker-deploySkill
- docxSkill
- domain-name-brainstormerSkill
- email-campaignsSkill
- finishing-a-development-branchSkill
- game-devSkill
- git-pushingSkill
- git-workflowSkill
- godot-helperSkill
- ios-simulator-skillSkill
- langsmith-fetchSkill
- lead-research-assistantSkill
- lean-ctxSkill
- mcp-builderSkill
- meeting-insights-analyzerSkill
- pdfSkill
- playwright-skillSkill
- pptxSkill
- react-nextjs-builderSkill
- review-implementingSkill
- seo-optimizerSkill
- ship-learn-nextSkill
- skill-creatorSkill
- skill-builderSkill
- social-media-managerSkill
- staff-engineer-reviewSkill
- tailored-resume-generatorSkill
- test-driven-developmentSkill
- test-fixingSkill
- twitter-algorithm-optimizerSkill
- using-git-worktreesSkill
- video-framesSkill
- webapp-testingSkill
- xlsxSkill
- youtube-transcriptSkill
- your-skill-nameSkill
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.

