SuperAPI AI 工具集

seo-schema-jsonld

营销与增长

查看项目

更新于 10-16 08:48

技能介绍

用途:审计并生成页面的结构化数据(JSON-LD),检测、校验、补全 Tier-1 schema.org 类型,如 Article、Organization、Person、Product/Offer 等。参考 references/schema-tier1.md,模板位于 schema/jsonld-templates/。

主要能力:从 dispatch envelope 指定的 PageSnapshot 读取 pages/<slug>.json(jsonld[]、microdata_items、headings[]、images[]),在 pages/<slug>.html 中检索原文证据,站点产物位于 site/{robots.json,sitemaps.json,discovery.json}。检测所有 script type=application/ld+json 块并解析,标记内联 microdata/RDFa 以便迁移;校验 JSON 有效性、@type 是否被识别、必需与推荐属性;对照页面内容与行业类型检查完整性(文章页应有 Article/BlogPosting 含 author、datePublished、dateModified、image、publisher;产品页应有 Product + Offer 含 price、priceCurrency、availability);检查实体卫生(稳定 @id、@graph 关联、sameAs);核对日期与可见日期一致;对 FAQPage/HowTo 标注为已弃用于 SERP 富结果但仍可被 AI 解析。

使用方式:若直接以 URL/路径调用且无快照,先运行 node "${CLAUDE_PLUGIN_ROOT}/scripts/snapshot.mjs" <target> --out "${CLAUDE_PLUGIN_DATA}/runs",使用输出的快照路径。离线校验:node "${CLAUDE_PLUGIN_ROOT}/scripts/validate-jsonld.mjs" --snapshot <pages/<slug>.json>(或 --url <u>)。Tier 1 可用 Google Rich Results Test / schema.org validator 确认资格;不可用时状态为 needs_api,而非 pass。

修复:为缺失或不完整的 Tier-1 类型生成完整有效 JSON-LD,使用单一 @graph 与稳定 @id,注入缺失的 dateModified/@id,作为 fix (AUTO) 差异。绝不编造价格、日期、评分或 sameAs 身份链接,需询问或留 TODO 占位。

发现项:按 schema/finding.schema.json 输出,严重度 5 仅限站点/模板级灾难性事实,4 重大、3 中等、2 次要、1 外观、0 信息。示例:M5.article.missing、M5.product.missing_offer_price、M5.jsonld.invalid_json、M5.jsonld.contradicts_page、M5.faqpage.deprecated_richresult。平台条件 id 仅在 profile.json 指定 shopify/wordpress 时触发。

限制:Google 未记录任何 AI 专用 schema.org 类型或属性,AI 概览资格来自被索引与可摘要,而非标记;结构化数据须有效且与可见页面一致。不要标记页面不可见内容,保持与产品 feed 一致。有效块只是底线,不是排名杠杆。