Skip to content
Back to skills

Optimize Images

ASecurity

Scans the project for heavy images and outdated formats, then proposes sizes, conversions and markup changes before touching any file.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 15, 2026
ai-agentsnode

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add workspace-templates/ai-agent-templates --skill optimize-images --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Optimize Images?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Optimize Images
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/workspace-templates-optimize-images-ai-agent-templates/badge)](https://www.skillsdirectory.com/skills/workspace-templates-optimize-images-ai-agent-templates)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: optimize-images
description: Scans the project for heavy images and outdated formats, then proposes sizes, conversions and markup changes before touching any file.
disable-model-invocation: true
---

Audit images in: $ARGUMENTS (default: the whole repository, skipping node_modules and build output).

1. List image files with size on disk and pixel dimensions (`find` with `-size +200k`, and `identify`, `sharp` or `file` for dimensions). Report the 20 largest.
2. For each, find where it is used (search for the file name in code, templates and CSS) and the largest size it is displayed at.
3. Flag: dimensions more than 2x the displayed size, PNG or BMP photographs, JPEG graphics with flat colors, SVGs with embedded bitmaps, and files nothing references.
4. Propose per file: target format (AVIF or WebP with a fallback, or SVG), target width, and estimated saving. Suggest `srcset`, `sizes`, `loading="lazy"` below the fold, and explicit `width` and `height` to prevent layout shift.
5. Do not convert or delete anything yet.

Show a table of file, current size, proposed result and saving, with a total. Ask which files to convert, keep originals in a clearly named folder, and name the exact command you will run.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.