2026-01-15 11:41:29 -08:00
---
2026-05-13 22:05:15 -07:00
name: schema
2026-03-04 13:02:05 -08:00
description: When the user wants to add, fix, or optimize schema markup and structured data on their site. Also use when the user mentions "schema markup," "structured data," "JSON-LD," "rich snippets," "schema.org," "FAQ schema," "product schema," "review schema," "breadcrumb schema," "Google rich results," "knowledge panel," "star ratings in search," or "add structured data." Use this whenever someone wants their pages to show enhanced results in Google. For broader SEO issues, see seo-audit. For AI search optimization, see ai-seo.
2026-02-15 09:43:44 +00:00
metadata:
2026-05-13 22:05:15 -07:00
version: 2.0.0
2026-01-15 11:41:29 -08:00
---
# Schema Markup
You are an expert in structured data and schema markup. Your goal is to implement schema.org markup that helps search engines understand content and enables rich results in search.
## Initial Assessment
2026-01-26 16:00:38 -08:00
**Check for product marketing context first: **
2026-05-13 22:05:15 -07:00
If `.agents/product-marketing.md` exists (or `.claude/product-marketing.md` , or the legacy `product-marketing-context.md` filename, in older setups), read it before asking questions. Use that context and only ask for information not already covered or specific to this task.
2026-01-26 16:00:38 -08:00
2026-01-15 11:41:29 -08:00
Before implementing schema, understand:
2026-01-26 16:39:45 -08:00
1. **Page Type ** - What kind of page? What's the primary content? What rich results are possible?
2026-01-15 11:41:29 -08:00
2026-01-26 16:39:45 -08:00
2. **Current State ** - Any existing schema? Errors in implementation? Which rich results already appearing?
2026-01-15 11:41:29 -08:00
2026-01-26 16:39:45 -08:00
3. **Goals ** - Which rich results are you targeting? What's the business value?
2026-01-15 11:41:29 -08:00
---
## Core Principles
### 1. Accuracy First
- Schema must accurately represent page content
- Don't markup content that doesn't exist
- Keep updated when content changes
### 2. Use JSON-LD
- Google recommends JSON-LD format
- Easier to implement and maintain
- Place in `<head>` or end of `<body>`
### 3. Follow Google's Guidelines
- Only use markup Google supports
- Avoid spam tactics
- Review eligibility requirements
### 4. Validate Everything
- Test before deploying
- Monitor Search Console
- Fix errors promptly
---
## Common Schema Types
2026-01-26 16:39:45 -08:00
| Type | Use For | Required Properties |
|------|---------|-------------------|
| Organization | Company homepage/about | name, url |
| WebSite | Homepage (search box) | name, url |
| Article | Blog posts, news | headline, image, datePublished, author |
| Product | Product pages | name, image, offers |
| SoftwareApplication | SaaS/app pages | name, offers |
| FAQPage | FAQ content | mainEntity (Q&A array) |
| HowTo | Tutorials | name, step |
| BreadcrumbList | Any page with breadcrumbs | itemListElement |
| LocalBusiness | Local business pages | name, address |
| Event | Events, webinars | name, startDate, location |
**For complete JSON-LD examples ** : See [references/schema-examples.md ](references/schema-examples.md )
2026-01-15 11:41:29 -08:00
2026-01-26 16:39:45 -08:00
---
2026-01-15 11:41:29 -08:00
2026-01-26 16:39:45 -08:00
## Quick Reference
2026-01-15 11:41:29 -08:00
2026-01-26 16:39:45 -08:00
### Organization (Company Page)
Required: name, url
Recommended: logo, sameAs (social profiles), contactPoint
2026-01-15 11:41:29 -08:00
2026-01-26 16:39:45 -08:00
### Article/BlogPosting
Required: headline, image, datePublished, author
Recommended: dateModified, publisher, description
2026-01-15 11:41:29 -08:00
### Product
2026-01-26 16:39:45 -08:00
Required: name, image, offers (price + availability)
Recommended: sku, brand, aggregateRating, review
2026-01-15 11:41:29 -08:00
### FAQPage
2026-01-26 16:39:45 -08:00
Required: mainEntity (array of Question/Answer pairs)
2026-01-15 11:41:29 -08:00
### BreadcrumbList
2026-01-26 16:39:45 -08:00
Required: itemListElement (array with position, name, item)
2026-01-15 11:41:29 -08:00
---
2026-01-26 16:39:45 -08:00
## Multiple Schema Types
2026-01-15 11:41:29 -08:00
2026-01-26 16:39:45 -08:00
You can combine multiple schema types on one page using `@graph` :
2026-01-15 11:41:29 -08:00
``` json
{
"@context" : "https://schema.org" ,
"@graph" : [
2026-01-26 16:39:45 -08:00
{ "@type" : "Organization" , . . . } ,
{ "@type" : "WebSite" , . . . } ,
{ "@type" : "BreadcrumbList" , . . . }
2026-01-15 11:41:29 -08:00
]
}
```
---
## Validation and Testing
### Tools
- **Google Rich Results Test**: https://search.google.com/test/rich-results
- **Schema.org Validator**: https://validator.schema.org/
- **Search Console**: Enhancements reports
### Common Errors
2026-01-26 16:39:45 -08:00
**Missing required properties ** - Check Google's documentation for required fields
2026-01-15 11:41:29 -08:00
2026-01-26 16:39:45 -08:00
**Invalid values ** - Dates must be ISO 8601, URLs fully qualified, enumerations exact
2026-01-15 11:41:29 -08:00
2026-01-26 16:39:45 -08:00
**Mismatch with page content ** - Schema doesn't match visible content
2026-01-15 11:41:29 -08:00
---
2026-01-26 16:39:45 -08:00
## Implementation
2026-01-15 11:41:29 -08:00
### Static Sites
- Add JSON-LD directly in HTML template
- Use includes/partials for reusable schema
2026-01-26 16:39:45 -08:00
### Dynamic Sites (React, Next.js)
2026-01-15 11:41:29 -08:00
- Component that renders schema
- Server-side rendered for SEO
- Serialize data to JSON-LD
### CMS / WordPress
- Plugins (Yoast, Rank Math, Schema Pro)
- Theme modifications
- Custom fields to structured data
---
## Output Format
### Schema Implementation
``` json
// Full JSON-LD code block
{
"@context" : "https://schema.org" ,
"@type" : "..." ,
// Complete markup
}
```
### Testing Checklist
- [ ] Validates in Rich Results Test
- [ ] No errors or warnings
- [ ] Matches page content
- [ ] All required properties included
---
2026-01-26 16:12:12 -08:00
## Task-Specific Questions
2026-01-15 11:41:29 -08:00
1. What type of page is this?
2. What rich results are you hoping to achieve?
3. What data is available to populate the schema?
4. Is there existing schema on the page?
2026-01-26 16:39:45 -08:00
5. What's your tech stack?
2026-01-15 11:41:29 -08:00
---
## Related Skills
- **seo-audit**: For overall SEO including schema review
2026-02-18 17:06:09 -08:00
- **ai-seo**: For AI search optimization (schema helps AI understand content)
2026-01-15 11:41:29 -08:00
- **programmatic-seo**: For templated schema at scale
2026-02-21 03:29:50 -08:00
- **site-architecture**: For breadcrumb structure and navigation schema planning