关于 schema-markup-generator
这是一个 Claude skill,可为常见内容类型生成并审查 JSON-LD 结构化数据,适合需要添加 schema 标记或检查现有标记缺失字段与错误的网站管理者和内容团队。
主要功能
- 01为多种 schema 类型生成 JSON-LD
- 02列出必需和推荐字段
- 03核对标记与页面可见内容
- 04使用列出的验证器检查 schema
- 05提供模板和常见错误说明
适用场景
- 01为新页面添加结构化数据
- 02审查现有标记中的错误或缺失字段
- 03准备 FAQ 或产品搜索结果标记
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ thatrebeccarae/ claude-marketing --skill schema-markup-generator安装后在 Claude Code 中输入/schema-markup-generator确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
EXAMPLES.mdLICENSEREFERENCE.md详细介绍
架构标记生成器
生成 JSON-LD 结构化数据,以获得富媒体搜索结果、AI 引用和更高的搜索可见度。
安装
git clone https://github.com/thatrebeccarae/claude-marketing.git && cp -r claude-marketing/skills/schema-markup-generator ~/.claude/skills/
适用场景
- 为新页面或现有页面添加结构化数据
- 为特定架构类型生成 JSON-LD
- 审核现有架构,检查错误或缺失字段
- 提升 AI 搜索可见度(与 aeo-geo-optimizer 配合使用)
- 启用富媒体搜索结果(FAQ 下拉项、星级评分、操作步骤)
工作流
步骤 1:确定内容类型
| 内容 | 主要架构 | 富媒体搜索结果 |
|---|---|---|
| 博文 | Article | 显示作者和日期的增强型列表 |
| FAQ 区块 | FAQPage | 搜索结果页(SERP)中的可展开问答 |
| 教程 | HowTo | 带图片和时长的分步说明 |
| 产品页面 | Product | 价格、库存情况、评分 |
| 评论 | Review + Rating | 搜索结果页(SERP)中的星级评分 |
| 食谱 | Recipe | 烹饪时间、食材、评分 |
| 活动 | Event | 日期、地点、票务信息 |
| 本地商家 | LocalBusiness | 地图、营业时间、联系方式 |
| 人物/作者 | Person | 知识面板 |
| 面包屑导航 | BreadcrumbList | 搜索结果页(SERP)中的面包屑导航 |
| 视频 | VideoObject | 视频轮播、缩略图 |
| 软件 | SoftwareApplication | 搜索结果页(SERP)中的应用信息 |
| 课程 | Course | 搜索结果页(SERP)中的课程信息 |
| 数据集 | Dataset | 数据集搜索结果 |
步骤 2:生成 JSON-LD
生成包含该架构类型所有必需和推荐字段的 <script type="application/ld+json"> 区块。始终使用 JSON-LD 格式(不要使用 Microdata 或 RDFa)。
步骤 3:验证
- Google 富媒体搜索结果测试:https://search.google.com/test/rich-results
- Schema.org 验证工具:https://validator.schema.org/
- 在 Google Search Console 中检查结构化数据错误
架构模板
Article
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Article Title (max 110 chars)",
"description": "Brief description of the article",
"author": {
"@type": "Person",
"name": "Author Name",
"url": "https://example.com/author/name",
"jobTitle": "Author Title",
"sameAs": ["https://linkedin.com/in/author", "https://twitter.com/author"]
},
"publisher": {
"@type": "Organization",
"name": "Publisher Name",
"logo": {"@type": "ImageObject", "url": "https://example.com/logo.png"}
},
"datePublished": "2026-03-18T00:00:00Z",
"dateModified": "2026-03-18T00:00:00Z",
"image": "https://example.com/article-image.jpg",
"mainEntityOfPage": {"@type": "WebPage", "@id": "https://example.com/article-url"}
}
FAQPage
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "What is the question?",
"acceptedAnswer": {
"@type": "Answer",
"text": "The complete answer text. Can include <a href=url>HTML links</a>."
}
}
]
}
HowTo
{
"@context": "https://schema.org",
"@type": "HowTo",
"name": "How to Do Something",
"description": "Brief description",
"totalTime": "PT30M",
"estimatedCost": {"@type": "MonetaryAmount", "currency": "USD", "value": "0"},
"step": [
{
"@type": "HowToStep",
"name": "Step 1 Title",
"text": "Detailed step instructions",
"image": "https://example.com/step1.jpg"
}
]
}
Product
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Product Name",
"description": "Product description",
"image": "https://example.com/product.jpg",
"brand": {"@type": "Brand", "name": "Brand Name"},
"sku": "SKU-12345",
"offers": {
"@type": "Offer",
"price": "29.99",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock",
"url": "https://example.com/product"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.5",
"reviewCount": "127"
}
}
BreadcrumbList
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{"@type": "ListItem", "position": 1, "name": "Home", "item": "https://example.com"},
{"@type": "ListItem", "position": 2, "name": "Category", "item": "https://example.com/category"},
{"@type": "ListItem", "position": 3, "name": "Current Page"}
]
}
必需字段与推荐字段
| 架构类型 | 必需字段 | 推荐字段 |
|---|---|---|
| Article | headline、author、datePublished、image | dateModified、publisher、description |
| FAQPage | mainEntity(Question + Answer) | — |
| HowTo | name、step | totalTime、estimatedCost、image |
| Product | name、offers(price + currency + availability) | brand、sku、aggregateRating、image |
| LocalBusiness | name、address | phone、hours、geo、image、priceRange |
| Event | name、startDate、location | endDate、offers、image、performer |
| Person | name | jobTitle、url、sameAs、image |
常见错误
- 缺少必需字段 — 务必检查各类型的要求
- 日期格式不正确 — 使用 ISO 8601(YYYY-MM-DDTHH:MM:SSZ)
- 标记与可见内容不符 — 架构必须反映用户看到的内容
- 使用 Microdata 而非 JSON-LD — Google 推荐使用 JSON-LD
- 嵌套错误 — 部署前验证 JSON 语法
- 重复架构 — 每个页面的每种类型只保留一个架构区块
- Organization 自引用 — publisher 应为组织,而非页面
与其他技能集成
- aeo-geo-optimizer — 架构是 AEO 的关键信号;实施 AEO 审核推荐的类型
- technical-seo-audit — 审核会找出缺失或损坏的架构;此技能用于生成修复内容
- seo-content-writer — 内容结构应与架构结构保持一致
评论
支持 Markdown