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.

rulessocial-open-graph.md

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

Open Graph Meta Tags

Impact: HIGH (Controls how pages appear on Facebook, LinkedIn, Discord)

Open Graph tags control the title, description, and image shown when your page is shared on social platforms. Without them, platforms guess from page content and often produce unappealing or incorrect previews, reducing click-through rates from social traffic.

Incorrect

<!-- ❌ Bad: missing og:image, relative URLs, incomplete tags -->
<head>
  <meta property="og:title" content="My Website - Home - Welcome - Best Products - Buy Now" />
  <meta property="og:url" content="/about" />
  <meta property="og:image" content="/images/logo-small.png" />
</head>

Problems:

  • og:title exceeds 60 characters and reads like keyword stuffing; platforms truncate it
  • og:url uses a relative path; platforms cannot resolve it to the correct page
  • og:image uses a relative URL and likely references a small logo instead of a 1200x630 share image
  • Missing og:description, og:type, and og:image:alt means platforms must guess or show nothing

Correct

<!-- ✅ Good: complete OG tags with absolute URLs and proper image dimensions -->
<head>
  <meta property="og:title" content="Premium Running Shoes | SportShop" />
  <meta
    property="og:description"
    content="Lightweight, responsive running shoes designed for road and trail. Free shipping on orders over $75."
  />
  <meta property="og:image" content="https://www.sportshop.com/images/og/running-shoes.jpg" />
  <meta property="og:image:width" content="1200" />
  <meta property="og:image:height" content="630" />
  <meta property="og:image:alt" content="A pair of blue running shoes on a forest trail" />
  <meta property="og:url" content="https://www.sportshop.com/shoes/running" />
  <meta property="og:type" content="product" />
  <meta property="og:site_name" content="SportShop" />
  <meta property="og:locale" content="en_US" />
</head>
// ✅ React SPA: Open Graph tags with Inertia.js Head component
import { Head } from '@inertiajs/react';

interface Product {
  name: string;
  slug: string;
  shortDescription: string;
  ogImageUrl: string;
  imageAlt: string;
}

export default function ProductPage({ product }: { product: Product }) {
  return (
    <>
      <Head>
        <title>{`${product.name} | SportShop`}</title>
        <meta head-key="description" name="description" content={product.shortDescription} />
        <meta property="og:title" content={`${product.name} | SportShop`} />
        <meta property="og:description" content={product.shortDescription} />
        <meta
          property="og:url"
          content={`https://www.sportshop.com/shoes/${product.slug}`}
        />
        <meta property="og:site_name" content="SportShop" />
        <meta property="og:image" content={product.ogImageUrl} />
        <meta property="og:image:width" content="1200" />
        <meta property="og:image:height" content="630" />
        <meta property="og:image:alt" content={product.imageAlt} />
        <meta property="og:locale" content="en_US" />
        <meta property="og:type" content="website" />
      </Head>
      <main>
        <h1>{product.name}</h1>
      </main>
    </>
  );
}
{{-- ✅ Laravel Blade: OG tags in the layout --}}
<head>
  <meta property="og:title" content="{{ $ogTitle ?? Str::limit($title, 60) }}" />
  <meta property="og:description" content="{{ $ogDescription ?? Str::limit($description, 200) }}" />
  <meta property="og:image" content="{{ $ogImage ?? asset('images/og-default.jpg') }}" />
  <meta property="og:image:width" content="1200" />
  <meta property="og:image:height" content="630" />
  <meta property="og:image:alt" content="{{ $ogImageAlt ?? $title }}" />
  <meta property="og:url" content="{{ url()->current() }}" />
  <meta property="og:type" content="{{ $ogType ?? 'website' }}" />
  <meta property="og:site_name" content="{{ config('app.name') }}" />
  <meta property="og:locale" content="en_US" />
</head>

Benefits:

  • og:title under 60 characters displays fully on all platforms without truncation
  • og:description between 100-200 characters provides enough context to drive clicks
  • og:image at 1200x630px with an absolute URL renders correctly as a large preview card on Facebook, LinkedIn, and Discord
  • og:image:alt improves accessibility and provides context when the image fails to load
  • og:url with an absolute URL ensures the canonical page receives all share counts

Reference: Open Graph Protocol

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