Free 40-page Claude guide — setup, 120 prompt codes, MCP servers, AI agents. Download free →
CLSkills
Frontendintermediate

SEO Optimizer

Share

Add SEO meta tags, structured data, sitemap

Works with OpenClaude

You are an SEO specialist implementing on-page optimization. The user wants to add SEO meta tags, structured data (JSON-LD), and generate a sitemap for better search engine visibility.

What to check first

  • Verify your build tool supports static file generation (Next.js, Gatsby, or a custom build script)
  • Check if you have a public/ or static/ directory for sitemap output
  • Confirm your framework allows head tag injection (React Helmet, Next.js Head, or native HTML)

Steps

  1. Install next-seo (Next.js) or create a reusable SEO component that injects meta tags into the document head
  2. Define essential meta tags: title, description, og:image, og:url, canonical, viewport, and charset
  3. Add structured data as JSON-LD (application/ld+json script tag) for Organization, Article, or Product schemas
  4. Create a sitemap generator script that crawls your routes and outputs sitemap.xml
  5. Add robots.txt to control crawler access and point to sitemap location
  6. Implement Open Graph and Twitter Card tags for social media sharing
  7. Add hreflang tags if your site supports multiple languages
  8. Configure your build pipeline to generate sitemap at deploy time

Code

// seo-config.js - SEO metadata configuration
export const seoConfig = {
  siteName: 'My Website',
  siteUrl: 'https://mywebsite.com',
  description: 'Your site description',
  socialImage: 'https://mywebsite.com/og-image.jpg',
  twitter: '@yourhandle',
};

// components/SEOHead.jsx - Reusable SEO component
import Head from 'next/head';

export default function SEOHead({ 
  title, 
  description, 
  canonicalUrl, 
  ogImage, 
  article = false 
}) {
  const { siteUrl, siteName, socialImage } = require('../seo-config');
  const fullTitle = `${title} | ${siteName}`;
  const image = ogImage || socialImage;

  return (
    <Head>
      <title>{fullTitle}</title>
      <meta name="description" content={description} />
      <meta name="viewport" content="width=device-width, initial-scale=1" />
      <link rel="canonical" href={canonicalUrl || siteUrl} />
      
      {/* Open Graph */}
      <meta property="og:site_name" content={siteName} />
      <meta property="og:title" content={title} />
      <meta property="og:description" content={description} />
      <meta property="og:image" content={image} />
      <meta property="og:url" content={canonicalUrl} />
      <meta property="og:type" content={article ? 'article' : 'website'} />

Note: this example was truncated in the source. See the GitHub repo for the latest full version.

Common Pitfalls

  • Treating this skill as a one-shot solution — most workflows need iteration and verification
  • Skipping the verification steps — you don't know it worked until you measure
  • Applying this skill without understanding the underlying problem — read the related docs first

When NOT to Use This Skill

  • When a simpler manual approach would take less than 10 minutes
  • On critical production systems without testing in staging first
  • When you don't have permission or authorization to make these changes

How to Verify It Worked

  • Run the verification steps documented above
  • Compare the output against your expected baseline
  • Check logs for any warnings or errors — silent failures are the worst kind

Production Considerations

  • Test in staging before deploying to production
  • Have a rollback plan — every change should be reversible
  • Monitor the affected systems for at least 24 hours after the change

Quick Info

CategoryFrontend
Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
frontendseometa-tags

Install command:

curl -o ~/.claude/skills/seo-optimizer.md https://claude-skills-hub.vercel.app/skills/frontend/seo-optimizer.md

Related Frontend Skills

Other Claude Code skills in the same category — free to download.

Want a Frontend skill personalized to YOUR project?

This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.