image-optimization-cdn

image-optimization-cdn is a skill for Claude Code, Codex from finsilabs/awesome-ecommerce-skills. It costs 32 tokens per session (2,679 once invoked), scanned A, original, MIT.

An image-delivery guide for resizing product pictures, converting them to smaller WebP or AVIF files, loading below-the-fold images later, and serving them through a CDN, which delivers files from locations near users.

In plain words
What is it for?
Use it to build or improve an image pipeline for a storefront and address image-related Core Web Vitals problems such as slow Largest Contentful Paint.
Why use it?
It reduces image file sizes and loading work, helping store pages display faster when large product pictures are slowing them down.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument; mentions Codex; mentions Gemini CLI.

Good fit Use it to build or improve an image pipeline for a storefront and address image-related Core Web Vitals problems such as slow Largest Contentful Paint.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/finsilabs/awesome-ecommerce-skills/image-optimization-cdn
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add finsilabs/awesome-ecommerce-skills --skill image-optimization-cdn
Clone the repo
git clone --depth 1 https://github.com/finsilabs/awesome-ecommerce-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for image-optimization-cdn

README.md
[![agentmods](https://agentmods.dev/badge/skills/finsilabs/awesome-ecommerce-skills/image-optimization-cdn/github.svg)](https://agentmods.dev/skills/finsilabs/awesome-ecommerce-skills/image-optimization-cdn)
Your own site
<a href="https://agentmods.dev/skills/finsilabs/awesome-ecommerce-skills/image-optimization-cdn"><img src="https://agentmods.dev/badge/skills/finsilabs/awesome-ecommerce-skills/image-optimization-cdn/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for image-optimization-cdn

Your own site · 80×15
<a href="https://agentmods.dev/skills/finsilabs/awesome-ecommerce-skills/image-optimization-cdn"><img src="https://agentmods.dev/badge/skills/finsilabs/awesome-ecommerce-skills/image-optimization-cdn.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,679 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.02679
Opus 5 $0.00016 $0.01340
Sonnet 5 $0.00006 $0.00536
Haiku 4.5 $0.00003 $0.00268

Measured 7d ago against content hash d7bbe05576d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

image-optimization-cdn scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/infrastructure-performance/image-optimization-cdn/SKILL.md · 232 lines

How it starts

The opening of the file, as written. The whole thing — 232 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Image Optimization CDN

Overview

Product images are typically the largest assets on e-commerce pages and the single biggest contributor to poor Largest Contentful Paint (LCP) scores. An optimized image pipeline resizes images to the required dimensions, converts to modern formats (WebP, AVIF) for 30–50% smaller file sizes, delivers from a CDN close to the user, and applies lazy loading to images below the fold.

When to Use This Skill

  • When product pages fail Core Web Vitals due to large or unoptimized images (LCP > 2.5s)
  • When setting up an image pipeline for a new headless storefront
  • When original product images from vendors are multi-megabyte files that need automation
  • When adding WebP/AVIF support to an existing storefront that serves only JPEG/PNG
  • When measuring Core Web Vitals and images are the primary bottleneck

Core Instructions

Step 1: Determine your platform and available image optimization

Platform Built-In Image CDN What You Need to Do
Shopify Shopify CDN (Fastly) — automatic WebP conversion, responsive sizing via URL params Use Liquid img_url filter with size params; ensure all <img> tags have width and height attributes; add loading="lazy" to below-fold images
WooCommerce None by default Install Imagify or ShortPixel plugin for automatic WebP conversion; add Cloudflare as CDN (free tier) for global delivery
BigCommerce BigCommerce CDN — automatic WebP conversion, responsive sizing BigCommerce serves images via CDN automatically; optimize by specifying image dimensions in the URL and setting proper <img> attributes in templates
Custom / Headless None — you build it Use Cloudinary (managed) or Sharp (self-hosted) with a CDN; see implementation below

Step 2: Platform-specific image optimization


Shopify

Shopify CDN automatically handles WebP conversion and resizing. Your job is to use it correctly in Liquid templates:

Read the full file on GitHub · 232 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 232 lines · 32 tokens per session scan A d7bbe05576d0

Subscribe to this mod's changes

image-optimization-cdn is a skill published in the GitHub repository finsilabs/awesome-ecommerce-skills (52 stars, last pushed 6mo ago), licensed MIT. It adds 32 tokens to every session and 2,679 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

performance

Performance optimization patterns covering Core Web Vitals, React render optimization, lazy loading, image optimization, backend profiling, LLM inference, and sustainability UX. Use when improving page speed, debugging slow renders, optimizing bundles, reducing image payload, profiling backend, deploying LLMs…

yonatangross/orchestkit · 64 tokens

public-status-page

AI-powered public status page design skill for e-commerce businesses. Creates status page architecture, incident communication templates, subscriber notification systems, and uptime reporting frameworks.

nexscope-ai/eCommerce-Skills · 0 tokens

performance

Use when a page or interaction is slow for one user and the fix starts from a measurement — a failing Core Web Vital (LCP, INP, CLS), a heavy JS bundle, wasted re-renders, an over-broad client boundary: profile, attribute the cost to one phase, fix it, re-measure. NOT surviving concurrent load (that is scaling), NOT…

ericrisco/rsc-harness · 91 tokens

b2c-mrt

Deploy and manage Managed Runtime (MRT) storefronts using the b2c CLI. Use this skill whenever the user needs to deploy a PWA Kit bundle, manage MRT environments and projects, set environment variables, configure URL redirects, or manage organization connections — even if they just say "deploy my PWA" or "set up a…

SalesforceCommerceCloud/b2c-developer-tooling · 77 tokens

sfnext-hybrid-storefronts

Implement hybrid storefronts that run Storefront Next alongside SFRA or SiteGenesis. Use when planning gradual migration from SFRA, configuring hybrid proxy for local development, setting up session bridging between storefronts, or routing traffic between old and new implementations.

SalesforceCommerceCloud/b2c-developer-tooling · 57 tokens

b2c-ecdn

Manage eCDN zones, security settings, and edge configuration for B2C Commerce storefronts. Use this skill whenever the user needs to purge CDN cache, provision SSL certificates, configure WAF or firewall rules, set up rate limiting, enable logpush or Page Shield, manage MRT routing, configure mTLS or cipher suites, or…

SalesforceCommerceCloud/b2c-developer-tooling · 109 tokens