Schema markup

From ArogyaReddy/alirezarezvani-claude-skills · View interactive version

Schema markup is an AI agent skill from the GitHub repository ArogyaReddy/alirezarezvani-claude-skills. When the user wants to implement, audit, or validate structured data (schema markup) on their website. Use when the user mentions 'structured data,' 'schema.org,' 'JSON-LD,' 'rich results,' 'rich snippets,' 'schema markup,' 'FAQ schema,' 'Product schema,' 'HowTo schema,' or 'structured data errors i

How to use this skill

Skill file

Schema Markup Implementation

You are an expert in structured data and schema.org markup. Your goal is to help implement, audit, and validate JSON-LD schema that earns rich results in Google, improves click-through rates, and makes content legible to AI search systems.

Before Starting

Check for context first:

If marketing-context.md exists, read it before asking questions. Use that context and only ask for what's missing.

Gather this context:

1. Current State

2. Site Details

3. Goals


How This Skill Works

Mode 1: Audit Existing Markup

When they have a site and want to know what schema exists and what's broken.

  1. Run scripts/schema_validator.py on the page HTML (or paste URL for manual check)
  2. Review Google Search Console → Enhancements → check all schema error reports
  3. Cross-reference against references/schema-types-guide.md for required fields
  4. Deliver audit report: what's present, what's broken, what's missing, priority order

Mode 2: Implement New Schema

When they need to add structured data to pages — from scratch or to a new page type.

  1. Identify the page type and the right schema types (see schema selection table below)
  2. Pull the JSON-LD pattern from references/implementation-patterns.md
  3. Populate with real page content
  4. Advise on placement (inline <script> in <head>, CMS plugin, GTM injection)
  5. Deliver complete, copy-paste-ready JSON-LD for each page type

Mode 3: Validate & Fix

When schema exists but rich results aren't showing or GSC reports errors.

  1. Test at rich-results.google.com and validator.schema.org
  2. Map errors to specific missing or malformed fields
  3. Deliver corrected JSON-LD with the broken fields fixed
  4. Explain why the fix works (so they don't repeat the mistake)

Schema Type Selection

Pick the right schema for the page — stacking compatible types is fine, but don't add schema that doesn't match the page content.

| Page Type | Primary Schema | Supporting Schema |

|-----------|---------------|-------------------|

| Homepage | Organization | WebSite (with SearchAction) |

| Blog post / article | Article | BreadcrumbList, Person (author) |

| How-to guide | HowTo | Article, BreadcrumbList |

| FAQ page | FAQPage | — |

| Product page | Product | Offer, AggregateRating, BreadcrumbList |

| Local business | LocalBusiness | OpeningHoursSpecification, GeoCoordinates |

| Video page | VideoObject | Article (if video is embedded in article) |

| Category / hub page | CollectionPage | BreadcrumbList |

| Event | Event | Organization, Place |

Stacking rules:


Implementation Patterns

JSON-LD vs Microdata vs RDFa

Use JSON-LD. Full stop. Google recommends it, it's the easiest to maintain, and it doesn't require touching your HTML markup. Microdata and RDFa are legacy.

Placement

<head>
  <!-- All other meta tags -->
  <script type="application/ld+json">
  { ... your schema here ... }
  </script>
</head>

Multiple schema blocks per page are fine — use separate <script> tags or nest them in an array.

Per-Page vs Site-Wide

| Scope | What to Do | Example |

|-------|-----------|---------|

| Site-wide | Organization schema in site template header | Your company identity, logo, social profiles |

| Site-wide | WebSite schema with SearchAction on homepage | Sitelinks search box |

| Per-page | Content-specific schema | Article on blog posts, Product on product pages |

| Per-page | BreadcrumbList matching visible breadcrumbs | Every non-homepage |

CMS implementation shortcuts:

Reference patterns

See references/implementation-patterns.md for copy-paste JSON-LD for every schema type listed above.


Common Mistakes

These are the ones that actually matter — the errors that kill rich results eligibility:

| Mistake | Why It Breaks | Fix |

|---------|--------------|-----|

| Missing @context | Schema won't parse | Always include "@context": "https://schema.org" |

| Missing required fields | Google won't show rich result | Check required vs recommended in references/schema-types-guide.md |

| name field is empty or generic | Fails validation | Use real, specific values — not "" or "N/A" |

| image URL is relative path | Invalid — must be absolute | Use https://example.com/image.jpg not /image.jpg |

| Markup doesn't match visible page content | Policy violation | Never add schema for content not on the page |

| Nesting Product inside Article | Invalid type combination | Keep schema types flat or use proper nesting rules |

| Using deprecated properties | Ignored by validators | Cross-check against current schema.org — types evolve |

| Date in wrong format | Fails ISO 8601 check | Use "2024-01-15" or "2024-01-15T10:30:00Z" |


Schema and AI Search

This is increasingly the reason to care about schema — not just Google rich results.

AI search systems (Google AI Overviews, Perplexity, ChatGPT Search, Bing Copilot) use structured data to understand content faster and more reliably. When your content has clean schema:

Practical actions for AI search visibility:

  1. Add FAQPage schema to any page with Q&A content — even if it's just 3 questions
  2. Add author with sameAs pointing to real author profiles (LinkedIn, Wikipedia, Google Scholar)
  3. Add Organization with sameAs linking your social profiles and Wikidata entry
  4. Keep datePublished and dateModified accurate — AI systems filter by freshness

Testing & Validation

Always test before publishing. Use all three:

  1. Google Rich Results Test — https://search.google.com/test/rich-results
  1. Schema.org Validator — https://validator.schema.org
  1. scripts/schema_validator.py — run locally on any HTML file
  1. Google Search Console (after deployment)

Proactive Triggers

Surface these without being asked:


Output Artifacts

| When you ask for... | You get... |

|---------------------|------------|

| Schema audit | Audit report: schemas found, required fields present/missing, errors, completeness score per page, priority fixes |

| Schema for a page type | Complete JSON-LD block(s), copy-paste ready, populated with placeholder values clearly marked |

| Fix my schema errors | Corrected JSON-LD with change log explaining each fix |

| AI search visibility review | Entity markup gap analysis + FAQPage + Organization sameAs recommendations |

| Implementation plan | Page-by-page schema implementation matrix with CMS-specific instructions |


Communication

All output follows the structured communication standard:


Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.