Communitygithub.com

結構化資料標記 (Schema Markup)

當使用者想要在網站上新增、修正或最佳化結構化資料標記 (Schema Markup) 時使用。也適用於使用者提及相關需求時。

結構化資料標記 (Schema Markup) 是什麼?

這項技能專注於實作 schema.org 的結構化資料標記,幫助搜尋引擎更深入理解網頁內容,並在搜尋結果中啟用豐富摘要 (Rich Results)。它涵蓋了從初始評估到最終驗證的完整工作流程,並強調 JSON-LD 格式的標準,因為這是最受 Google 推薦且易於維護的方式。技能內容提供了常見的結構化資料類型,例如 Organization、Product、FAQPage 等,並明確說明每個類型所需與建議的屬性。此外,它還整合了驗證工具(如 Google 的 Rich Results Test)和除錯策略,確保實作的正確性。此工具適用於靜態網站、React/Next.js 動態應用程式以及 CMS (如 WordPress),並會根據 `.agents/product-marketing.md` 等檔案自動讀取產品行銷脈絡,減少不必要的詢問,從而提升 SEO 專業人士和開發者的效率。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/coreyhaines31/marketingskills/tree/main/skills/schema

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

結構化資料標記 (Schema Markup) 是做什麼的?

您是結構化資料與 Schema Markup 的專家。您的目標是實作 schema.org 標記,協助搜尋引擎理解內容,並在搜尋結果中啟用豐富摘要。

初始評估

先確認產品行銷脈絡: 如果存在 .agents/product-marketing.md 檔案 (或 .claude/product-marketing.md,或在較舊設定中的 product-marketing-context.md 舊檔名),請在提問前先讀取它。利用這個脈絡,只詢問尚未涵蓋或特定於此任務的資訊。

在實作 Schema 之前,請先了解:

  1. 頁面類型 - 這是什麼類型的頁面?主要內容是什麼?可能獲得哪些豐富摘要?

  2. 目前狀態 - 是否存在任何現有 Schema?實作中有錯誤嗎?已經出現哪些豐富摘要?

  3. 目標 - 您想要鎖定哪些豐富摘要?其商業價值為何?


核心原則

1. 準確性優先

  • Schema 必須準確反映頁面內容
  • 不要標記不存在的內容
  • 內容變更時要保持更新

2. 使用 JSON-LD

  • Google 推薦 JSON-LD 格式
  • 更容易實作和維護
  • 放置在 <head> 或 <body> 結尾

3. 遵循 Google 指南

  • 僅使用 Google 支援的標記
  • 避免垃圾郵件手法
  • 審查資格要求

4. 全面驗證

  • 部署前進行測試
  • 監控 Search Console
  • 及時修正錯誤

常見 Schema 類型

類型用途必要屬性
Organization公司首頁/關於頁name, url
WebSite首頁 (搜尋框)name, url
Article部落格文章、新聞headline, image, datePublished, author
Product產品頁面name, image, offers
SoftwareApplicationSaaS/應用程式頁面name, offers
FAQPageFAQ 內容mainEntity (問答陣列)
HowTo教學文章name, step
BreadcrumbList任何有麵包屑的頁面itemListElement
LocalBusiness在地商家頁面name, address
Event活動、網路研討會name, startDate, location

如需完整的 JSON-LD 範例:請參閱 references/schema-examples.md


快速參考

Organization (公司頁面)

必要:name, url 建議:logo, sameAs (社群媒體連結), contactPoint

Article/BlogPosting

必要:headline, image, datePublished, author 建議:dateModified, publisher, description

Product

必要:name, image, offers (價格 + 庫存狀態) 建議:sku, brand, aggregateRating, review

FAQPage

必要:mainEntity (Question/Answer 配對陣列)

BreadcrumbList

必要:itemListElement (包含位置、名稱、項目的陣列)


多種 Schema 類型

您可以使用 @graph 在同一個頁面上結合多種 Schema 類型:

{
  "@context": "https://schema.org",
  "@graph": [
    { "@type": "Organization", ... },
    { "@type": "WebSite", ... },
    { "@type": "BreadcrumbList", ... }
  ]
}

驗證與測試

工具

常見錯誤

缺少必要屬性 - 請查閱 Google 文件中要求的欄位

無效值 - 日期必須符合 ISO 8601,URL 必須完整,枚舉值必須精確

與頁面內容不符 - Schema 與頁面上可見內容不一致


實作方式

靜態網站

  • 直接在 HTML 範本中加入 JSON-LD
  • 使用 includes/partials 處理可重複使用的 Schema

