> ## Documentation Index
> Fetch the complete documentation index at: https://www.opendirectory.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# schema-markup-generator

> Generate valid JSON-LD structured data for any webpage. The agent crawls the page, detects which schema types apply, and outputs a script tag ready to paste...

<Info>
  **Category:** Developer Tools · **Version:** `1.0.0` · **Author:** `OpenDirectory` · **Compatibility:** All targets (claude, codex, opencode, gemini, anti-gravity, openclaw, hermes)
</Info>

![schema-markup-generator](https://github.com/user-attachments/assets/4b5e5bfb-3c33-4a20-afff-59fda19196b4)

Generate valid JSON-LD structured data for any webpage. The agent crawls the page, detects which schema types apply, and outputs a script tag ready to paste into your HTML. Optionally opens a GitHub PR with the markup injected.

## Install

<Tabs>
  <Tab title="npx CLI (Recommended)">
    ```bash theme={null}
    npx "@opendirectory.dev/skills" install schema-markup-generator --target claude
    ```
  </Tab>

  <Tab title="skills.sh">
    ```bash theme={null}
    npx skills add Varnan-Tech/opendirectory --skill schema-markup-generator
    ```
  </Tab>

  <Tab title="Claude Code Native">
    ```bash theme={null}
    /plugin marketplace add Varnan-Tech/opendirectory
    /plugin install opendirectory-gtm-skills@opendirectory-marketplace
    ```
  </Tab>

  <Tab title="Claude Desktop">
    <video controls className="w-full aspect-video rounded-xl mb-4" src="https://github.com/user-attachments/assets/cea8b565-2002-4a87-8857-d902bfcfdc1c" />

    1. Copy `https://github.com/Varnan-Tech/opendirectory/tree/main/skills/schema-markup-generator` into [download-directory.github.io](https://download-directory.github.io/) to download the ZIP.
    2. Open **Claude Desktop** -> **Customize** -> **Skills** -> **+** -> **Upload a skill** and drop the folder containing `SKILL.md`.
  </Tab>

  <Tab title="Manus AI">
    <video controls className="w-full aspect-video rounded-xl mb-4" src="https://github.com/user-attachments/assets/17cbee2a-9e17-4bd4-ac46-68e0e92ffab4" />

    [**Install schema-markup-generator in Manus AI**](https://manus.im/import-skills?githubUrl=https%3A%2F%2Fgithub.com%2FVarnan-Tech%2Fopendirectory%2Ftree%2Fmain%2Fskills%2Fschema-markup-generator\&utm_source=opendirectory)
  </Tab>
</Tabs>

## Schema Types Supported

| Type | Use When |
| - | - |
| FAQPage | Page has 2 or more visible question/answer pairs |
| Article / BlogPosting | Page is a blog post or editorial article |
| Organization | Page represents a company or institution |
| Product | Page sells or describes a product with pricing |
| WebSite | Homepage schema with optional sitelinks search |
| HowTo | Page is a step-by-step guide with numbered steps |
| BreadcrumbList | Page has visible breadcrumb navigation |
| SoftwareApplication | Page describes a software tool or app |
| LocalBusiness | Page represents a physical business location |

The agent detects the right type automatically. A single page often gets multiple types (a blog post gets Article and BreadcrumbList, a homepage gets WebSite and Organization).

## Requirements

No LLM API key needed. The agent reads the page and generates the markup.

Chrome is needed for JavaScript-rendered pages. For static HTML pages or when you paste HTML directly, Chrome is not required.

A GitHub token is optional. Without it, the agent outputs the markup as text for you to paste manually.

## Setup

### 1. Start Chrome with remote debugging (for live URLs)

```bash theme={null}
# macOS
open -a "Google Chrome" --args --remote-debugging-port=9222

# Linux
google-chrome --remote-debugging-port=9222
```

### 2. Configure environment variables (optional)

```bash theme={null}
cp .env.example .env
# Add GITHUB_TOKEN if you want auto-PR support
```

## How to Use

From a live URL:

```
"Generate schema markup for https://example.com/faq"
"Add structured data to https://example.com/blog/my-post"
"What schema markup does this page need? https://example.com/about"
```

From pasted HTML:

```
"Generate schema markup for this page: [paste HTML]"
"Add JSON-LD to this HTML: [paste HTML]"
```

Targeting a specific type:

```
"Generate FAQPage schema for https://example.com/support"
"Add Organization schema to our about page: https://example.com/about"
"Generate Product schema for this page: https://example.com/products/pro"
```

With auto-PR:

```
"Generate schema markup for https://example.com/blog/post and open a GitHub PR"
```

## Output

| Output | Description |
| - | - |
| JSON-LD script block | One `<script type="application/ld+json">` block per schema type |
| Placement instructions | Where to insert the block in your HTML or framework |
| MISSING field list | Required fields not found on the page that you need to fill in |
| GitHub PR | If GITHUB\_TOKEN and GITHUB\_REPO are configured and you confirm |

## Validate Your Markup

After applying the markup, validate it at:

* Google Rich Results Test: [https://search.google.com/test/rich-results](https://search.google.com/test/rich-results)
* Schema.org Validator: [https://validator.schema.org](https://validator.schema.org)

## Project Structure

```
schema-markup-generator/
├── SKILL.md
├── README.md
├── .env.example
├── evals/
│   └── evals.json
└── references/
    ├── json-ld-spec.md
    └── output-template.md
```

## License

MIT


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.