agentleFS
6t9xstar6t9xstar/one-step-seo/skills/image-seo/SKILL.md

image-seo

Skill5 starsChanged 36 days agoMITView on GitHub

Audit image SEO, descriptive alt attributes, width/height Cumulative Layout Shift (CLS) prevention, image count budgets, passive mixed-content images, and Open Graph preview images.

  • Reads credentials

6 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use programmatic-seo.

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.
  • SentrySkill

    programmatic-seo

    When the user wants to create SEO-driven pages at scale using templates and data. Also use when the user mentions "programmatic SEO," "template pages," "pages at scale," "directory pages," "location pages," "[keyword] + [city] pages," "comparison pages," "integration pages," or "building many pages for SEO." For auditing existing SEO issues, see seo-audit.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run a focused media audit via --skills image-seo (aliases: images, media-seo).

    line 14
  2. Very specific:

    Write concise, accurate alt descriptions for informative photos, charts, diagrams, and product shots.

    line 30
  3. Very specific:

    Add intrinsic width and height attributes (or CSS aspect-ratio) to every <img> tag so browsers reserve layout space before images download.

    line 32
  4. Very specific:

    When P02-img-count (P2) fires (> 20 images), add loading="lazy" and decoding="async" to below-the-fold images, serve modern AVIF/WebP with …

    line 34
  5. Very specific:

    If report.page.psi is present, cite report.page.psi lab/field LCP and CLS alongside O09-img-dims and P02-img-count.

    line 53
  6. Very specific:

    Never fabricate width/height pixel values without reading the actual image asset dimensions on disk or in the repo — wrong aspect ratios …

    line 67
  7. Very specific:

    Never stuff keywords into alt attributes.

    line 68

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

image-seo — Image Optimization, Alt Text & Visual Stability

1. Description & Activation Criteria

Activate image-seo when the user wants to:

  • Audit image search discoverability, screen-reader accessibility, and visual layout stability across landing pages, blogs, or product catalogs.
  • Remediate missing alt attributes (O08-alt P1), missing width/height dimensions causing Cumulative Layout Shift (O09-img-dims P2), excessive unoptimized <img> counts (P02-img-count P2, > 20 images), missing og:image (O06-og P2), or http:// passive mixed-content images (T13-mixed P2).
  • Run a focused media audit via --skills image-seo (aliases: images, media-seo).

2. Inputs & Prerequisites

  • Target: Live URL or local HTML file/directory.
  • Calibrated thresholds (lib/checks.mjs):
    • O08-alt (P1): Fires when 1+ <img> tags lack an alt attribute (alt="" is valid for decorative images; omitting alt entirely fails).
    • O09-img-dims (P2): Fires when more than 50% of <img> tags lack explicit width and height attributes.
    • P02-img-count (P2): Fires when a page embeds > 20 <img> elements (THRESHOLDS.imgCountMax = 20).

3. Step-by-Step Workflow

  1. Run an image-focused audit:
    • Execute npx one-step-seo page <url> --skills image-seo --out ./seo-report (add --psi when PSI_API_KEY is set to measure live LCP and CLS impact).
  2. Fix missing alt attributes (O08-alt):
    • Inspect report.page.images and O08-alt (P1) in report.findings.
    • Write concise, accurate alt descriptions for informative photos, charts, diagrams, and product shots; set explicit empty alt="" on purely decorative icons or dividers.
  3. Eliminate image-driven CLS (O09-img-dims):
    • Add intrinsic width and height attributes (or CSS aspect-ratio) to every <img> tag so browsers reserve layout space before images download.
  4. Optimize image count, format & loading priority (P02-img-count, T13-mixed):
    • When P02-img-count (P2) fires (> 20 images), add loading="lazy" and decoding="async" to below-the-fold images, serve modern AVIF/WebP with responsive srcset/sizes, and never put loading="lazy" on the above-the-fold LCP hero image (use fetchpriority="high" on the hero image instead).
    • Upgrade any http:// image URLs flagged by T13-mixed (P2) to https://.

4. Tools & CLI Commands

# Single-page image SEO & CLS risk audit
npx one-step-seo page https://example.com --skills image-seo --out ./seo-report

# Multi-page crawl across media-heavy galleries or product pages
npx one-step-seo audit https://example.com --pages 20 --skills images --out ./seo-report

# Combine image HTML checks with live PageSpeed Insights LCP & CLS metrics
PSI_API_KEY=your_key npx one-step-seo page https://example.com --psi --skills image-seo,core-web-vitals

5. Evidence Requirements

  • Report report.page.images alongside exact ratios from O08-alt (X/Y images missing alt), O09-img-dims (X/Y without width+height), P02-img-count (N <img>), O06-og, and T13-mixed in report.findings.
  • If report.page.psi is present, cite report.page.psi lab/field LCP and CLS alongside O09-img-dims and P02-img-count.

6. Expected Outputs

  1. Image Health & Stability Summary: Total <img> count, alt coverage, intrinsic dimension coverage, HTTPS hygiene, and og:image presence.
  2. Concrete <img> / <picture> Snippets: Corrected tags with descriptive alt, intrinsic width/height, fetchpriority="high" for hero LCP images, and loading="lazy" for below-the-fold assets.

7. Limitations & External Data

  • HTML markup vs binary byte inspection: Without --psi, one-step-seo inspects HTML <img> attributes (alt, width, height, src scheme, count) without downloading image binaries to check compression ratios or pixel dimensions. Pass --psi (PSI_API_KEY) for live Lighthouse image byte-savings and LCP/CLS diagnostics.
  • Offline support: 100% supported offline (--offline).

8. Safety & Approval Rules

  • Never fabricate width/height pixel values without reading the actual image asset dimensions on disk or in the repo — wrong aspect ratios distort rendered images!
  • Never stuff keywords into alt attributes; describe what a human viewer actually sees in the image.

9. Examples

# Inspect the image-seo skill definition
npx one-step-seo skills image-seo

# Audit an offline static build for missing alt text and missing image dimensions
npx one-step-seo audit ./dist --pages 20 --skills image-seo --offline --out ./seo-report

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.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.