Saltar al contenido
Skillpedia
SEO75 mil · #2906

json-ld-valid

Qué hace

Esta skill revisa los bloques de datos estructurados de una página en busca de errores de sintaxis y campos obligatorios que falten. Es para dueños de sitios y desarrolladores que quieren resultados enriquecidos en la búsqueda.

Cuándo usarla

  • ✓Cuando tus resultados enriquecidos no aparecen en Google Search Console.
  • ✓Cuando añades marcado de artículo, producto, preguntas frecuentes o migas de pan a tus páginas.
  • ✓Cuando generas datos estructurados con código o con una plantilla.

Link de la skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/json-ld-valid/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/json-ld-valid/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“¿Puedes revisar mis datos estructurados y decirme por qué no aparecen los resultados enriquecidos?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

El agente analiza cada bloque JSON-LD, revisa el contexto y el tipo, y verifica las propiedades obligatorias de ese tipo. Sugiere correcciones para los errores de sintaxis y los campos faltantes, y recomienda la Rich Results Test de Google.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

Use valid JSON-LD structured data

Invalid JSON-LD is silently ignored by Google — there are no error messages in search results, only the absence of rich results. Invalid structured data means no eligibility for rich results (stars, FAQs, breadcrumbs, etc.) that increase click-through rates.

Quick Reference

  • JSON-LD must be valid JSON, reference @context: 'https://schema.org', and include all required properties for the chosen @type
  • Invalid JSON (unclosed brackets, missing commas) causes the entire block to be silently ignored by Google
  • Validate with Google's Rich Results Test before deploying structured data changes

Check

Find all <script type='application/ld+json'> elements on the page. For each: (1) Attempt to parse the content as JSON — flag syntax errors. (2) Verify @context is set to 'https://schema.org'. (3) Verify @type is a valid schema.org type. (4) For the detected type, check required properties are present (e.g., Article requires headline, author, datePublished; Product requires name; FAQPage requires mainEntity). (5) Run through Google's Rich Results Test API if available.

Fix

  1. Parse the JSON-LD with JSON.parse() — fix any syntax errors (trailing commas, single quotes, missing brackets).
  2. Ensure @context is exactly "https://schema.org" (not "http://schema.org" or omitted).
  3. Verify the @type value against schema.org types.
  4. Add required properties for the type:
    • Article: headline, author (with @type Person and name), datePublished
    • Product: name (and ideally offers, description)
    • FAQPage: mainEntity array with Question and acceptedAnswer
    • BreadcrumbList: itemListElement array with ListItem, position, name, item
  5. Validate at https://search.google.com/test/rich-results
  6. Validate JSON syntax at https://jsonlint.com

Explain

Google uses JSON-LD structured data to generate rich results — enhanced search result formats that include stars, images, expandable Q&As, and other features. Invalid JSON-LD is ignored entirely: no rich results are generated, and no error is reported to you. Only by testing with the Rich Results Test can you discover validation failures. Correct, complete JSON-LD is a prerequisite for rich result eligibility.

Code Review

Extract all <script type='application/ld+json'> element contents. Run JSON.parse() on each — catch and report parse errors. Validate that @context equals 'https://schema.org'. Check @type against a whitelist of common valid types. For each type, validate required properties are present and non-empty. Report the first validation error found for each block.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/seo/json-ld-valid

Preguntas frecuentes

¿Google muestra errores por datos estructurados no válidos?

La skill indica que el JSON-LD no válido se ignora en silencio, así que la única señal es que faltan los resultados enriquecidos.

¿Cuál es un problema de sintaxis común?

La skill menciona las comas finales, las comillas simples y los corchetes que faltan como causas habituales.

¿Cómo se puede probar el marcado?

La skill recomienda la Rich Results Test de Google antes de publicar los cambios.

Detalles

Descripción original del autor

Use when generating or auditing any `<script type='application/ld+json'>` blocks, implementing structured data for articles, products, FAQs, breadcrumbs, or local businesses, or investigating why rich results are not appearing in Google Search Console.

repo: thedaviddias/Front-End-Checklist

Popularidad

Estrellas en GitHub
75 mil
Posición en el ranking
#2906
Licencia
MIT
Actualizada
31/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas