
Agent Search Optimisation
- 3 installs
- 5 repo stars
- Updated June 3, 2026
- dimitrigilbert/ai-skills
Audits a website for AI-agent and AI-search discoverability (crawlability, structured data, llms.txt, sitemaps) and produces a prioritized optimization roadmap.
About
Crawls a site's public surfaces, scores agent-readiness across crawlability, structured data, entity clarity and llms.txt, and delivers a prioritized roadmap for AI search visibility. A developer uses it to make a site more discoverable and citable by AI agents and answer engines.
- Audits a site for AI-agent readiness: crawlability, sitemaps, structured data, llms.txt
- Scores areas 0-3 and outputs a prioritized optimization roadmap
Agent Search Optimisation by the numbers
- 3 all-time installs (skills.sh)
- Ranked #1,624 of 1,879 Marketing & SEO skills by installs in the Skillselion catalog
- Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/dimitrigilbert/ai-skills --skill agent-search-optimisationAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 3 |
|---|---|
| repo stars | ★ 5 |
| Last updated | June 3, 2026 |
| Repository | dimitrigilbert/ai-skills ↗ |
What it does
Audits a website for AI-agent and AI-search discoverability (crawlability, structured data, llms.txt, sitemaps) and produces a prioritized optimization roadmap.
Files
Agent Search Optimisation
Quick start
When given a website URL, produce an evidence-based optimisation plan for AI agents and AI search.
1. Crawl the public site surfaces:
- homepage
- robots.txt
- sitemap.xml and sitemap index
- llms.txt / llms-full.txt if present
- key navigation pages
- representative article, product, project, docs, pricing, and about pages
2. Audit agent-readiness:
- crawlability and renderability
- canonical URLs
- sitemap coverage
- structured data
- language alternates
- entity clarity
- answer-oriented page summaries
- machine-readable indexes or APIs
- internal linking and topic hubs
3. Research current AI search best practices before making claims about current platforms. 4. Create a prioritized roadmap with:
- quick wins
- technical fixes
- content changes
- agent-facing data surfaces
- measurement plan
Workflow
1. Clarify the goal
Infer the likely goal from the user request. Ask only when necessary.
Common goals:
- increase AI answer citations
- make agents understand a product or portfolio
- expose documentation to coding agents
- improve local/business discovery in AI search
- prepare content for retrieval-augmented systems
- control AI crawler access
2. Collect evidence
Check these URLs where applicable:
{site}/
{site}/robots.txt
{site}/sitemap.xml
{site}/llms.txt
{site}/llms-full.txt
{site}/.well-known/Also inspect at least 5 representative pages when the site has enough content:
- homepage
- about/company/profile page
- main collection/archive page
- one detail page
- one recent article/docs page
3. Score the site
Use a 0-3 score for each area:
| Area | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| Crawlability | blocked/broken | partially crawlable | mostly crawlable | clean HTML + clear policy |
| Discovery | no sitemap | partial sitemap | complete sitemap | sitemap index + freshness |
| Structured data | none | basic metadata | JSON-LD on some templates | complete schema graph |
| Entity clarity | vague | some entities | clear entities | entity graph + IDs |
| Content extractability | thin/visual | prose only | summaries present | answer blocks + JSON |
| Language/canonicals | absent | inconsistent | mostly correct | canonical + hreflang complete |
| Agent surface | none | llms.txt only | index/feed | API/search/content endpoints |
| Measurement | none | traffic only | search console | AI/retrieval benchmark |
4. Recommend changes
Prioritize in this order unless the site context suggests otherwise:
1. Fix public crawl/discovery basics. 2. Add canonical URLs, metadata, and language alternates. 3. Add JSON-LD and entity IDs. 4. Add answer-oriented summaries to important pages. 5. Add topic hubs and internal links. 6. Add llms.txt as an orientation layer. 7. Add machine-readable content index. 8. Add semantic search/API only when the corpus is large enough. 9. Add measurement and recurring evaluation.
5. Deliver the plan
Structure the final answer as:
1. Executive summary 2. What I checked 3. Current strengths 4. Gaps and risks 5. Prioritized roadmap 6. Implementation details 7. Measurement plan 8. Open questions / assumptions
Output rules
- Do not claim a file or feature exists unless verified.
- Mark unverified items clearly.
- Prefer durable web standards over hype.
- Treat
llms.txtas additive, not a replacement for HTML, sitemaps, metadata, or structured data. - Separate discovery from access control; robots.txt is not security.
- Include concrete examples when possible.
- Keep recommendations implementation-ready.
- Use current web research for AI search platform behavior, crawler policies, and new conventions.
- If the user provides a private repo or codebase, inspect implementation before suggesting exact code changes.
Advanced features
See REFERENCE.md for audit criteria, schema recommendations, llms.txt guidance, roadmap templates, and API examples.
See EXAMPLES.md for output examples and reusable prompts.
Use scripts/audit-agent-readiness.mjs for a lightweight first-pass technical audit.
Agent Search Optimisation Examples
Example user requests
Use this skill for requests like:
Can you optimise my website for AI agents?
Audit https://example.com for AI search visibility.
Make a plan for AEO/GEO/LLM discoverability.
Should I add llms.txt to my site?
How do I make my docs easier for Cursor, Claude, ChatGPT, and Perplexity?
Create an AI SEO roadmap for this website.Example final answer outline
# Agent search optimisation plan for example.com
## Executive summary
The site is crawlable and has useful content, but it lacks a strong machine-readable layer. The highest-impact fixes are sitemaps, canonical URLs, structured data, answer blocks, and a compact content index.
## What I checked
- Homepage
- robots.txt
- sitemap.xml
- llms.txt
- 6 representative pages
- public search snippets
- structured data presence
## Strengths
- Clear product positioning
- Indexable public pages
- Good internal navigation
## Gaps
- No verified llms.txt
- Missing JSON-LD on detail pages
- Inconsistent metadata
- No machine-readable content index
## Roadmap
### Week 1: Discovery basics
- Add robots.txt with sitemap reference.
- Add sitemap index.
- Fix canonical tags.
- Normalize title and description templates.
### Weeks 2-3: Semantic layer
- Add Organization/WebSite schema.
- Add Article/Product/SoftwareApplication schema.
- Add breadcrumbs.
- Add answer blocks.
### Weeks 4-6: Agent layer
- Add llms.txt.
- Add /index.json.
- Add /api/content/{id}.
- Build 25-question retrieval benchmark.
## Measurement
Track sitemap coverage, structured data validity, AI referrals, crawler logs, and retrieval benchmark accuracy.Example llms.txt
# Example.com
> Example.com helps small teams manage project documentation and support knowledge bases.
## Canonical pages
- [Home](https://example.com/)
- [Product](https://example.com/product/)
- [Pricing](https://example.com/pricing/)
- [Docs](https://example.com/docs/)
- [Blog](https://example.com/blog/)
## Machine-readable resources
- [Sitemap](https://example.com/sitemap.xml)
- [Content index](https://example.com/index.json)
- [RSS feed](https://example.com/feed.xml)
## Key topics
- Knowledge base automation
- Customer support workflows
- AI documentation search
## Citation guidance
Use canonical URLs. Prefer docs pages for product behavior and pricing pages for plan details.Example robots.txt
User-agent: *
Allow: /
Sitemap: https://example.com/sitemap.xml
Sitemap: https://example.com/sitemap-posts.xml
Sitemap: https://example.com/sitemap-products.xmlExample JSON-LD for a software product
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"@id": "https://example.com/product/#software",
"name": "Example Product",
"url": "https://example.com/product/",
"description": "A documentation search tool for support teams.",
"applicationCategory": "BusinessApplication",
"operatingSystem": "Web",
"publisher": {
"@id": "https://example.com/#organization"
}
}Example audit prompt for an agent
Audit https://example.com for AI agent and AI search optimisation. Check crawlability, robots.txt, sitemaps, structured data, metadata, canonicals, hreflang, answer blocks, llms.txt, machine-readable indexes, internal linking, entity clarity, and measurement. Return a prioritized implementation roadmap.Agent Search Optimisation Reference
Core concept
Agent search optimisation means making a website easy for LLMs, answer engines, crawlers, and autonomous agents to discover, understand, cite, and navigate.
It is not a replacement for SEO. It sits on top of technical SEO, structured content, entity clarity, and stable machine-readable surfaces.
Terminology
- AI SEO: broad optimisation for visibility in AI search experiences.
- AEO: answer engine optimisation; content designed to answer questions clearly.
- GEO: generative engine optimisation; making content likely to be retrieved and cited by generative systems.
- Agent-readiness: making a site usable by autonomous agents, not only search crawlers.
- Machine layer: sitemaps, JSON-LD, feeds, indexes, APIs, and retrieval endpoints.
- Human layer: normal HTML pages designed for people.
Audit checklist
Crawl and discovery
Check:
robots.txtexists at root.robots.txtreferences sitemap URLs.- Sitemap index exists when the site has multiple sections.
- Important public pages are in sitemaps.
- Pages return correct status codes.
- Public pages are not blocked accidentally.
- Canonical URLs resolve consistently.
- Important content is present in initial HTML or reliably rendered.
Recommended files:
/robots.txt
/sitemap.xml
/sitemap-pages.xml
/sitemap-posts.xml
/sitemap-products.xml
/sitemap-docs.xml
/sitemap-tags.xml
/llms.txt
/llms-full.txt
/index.json
/feed.xmlStructured data
Use JSON-LD. Choose schema types based on the site:
| Site type | Useful schema types |
|---|---|
| Personal portfolio | Person, WebSite, CollectionPage, BlogPosting, SoftwareSourceCode |
| SaaS/product site | Organization, SoftwareApplication, Product, Offer, FAQPage |
| Docs site | TechArticle, HowTo, APIReference if applicable, BreadcrumbList |
| Local business | LocalBusiness, Service, PostalAddress, OpeningHoursSpecification |
| Ecommerce | Product, Offer, AggregateRating, Review, BreadcrumbList |
| Media/blog | Article, BlogPosting, Person, Organization, ImageObject |
Always add:
- stable
@idvalues urlnamedescriptiondatePublished/dateModifiedwhere relevantauthororpublisherinLanguageisPartOfaboutkeywordssameAsfor known external entity profiles
Entity clarity
Agents need explicit answers to:
- Who owns this site?
- What does this business/person/product do?
- Who is it for?
- What are the important topics?
- Which pages are canonical?
- Which pages are translations?
- Which pages support which claims?
- Which entities are related?
Create stable IDs for key entities:
https://example.com/#organization
https://example.com/#person
https://example.com/products/widget/#product
https://example.com/docs/api/#docsAnswer blocks
Add a compact extraction block near the top of important pages.
Template:
## Quick answer
**What this is:** ...
**Who it is for:** ...
**Key capabilities:** ...
**Technology / category:** ...
**Primary source:** ...
**Best citation summary:** ...For product or service pages:
## Summary for AI agents
This page describes [product/service], a [category] for [audience]. It helps users [outcome]. The most important features are [features]. Use this page as the canonical source for [specific topic].llms.txt guidance
llms.txt is useful as an orientation file for agents, but it is not a universal standard and should not replace normal discovery infrastructure.
Recommended structure:
# Site Name
> One-paragraph description of the site.
## Canonical pages
- [Home](https://example.com/)
- [About](https://example.com/about/)
- [Docs](https://example.com/docs/)
- [Products](https://example.com/products/)
## Key topics
- Topic 1: description
- Topic 2: description
## Machine-readable resources
- [Sitemap](https://example.com/sitemap.xml)
- [Content index](https://example.com/index.json)
- [RSS feed](https://example.com/feed.xml)
## Citation guidance
When citing this site, prefer canonical URLs and use page-level summaries.Use llms-full.txt only when the corpus is small enough or when it points to condensed Markdown versions of the most important content.
Machine-readable content index
A lightweight /index.json can be more useful than a complex API.
Example:
{
"site": {
"name": "Example",
"url": "https://example.com",
"language": ["en"]
},
"updatedAt": "2026-05-23",
"items": [
{
"id": "post:agent-search",
"type": "article",
"title": "Agent Search Optimisation",
"url": "https://example.com/blog/agent-search/",
"language": "en",
"summary": "A practical guide to making websites easier for AI agents to understand.",
"tags": ["ai-search", "agents", "seo"],
"publishedAt": "2026-05-01",
"updatedAt": "2026-05-10"
}
]
}Agent-facing API
Only recommend an API when the site has enough content or product complexity.
Useful endpoints:
GET /index.json
GET /api/content/{id}
GET /api/search?q=
GET /api/graph
GET /api/changesMinimum response fields:
{
"id": "string",
"type": "article|product|project|doc|service",
"title": "string",
"url": "string",
"summary": "string",
"language": "en",
"tags": [],
"entities": [],
"datePublished": "YYYY-MM-DD",
"dateModified": "YYYY-MM-DD"
}Retrieval benchmark
Create 25-50 questions that agents should answer from the site.
Grade:
- correct canonical URL
- correct language
- correct entity
- accurate summary
- supporting page found in top 5
- no hallucinated feature or claim
Example benchmark questions:
What does this company sell?
Who is the target customer?
Which product solves [problem]?
What is the pricing model?
Which pages should be cited for API documentation?
Which articles explain [topic]?
What changed recently?Roadmap template
Phase 1: Discovery and crawl hygiene
- Verify root
robots.txt. - Add sitemap index.
- Add canonical links.
- Fix broken links and redirect chains.
- Make important content visible in HTML.
- Normalize titles and descriptions.
Phase 2: Semantic structure
- Add JSON-LD to core templates.
- Create stable entity IDs.
- Add breadcrumbs.
- Add language metadata and hreflang.
- Add answer blocks.
Phase 3: Agent orientation
- Add
llms.txt. - Add
/index.json. - Add Markdown or clean text versions of important docs when appropriate.
- Add feeds/changelogs.
Phase 4: Agent interaction
- Add content/search API.
- Add vector search for large corpora.
- Add rate limiting and caching.
- Add evaluation queries.
Phase 5: Measurement
- Track AI referrals.
- Track crawler logs.
- Track citation quality.
- Run retrieval benchmark monthly.
- Update answer blocks based on failures.
Common mistakes
- Treating
llms.txtas the whole strategy. - Blocking crawlers without understanding discovery goals.
- Publishing JavaScript-only content with no crawlable fallback.
- Using generic page descriptions across many pages.
- Failing to distinguish original and translated pages.
- Creating schema that contradicts visible page content.
- Adding a vector API before fixing sitemaps and metadata.
- Optimising for agents while hiding the actual answer in images or PDFs.
#!/usr/bin/env node
/**
* Lightweight agent-readiness audit.
*
* Usage:
* node scripts/audit-agent-readiness.mjs https://example.com
*
* This script intentionally avoids heavy crawling. It checks the root page and
* standard machine-readable resources, then reports signals useful for an
* agent-search optimisation audit.
*/
const site = process.argv[2];
if (!site) {
console.error("Usage: node scripts/audit-agent-readiness.mjs https://example.com");
process.exit(1);
}
function normalizeBase(input) {
const url = new URL(input);
return `${url.protocol}//${url.host}`;
}
async function fetchText(url) {
try {
const res = await fetch(url, {
redirect: "follow",
headers: {
"User-Agent": "agent-search-readiness-audit/1.0"
}
});
const text = await res.text();
return {
ok: res.ok,
status: res.status,
url: res.url,
contentType: res.headers.get("content-type") || "",
text
};
} catch (error) {
return {
ok: false,
status: 0,
url,
contentType: "",
text: "",
error: error.message
};
}
}
function hasPattern(text, regex) {
return regex.test(text || "");
}
function extractTitle(html) {
const match = html.match(/<title[^>]*>([\s\S]*?)<\/title>/i);
return match ? match[1].replace(/\s+/g, " ").trim() : null;
}
function extractMetaDescription(html) {
const match = html.match(/<meta\s+[^>]*name=["']description["'][^>]*content=["']([^"']+)["'][^>]*>/i)
|| html.match(/<meta\s+[^>]*content=["']([^"']+)["'][^>]*name=["']description["'][^>]*>/i);
return match ? match[1].trim() : null;
}
function countMatches(text, regex) {
return [...(text || "").matchAll(regex)].length;
}
const base = normalizeBase(site);
const targets = {
home: `${base}/`,
robots: `${base}/robots.txt`,
sitemap: `${base}/sitemap.xml`,
llms: `${base}/llms.txt`,
llmsFull: `${base}/llms-full.txt`
};
const results = {};
for (const [key, url] of Object.entries(targets)) {
results[key] = await fetchText(url);
}
const home = results.home.text;
const report = {
site: base,
checkedAt: new Date().toISOString(),
resources: Object.fromEntries(
Object.entries(results).map(([key, value]) => [
key,
{
url: value.url,
ok: value.ok,
status: value.status,
contentType: value.contentType,
bytes: value.text.length,
error: value.error || null
}
])
),
homepageSignals: {
title: extractTitle(home),
metaDescription: extractMetaDescription(home),
canonical: hasPattern(home, /<link\s+[^>]*rel=["']canonical["'][^>]*>/i),
hreflangCount: countMatches(home, /hreflang=["'][^"']+["']/gi),
jsonLdBlocks: countMatches(home, /<script\s+[^>]*type=["']application\/ld\+json["'][^>]*>/gi),
openGraph: hasPattern(home, /property=["']og:/i),
twitterCard: hasPattern(home, /name=["']twitter:/i),
headings: {
h1: countMatches(home, /<h1[\s>]/gi),
h2: countMatches(home, /<h2[\s>]/gi)
}
},
discoverySignals: {
robotsMentionsSitemap: hasPattern(results.robots.text, /^sitemap:\s*/gim),
sitemapLooksXml: hasPattern(results.sitemap.text, /<(urlset|sitemapindex)[\s>]/i),
llmsTxtPresent: results.llms.ok,
llmsFullPresent: results.llmsFull.ok
},
recommendations: []
};
if (!results.robots.ok) report.recommendations.push("Add a root /robots.txt file and reference sitemap URLs.");
if (!results.sitemap.ok) report.recommendations.push("Add /sitemap.xml or a sitemap index.");
if (!report.homepageSignals.canonical) report.recommendations.push("Add canonical link tags to important pages.");
if (report.homepageSignals.jsonLdBlocks === 0) report.recommendations.push("Add JSON-LD structured data to templates.");
if (!report.discoverySignals.llmsTxtPresent) report.recommendations.push("Consider adding /llms.txt as an agent orientation file.");
if (!report.homepageSignals.metaDescription) report.recommendations.push("Add a unique meta description to the homepage.");
if (report.homepageSignals.h1 !== 1) report.recommendations.push("Use one clear H1 on the homepage.");
console.log(JSON.stringify(report, null, 2));