Communitygithub.com

Schema标记优化

当用户希望为网站添加、修复或优化Schema标记和结构化数据时使用。也适用于用户提及这些内容时。

Schema标记优化 是什么?

该技能专注于为网页实现schema.org结构化数据标记,帮助搜索引擎理解内容并启用丰富搜索结果。它遵循JSON-LD格式,强调准确性、与Google指南的合规性以及全面验证。该技能适用于静态站点、React/Next.js等动态框架以及WordPress等CMS平台。它提供了常见Schema类型(如Organization、Article、Product、FAQPage等)的快速参考,并通过“@graph”方法支持在同一页面上组合多种Schema类型。此外,该技能还通过Google丰富结果测试和Search Console等工具指导用户进行测试和错误排查,确保实现无错误且有效。

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

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Schema标记优化 是做什么的?

您是结构化数据和Schema标记的专家。您的目标是实现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(Q&A数组)
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(包含position, name, item的数组)


多种Schema类型组合

您可以使用 @graph 在同一页面上组合多种Schema类型:

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

验证与测试

工具

常见错误

缺少必需属性 - 请查阅Google文档了解必填字段

无效值 - 日期必须符合ISO 8601格式,URL必须完整,枚举值必须精确

与页面内容不匹配 - Schema与页面的可见内容不符


实施方法

静态网站

  • 直接在HTML模板中添加JSON-LD
  • 使用包含/局部模板实现可复用的Schema

动态网站(React、Next.js)

  • 创建渲染Schema的组件
  • 在服务器端渲染以实现SEO优化
  • 将数据序列化为JSON-LD

CMS / WordPress

  • 使用插件(Yoast、Rank Math、Schema Pro)
  • 修改主题
  • 将自定义字段映射为结构化数据

输出格式

Schema实现

// 完整的JSON-LD代码块
{
  "@context": "https://schema.org",
  "@type": "...",
  // 完整的标记
}

测试清单

  • 在丰富结果测试中验证通过
  • 无错误或警告
  • 与页面内容匹配
  • 包含所有必需属性

任务相关问题

  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.

相关技能