Skip to content
Back to skills

Schema Gaps

ASecurity

Structured data is how you hand search engines and AI models your facts in a form they can attribute to you. This skill: find what's missing by site type, add only what the page can honestly support, validate before you ship. Run it for one site at a time. A first pass is one inventory run over the homepage and one URL per template, a gap table, and a fix plan; the re-check after deploy is a single re-fetch per template.

  • 35 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
content-marketingpythonrustgobashnode

Works with

  • cli

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add loophalt/seo-agent-tools --skill schema-gaps --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Schema Gaps?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Schema Gaps
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/loophalt-schema-gaps/badge)](https://www.skillsdirectory.com/skills/loophalt-schema-gaps)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Schema Gap Analysis

Structured data is how you hand search engines and AI models your facts in a form they can attribute to you. This skill: find what's missing by site type, add only what the page can honestly support, validate before you ship.

Run it for one site at a time. A first pass is one inventory run over the homepage and one URL per template, a gap table, and a fix plan; the re-check after deploy is a single re-fetch per template.

## Preconditions

Do not start without all of these. If one is missing, say which and stop — do not guess it.

- **The target domain** — the production host, apex (no `www` unless the site itself uses it). If the apex blocks datacenter IPs, fetch through the mirror the site actually serves crawlers from instead: usaattorneys.company's apex blocks datacenter IPs, so fetches there go through its workers.dev mirror while canonical URLs still point at the apex.
- **The site type, one row of the table in Step 2** (local service business, attorney / law firm, directory / listings, e-commerce, content / blog, or "any site"). The `Any site` row is a baseline that applies to every site — `WebSite` / `Organization` on the homepage, `Article` on guides — and the chosen row adds its specialized expectations on top of it. Without a row there is no definition of a gap.
- **The page inventory** — the homepage plus one live URL per template the site actually has (detail / listing page, article / guide page, tool page if any). Take the URLs from `sitemap.xml`, not from memory: a template you did not list is a template you did not check. If the site has no `sitemap.xml`, inventory the templates from site navigation instead (as the [technical-audit skill](../technical-audit/SKILL.md) allows) and record the missing sitemap as a finding — a missing sitemap never stops the run.
- **`curl` and `python3` available**, and the repo checked out so the schema checker's own rules (`tools/src/lib/seo-tools.ts`, `REQUIRED_FIELDS`) are on hand. Fetches go through `curl --http2` — plain HTTP/1.1 fetches on Cloudflare/Vercel hosts get early-closed connections and report healthy pages as broken (see the [ai-visibility skill](../ai-visibility/SKILL.md#traps)).
- **The run date.** Every gap table in the output carries a date — a gap list without a date goes stale silently, and schema regressions are silent.

## Evidence rule (read this first)

Every claim in the output must be backed by something actually fetched or observed in this run — a live HTML fetch, a JSON-LD block quoted from it, a checker result. Never report a gap that was not observed, and never report a type as present from memory or a cached copy. A gap is a finding, not a failure — record it as measured, with the URL fetched and the types seen.

## Step 1 — Inventory what exists

Fetch the live homepage and one URL per template, and extract the JSON-LD blocks from each. Do the same for a detail page and an article page — schema is usually present on the homepage and missing exactly where it matters.

```bash
curl -s --http2 https://example.com/ > /tmp/page.html
python3 - <<'EOF'
import json, re
html = open('/tmp/page.html').read()
blocks = re.findall(r'<script[^>]*type\s*=\s*["\']application/ld\+json["\'][^>]*>([\s\S]*?)</script>', html, re.I)
print(f"{len(blocks)} JSON-LD block(s)")
for i, raw in enumerate(blocks, 1):
    try:
        data = json.loads(raw)
    except json.JSONDecodeError as e:
        print(f"block {i}: INVALID JSON ({e})"); continue
    nodes = data if isinstance(data, list) else [data]
    types = []
    for n in nodes:
        t = n.get('@type') if isinstance(n, dict) else None
        types += t if isinstance(t, list) else ([t] if isinstance(t, str) else [])
    print(f"block {i}: types={types or 'NONE — block declares no @type'}")
EOF
```

Do not use `grep` for this: it misses `"@type": ["Product", "Thing"]` (array-valued types) and counts matching type strings instead of blocks, so a valid type can look absent and the block count comes out wrong. The parser above reports the block count and every `@type` value, string or array, per block.

Repeat the fetch for every URL in the inventory, and record the raw block count per URL, not just the type names: a page can carry three blocks and still miss the type it needs, and a page can carry zero blocks while its template sibling carries five.

Run the whole inventory against one stable deployment: if the site deploys while the fetches are in progress, the gap table mixes two deployed states and can prescribe a fix for a gap that already changed — or miss a regression the deploy introduced. If a deploy lands mid-run, restart and re-fetch every URL, and record the fetch date on the inventory.

Also note schema.org microdata (`itemscope` / `itemtype`) where it exists — the repo's schema checker scans for it too — but JSON-LD is the format to standardize on: Google recommends it because it is easier to maintain and less likely to break when the page design changes (see the [schema checker](https://frinjo.me/schema-checker)).

Checklist:
- [ ] Every URL in the inventory fetched live with `curl --http2`; status code recorded (a non-200 is a finding for the [technical-audit skill](../technical-audit/SKILL.md), not a schema result — do not record schema for a page that did not load).
- [ ] Per URL: number of `application/ld+json` blocks, each block's `@type` values, and whether a top-level `@context` is declared.
- [ ] Every block declares an `@type`: a block with no `@type` is a defect — the schema checker only warns when a page has no typed node at all, so a typeless block sitting next to a typed one is not flagged by the tool.
- [ ] Microdata noted where present, or recorded as absent.
- [ ] Duplicated blocks flagged: the same type emitted twice by layout + page is a defect, not coverage (Schema Markup Agent, `agents/SKILL.md` §3).

Evidence to record: the URL, the block count, and the `@type` list per URL, quoted from the fetch. If a template has no JSON-LD at all, write that down with the URL — that is the most common real gap, not an embarrassment.

## Step 2 — Compare against the type table

Every site must meet the `Any site` row first — it is the baseline — then its own row's expectations on top. A local-service homepage carrying `LocalBusiness` but no `WebSite` or `Organization` still has those two gaps; a guide with other schema but no `Article` still misses `Article`.

| Site type | Homepage | Detail/listing page | Article/guide page |
|---|---|---|---|
| Any site | `WebSite` (+ `SearchAction` if site search exists), `Organization` | — | `Article`/`BlogPosting` |
| Local service business | `LocalBusiness` (or subtype) with NAP, hours, geo | `LocalBusiness` per location | `FAQPage` where real FAQs exist |
| Attorney / law firm | `Attorney` (a `LocalBusiness` subtype) with `practiceArea`-style services | Attorney profile: `Person`/`Attorney` + `PostalAddress` | `FAQPage` for cost/process guides |
| Directory / listings | `WebSite` + `ItemList` on index pages | The listing's own type (`Attorney`, `LocalBusiness`, `Product`…) | `Article` + `BreadcrumbList` |
| E-commerce | `Organization` + `WebSite` | `Product` with `offers` (price, currency, availability) | `Article`; `Review`/`AggregateRating` only with real reviews |
| Content/blog | `WebSite` | — | `Article` + `BreadcrumbList`; `FAQPage` if the page has a genuine Q&A section |

**Gap = a cell the page should fill but doesn't.** The most common real-world gaps: directories whose 700+ listing pages carry only a bare `WebSite` block, and FAQ content rendered as plain headings with no `FAQPage` schema behind it.

Grade each gap against the severity scale in the [README](../../README.md#how-the-agent-suite-works) — **Critical** (blocks indexing — fix now) · **High** (suppresses rankings — fix within a week) · **Medium** (fix within a month) · **Low** (backlog polish) — and grade honestly: a missing schema type almost never blocks indexing, so it is almost never Critical. A whole template with no schema where an obvious type exists (tools with no `WebApplication`, guides with no `Article`, listings with no `ItemList`) is High; a missing `FAQPage` behind real Q&A content, or a missing `BreadcrumbList`, is Medium; a missing `SearchAction` on a `WebSite` block is Low. Say why each gap got its grade — the grade is part of the evidence.

Checklist:
- [ ] Every inventory URL matched to its row and column in the table; cells the page should fill but doesn't are listed as gaps, one per row.
- [ ] Every gap has a severity with a one-line reason, and a fix (the type to add — Step 5).
- [ ] Pages with no schema that have an obvious type are flagged (Schema Markup Agent, `agents/SKILL.md` §3): tools → `WebApplication`/`SoftwareApplication`, guides → `Article`, listings → `ItemList`.
- [ ] The homepage is not the whole audit: if only the homepage was checked, the run is incomplete — say so.

Evidence to record: the gap table (template URL, expected type, what is actually there, severity + reason). A template with zero gaps is recorded as zero gaps with its type list — not skipped.

## Step 3 — Check required fields per type

A type that is present but missing its required fields is barely better than absent: the repo's own schema checker tests every detected type against this table (`tools/src/lib/seo-tools.ts`, `REQUIRED_FIELDS`), and Google's Rich Results Test does the same.

Know the checker's limits before you trust a pass. `analyzeSchema` checks only the **first node** of each type, so a second `Article` missing `headline` passes unseen; and it skips types absent from `REQUIRED_FIELDS` entirely (`Attorney`, `ItemList`, …), so those types are never field-checked by the tool. Check **every node** of each type, not just the first, and for any expected type missing from the table, check its required fields by hand against schema.org and record the manual check — a type the checker never looked at is not a pass. Google's Rich Results Test is narrower still: it only validates types Google supports as rich results, so it does not replace this table for types it does not support.

| Type | Required field(s) |
|---|---|
| `Article`, `BlogPosting`, `NewsArticle` | `headline` |
| `Organization`, `LocalBusiness`, `Person`, `Recipe` | `name` |
| `FAQPage` | `mainEntity` |
| `Product` | `name` |
| `BreadcrumbList` | `itemListElement` |
| `WebSite` | `name` |
| `Event` | `name`, `startDate` |
| `VideoObject` | `name`, `thumbnailUrl`, `uploadDate` |
| `HowTo` | `name`, `step` |

Beyond the table, the Schema Markup Agent (`agents/SKILL.md` §3) checks two things the checker does not enforce: an `Article` also needs a date and an author, and a `FAQPage` needs `mainEntity` entries with real `acceptedAnswer` text — a question with no answer is not a FAQ. Also check that `Organization` / `WebSite` on the homepage and the same types on inner pages use consistent `@id` references, and that the visible breadcrumb trail matches the `BreadcrumbList` (a breadcrumb schema that disagrees with the page is worse than none). For local pages, check the agent's additional local-business fields too — `address`, `phone`, and `openingHours` where publicly true — not just `name`.

Checklist:
- [ ] Every detected type tested against the table above; missing fields listed per type and URL.
- [ ] Every node of each type checked, not just the first — a later node missing a required field is a failure, not a pass.
- [ ] Types absent from `REQUIRED_FIELDS` field-checked by hand and the manual check recorded — never recorded as a checker pass.
- [ ] `Article` / `BlogPosting` checked for date + author as well as `headline`.
- [ ] `FAQPage` checked for `acceptedAnswer` text on every `mainEntity` entry.
- [ ] Local pages checked for `address`, `phone`, and `openingHours` where publicly true, not just `name`.
- [ ] `@id` references consistent across the homepage and inner pages; breadcrumb schema matches the visible trail.
- [ ] Microdata-only pages noted: valid, but flagged for migration to JSON-LD when the template is next touched.

Evidence to record: per URL, the type, and each missing required field by name. A type that passes all its fields is recorded as passing — the checker's "pass" is evidence too.

## Step 4 — Honesty rules

Schema is a claim about the page. A false claim is worse than a missing type — it is the one schema mistake that can cost trust instead of just rich results.

- Never mark up content that isn't visible on the page.
- No `FAQPage` for hidden FAQs — the questions and answers must be on the page a visitor can read.
- No `AggregateRating` without real, on-site reviews. No fake prices in `offers`.
- Fee ranges in guides are editorial content, not `Product` offers — don't dress them up as such.
- Local schema must match the business as it actually is: name, address and phone identical across the site, the schema, and the Google Business Profile — see the [local-seo skill](../local-seo/SKILL.md) for the NAP check.
- Do not emit the same type twice (layout + page) to "cover" a gap — fix the duplication, don't duplicate the claim.

Checklist:
- [ ] Every type in the fix plan (Step 5) maps to content visible on its page — quoted, not assumed.
- [ ] Any type the page cannot honestly support is listed as "not applicable, with the reason" instead of being added anyway.
- [ ] No rating, price, review count, or availability figure appears in the plan unless the page itself shows it.

Evidence to record: for each planned type, the visible page content it describes (a quote or a selector). If a type was considered and rejected, record the rejection and why — that stops the next run re-adding it.

## Step 5 — Write the fix

Before writing any fix, capture the BotView baseline (see Step 6) — without a pre-fix score there is no before/after comparison, and a post-fix run alone cannot produce one.

One JSON-LD block per page (or per template, if the template generates it), containing **all** the types that page needs: if the homepage is missing both `WebSite` and `Organization`, both go in the same block (use `@graph` for two types in one block) — never one block per gap, and never a second block for a type the page already has. When adding or repairing a type, preserve the existing entities and their `@id`s and update the existing block rather than creating a conflicting duplicate. Each block contains only what the page honestly supports: `@context` of `https://schema.org`, the `@type`(s), their required fields from Step 3, and an `@id` for `Organization` / `WebSite` so inner pages reference the same entity. Keep it minimal — a block that restates the whole page is a block that will rot.

Before writing a fix, re-fetch the live template (or inspect it) immediately beforehand: two runs working the same template at once will both see the same missing type and both add a block, and the page then emits the type twice. Run one schema-gap pass per site and template at a time; if the live template already carries the type, do not add another block.

A minimal `FAQPage` block, for a page whose Q&A section is real and visible:

```json
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "How much does an attorney cost?",
      "acceptedAnswer": { "@type": "Answer", "text": "…" }
    }
  ]
}
```

Every `acceptedAnswer` carries the answer text as it appears on the page — a question without its answer fails the Step 3 check and buys nothing.

Checklist:
- [ ] One block per page/template, holding every type that page needs, each with `@context`, `@type`, and every required field from Step 3 filled from visible page content.
- [ ] Live template re-fetched immediately before writing — the fix applies to the template as it is now, not as the inventory saw it.
- [ ] `@id` used for `Organization` / `WebSite` and referenced consistently from inner pages.
- [ ] The block is scoped to its template: a fix that only works on one URL says which URL, and a template fix says which template.
- [ ] No field in the block comes from anywhere but the page (Step 4) — if a required field has no honest source, the type is not added and the gap stays open with the reason.

Evidence to record: the new block(s) as written, and the template or URL each one ships on.

## Step 6 — Validate before you ship

- [ ] JSON parses (paste into any JSON validator or `python3 -m json.tool`). One invalid block is silently ignored by Google — this is the failure the checker exists to catch.
- [ ] The candidate block is validated **before** it ships: parse it, check every required field from Step 3 against it, and confirm `@context` is declared. The schema checker fetches the live URL, so it cannot validate a block that is not deployed yet — a pre-deploy checker pass describes the old page, not the fix. Run the checker on the live URL only **after** deploy, and record that result against the deployed version, not the candidate.
- [ ] Google Rich Results Test on one URL per template — for the types Google supports as rich results only; it does not replace the Step 3 field checks for types it does not support.
- [ ] Re-fetch the live page after deploy — confirm the new block is actually served, not just committed. The committed file is not evidence; the served page is. Re-run the schema checker on the deployed page at the same time and record the result per URL.
- [ ] Re-run the [ai-visibility audit](../ai-visibility/SKILL.md) — but only where its score can measure the change. First, capture the BotView baseline **before** any fix ships and record it with the date; without a pre-fix run there is no before score to compare against. Then, after deploy, re-run it and record before → after with dates. Two limits: BotView scores only the homepage, so an inner-page fix will not move the homepage score — verify inner-page fixes per template with the schema checker and the live re-fetch instead of waiting for a score gain. And BotView's structured-data check only matches a scalar `"@type": "..."` — a valid block using an array of types (`"@type": ["Product", "Thing"]`) scores zero — so verify array-typed pages with the schema checker, which parses arrays, instead of trusting the score. For field-level fixes on a type already present (adding `headline` to an existing `Article`), the `@type`-presence score cannot move at all: close those from the live block and the checker result, and keep the score re-audit for changes the score can measure (a template that had no `@type` at all). Corrected reference point: frinjo.me scores 100/100 (2026-11-30, see [`examples/sample-audit-report.md`](../../examples/sample-audit-report.md)) with structured data 10/10 for `Answer`, `ContactPoint`, `FAQPage`, `Question`, `WebSite` — the earlier 94/100 in that sample was a BotView H1-counting bug, not a site problem, so do not use 94 as a comparison point.
- [ ] Note the change + date; schema regressions are silent, so the next ai-visibility audit should show the new types.

Evidence to record: the parse result, the checker result per URL, the Rich Results Test result per template, the live re-fetch showing the new block served, and the before/after ai-visibility scores with dates.

## Step 7 — Hand off and re-check

This skill covers one site's schema gaps only — inventory, gap table, fix, validation. It is not a full SEO audit: that is the orchestrator in `agents/SKILL.md` plus the 13 checker tools in `tools/src/`.

1. Hand the report to the Schema Markup Agent (`agents/SKILL.md` §3) for what this skill does not cover: conflicting or duplicated blocks across the whole template set, and schema on page types this run did not inventory.
2. Re-run this skill after any template change that touches `<head>` or layout output — that is where schema silently breaks — and monthly otherwise. Record the date each time; an inventory without a date goes stale silently.

Checklist:
- [ ] Report handed to the Schema Markup Agent with the gap table, the fixes shipped, and the validation results.
- [ ] Next re-check date recorded (after the next template change, or one month from this run).

Evidence to record: the handoff (gap table + fixes + validation) and the next re-check date.

## Output format

Return exactly this, filled in. Every field is filled or marked `n/a` with the reason — never left blank, never guessed.

```markdown
## Schema Gap Analysis — <site> (<date>)
- Site type: <row of the Step 2 table>
- Inventory: <N URLs — homepage + one per template>

### Inventory (fetched <date>)
| Template | URL | HTTP status | JSON-LD blocks | Top-level @context | Microdata | Types found |
|---|---|---|---|---|---|---|
| Homepage | <url> | <status> | N | <yes/no> | <present/absent> | <types, or "none"> |
| <template> | <url> | <status> | N | <yes/no> | <present/absent> | <types, or "none"> |

### Gaps
| # | Severity | Template | Expected type | Actually there | Evidence | Fix |
|---|----------|----------|---------------|----------------|----------|-----|
| 1 | <Critical / High / Medium / Low — with the reason> | <template + URL> | <type> | <types found, or "none"> | <fetch quote> | <type to add — Step 5> |

### Required-field failures
| URL | Type | Missing field(s) |
|---|---|---|
| <url> | <type> | <field(s), or "none — all present"> |

### Fixes shipped
- <template/URL>: <block added, with its @type + required fields> — validated <date>

### Validation
- JSON parses: <yes — python3 -m json.tool / checker>
- Schema checker: <result per URL>
- Rich Results Test: <result per template>
- Live re-fetch after deploy: <new block served — yes/no, with the fetch>
- ai-visibility re-audit: <before NN (baseline, captured pre-fix) → after NN, <date>> — or <n/a with reason: field-level fix, the score cannot measure it>

### Phased action plan
- Week 1 — critical + high: <the Critical fixes now, then the High gaps — High means fix within a week, so they belong here, not in Weeks 2–3>
- Weeks 2–4 — medium: <the Medium gaps — fix within a month>
- Month 2 — low / content & authority: <the Low gaps, plus hand content & authority work to the Schema Markup Agent — outside this skill>
- Ongoing — monitoring: re-run this skill after template changes and monthly; record the date each time.

### Open gaps
1. <what is still missing, and which step it belongs to>

### Next re-check
- <date: after the next template change, or one month from this run>
```

Severity scale (see [README.md](../../README.md#how-the-agent-suite-works)): **Critical** (blocks indexing — fix now) · **High** (suppresses rankings — fix within a week) · **Medium** (fix within a month) · **Low** (backlog polish). Schema gaps are almost never Critical — a missing type does not block indexing — so a Critical grade needs a one-line justification, not just the label. Schema is 10% of the SEO Health Score (README scoring weights), so a template with no schema at all is a real, bounded loss, not a catastrophe.

## Traps

- **Only checking the homepage.** Schema is usually present on the homepage and missing exactly where it matters — the detail and article templates. Step 1 inventories one URL per template for exactly this reason.
- **Trusting committed code over the live page.** A block can be committed, merged, and never served (layout emitting it twice, a template override swallowing it). Step 6 re-fetches the live page after deploy — the served page is the evidence.
- **One invalid block poisoning the page.** Google silently ignores malformed JSON-LD. A page with three blocks where one fails to parse does not have "mostly working" schema — validate every block, not just the new one.
- **FAQPage for hidden FAQs, AggregateRating without reviews.** The honesty rules (Step 4) exist because a false claim costs trust; a missing type only costs a rich result.
- **BreadcrumbList that disagrees with the page.** If the visible breadcrumb trail and the schema list different parents, the schema is wrong even though it validates.
- **`@graph` without `@context`, or a block with no `@type`.** A block that parses but declares no type is not schema — and the checker will not catch it for you: its "Schema types found" check passes as long as *any* typed node exists on the page, so a typeless block sitting next to a typed one goes unflagged. Catch typeless blocks with the per-block check in Step 1 (every block must declare an `@type`).
- **A gap table built across a deploy.** If the site deployed mid-run, the inventory mixes two live states — restart and re-fetch every URL (Step 1).
- **Grading a missing type as Critical.** It does not block indexing. Grade it High at most, with the reason — inflated severity is how a gap table stops being believed.
- **A gap table without a date.** Schema regressions are silent. Without the run date, nobody can tell a fixed gap from a gap that was never re-checked.

## What this is not

Not a full SEO audit — that is the orchestrator and the 14 specialist agents in `agents/SKILL.md`, plus the 13 checker tools in `tools/src/`. Not the schema checker tool itself (`tools/src/app/schema-checker/page.tsx`, `analyzeSchema` in `tools/src/lib/seo-tools.ts`) — this skill is the workflow around it: inventory, gap table, fix, validation. And no invented figures anywhere: no traffic numbers, ratings, review counts, or client results the run did not fetch.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in content-marketing →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.