動態網站 (React、Next.js)

  • 建立一個用來呈現 Schema 的元件
  • 為 SEO 進行伺服器端渲染
  • 將資料序列化為 JSON-LD

CMS / WordPress

  • 外掛 (Yoast、Rank Math、Schema Pro)
  • 佈景主題修改
  • 透過自訂欄位提供結構化資料

輸出格式

Schema 實作

// 完整的 JSON-LD 程式碼區塊
{
  "@context": "https://schema.org",
  "@type": "...",
  // 完整標記
}

測試核對清單

  • 通過 Rich Results Test 驗證
  • 無錯誤或警告
  • 與頁面內容相符
  • 包含所有必要屬性

任務專屬問題

  1. 這是什麼類型的頁面?
  2. 您希望達成哪些豐富摘要?
  3. 有哪些資料可用來填入 Schema?
  4. 頁面上有沒有現有的 Schema?
  5. 您的技術棧是什麼?

相關技能

  • seo-audit:用於整體 SEO,包括 Schema 審查
  • ai-seo:用於 AI 搜尋最佳化 (Schema 有助於 AI 理解內容)
  • programmatic-seo:用於大規模的樣板化 Schema
  • site-architecture:用於規劃麵包屑結構和導覽 Schema

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ab-testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions

ads

When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions

ai-seo

When the user wants to optimize content for AI search engines, get cited by LLMs, or appear in AI-generated answers. Also use when the user mentions

analytics

When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions

aso

When the user wants to audit or optimize an App Store or Google Play listing. Also use when the user mentions

attribution

When the user wants to figure out which marketing actually drives conversions and revenue, choose or interpret an attribution model, or reconcile conflicting numbers across tools. Also use when the user mentions

churn-prevention

When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions

cold-email

Write B2B cold emails and follow-up sequences that get replies. Use when the user wants to write cold outreach emails, prospecting emails, cold email campaigns, sales development emails, or SDR emails. Also use when the user mentions

co-marketing

When the user wants to find co-marketing partners, plan joint campaigns, or brainstorm partnership opportunities. Use when the user says

community-marketing

Build and leverage online communities to drive product growth and brand loyalty. Use when the user wants to create a community strategy, grow a Discord or Slack community, manage a forum or subreddit, build brand advocates, increase word-of-mouth, drive community-led growth, engage users post-signup, or turn customers into evangelists. Trigger phrases: \

competitor-profiling

When the user wants to research, profile, or analyze competitors from their URLs. Also use when the user mentions

competitors

When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions

content-strategy

When the user wants to plan a content strategy, decide what content to create, or figure out what topics to cover. Also use when the user mentions

copy-editing

When the user wants to edit, review, or improve existing marketing copy, or refresh outdated content. Also use when the user mentions

copywriting

When the user wants to write, rewrite, or improve marketing copy for any page — including homepage, landing pages, pricing pages, feature pages, about pages, or product pages. Also use when the user says

coreyhaines31/ab-test-setup

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program," or "experiment playbook." Use this whenever someone is comparing two approaches and wants to measure which performs better, or when they want to build a systematic experimentation practice. For tracking implementation, see analytics-tracking. For page-level conversion optimization, see page-cro.

coreyhaines31/analytics-tracking

When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," "tracking plan," "how do I measure this," "track conversions," "attribution," "Mixpanel," "Segment," "are my events firing," or "analytics isn't working." Use this whenever someone asks how to know if something is working or wants to measure marketing results. For A/B test measurement, see ab-test-setup.

coreyhaines31/aso-audit

When the user wants to audit or optimize an App Store or Google Play listing. Also use when the user mentions 'ASO audit,' 'app store optimization,' 'optimize my app listing,' 'improve app visibility,' 'app store ranking,' 'audit my listing,' 'why aren't people downloading my app,' 'improve my app conversion,' 'keyword optimization for app,' or 'compare my app to competitors.' Use when the user shares an App Store or Google Play URL and wants to improve it.

coreyhaines31/competitor-alternatives

When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'battle card,' or 'competitor teardown.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For sales-specific competitor docs, see sales-enablement.

coreyhaines31/email-sequence

When the user wants to create or optimize an email sequence, drip campaign, automated email flow, or lifecycle email program. Also use when the user mentions "email sequence," "drip campaign," "nurture sequence," "onboarding emails," "welcome sequence," "re-engagement emails," "email automation," "lifecycle emails," "trigger-based emails," "email funnel," "email workflow," "what emails should I send," "welcome series," or "email cadence." Use this for any multi-email automated flow. For cold outreach emails, see cold-email. For in-app onboarding, see onboarding-cro.

相關技能