agentleFS
thisisAhsanIqbalthisisAhsanIqbal/nextjs-seo-audit/skills/site-speed-optimization/SKILL.md

site-speed-optimization

Skill7 starsChanged 10 months agoMITView on GitHub

Audits stylesheet loading, inline CSS volume, image alt text, image formats, and Next.js Image component usage. Use when checking page speed related to HTML structure. For render-blocking scripts, image dimensions, lazy loading, and resource hints, see the core-web-vitals skill.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If stylesheets > 3 → ⚠️ WARN "Consider combining CSS files"

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

Site Speed Optimization

Audit HTML-level factors that affect page load speed.

Note: Render-blocking scripts, image dimensions/lazy loading, preconnect hints, and font loading are handled by the core-web-vitals skill. Do not duplicate those checks here.

1. Total script count

Count all <script src="..."> elements:

  • More than 10 external scripts → ⚠️ WARN "Consider bundling or removing unused scripts"
  • 10 or fewer → ✅ PASS

2. Inline CSS volume

Measure total character count of all style="..." attributes + <style> element contents:

ConditionStatus
Total > 5000 characters⚠️ WARN "Move styles to external stylesheet for caching"
Total ≤ 5000✅ PASS

3. Stylesheet loading

  • Count <link rel="stylesheet"> elements
  • If stylesheets > 3 → ⚠️ WARN "Consider combining CSS files"

4. Image alt text

ConditionStatus
All images have alt attribute✅ PASS
Any image missing alt❌ FAIL "Critical for SEO and accessibility"

5. Image formats

  • Images with .jpg, .jpeg, .png, .gif extensions → ⚠️ WARN "Consider WebP or AVIF for smaller file sizes"

6. Next.js Image component

  • Images not using /_next/image src → ⚠️ WARN "Consider using Next.js <Image> component for automatic optimization"
  • Skip this check if the site is not a Next.js project

Edge cases

  • Inline <script> tags (no src) should be counted separately from external scripts — they contribute to page weight but not network requests
  • <style> elements inside <noscript> blocks should be excluded from inline CSS volume
  • Base64-encoded images (src="data:image/...") bypass network loading but increase HTML size — flag as ⚠️ WARN if total base64 content exceeds 10KB
  • SVG images (<img src="*.svg">) do not need WebP/AVIF conversion — exclude from image format checks
  • Next.js <Image> component detection: look for /_next/image in src or srcset attributes, or data-nimg attribute
  • Dynamically injected scripts (via JS) are not visible in static HTML — note this limitation

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.