- Developers and agencies who build websites with an AI coding agent and want every site readable by AI assistants and search engines.
- Site owners who would rather fix robots.txt, structured data and llms.txt themselves and see a plain pass or fail.
- Teams who want a GEO check in CI: the script checks a built folder with no dependencies.
GEO Skill Kit
Audits a website for AI search readiness, fixes robots.txt rules, structured data, canonical and Open Graph tags and llms.txt, then proves the result with a zero-dependency check script. Free, MIT licence.
- Node 18 or newer. The check script has no dependencies.
- An agent that reads SKILL.md, such as Claude Code, Cursor or Antigravity. You can also run the script on its own.
- No accounts and no keys.
Every file, in full.
This is the whole kit, exactly as it is in the zip.
Read the files
Everything in the zip (11 files)
- geo-audit/
- LICENSE
- README.md readable
- SKILL.md readable
- scripts/
- verify-geo.mjs readable
- templates/
- llms.template.txt readable
- project-rules.md readable
- robots.ai.txt readable
- schema-faq.jsonld
- schema-organization.jsonld
- schema-software-app.jsonld readable
- schema-website.jsonld
geo-audit/SKILL.md107 lines---
name: geo-audit
description: Audit and fix a website so AI assistants and search engines can read, understand and cite it. Checks robots.txt rules for AI crawlers, sitemap, llms.txt, JSON-LD structured data, canonical and Open Graph tags, then fixes what failed and proves it with the bundled verify-geo.mjs script. Use when asked for a GEO audit, AI search readiness, AI crawler access, llms.txt, or schema markup on a site or codebase.
license: MIT
metadata:
version: "1.0.0"
author: Red Center Studio
---
# GEO audit and fix
You are making a website readable and citable by AI assistants (ChatGPT, Claude, Perplexity, Google AI Overviews) and search engines. Work in the five phases below, in order. Do not skip Phase 5: the job is done when the script passes, not when the files exist.
Paths in this file are relative to this skill's folder. The script needs Node 18 or newer and has no dependencies.
## Ground rules
1. **Never invent facts.** No made-up ratings, review counts, awards, prices, addresses, phone numbers, founding dates or social profiles. If a value is not on the site or given by the user, leave the property out or ask.
2. **Schema must match the page.** Every claim in JSON-LD (price, FAQ question, rating, name) must be visible to a person on the same page. If it is not on the page, it does not go in the schema.
3. **No leftover template text.** Nothing containing `{{`, TODO, "Your Company" or example.com may ship. The script fails on these.
4. **Change the source, not the output.** Find where the site generates its head tags, robots.txt and sitemap (a layout component, a build script, a CMS setting) and change it there. Do not edit files in a build output folder.
5. **Ask before a business decision.** Whether to allow AI training crawlers is the owner's call. Ask once, then write the answer down in robots.txt.
## Phase 1: Audit
1. Work out what you are checking: a live URL, a built folder (`dist`, `build`, `public`, `out`, `.next`), or both. If the project has a build command, run it first so you check real output.
2. Run the script and keep the output:
```
node scripts/verify-geo.mjs --url https://the-site/
node scripts/verify-geo.mjs --dir ./dist
```
Add `--page path/to/page.html` with `--dir` to check a page other than the home page. Add `--json` if you want to parse the results.
3. Check at least the home page and one page of each main type (product or service page, article, contact). Problems are usually per template, not per page.
4. Read the page source yourself for what the script cannot judge:
- Does the first screen of text say plainly what the business does, for whom and where?
- Is the main content in the HTML, or does it only appear after JavaScript runs? AI crawlers mostly do not run JavaScript. If the HTML is an empty shell, say so: it matters more than everything else here.
- Are headings in order (one H1, then H2, H3) and do they describe the content?
5. Report to the user before changing anything: what failed, what you will change, and any question from Ground rule 5.
## Phase 2: robots.txt and AI crawlers
There are two kinds of AI crawler, and they should be handled separately:
| Kind | User agents | Default |
|---|---|---|
| Search and answer: fetch a page when a person asks about it | `OAI-SearchBot`, `ChatGPT-User`, `PerplexityBot`, `Perplexity-User`, `Claude-SearchBot`, `Claude-User` | Allow |
| Training: collect text to train models | `GPTBot`, `ClaudeBot`, `Google-Extended`, `CCBot` | Ask the owner |
1. Start from `templates/robots.ai.txt`. Keep the site's existing Disallow rules for private paths.
2. Give every crawler in the table its own `User-agent` group with `Allow: /` or `Disallow: /`. An explicit rule shows the choice was deliberate.
3. Blocking a training crawler does not block the search crawlers, so a site can opt out of training and still be cited.
4. Add `Sitemap: https://the-domain/sitemap.xml`.
5. Check the host as well as the file. A firewall or bot protection rule (Cloudflare, Vercel, a WAF) can block AI crawlers even when robots.txt allows them. If you can see that configuration, check it. If you cannot, tell the user to check it.
## Phase 3: Structured data (JSON-LD)
1. Add one `<script type="application/ld+json">` block per page, built where the site builds its `<head>`.
2. Site-wide, on every page: `Organization` and `WebSite` (`templates/schema-organization.jsonld`, `templates/schema-website.jsonld`). Give them stable `@id` values and refer to them from other nodes.
3. Per page type, only where it is true:
- A software product or app: `SoftwareApplication` with an `Offer` (`templates/schema-software-app.jsonld`). `price` is digits only, `priceCurrency` is a three-letter code, and the same price is visible on the page.
- A page with questions and answers shown on it: `FAQPage` (`templates/schema-faq.jsonld`). Copy each question exactly as it appears on the page.
- Articles: `Article` or `BlogPosting` with `headline`, `datePublished`, `dateModified`, `author`.
- A local business: `LocalBusiness` with the real address and opening hours.
4. Generate the schema from the same data the page renders from (the product record, the FAQ array). Two hand-typed copies will drift apart.
5. Do not add `aggregateRating` or `review` unless real reviews are displayed on that page.
6. Delete any property you cannot fill with a real value. A shorter, true block beats a complete, guessed one.
## Phase 4: Canonical, Open Graph and llms.txt
1. Every page gets exactly one `<link rel="canonical">` with its full https URL. Pick one form (with or without the trailing slash, with or without www) and use it in the canonical, `og:url`, the sitemap and internal links.
2. Every page gets `og:title`, `og:description`, `og:url`, `og:image` (absolute URL), `og:type` and `twitter:card`.
3. Every page gets a unique `<title>` (60 characters or fewer) and meta description (about 155), one H1, a `lang` attribute and a `<main>` landmark.
4. The sitemap lists every page that should be found, and nothing that is noindex or redirected.
5. llms.txt: write `/llms.txt` from `templates/llms.template.txt`, following the format at llmstxt.org: one `# Title`, a `> summary` blockquote, then `## Sections` of `- [Name](https://full-url): description` links. Link the pages that best answer the questions a customer would ask. Generate it from the site's own page list if there is one.
6. Be straight with the user about llms.txt: it is cheap to add and harmless, but independent log studies show most AI crawlers do not request it today. Phases 2 and 3 matter more. `llms-full.txt` (the full text of the key pages in one file) is optional; add it only if the user wants it.
## Phase 5: Verify and finish
1. Rebuild the site if it has a build step.
2. Run the script again on the same pages as in Phase 1:
```
node scripts/verify-geo.mjs --dir ./dist
node scripts/verify-geo.mjs --dir ./dist --page pricing/index.html
```
3. Fix every FAIL line and run it again. Repeat until the last line is `PASS`. Each failure prints the file, the line where it can tell, and the fix.
4. Go through the warnings. Fix them or tell the user why one is left (for example, the owner chose not to add llms.txt).
5. Finish with a short report: what you changed and where, the before and after script results, what the user still has to decide or do (firewall rules, a deploy), and anything you could not verify.
Do not report the work as done while the script prints `FAIL`.
## What the script checks
| Area | Fails when | Warns when |
|---|---|---|
| robots.txt | The file is missing, or a search and answer crawler is blocked from the whole site | A crawler has no explicit rule, or there is no Sitemap line |
| llms.txt | The file exists but has no `# Title`, no `> summary`, no `## Section`, or a link that is not a full URL | The file is missing |
| JSON-LD | No block, invalid JSON, missing `@context` or `@type`, leftover template text, an FAQ question or rating that is not on the page, a price that is not a plain number | |
| Canonical | Missing, duplicated, or not an absolute https URL; `og:url` differs from it | It differs from the address being checked |
| Open Graph | `og:title`, `og:description`, `og:url` or `og:image` missing | `og:type` or `twitter:card` missing |
| Page | noindex, no title, no meta description, no H1 | Long title or description, several H1s, no `lang`, no `<main>` |
| Sitemap | The file is not a sitemap | The file is missing |
`--strict` turns warnings into failures. Exit code 0 means pass, 1 means at least one failure.
geo-audit/scripts/verify-geo.mjs393 lines#!/usr/bin/env node
// verify-geo.mjs: checks a website for the basics AI assistants and search engines rely on.
// No dependencies. Needs Node 18 or newer.
//
// node verify-geo.mjs --url https://example.com/
// node verify-geo.mjs --dir ./public
// node verify-geo.mjs --dir ./public --page pricing/index.html
//
// Options:
// --url <url> Check a live page. robots.txt, llms.txt and sitemap.xml are read from the same origin.
// --dir <path> Check a built site on disk. robots.txt, llms.txt and sitemap.xml are read from the top of <path>.
// --page <file> With --dir: the HTML file to check, relative to <path>. Default: index.html.
// --strict Treat warnings as failures.
// --json Print the results as JSON instead of text.
//
// Exit code 0 when nothing failed, 1 when at least one check failed, 2 when the arguments are wrong.
import { readFile } from "node:fs/promises";
import { join, resolve } from "node:path";
import { pathToFileURL } from "node:url";
// Crawlers that fetch pages to answer a person's question. Blocking these removes the site from AI answers.
export const SEARCH_BOTS = ["OAI-SearchBot", "ChatGPT-User", "PerplexityBot", "Perplexity-User", "Claude-SearchBot", "Claude-User"];
// Crawlers that collect training data. Allowing or blocking these is the owner's choice; the choice should be written down.
export const TRAINING_BOTS = ["GPTBot", "ClaudeBot", "Google-Extended", "CCBot"];
// Leftover template text. The marks are case-sensitive so a real "todo list app" description is not flagged.
const PLACEHOLDER_WORDS = /\b(lorem ipsum|your company|your business name|company name here|example\.(com|org|net)|000-?000-?0000|123 main st)/i;
const PLACEHOLDER_MARKS = /\b(TODO|TBD|FIXME|PLACEHOLDER)\b|\{\{[^}]*\}\}/;
const PLACEHOLDER = { test: (s) => PLACEHOLDER_WORDS.test(s) || PLACEHOLDER_MARKS.test(s) };
const REQUIRED_OG = ["og:title", "og:description", "og:url", "og:image"];
// ---------- small HTML helpers (regex based, good enough for well-formed pages) ----------
export function attrs(tag) {
const out = {};
const re = /([a-zA-Z_:][-\w:.]*)\s*=\s*("([^"]*)"|'([^']*)'|([^\s"'>]+))/g;
let m;
while ((m = re.exec(tag))) out[m[1].toLowerCase()] = m[3] ?? m[4] ?? m[5] ?? "";
return out;
}
const decode = (s) =>
s.replace(/ /g, " ").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/�?39;|'/g, "'").replace(/&#(\d+);/g, (_, n) => String.fromCodePoint(Number(n)));
export function visibleText(html) {
return decode(
html
.replace(/<!--[\s\S]*?-->/g, " ")
.replace(/<(script|style|template|noscript)\b[\s\S]*?<\/\1>/gi, " ")
.replace(/<[^>]+>/g, " "),
).replace(/\s+/g, " ").trim();
}
const norm = (s) => String(s).toLowerCase().replace(/[^\p{L}\p{N}]+/gu, " ").trim();
const lineOf = (text, index) => text.slice(0, index).split("\n").length;
// ---------- robots.txt ----------
/** Groups of user-agents with their rules, in file order. */
export function parseRobots(text) {
const groups = [];
let current = null;
let lastWasAgent = false;
for (const raw of text.split(/\r?\n/)) {
const line = raw.replace(/#.*/, "").trim();
if (!line) continue;
const i = line.indexOf(":");
if (i < 0) continue;
const key = line.slice(0, i).trim().toLowerCase();
const value = line.slice(i + 1).trim();
if (key === "user-agent") {
if (!lastWasAgent) {
current = { agents: [], rules: [] };
groups.push(current);
}
current.agents.push(value.toLowerCase());
lastWasAgent = true;
} else {
lastWasAgent = false;
if ((key === "allow" || key === "disallow") && current) current.rules.push({ type: key, path: value });
}
}
return groups;
}
/** "named" when the bot has its own group, "wildcard" when only * applies, "none" when no group applies. */
export function robotsFor(groups, bot) {
const own = groups.filter((g) => g.agents.includes(bot.toLowerCase()));
const star = groups.filter((g) => g.agents.includes("*"));
const used = own.length ? own : star;
const rules = used.flatMap((g) => g.rules);
// The site root is blocked when the longest matching rule for "/" is a Disallow.
const matching = rules.filter((r) => r.path === "/" || r.path === "/*" || (r.type === "allow" && r.path === ""));
const blocked = matching.some((r) => r.type === "disallow") && !matching.some((r) => r.type === "allow");
return { scope: own.length ? "named" : star.length ? "wildcard" : "none", blocked };
}
// ---------- the checks ----------
export function checkRobots(text) {
const out = [];
if (text == null) {
out.push({ level: "fail", area: "robots.txt", message: "robots.txt was not found.", fix: "Add /robots.txt. Start from templates/robots.ai.txt." });
return out;
}
const groups = parseRobots(text);
for (const bot of SEARCH_BOTS) {
const r = robotsFor(groups, bot);
if (r.blocked) out.push({ level: "fail", area: "robots.txt", message: `${bot} is blocked from the whole site (${r.scope === "named" ? "its own rule" : "the * rule"}).`, fix: `Add "User-agent: ${bot}" with "Allow: /" so AI assistants can read the site when someone asks about it.` });
}
if (!out.length) out.push({ level: "pass", area: "robots.txt", message: "AI search crawlers can reach the site." });
const unnamed = [...SEARCH_BOTS, ...TRAINING_BOTS].filter((b) => robotsFor(groups, b).scope !== "named");
if (unnamed.length) out.push({ level: "warn", area: "robots.txt", message: `No explicit rule for: ${unnamed.join(", ")}.`, fix: "Name each crawler with Allow or Disallow so the choice is deliberate. See templates/robots.ai.txt." });
else out.push({ level: "pass", area: "robots.txt", message: "Every AI crawler has an explicit rule." });
if (!/^\s*sitemap\s*:/im.test(text)) out.push({ level: "warn", area: "robots.txt", message: "No Sitemap line.", fix: 'Add "Sitemap: https://your-domain/sitemap.xml".' });
return out;
}
export function checkLlms(text) {
const out = [];
const fail = (line, message, fix) => out.push({ level: "fail", area: "llms.txt", line, message, fix });
if (text == null) {
out.push({ level: "warn", area: "llms.txt", message: "llms.txt was not found.", fix: "Optional. If you add one, start from templates/llms.template.txt." });
return out;
}
if (/^\s*<(!doctype|html)/i.test(text)) {
fail(1, "llms.txt returns an HTML page, not Markdown.", "Serve a plain Markdown file at /llms.txt (the request is probably falling through to a 404 or app page).");
return out;
}
const lines = text.split(/\r?\n/);
const first = lines.findIndex((l) => l.trim() !== "");
if (first < 0 || !/^# \S/.test(lines[first])) fail(first + 1 || 1, 'The first line is not a "# Title" heading.', "Start the file with one H1: the site or project name.");
const h1s = lines.map((l, i) => (/^# \S/.test(l) ? i + 1 : 0)).filter(Boolean);
if (h1s.length > 1) fail(h1s[1], "More than one H1 heading.", "Keep one H1. Use ## for sections.");
const quote = lines.findIndex((l) => /^> \S/.test(l));
const firstH2 = lines.findIndex((l) => /^## \S/.test(l));
if (quote < 0) fail(first + 2, 'No "> summary" blockquote.', "Add a one or two sentence summary as a blockquote straight after the title.");
else if (firstH2 >= 0 && quote > firstH2) fail(quote + 1, "The summary blockquote comes after the first section.", "Move the summary to just under the title.");
if (firstH2 < 0) fail(lines.length, 'No "## Section" headings.', "Group links under H2 sections such as ## Docs or ## Products.");
let links = 0;
lines.forEach((l, i) => {
const m = /^\s*[-*]\s*\[([^\]]*)\]\(([^)]*)\)/.exec(l);
if (!m) return;
links++;
if (!m[1].trim()) fail(i + 1, "A link has no name.", "Write links as - [Name](https://...): short description.");
if (!/^https?:\/\//.test(m[2])) fail(i + 1, `Link is not an absolute URL: ${m[2] || "(empty)"}`, "Use full https:// URLs so the file works wherever it is read.");
else if (PLACEHOLDER.test(m[2])) fail(i + 1, `Link looks like a placeholder: ${m[2]}`, "Replace it with a real page.");
});
if (firstH2 >= 0 && links === 0) fail(firstH2 + 1, "No links in list form.", "Under each section list pages as - [Name](https://...): short description.");
if (!out.length) out.push({ level: "pass", area: "llms.txt", message: `Structure is valid (${links} links).` });
return out;
}
/** Every JSON-LD node on the page, flattened out of @graph and arrays. */
export function jsonLdNodes(html) {
const blocks = [];
const re = /<script\b([^>]*)>([\s\S]*?)<\/script>/gi;
let m;
while ((m = re.exec(html))) {
if ((attrs(m[1]).type || "").toLowerCase() !== "application/ld+json") continue;
const line = lineOf(html, m.index);
try {
blocks.push({ line, data: JSON.parse(m[2]) });
} catch (err) {
blocks.push({ line, error: String(err.message || err) });
}
}
return blocks;
}
const flatten = (data) => {
const nodes = [];
const visit = (v) => {
if (Array.isArray(v)) v.forEach(visit);
else if (v && typeof v === "object") {
nodes.push(v);
if (Array.isArray(v["@graph"])) v["@graph"].forEach(visit);
}
};
visit(data);
return nodes;
};
const typesOf = (node) => [].concat(node["@type"] ?? []).map(String);
function strings(value, path = "", out = []) {
if (typeof value === "string") out.push([path, value]);
else if (Array.isArray(value)) value.forEach((v, i) => strings(v, `${path}[${i}]`, out));
else if (value && typeof value === "object") for (const [k, v] of Object.entries(value)) strings(v, path ? `${path}.${k}` : k, out);
return out;
}
export function checkJsonLd(html) {
const out = [];
const blocks = jsonLdNodes(html);
const fail = (line, message, fix) => out.push({ level: "fail", area: "JSON-LD", line, message, fix });
if (!blocks.length) {
fail(undefined, "No JSON-LD structured data on the page.", "Add at least an Organization or WebSite block. See templates/.");
return out;
}
const text = norm(visibleText(html));
let nodeCount = 0;
for (const b of blocks) {
if (b.error) {
fail(b.line, `JSON-LD does not parse: ${b.error}`, "Fix the JSON. A trailing comma or an unescaped quote is the usual cause.");
continue;
}
const top = [].concat(b.data);
for (const t of top) {
const ctx = [].concat(t?.["@context"] ?? []).map((c) => (typeof c === "string" ? c : c?.["@vocab"] || ""));
if (!ctx.some((c) => /^https?:\/\/schema\.org\/?$/.test(c))) fail(b.line, 'Missing "@context": "https://schema.org".', 'Add "@context": "https://schema.org" at the top of the block.');
}
for (const node of flatten(b.data)) {
const isTop = top.includes(node);
const inGraph = top.some((t) => Array.isArray(t?.["@graph"]) && t["@graph"].includes(node));
if ((isTop && !node["@graph"]) || inGraph) {
nodeCount++;
if (!typesOf(node).length) fail(b.line, 'A node has no "@type".', "Give every top-level node a schema.org @type.");
}
const types = typesOf(node);
if (types.includes("FAQPage")) {
for (const q of [].concat(node.mainEntity ?? [])) {
const name = q?.name;
if (typeof name !== "string" || !name.trim()) fail(b.line, "An FAQ question has no name.", "Every Question needs name and acceptedAnswer.text.");
else if (!text.includes(norm(name))) fail(b.line, `FAQ question is in the schema but not on the page: "${name}"`, "Show the question and its answer on the page, or remove it from the schema.");
if (typeof q?.acceptedAnswer?.text !== "string" || !q.acceptedAnswer.text.trim()) fail(b.line, `FAQ question has no answer text: "${name ?? ""}"`, "Add acceptedAnswer.text.");
}
}
if (node.aggregateRating || types.includes("AggregateRating")) {
const r = node.aggregateRating || node;
const value = String(r.ratingValue ?? "");
if (!value || !text.includes(norm(value))) fail(b.line, "aggregateRating is in the schema but the rating is not shown on the page.", "Only publish ratings that come from real reviews shown on the same page. Otherwise remove aggregateRating.");
}
if (types.includes("Offer") && node.price != null && !/^\d+(\.\d{1,2})?$/.test(String(node.price))) fail(b.line, `Offer price is not a plain number: ${node.price}`, 'Use digits only, for example "29.00", and put the currency in priceCurrency.');
if (types.includes("Offer") && node.price != null && !node.priceCurrency) fail(b.line, "Offer has a price but no priceCurrency.", 'Add priceCurrency, for example "USD".');
}
for (const [path, value] of strings(b.data)) {
if (PLACEHOLDER.test(value)) fail(b.line, `Placeholder value at ${path}: "${value.slice(0, 60)}"`, "Replace it with the real value or remove the property.");
}
}
if (!out.length) out.push({ level: "pass", area: "JSON-LD", message: `${blocks.length} block${blocks.length === 1 ? "" : "s"}, ${nodeCount} node${nodeCount === 1 ? "" : "s"}, all valid and matching the page.` });
return out;
}
export function checkHead(html, pageUrl) {
const out = [];
const head = (/<head\b[^>]*>([\s\S]*?)<\/head>/i.exec(html) || [, html])[1];
const tags = (name) => [...head.matchAll(new RegExp(`<${name}\\b([^>]*)>`, "gi"))].map((m) => ({ a: attrs(m[1]), line: lineOf(html, html.indexOf(m[0])) }));
const metas = tags("meta");
const meta = (key) => metas.find((t) => (t.a.property || t.a.name || "").toLowerCase() === key)?.a.content?.trim();
// Canonical
const canon = tags("link").filter((t) => (t.a.rel || "").toLowerCase().split(/\s+/).includes("canonical"));
if (!canon.length) out.push({ level: "fail", area: "canonical", message: 'No <link rel="canonical">.', fix: "Add one canonical link with the page's full https URL." });
else if (canon.length > 1) out.push({ level: "fail", area: "canonical", line: canon[1].line, message: "More than one canonical link.", fix: "Keep exactly one." });
else {
const href = canon[0].a.href || "";
if (!/^https:\/\//.test(href)) out.push({ level: "fail", area: "canonical", line: canon[0].line, message: `Canonical is not an absolute https URL: ${href || "(empty)"}`, fix: "Use the full address, for example https://your-domain/page/." });
else if (pageUrl && stripSlash(href) !== stripSlash(pageUrl)) out.push({ level: "warn", area: "canonical", line: canon[0].line, message: `Canonical (${href}) differs from the page address (${pageUrl}).`, fix: "Fine if this page is a deliberate duplicate. Otherwise point the canonical at this page." });
else out.push({ level: "pass", area: "canonical", message: href });
const ogUrl = meta("og:url");
if (ogUrl && /^https:\/\//.test(href) && stripSlash(ogUrl) !== stripSlash(href)) out.push({ level: "fail", area: "Open Graph", message: `og:url (${ogUrl}) does not match the canonical (${href}).`, fix: "Set og:url to the canonical URL." });
}
// Open Graph
const missing = REQUIRED_OG.filter((k) => !meta(k));
if (missing.length) out.push({ level: "fail", area: "Open Graph", message: `Missing: ${missing.join(", ")}.`, fix: "Add the missing tags. og:image must be an absolute URL." });
else if (!/^https?:\/\//.test(meta("og:image"))) out.push({ level: "fail", area: "Open Graph", message: `og:image is not an absolute URL: ${meta("og:image")}`, fix: "Use the full https:// address of the image." });
else out.push({ level: "pass", area: "Open Graph", message: "title, description, url and image are set." });
if (!meta("og:type")) out.push({ level: "warn", area: "Open Graph", message: "No og:type.", fix: 'Add og:type, usually "website" or "article".' });
if (!meta("twitter:card")) out.push({ level: "warn", area: "Open Graph", message: "No twitter:card.", fix: 'Add <meta name="twitter:card" content="summary_large_image">.' });
// Page basics
const robots = (meta("robots") || "").toLowerCase();
if (/\bnoindex\b/.test(robots)) out.push({ level: "fail", area: "page", message: "The page is set to noindex.", fix: "Remove noindex if this page should be found." });
const title = decode((/<title\b[^>]*>([\s\S]*?)<\/title>/i.exec(head) || [, ""])[1]).trim();
if (!title) out.push({ level: "fail", area: "page", message: "No <title>.", fix: "Add a title that says what the page is and who it is for." });
else if (title.length > 60) out.push({ level: "warn", area: "page", message: `Title is ${title.length} characters.`, fix: "Keep it to 60 or fewer so it is not cut off." });
const desc = meta("description");
if (!desc) out.push({ level: "fail", area: "page", message: "No meta description.", fix: "Add one or two plain sentences, up to about 155 characters." });
else if (desc.length > 160) out.push({ level: "warn", area: "page", message: `Meta description is ${desc.length} characters.`, fix: "Keep it to about 155." });
if (!/<html\b[^>]*\blang\s*=/i.test(html)) out.push({ level: "warn", area: "page", message: "No lang attribute on <html>.", fix: 'Add lang, for example <html lang="en">.' });
const h1 = (html.replace(/<(script|style|template)\b[\s\S]*?<\/\1>/gi, "").match(/<h1\b/gi) || []).length;
if (h1 !== 1) out.push({ level: h1 === 0 ? "fail" : "warn", area: "page", message: `The page has ${h1} H1 headings.`, fix: "Use exactly one H1 that states the page's subject." });
if (!/<main\b|role\s*=\s*["']?main/i.test(html)) out.push({ level: "warn", area: "page", message: "No <main> landmark.", fix: "Wrap the page's main content in <main>." });
if (!out.some((r) => r.area === "page")) out.push({ level: "pass", area: "page", message: "Title, description, language, one H1 and a main landmark." });
return out;
}
const stripSlash = (u) => u.replace(/[#?].*$/, "").replace(/\/+$/, "");
export function checkSitemap(text) {
if (text == null) return [{ level: "warn", area: "sitemap", message: "sitemap.xml was not found.", fix: "Add /sitemap.xml listing every page that should be found, and name it in robots.txt." }];
if (!/<(urlset|sitemapindex)\b/i.test(text)) return [{ level: "fail", area: "sitemap", message: "sitemap.xml is not a sitemap (no <urlset> or <sitemapindex>).", fix: "Serve a valid XML sitemap at /sitemap.xml." }];
const n = (text.match(/<loc>/gi) || []).length;
return [{ level: "pass", area: "sitemap", message: `${n} address${n === 1 ? "" : "es"} listed.` }];
}
export function verify({ html, robots, llms, sitemap, pageUrl }) {
return [...checkRobots(robots), ...checkLlms(llms), ...checkJsonLd(html), ...checkHead(html, pageUrl), ...checkSitemap(sitemap)];
}
// ---------- loading ----------
async function fetchText(url) {
try {
const res = await fetch(url, { redirect: "follow", headers: { "user-agent": "verify-geo/1.0 (+site check)", accept: "text/html,text/plain,*/*" }, signal: AbortSignal.timeout(15000) });
if (!res.ok) return null;
return await res.text();
} catch {
return null;
}
}
async function readOrNull(path) {
try {
return await readFile(path, "utf8");
} catch {
return null;
}
}
export function parseArgs(argv) {
const o = { strict: false, json: false };
for (let i = 0; i < argv.length; i++) {
const a = argv[i];
if (a === "--strict") o.strict = true;
else if (a === "--json") o.json = true;
else if (a === "--help" || a === "-h") o.help = true;
else if (["--url", "--dir", "--page"].includes(a)) {
if (argv[i + 1] == null || argv[i + 1].startsWith("--")) return { error: `${a} needs a value.` };
o[a.slice(2)] = argv[++i];
} else return { error: `Unknown option: ${a}` };
}
if (o.help) return o;
if (!o.url === !o.dir) return { error: "Give exactly one of --url or --dir." };
if (o.page && !o.dir) return { error: "--page only works with --dir." };
return o;
}
const USAGE = `Usage:
node verify-geo.mjs --url https://example.com/
node verify-geo.mjs --dir ./public [--page pricing/index.html]
Options: --strict (warnings fail), --json`;
export async function main(argv) {
const o = parseArgs(argv);
if (o.help) return console.log(USAGE), 0;
if (o.error) return console.error(`${o.error}\n${USAGE}`), 2;
let input;
let target;
if (o.url) {
let u;
try {
u = new URL(/^https?:\/\//.test(o.url) ? o.url : `https://${o.url}`);
} catch {
return console.error(`Not a valid URL: ${o.url}`), 2;
}
target = u.href;
const [html, robots, llms, sitemap] = await Promise.all([fetchText(u.href), fetchText(`${u.origin}/robots.txt`), fetchText(`${u.origin}/llms.txt`), fetchText(`${u.origin}/sitemap.xml`)]);
if (html == null) return console.error(`Could not load ${u.href}`), 1;
input = { html, robots, llms, sitemap, pageUrl: u.href };
} else {
const dir = resolve(o.dir);
const page = o.page || "index.html";
target = join(dir, page);
const [html, robots, llms, sitemap] = await Promise.all([readOrNull(join(dir, page)), readOrNull(join(dir, "robots.txt")), readOrNull(join(dir, "llms.txt")), readOrNull(join(dir, "sitemap.xml"))]);
if (html == null) return console.error(`Could not read ${target}`), 1;
input = { html, robots, llms, sitemap };
}
const results = verify(input);
const count = (level) => results.filter((r) => r.level === level).length;
const failed = count("fail") + (o.strict ? count("warn") : 0);
if (o.json) {
console.log(JSON.stringify({ target, ok: failed === 0, fail: count("fail"), warn: count("warn"), pass: count("pass"), results }, null, 2));
} else {
console.log(`GEO check: ${target}\n`);
for (const r of results) {
const where = r.line ? `${r.area}:${r.line}` : r.area;
console.log(`${r.level.toUpperCase().padEnd(4)} ${where.padEnd(14)} ${r.message}`);
if (r.fix && r.level !== "pass") console.log(`${" ".repeat(22)}Fix: ${r.fix}`);
}
console.log(`\n${count("pass")} passed, ${count("warn")} warning${count("warn") === 1 ? "" : "s"}, ${count("fail")} failed.${o.strict && count("warn") ? " (--strict: warnings count as failures)" : ""}`);
console.log(failed === 0 ? "PASS" : "FAIL");
}
return failed === 0 ? 0 : 1;
}
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
main(process.argv.slice(2)).then((code) => process.exit(code));
}
geo-audit/templates/robots.ai.txt47 lines# robots.txt with an explicit rule for each AI crawler.
# Replace {{DOMAIN}} and delete any private paths you do not have. Lines starting with # are comments.
#
# Two kinds of AI crawler:
# 1. Search and answer crawlers fetch a page when a person asks about it. Blocking them removes the site
# from AI answers. Keep these on Allow unless you have a reason not to.
# 2. Training crawlers collect text to train models. Allowing or blocking them is a business choice.
# It does not change whether the search crawlers above can cite the site.
User-agent: *
Allow: /
Disallow: /api/
Disallow: /admin/
# 1. Search and answer crawlers
User-agent: OAI-SearchBot
Allow: /
User-agent: ChatGPT-User
Allow: /
User-agent: PerplexityBot
Allow: /
User-agent: Perplexity-User
Allow: /
User-agent: Claude-SearchBot
Allow: /
User-agent: Claude-User
Allow: /
# 2. Training crawlers: change Allow to Disallow for any you want to opt out of.
User-agent: GPTBot
Allow: /
User-agent: ClaudeBot
Allow: /
User-agent: Google-Extended
Allow: /
User-agent: CCBot
Allow: /
Sitemap: https://{{DOMAIN}}/sitemap.xml
geo-audit/templates/llms.template.txt18 lines# {{SITE_NAME}}
> {{ONE_OR_TWO_SENTENCES: what the site offers, who it is for, and where it operates. Facts only.}}
{{OPTIONAL: a short paragraph of details an assistant needs to answer questions correctly, such as prices, service area, opening hours or how to get support. Delete this block if there is nothing to add.}}
## {{SECTION_NAME, for example Products}}
- [{{PAGE_NAME}}]({{https://your-domain/page/}}): {{what the page covers, in one line}}
- [{{PAGE_NAME}}]({{https://your-domain/page/}}): {{what the page covers, in one line}}
## {{SECTION_NAME, for example Docs}}
- [{{PAGE_NAME}}]({{https://your-domain/page/}}): {{what the page covers, in one line}}
## Optional
- [{{PAGE_NAME}}]({{https://your-domain/page/}}): {{pages an assistant can skip when short on space}}
geo-audit/templates/schema-software-app.jsonld18 lines{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "{{PRODUCT_NAME}}",
"url": "{{https://your-domain/product/}}",
"description": "{{ONE_OR_TWO_SENTENCES_THAT_ALSO_APPEAR_ON_THE_PAGE}}",
"applicationCategory": "{{BusinessApplication, DeveloperApplication or another schema.org category}}",
"operatingSystem": "{{Web, or the systems it runs on}}",
"softwareVersion": "{{1.0.0, or delete this line}}",
"offers": {
"@type": "Offer",
"price": "{{29.00, digits only. Use 0 for a free product}}",
"priceCurrency": "{{USD}}",
"url": "{{https://your-domain/product/}}",
"availability": "https://schema.org/InStock"
},
"publisher": { "@id": "{{https://your-domain/}}#organization" }
}
geo-audit/templates/project-rules.md40 lines# GEO rules for this project
Paste this section into the project's `CLAUDE.md`, `AGENTS.md` or `.cursor/rules/geo.mdc` so every future change keeps the site readable by AI assistants and search engines.
## Head tags
- Every page has exactly one `<link rel="canonical">` with its full https URL.
- One URL form only: the canonical, `og:url`, the sitemap entry and internal links all use the same host and the same trailing-slash style.
- Every page has a unique `<title>` (60 characters or fewer), a unique meta description (about 155), `og:title`, `og:description`, `og:url`, `og:image` (absolute URL), `og:type` and `twitter:card`.
- Head tags are generated in one place (the layout or page helper). Do not hand-write them per page.
## Structured data
- JSON-LD is generated from the same data the page renders. Never keep a second, hand-typed copy of a price, name or FAQ.
- Everything in the schema is visible on the same page. No rating, review, price, award or FAQ question that a visitor cannot see.
- Never invent a value. If it is unknown, leave the property out.
- `Organization` and `WebSite` go on every page with stable `@id` values. Page-specific types (`SoftwareApplication`, `FAQPage`, `Article`, `LocalBusiness`) go only on pages they describe.
- Offer prices are digits only with a separate `priceCurrency`.
## Content
- The main content of a page is in the HTML the server sends. Do not rely on client-side JavaScript to render text that should be found.
- One H1 per page. Headings go in order and describe the content under them.
- The main content sits inside `<main>`. `<html>` has a `lang` attribute.
## Crawlers and discovery
- `robots.txt` names each AI crawler with an explicit Allow or Disallow. Do not block the search and answer crawlers (`OAI-SearchBot`, `ChatGPT-User`, `PerplexityBot`, `Perplexity-User`, `Claude-SearchBot`, `Claude-User`) unless the owner asks.
- New pages are added to the sitemap by the build, never by hand. Pages that are noindex or redirected stay out of it.
- When a page is added, moved or removed, update `llms.txt` if the site has one.
## Before finishing any change that touches pages, head tags, robots.txt or the sitemap
Run the check on the built site and fix every failure:
```
node .claude/skills/geo-audit/scripts/verify-geo.mjs --dir <build-folder>
```
Adjust the path if the skill is installed somewhere else.
geo-audit/README.md113 lines# GEO Skill Kit
Version 1.0.0. Free, MIT licence. By Red Center Studio, https://redcenterstudio.com/
An Agent Skill that audits a website for AI search readiness, fixes what it finds, and proves the result with a script. It works in any agent that reads the open `SKILL.md` format, including Claude Code, Cursor and Antigravity.
It is different from a prompt in one way that matters: the agent is not finished until `verify-geo.mjs` exits with code 0. The script has no dependencies, so you can also run it yourself or in CI.
## What is in the kit
```
geo-audit/
SKILL.md The skill: five phases, from audit to verified fix
README.md This file
LICENSE
scripts/
verify-geo.mjs The check. Node 18 or newer, no dependencies
templates/
robots.ai.txt robots.txt with a rule for each AI crawler
llms.template.txt llms.txt in the llmstxt.org format
schema-organization.jsonld
schema-website.jsonld
schema-software-app.jsonld SoftwareApplication with an Offer
schema-faq.jsonld
project-rules.md Rules to paste into CLAUDE.md, AGENTS.md or Cursor rules
```
## Install
Unzip, then copy the `geo-audit` folder to where your agent looks for skills.
**Claude Code** (one project):
```
mkdir -p .claude/skills
cp -r geo-audit .claude/skills/
```
For every project on your machine, use `~/.claude/skills/` instead.
**Cursor:**
```
mkdir -p .cursor/skills
cp -r geo-audit .cursor/skills/
```
If your Cursor version does not load skills, copy `templates/project-rules.md` to `.cursor/rules/geo.mdc` and ask the agent to follow `geo-audit/SKILL.md`.
**Antigravity:**
```
mkdir -p .agent/skills
cp -r geo-audit .agent/skills/
```
**Any other agent:** keep the folder anywhere in the project and say "follow geo-audit/SKILL.md".
Skill folder locations change between agent versions. If the skill does not show up, check your agent's documentation for the current folder.
## Use
Ask your agent in plain words:
- "Run a GEO audit on this project and fix what fails."
- "Check https://my-site.com for AI search readiness."
- "Add structured data and an llms.txt to this site."
To keep the site in shape afterwards, paste `templates/project-rules.md` into your project's `CLAUDE.md` or `AGENTS.md`.
## Run the check yourself
```
node geo-audit/scripts/verify-geo.mjs --url https://my-site.com/
node geo-audit/scripts/verify-geo.mjs --dir ./dist
node geo-audit/scripts/verify-geo.mjs --dir ./dist --page pricing/index.html
```
| Option | What it does |
|---|---|
| `--url <url>` | Check a live page. robots.txt, llms.txt and sitemap.xml are read from the same site |
| `--dir <path>` | Check a built site on disk |
| `--page <file>` | With `--dir`, the HTML file to check. Default `index.html` |
| `--strict` | Warnings count as failures |
| `--json` | Print results as JSON |
Exit code 0 means pass, 1 means at least one check failed. In CI:
```
node geo-audit/scripts/verify-geo.mjs --dir ./dist --strict
```
## What it checks
- **robots.txt:** AI search crawlers are not blocked, and each AI crawler has an explicit rule.
- **llms.txt:** if present, it follows the format (`# Title`, `> summary`, `## Sections`, full-URL links).
- **JSON-LD:** every block parses, has `@context` and `@type`, has no leftover template text, and every FAQ question and rating in the schema is visible on the page.
- **Canonical and Open Graph:** one absolute https canonical, matching `og:url`, and the four core Open Graph tags.
- **Page basics:** title, meta description, one H1, `lang`, a `<main>` landmark, not noindex.
- **Sitemap:** present and valid.
## What it does not do
- It does not measure whether AI assistants cite you. It checks the technical basics that make citing possible.
- It does not run JavaScript. If your content only appears after scripts run, the check sees what most AI crawlers see: an empty page.
- It cannot see firewall or bot protection rules. A host can block AI crawlers even when robots.txt allows them.
- llms.txt is cheap and harmless, but independent studies show most AI crawlers do not request it yet. Crawler access and structured data matter more.
## Want it done for you
Red Center Studio sets all of this up on your site for a fixed price, with a before and after audit: https://redcenterstudio.com/services/geo-foundation/
A free online version of the audit, no install needed: https://redcenterstudio.com/geo-audit/
Five phases, in order.
The agent follows SKILL.md from the first phase to the last. It is not done until verify-geo.mjs passes.
- Audit. Runs the script on the home page and one page of each type, reads the source for what a script cannot judge, and reports before changing anything.
- robots.txt and AI crawlers. Gives each AI search and training crawler its own robots.txt rule, asks you once about training crawlers, and adds the sitemap line.
- Structured data (JSON-LD). Adds Organization and WebSite JSON-LD, plus SoftwareApplication, FAQPage, Article or LocalBusiness only where the page shows it. No invented ratings or prices.
- Canonical, Open Graph and llms.txt. One https canonical per page, the core Open Graph tags, unique titles and descriptions, a clean sitemap, and llms.txt in the llmstxt.org format.
- Verify and finish. Rebuilds and re-runs the script until it prints PASS, then reports what changed with the before and after results.
Unzip it where your agent looks for skills.
Claude Code, this project
mkdir -p .claude/skills && unzip geo-skill-kit-v1.0.0.zip -d .claude/skills/Cursor
mkdir -p .cursor/skills && unzip geo-skill-kit-v1.0.0.zip -d .cursor/skills/Antigravity
mkdir -p .agent/skills && unzip geo-skill-kit-v1.0.0.zip -d .agent/skills/Then ask in plain words, for example: "Use the geo-audit skill on this project."
- Price
- Free.
- Licence
- MIT. Use it, change it and share it.
- Delivery
- Instant download from this page. No sign-up and no email address.
- Version
- Version 1.0.0, updated 20 November 2026.
GEO Skill Kit questions
Is the GEO Skill Kit really free?
Yes. It is MIT licensed, so you can use it, change it and share it in your own projects and in client work. There is no sign-up and no email address to give: the download is a plain zip.
How is it different from the free GEO audit on this site?
The online audit reads one live page and gives a score with fixes to copy and paste. The kit works inside your project with your AI agent: it finds where your site builds its head tags, robots.txt and sitemap, fixes them in the source, and re-runs verify-geo.mjs on built pages or a live address until they pass.
Does it guarantee that AI assistants will cite my site?
No. It checks and fixes the technical basics that make citing possible: crawler access, structured data, canonical and Open Graph tags, the sitemap and llms.txt. It does not measure rankings or citations, and it cannot see firewall rules that block crawlers.
Can I run the check without an agent?
Yes. Run node geo-audit/scripts/verify-geo.mjs with --url for a live page or --dir for a built folder. Exit code 0 means pass and 1 means at least one failure. Add --strict in CI so warnings fail the build too.
Other Agent Skill kits.
Remote MCP Server Kit
$39 USD
Builds a production remote MCP server on Cloudflare Workers with OAuth sign-in, tool design rules, rate limits and tests, then checks it against the MCP spec and the connector directory requirements with a bundled script.
Stripe on Workers Kit
$19 USD
Adds Stripe Checkout, a signature-checked webhook and idempotent order fulfilment to a Cloudflare Worker with no Stripe SDK, then tests the webhook path with a bundled script.
Workers Launch Check Kit
$15 USD
Reviews a Cloudflare Workers project before launch: secrets, security headers, rate limits, error handling, observability and wrangler config, fixes what fails and re-runs the bundled checker until it passes.