Command Palette

Search for a command to run...

Назад к скиллам
скилл № 49125

seo-structured-data

Use when the user asks to add JSON-LD structured data, schema.org markup, rich results, Product, Article, BreadcrumbList or Organization schema, review stars…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить seo-structured-data в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Structured Data (JSON-LD)

Purpose

Structured data describes page content with the schema.org vocabulary so search engines can understand entities and show rich results (product price/availability, review stars, breadcrumbs, article info, events, recipes, videos). Google recommends JSON-LD. Markup only makes a page eligible; Google decides whether to show a rich result, and markup must describe content visible on the page.

Agent Protocol

Trigger

"json-ld", "schema.org", "structured data", "rich results", "rich snippets", "Product markup", "BreadcrumbList", "Organization logo", "Merchant listing".

Input Context

  • Page types (product, article, category, local business, event, video, recipe).
  • Data available per page (price, currency, availability, ratings, author, dates).
  • Rendering (SSR/SSG vs. client-only SPA) and framework.

Output Artifact

Typed JSON-LD builders per page type, rendering component, validation step.

Response Format

Page type: {type}
Schema: {@type list}
Required props: {Google-required fields present?}
Recommended props: {added}
Rendering: {server HTML|client}
Validation: {Rich Results Test / Schema Markup Validator / CI}

Which Types Still Produce Rich Results

Type Notes
Product + Offer / AggregateRating / Review Product snippets and merchant listings; self-serving reviews of your own business (LocalBusiness/Organization) are not eligible for stars
Article / NewsArticle / BlogPosting Helps title, image, date understanding
BreadcrumbList Breadcrumb trail (shown on desktop results)
Organization Logo, name, contact info in knowledge panels
LocalBusiness Business details; Google Business Profile matters more
Event, Recipe, VideoObject, JobPosting, Course, SoftwareApplication Type-specific features
FAQPage Since Aug 2023 shown only for well-known authoritative government/health sites
HowTo Rich result deprecated (2023); markup harmless but no display

Check Google Search Central's current "Search gallery" before promising a rich result; the list changes.

Typed Builders

// lib/schema.ts
import type { Product as SchemaProduct, WithContext, BreadcrumbList } from 'schema-dts';

export interface ProductData {
  name: string; description: string; sku: string; url: string; images: string[];
  brand: string; price: number; currency: string; inStock: boolean;
  rating?: { value: number; count: number };
}

export function productJsonLd(p: ProductData): WithContext<SchemaProduct> {
  return {
    '@context': 'https://schema.org',
    '@type': 'Product',
    name: p.name,
    description: p.description,
    sku: p.sku,
    image: p.images,
    brand: { '@type': 'Brand', name: p.brand },
    offers: {
      '@type': 'Offer',
      url: p.url,
      price: p.price.toFixed(2),
      priceCurrency: p.currency,
      availability: p.inStock ? 'https://schema.org/InStock' : 'https://schema.org/OutOfStock',
      itemCondition: 'https://schema.org/NewCondition',
    },
    ...(p.rating && p.rating.count > 0
      ? { aggregateRating: { '@type': 'AggregateRating', ratingValue: p.rating.value, reviewCount: p.rating.count } }
      : {}),
  };
}

export function breadcrumbJsonLd(items: { name: string; url: string }[]): WithContext<BreadcrumbList> {
  return {
    '@context': 'https://schema.org',
    '@type': 'BreadcrumbList',
    itemListElement: items.map((item, i) => ({
      '@type': 'ListItem', position: i + 1, name: item.name, item: item.url,
    })),
  };
}

schema-dts (Google-maintained types) catches misspelled properties at compile time.

Rendering Safely (React / Next.js)

// components/JsonLd.tsx — works in Server Components
export function JsonLd({ data }: { data: object }) {
  return (
    <script
      type="application/ld+json"
      // Escape "<" so data containing "</script>" cannot break out of the tag (XSS)
      dangerouslySetInnerHTML={{ __html: JSON.stringify(data).replace(/</g, '\\u003c') }}
    />
  );
}
// app/products/[slug]/page.tsx
export default async function ProductPage({ params }: { params: Promise<{ slug: string }> }) {
  const { slug } = await params;
  const product = await getProduct(slug);
  return (
    <>
      <JsonLd data={productJsonLd(product)} />
      <JsonLd data={breadcrumbJsonLd([{ name: 'Home', url: 'https://example.com/' }, { name: product.name, url: product.url }])} />
      <ProductView product={product} />
    </>
  );
}
  • JSON-LD may live in <head> or <body>; server-render it so every crawler sees it (Google can read JS-injected JSON-LD, many others cannot).
  • react-helmet is unmaintained; in non-Next React apps use react-helmet-async or render the script directly.

Linking Entities with @id

Use stable @id URLs to connect entities across pages (e.g. https://example.com/#organization referenced as publisher from every Article). One @graph array per page

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл seo-structured-data?

Use when the user asks to add JSON-LD structured data, schema.org markup, rich results, Product, Article, BreadcrumbList or Organization schema, review stars, or Rich Results Test errors. Produces valid, XSS-safe JSON-LD rendered server-side and validated in CI. Not for meta tags and Open Graph (use frontend-seo) or crawl issues (use seo-fundamentals).

Как установить скилл seo-structured-data?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл seo-structured-data запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить seo-structured-data с