All skills
asyrafhussin avatar

/seo-best-practices

@46bae0b

SEO patterns, conventions, and audit for web applications. Use when implementing meta tags, structured data, Core Web Vitals, sitemaps, Open Graph, auditing SEO, or optimizing pages for search engines. Triggers on "audit SEO", "check SEO", "review SEO", or tasks involving search optimization, schema markup, or social sharing meta tags.

Use this Skill: https://skilld.dev/gh/asyrafhussin/agent-skills/seo-best-practices

This session only. Nothing lands on disk.

rulescwv-lcp.md

≈673 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Largest Contentful Paint Optimization

Impact: CRITICAL (Must be under 2.5s (Google ranking signal))

LCP measures how long it takes for the largest visible element (usually a hero image or heading) to render. Google uses LCP as a direct ranking signal, and pages exceeding 2.5s risk lower search positions and higher bounce rates.

Incorrect

<!-- ❌ Bad: lazy-loading the hero image, no preload, render-blocking CSS -->
<head>
  <link rel="stylesheet" href="/css/all-styles.css" />
  <link rel="stylesheet" href="/css/animations.css" />
  <link rel="stylesheet" href="/css/third-party-widget.css" />
</head>
<body>
  <section class="hero">
    <img
      src="/images/hero-banner.jpg"
      loading="lazy"
      alt="Welcome to our platform"
    />
  </section>
</body>

Problems:

  • loading="lazy" on the hero image delays the LCP element, as the browser defers loading until it enters the viewport
  • No <link rel="preload"> means the browser discovers the image only after parsing the HTML and CSS
  • Multiple render-blocking stylesheets delay first render, pushing LCP further out

Correct

<!-- ✅ Good: preloaded hero image with fetchpriority, non-blocking CSS -->
<head>
  <link
    rel="preload"
    as="image"
    href="/images/hero-banner.webp"
    fetchpriority="high"
  />
  <link rel="stylesheet" href="/css/critical.css" />
  <link
    rel="stylesheet"
    href="/css/non-critical.css"
    media="print"
    onload="this.media='all'"
  />
</head>
<body>
  <section class="hero">
    <img
      src="/images/hero-banner.webp"
      fetchpriority="high"
      width="1200"
      height="600"
      alt="Welcome to our platform"
    />
  </section>
</body>
// ✅ React: hero image with fetchPriority="high" and no lazy loading
export default function HeroSection() {
  return (
    <section className="hero">
      <img
        src="/images/hero-banner.webp"
        alt="Welcome to our platform"
        width={1200}
        height={600}
        fetchPriority="high"
      />
    </section>
  );
}

Benefits:

  • fetchpriority="high" tells the browser to prioritize the hero image over other resources
  • <link rel="preload"> starts fetching the image before the browser encounters the <img> tag
  • Non-critical CSS is deferred using the media="print" trick, unblocking initial render
  • WebP format reduces image payload, further improving load time

Reference: Optimize Largest Contentful Paint

Source: SKILL.md on GitHub

1 warning16d4 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill is a comprehensive SEO reference and audit tool for React and Laravel applications. It provides detailed patterns for optimizing Core Web Vitals, technical SEO, and structured data. No malicious code, obfuscation, or data exfiltration patterns were identified. The skill is designed to analyze project code and provide structural feedback based on a predefined checklist.

  • Socket16d

    5 alerts: gptAnomaly

  • Snyk16d

    Risk: LOW · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 46bae0b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 6 months ago
metadata
{
  "author": "agent-skills",
  "version": "1.2.0"
}

README badge

README badge for asyrafhussin/agent-skills/seo-best-practices