seo-sitemap-generation
Skill10 starsChanged 6 months agoMITView on GitHub
Use when generating sitemap.xml, robots.txt, dynamic sitemaps from a database, sitemap index files, or fixing crawl coverage. Not for in-app navigation or internal link strategy (see programmatic-seo-pages).
In this repository56 other files it gives its agents.
- accessibility-passSkill
- analytics-eventsSkill
- api-error-handlingSkill
- audit-logging-backendSkill
- background-jobs-and-cronSkill
- dark-mode-and-themingSkill
- dashboard-charts-rechartsSkill
- edge-functions-and-webhooksSkill
- email-and-notificationsSkill
- error-states-and-empty-uiSkill
- feature-flags-and-togglesSkill
- file-upload-storageSkill
- i18n-multi-languageSkill
- lovable-prompting-playbookSkill
- lovable-ship-checklistSkill
- migration-playbookSkill
- multi-tenant-backendSkill
- onboarding-copySkill
- optimistic-updatesSkill
- payment-failed-and-recoverySkill
- payment-webhook-idempotencySkill
- payment-webhook-testingSkill
- performance-budgetSkill
- pg-cron-recipesSkill
- pg-cron-scheduled-jobsSkill
- pg-cron-with-pg-net-edgeSkill
- postgres-full-text-searchSkill
- postgres-triggers-and-functionsSkill
- pricing-and-billingSkill
- programmatic-seo-content-qualitySkill
- programmatic-seo-pagesSkill
- rate-limiting-edgeSkill
- realtime-and-subscriptionsSkill
- refactor-safe-diffSkill
- release-notesSkill
- seo-core-web-vitalsSkill
- seo-landing-pageSkill
- seo-meta-tags-spaSkill
- seo-ssr-and-prerenderingSkill
- seo-structured-dataSkill
- server-input-validationSkill
- shadcn-patternsSkill
- soft-delete-and-archivingSkill
- stripe-one-time-payment-webhooksSkill
- stripe-payment-webhooksSkill
- supabase-auth-flowsSkill
- supabase-database-designSkill
- supabase-rls-and-authSkill
- support-replySkill
- tanstack-infinite-queriesSkill
- tanstack-mutations-and-invalidationSkill
- tanstack-prefetch-and-hydrationSkill
- tanstack-query-alternativeSkill
- tanstack-router-data-loadersSkill
- tanstack-start-server-routesSkill
- typed-api-hooks-formsSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Every public Lovable site needs /sitemap.xml and /robots.txt — generate dynamically when content lives in Supabase.
- Very specific: line 33
Always include the absolute Sitemap: URL.
- Very specific: line 34
Don't Disallow: / and expect a deploy delay to "uncrawl" — it won't.
- Distinctive: line 106
If you have > 50,000 URLs or > 50 MB sitemap, split into multiple files and reference from a sitemap index:
- Distinctive: line 130
Verify the property in Google Search Console.
- Distinctive: line 132
Check Coverage weekly for the first month — fix excluded URLs, broken redirects.
- Distinctive: line 133
Add Bing Webmaster Tools too — free, takes 10 minutes.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SEO sitemap and robots
Every public Lovable site needs /sitemap.xml and /robots.txt — generate dynamically when content lives in Supabase.
Companion skills: seo-ssr-and-prerendering, programmatic-seo-pages, seo-landing-page.
robots.txt
Serve from the static root or via an edge function:
User-agent: *
Allow: /
Disallow: /app
Disallow: /api
Disallow: /auth
Disallow: /admin
Sitemap: https://acme.com/sitemap.xmlRules:
- Disallow authenticated routes and webhooks.
- Always include the absolute
Sitemap:URL. - Don't
Disallow: /and expect a deploy delay to "uncrawl" — it won't.
Sitemap (static, small site)
For sites with < 100 public pages, generate at build time and place at public/sitemap.xml:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://acme.com/</loc><lastmod>2026-05-22</lastmod><priority>1.0</priority></url>
<url><loc>https://acme.com/pricing</loc><lastmod>2026-05-22</lastmod></url>
<url><loc>https://acme.com/about</loc></url>
</urlset>Generate from a route list rather than hand-editing — keep one source of truth.
Sitemap (dynamic from Supabase)
Edge function returning XML:
// supabase/functions/sitemap/index.ts
Deno.serve(async () => {
const { data: posts } = await admin
.from("posts")
.select("slug, updated_at")
.eq("status", "published")
.is("deleted_at", null)
.order("updated_at", { ascending: false });
const { data: locations } = await admin
.from("location_pages")
.select("slug, updated_at")
.eq("published", true);
const staticUrls = ["/", "/pricing", "/about", "/contact", "/blog"];
const urls = [
...staticUrls.map((p) => ({ loc: `https://acme.com${p}`, lastmod: today() })),
...(posts ?? []).map((p) => ({
loc: `https://acme.com/blog/${p.slug}`,
lastmod: p.updated_at,
})),
...(locations ?? []).map((l) => ({
loc: `https://acme.com/locations/${l.slug}`,
lastmod: l.updated_at,
})),
];
const body = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
${urls
.map(
(u) => ` <url><loc>${u.loc}</loc><lastmod>${formatIso(u.lastmod)}</lastmod></url>`,
)
.join("\n")}
</urlset>`;
return new Response(body, {
headers: {
"Content-Type": "application/xml; charset=utf-8",
"Cache-Control": "public, max-age=3600",
},
});
});Route /sitemap.xml at your hosting layer to this function (or generate at build).
Sitemap index (large sites)
If you have > 50,000 URLs or > 50 MB sitemap, split into multiple files and reference from a sitemap index:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap><loc>https://acme.com/sitemaps/posts.xml</loc><lastmod>2026-05-22</lastmod></sitemap>
<sitemap><loc>https://acme.com/sitemaps/locations.xml</loc><lastmod>2026-05-22</lastmod></sitemap>
</sitemapindex>Submit the index URL to Search Console.
What goes in the sitemap
| Include | Exclude |
| Public, indexable pages | Login, signup, dashboard |
| Canonical URLs only | Paginated mirrors (/blog?page=2) |
200 OK URLs | Redirected URLs (301, 302) |
| Published content | Drafts, expired listings, soft-deleted rows |
noindex: false pages | Pages with noindex meta |
Submitting and monitoring
- Verify the property in Google Search Console.
- Submit
https://acme.com/sitemap.xml. - Check Coverage weekly for the first month — fix excluded URLs, broken redirects.
- Add Bing Webmaster Tools too — free, takes 10 minutes.
Avoid
- Listing
/dashboardor other auth-gated pages. - Stale
lastmod(use the actualupdated_atfrom DB). - Including URLs with
noindexmeta tag — pick one signal. - Returning
200HTML on/sitemap.xml(bots expectapplication/xml). - Sitemaps > 50 MB or > 50,000 URLs in a single file.
Checklist
/sitemap.xmlreturns valid XML with correctContent-Type./robots.txtreferences the sitemap.- Authenticated routes excluded.
- Soft-deleted / unpublished content filtered out.
- Submitted to Google Search Console.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

