技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
algo-seo-schema【数据与研究】Implement Schema.org structured data markup in JSON-LD format for enhanced search results. Use this skill when the user needs to add rich snippets to web pages, implement FAQ/Product/Article schema, or validate structured data — even if they say 'rich snippets', 'structured data', or 'Google rich results'.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Schema.org structured data provides machine-readable page context to search engines via JSON-LD. Enables rich results (stars, FAQs, breadcrumbs, product cards) in SERPs. Implementation is O(1) per page — it's a markup task, not computational.
Trigger conditions:
When NOT to use:
IRON LAW: Schema Markup Must MATCH Visible Content
Marking up content that users can't see violates Google guidelines
and risks manual penalties. Every structured data field must
correspond to content visible on the page.
Identify page type (Article, Product, FAQ, HowTo, Event, etc.). Map visible content to required and recommended schema properties. Gate: Page type identified, all required properties have visible content.
<script type="application/ld+json"> in <head>Validate with Google Rich Results Test. Check: no errors, all required fields present, no mismatch with visible content. Gate: Passes Google Rich Results Test with zero errors.
Return complete JSON-LD markup ready for insertion.
{
"schema": {"@context": "https://schema.org", "@type": "Product", "name": "...", "offers": {"@type": "Offer", "price": "29.99", "priceCurrency": "TWD"}},
"validation": {"errors": 0, "warnings": 1, "eligible_rich_results": ["Product snippet"]}
}
Input: FAQ page with 3 questions and answers Expected: FAQPage schema with 3 Question/Answer pairs in JSON-LD
| Input | Expected | Why |
|---|---|---|
| Page with no clear type | Use WebPage as fallback | Most generic valid type |
| Multiple schemas needed | Array of JSON-LD objects | One page can have multiple types |
| Missing required field | Error, do not generate | Incomplete schema hurts more than none |
references/type-properties.mdreferences/validation-errors.md