garrettjsmith/localseoskills

local-schema

When the user wants to implement LocalBusiness structured data, location schema, or local-specific JSON-LD markup.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/garrettjsmith/localseoskills --skill local-schema

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

Local Schema Markup

You are an expert in implementing structured data for local businesses. Your goal is to correctly implement LocalBusiness schema that reinforces GBP data and improves local search visibility.

Core Principle

Schema on your website must match your GBP data exactly. Mismatches create conflicting signals. The schema is your website confirming what GBP says about your business.


LocalBusiness Schema Template

json
{
  "@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": "info@smithplumbing.com",
  "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 Selection

Use the most specific LocalBusiness subtype:

Business TypeSchema @type
General businessLocalBusiness
PlumberPlumber
ElectricianElectrician
HVACHVACBusiness
DentistDentist
RestaurantRestaurant
Auto repairAutoRepair
AttorneyAttorney
Real estate agentRealEstateAgent
Hair salonHairSalon
Medical practiceMedicalBusiness

Full list: https://schema.org/LocalBusiness (check subtypes)


Multi-Location Schema

Each location needs its own schema with a unique @id:

json
{
  "@type": "Plumber",
  "@id": "https://example.com/locations/buffalo-ny/#business",
  "name": "Smith Plumbing - Buffalo",
  "url": "https://example.com/locations/buffalo-ny/",
  ...
}

On the homepage, reference all locations:

json
{
  "@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 (Service Area Business) Schema

For businesses without a public address, omit address and emphasize areaServed:

json
{
  "@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"
}

Validation

Tools

  1. Google Rich Results Test: https://search.google.com/test/rich-results (renders JavaScript)
  2. Schema Markup Validator: https://validator.schema.org/
  3. Browser DevTools: document.querySelectorAll('script[type="application/ld+json"]')

Common Errors

  • address format doesn't match GBP
  • Missing geo coordinates
  • Wrong @type (too generic)
  • telephone missing country code
  • openingHoursSpecification doesn't match actual hours
  • Duplicate @id across pages

⚠️ Detection limitation: web_fetch and curl strip <script> tags. Many CMS plugins inject JSON-LD via JavaScript. Always use Rich Results Test or browser tools to verify schema exists.


Task-Specific Questions

  1. Single location or multi-location?
  2. Storefront or SAB?
  3. What CMS/platform? (WordPress plugin, Next.js, etc.)
  4. Does the business have existing schema?
  5. What GBP categories are set?

What to Do Next

What You FoundNext ActionSkill
Schema implemented, need to verify GBP matchesAudit GBP to ensure all data aligns exactly with schemagbp-optimization
Need schema on multiple location pagesBuild schema per page with location-specific datalocal-landing-pages
Schema is part of a broader auditFeed schema findings into the full audit reportlocal-seo-audit
Schema added but rankings unchangedSchema alone rarely moves rankings — it reinforces other signals. Check if the real issue is elsewheregeogrid-analysis

Default next step: After implementing schema, validate with Google's Rich Results Test, then monitor Search Console for structured data errors over the next 2 weeks.

Tools for This Skill

See docs/tool-routing to pick based on what's connected.

  • Schema validation at scale (across many location pages) → technical audit tools (Screaming Frog preferred for custom extraction)
  • Single-page validation → Google Rich Results Test (no tool skill needed)
来自同一仓库

更多 Skills

全部 Skills
garrettjsmith
社区

gbp-optimization

When the user wants to set up, optimize, or manage a Google Business Profile, or improve visibility in Google's local map pack. Also use when the user mentions "GBP," "Google Business Profile," "Google My Business," "GMB," "business listing," "Google Maps listing," "optimize my profile," "map pack," "local pack," "3-pack," "Google Maps ranking," or "why am I not in the map pack." For review strategy, see review-management. For GBP posts, see gbp-posts. For suspension issues, see gbp-suspension-r

1小时安装量
3
GitHub Stars
152
最近更新
10月30日
garrettjsmith
社区

review-management

When the user wants to generate more reviews, respond to reviews, build a review strategy, or manage online reputation. Also use when the user mentions "reviews," "reputation management," "review generation," "review response," "star rating," "negative reviews," or "get more Google reviews." For GBP profile optimization, see gbp-optimization.

1小时安装量
2
GitHub Stars
152
最近更新
10月30日
garrettjsmith
社区

screaming-frog-tool

When the user wants a technical site audit, crawl data analysis, location page quality checks, duplicate content detection, schema validation at scale, or internal linking analysis. Trigger on "Screaming Frog," "site crawl," "technical audit," "crawl data," "broken links," "duplicate content," "location page audit," or when analyzing exported crawl CSV/Excel files.

1小时安装量
1
GitHub Stars
102
最近更新
8月15日