关于 local-schema
local-schema 是面向本地企业 SEO 从业者的结构化数据实施技能,指导配置与 Google Business Profile 数据一致的 LocalBusiness schema。它还涵盖多地点及服务区域企业的标记和验证。
主要功能
- 01选择具体的 LocalBusiness 类型
- 02配置单地点企业结构化数据
- 03为多个地点设置独立标识
- 04为无公开地址企业设置服务区域
- 05验证标记并排查常见错误
适用场景
- 01为本地企业网站添加 LocalBusiness 标记
- 02为每个营业地点配置独立 schema
- 03检查结构化数据是否与 GBP 信息一致
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ garrettjsmith/ localseoskills --skill local-schema安装后在 Claude Code 中输入/local-schema确认已加载。
详细介绍
本地 Schema 标记
你是实施本地商家结构化数据的专家。你的目标是正确实施 LocalBusiness schema,强化 GBP 数据并提升本地搜索曝光度。
核心原则
你网站上的 Schema 必须与 GBP 数据完全一致。不一致会产生相互冲突的信号。Schema 是你的网站对 GBP 中商家信息的确认。
LocalBusiness Schema 模板
{
"@context": "https://schema.org",
"@type": "Plumber",
"@id": "https://example.com/#business",
"name": "Smith Plumbing",
"image": "https://example.com/images/logo.png",
"url": "https://example.com",
"telephone": "+17165550100",
"email": "[email protected]",
"address": {
"@type": "PostalAddress",
"streetAddress": "123 Main St, Suite 200",
"addressLocality": "Buffalo",
"addressRegion": "NY",
"postalCode": "14201",
"addressCountry": "US"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": "42.8864",
"longitude": "-78.8784"
},
"openingHoursSpecification": [
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
"opens": "08:00",
"closes": "17:00"
}
],
"areaServed": [
{ "@type": "City", "name": "Buffalo", "sameAs": "https://en.wikipedia.org/wiki/Buffalo,_New_York" },
{ "@type": "City", "name": "Orchard Park" },
{ "@type": "City", "name": "Hamburg" }
],
"priceRange": "$$",
"sameAs": [
"https://www.facebook.com/smithplumbing",
"https://www.yelp.com/biz/smith-plumbing-buffalo"
],
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.8",
"reviewCount": "142"
},
"hasOfferCatalog": {
"@type": "OfferCatalog",
"name": "Plumbing Services",
"itemListElement": [
{
"@type": "Offer",
"itemOffered": {
"@type": "Service",
"name": "Emergency Plumbing",
"description": "24/7 emergency plumbing repair"
}
}
]
}
}
@type 选择
使用最具体的 LocalBusiness 子类型:
| 商家类型 | Schema @type |
|---|---|
| 普通商家 | LocalBusiness |
| 水管工 | Plumber |
| 电工 | Electrician |
| HVAC | HVACBusiness |
| 牙医 | Dentist |
| 餐厅 | Restaurant |
| 汽车维修 | AutoRepair |
| 律师 | Attorney |
| 房地产经纪人 | RealEstateAgent |
| 美发沙龙 | HairSalon |
| 医疗机构 | MedicalBusiness |
完整列表:https://schema.org/LocalBusiness(查看子类型)
多地点 Schema
每个地点都需要使用唯一的 @id 设置自己的 Schema:
{
"@type": "Plumber",
"@id": "https://example.com/locations/buffalo-ny/#business",
"name": "Smith Plumbing - Buffalo",
"url": "https://example.com/locations/buffalo-ny/",
...
}
在首页引用所有地点:
{
"@type": "Organization",
"@id": "https://example.com/#organization",
"name": "Smith Plumbing",
"department": [
{ "@id": "https://example.com/locations/buffalo-ny/#business" },
{ "@id": "https://example.com/locations/orchard-park-ny/#business" }
]
}
SAB(服务区域商家)Schema
对于没有公开地址的商家,省略 address 并着重设置 areaServed:
{
"@type": "Plumber",
"name": "Smith Plumbing",
"areaServed": [
{ "@type": "City", "name": "Buffalo, NY" },
{ "@type": "City", "name": "Orchard Park, NY" },
{ "@type": "State", "name": "New York" }
],
"telephone": "+17165550100",
"url": "https://example.com"
}
验证
工具
- Google Rich Results Test:https://search.google.com/test/rich-results(可渲染 JavaScript)
- Schema Markup Validator:https://validator.schema.org/
- 浏览器 DevTools:
document.querySelectorAll('script[type="application/ld+json"]')
常见错误
address格式与 GBP 不一致- 缺少
geo坐标 @type错误(过于宽泛)telephone缺少国家区号openingHoursSpecification与实际营业时间不一致- 不同页面使用了重复的
@id
⚠️ 检测限制:web_fetch 和 curl 会移除 <script> 标签。许多 CMS 插件通过 JavaScript 注入 JSON-LD。请务必使用 Rich Results Test 或浏览器工具验证 Schema 是否存在。
针对具体任务的问题
- 单个地点还是多个地点?
- 有门店还是 SAB?
- 使用什么 CMS/平台?(WordPress 插件、Next.js 等)
- 商家是否已有 Schema?
- 设置了哪些 GBP 类别?
下一步
| 发现的问题 | 下一步操作 | 技能 |
|---|---|---|
| 已实施 Schema,需要确认是否与 GBP 匹配 | 审核 GBP,确保所有数据与 Schema 完全一致 | gbp-optimization |
| 需要在多个地点页面添加 Schema | 根据各页面的地点专属数据构建 Schema | local-landing-pages |
| Schema 是更广泛审核的一部分 | 将 Schema 调查结果纳入完整审核报告 | local-seo-audit |
| 添加了 Schema,但排名没有变化 | Schema 本身很少能提升排名,它的作用是强化其他信号。请检查问题是否出在其他方面 | geogrid-analysis |
**默认下一步:**实施 Schema 后,使用 Google Rich Results Test 进行验证,然后在接下来的 2 周内监控 Search Console 中的结构化数据错误。
此技能的工具
请参阅 docs/tool-routing,根据已连接的工具进行选择。
- 大规模 Schema 验证(涵盖多个地点页面)→ 技术审核工具(首选 Screaming Frog 进行自定义提取)
- 单页验证 → Google Rich Results Test(无需工具技能)
评论
支持 Markdown