360 Secure SkillHub
360 安全技能中心

Schema Markup Generator

该 Skill 通过本地 Python 脚本为 Organization、FAQPage、Article、Product、HowTo 等类型生成 Schema.org JSON-LD,支持交互输入、JSON 文件、网页地址和 sitemap 批量模式,并校验必填字段、Schema 类型与 JSON-LD 语法;附带字段参考、Google 指南和示例。

geoly-geo
geoly-geo
热度 65.92
最近更新 2026-05-17 12:54:46
分类:营销依赖:代码执行 / 读写文件 / 第三方 API应用场景:模板 / 代码生成 / 数据处理 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add geo-schema-gen
Metadata
name
geo-schema-gen
description
Generate complete, validated Schema.org JSON-LD markup for any content type to boost AI citation rates. Creates structured data for Organization, FAQPage, Article, BlogPosting, Product, HowTo, BreadcrumbList, WebSite, VideoObject, and ImageObject schemas. Use whenever the user mentions adding schema markup, generating structured data, creating JSON-LD, implementing Schema.org, optimizing for rich snippets, or wants to improve how AI understands and cites their content. Also trigger for requests about Organization schema, FAQ schema, Article markup, Product schema, or any structured data implementation.

Schema Markup Generator

Methodology by GEOly AI (geoly.ai) — structured data is the language AI uses to understand your brand.

Generate production-ready Schema.org JSON-LD markup for any page type.

Quick Start

Generate schema for your page:

python scripts/generate_schema.py --type <schema-type> [--url <page-url>]

Example:

python scripts/generate_schema.py --type Organization --url example.com
python scripts/generate_schema.py --type FAQPage --file faqs.json

Why Schema Matters for GEO

Structured data helps AI platforms understand:

  • What your content is (entity type)
  • Who created it (author, publisher)
  • When it was published (freshness)
  • How it relates to other content (breadcrumbs)

Without schema, AI systems rely on NLP inference which is less reliable.

Supported Schema Types

Type Priority Best For
Organization 🔴 Critical Homepage, About page — establishes brand entity
FAQPage 🔴 Critical FAQ/Support pages — feeds AI Q&A answers
Article / BlogPosting 🟡 High Blog posts, news — improves citability
Product 🟡 High Product/pricing pages — enables shopping citations
HowTo 🟡 High Tutorials, guides — feeds step-by-step answers
WebSite 🟡 High Homepage — enables site search in AI
BreadcrumbList 🔵 Medium All pages — improves navigation understanding
VideoObject 🔵 Medium Video pages — enables video citations
ImageObject 🔵 Medium Image galleries — enables image citations
LocalBusiness 🔵 Medium Physical locations — local AI search

Full schema reference: See references/schema-types.md

Generation Methods

Method 1: Interactive (Recommended)

python scripts/generate_schema.py --type Organization --interactive

Guided prompts for all required and optional fields.

Method 2: From URL (Auto-Extract)

python scripts/generate_schema.py --type Article --url https://example.com/blog/post

Automatically extracts metadata from the page.

Method 3: From JSON Input

python scripts/generate_schema.py --type FAQPage --file faqs.json

Where faqs.json contains your content data.

Method 4: Batch Generate

python scripts/batch_generate.py sitemap.xml --output schemas/

Generate schemas for all pages in a sitemap.

Validation

Validate generated schema:

python scripts/validate_schema.py schema.json

Checks for:

  • Required fields present
  • Valid Schema.org types
  • Proper JSON-LD syntax
  • Google Rich Results eligibility

Implementation

Add to Your Page

Paste the generated JSON-LD inside your HTML <head>:

<head>
  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "Organization",
    ...
  }
  </script>
</head>

Test Before Deploying

  1. Schema.org Validator: https://validator.schema.org
  2. Google Rich Results Test: https://search.google.com/test/rich-results
  3. JSON-LD Playground: https://json-ld.org/playground/

Common Mistakes

❌ Wrong: Multiple conflicting Organization schemas on same page ✅ Right: One comprehensive Organization schema

❌ Wrong: Using http://schema.org (insecure) ✅ Right: Using https://schema.org (secure)

❌ Wrong: Copy-pasting without updating placeholder values ✅ Right: All fields contain actual, accurate data

Advanced Usage

Multiple Schemas per Page

Some pages need multiple schema types. Combine them in an array:

python scripts/generate_schema.py --types Organization,WebSite --url example.com

Nested Entities

Generate related schemas together:

python scripts/generate_schema.py --type Product \
  --with-offer --with-review --with-brand

Custom Properties

Add custom properties not in the generator:

python scripts/generate_schema.py --type Organization \
  --custom '{"knowsAbout": ["SEO", "AI", "Machine Learning"]}'

Output Formats

  • JSON-LD (default): Ready to paste into HTML
  • JSON: Raw structured data
  • HTML: Complete <script> tag
  • Markdown: With explanations

Schema Hierarchy

Understanding how schemas relate:

Organization (top-level entity)
├── WebSite (belongs to Organization)
├── Product (offered by Organization)
│   ├── Offer (pricing for Product)
│   └── Review (of Product)
├── Article (published by Organization)
│   ├── Author (Person or Organization)
│   └── Publisher (Organization)
└── LocalBusiness (subtype of Organization)
    └── Place (physical location)

See Also