agentleFS
saizulsaizul/seo-audit-skills/skills/robots-sitemap-check/SKILL.md

robots-sitemap-check

Skill0 starsChanged 12 days agoMITView on GitHub

Lint robots.txt and XML sitemaps (including sitemap indexes and .xml.gz) from local files, test whether specific URLs are allowed or blocked for Googlebot or any crawler using Google's longest-match rules, and cross-check that sitemaps only list crawlable, indexable URLs. Use when the user asks to check, write or fix robots.txt or sitemap.xml, asks "is this URL blocked", sees "Blocked by robots.txt" or "Sitemap could not be read" in Search Console, or wants robots/sitemap checks in CI.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Verify the two files that tell crawlers where to go, with the same matching rules Google uses, and fix them at their source (static file, …

    line 9
  2. Distinctive:

    Search Console: "Blocked by robots.txt", "Indexed, though blocked by robots.txt", "Couldn't fetch", "Sitemap has errors"

    line 19
  3. Very specific:

    Get the files: Prefer the repository source (public/robots.txt, static/robots.txt, app/robots.ts, app/sitemap.ts) or the build output.

    line 29

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

robots.txt and sitemap check

Verify the two files that tell crawlers where to go, with the same matching rules Google uses, and fix them at their source (static file, framework route, CMS setting).

Paths below are relative to this skill's directory.

When to use

  • Writing, reviewing or debugging robots.txt
  • "Is /some/url blocked?" for Googlebot, Bingbot, GPTBot or any user-agent
  • Validating sitemap.xml, a sitemap index, or a generated sitemap before deploy
  • Search Console: "Blocked by robots.txt", "Indexed, though blocked by robots.txt", "Couldn't fetch", "Sitemap has errors"

When not to use

  • Whole-site crawl and canonical problems: technical-seo-audit.
  • hreflang inside sitemaps in depth: hreflang-check --sitemap.
  • Generating a sitemap from scratch: use the framework's generator (next-sitemap, @astrojs/sitemap, Hugo/Jekyll built-ins, Yoast/Rank Math); then validate here.

Workflow

  1. Get the files. Prefer the repository source (public/robots.txt, static/robots.txt, app/robots.ts, app/sitemap.ts) or the build output. If the user wants the live files, ask them to save them (curl -o robots.txt https://example.com/robots.txt) or fetch only with their go-ahead.
  2. Lint robots.txt: python3 scripts/robots_check.py robots.txt --json
  3. Test the URLs that matter (homepage, key templates, assets, anything the user asked about): python3 scripts/robots_check.py robots.txt --user-agent Googlebot --test / --test /products/x --test /assets/app.css For CI assertions: --expect-allowed / --expect-blocked /cart/ (exit 1 if any expectation fails).
  4. Validate each sitemap and cross-check with robots.txt and the production origin: python3 scripts/sitemap_check.py sitemap.xml --base-url https://example.com --robots robots.txt --json For an index, the child sitemaps are listed; validate each child file too. Use --exclude-list urls.txt with known noindex, redirected or canonicalised URLs to catch them in the sitemap.
  5. Fix at the source and re-run until clean. Show the user a diff of the robots.txt or sitemap generator config.

Decision points

  • Blocking vs noindex. robots.txt controls crawling, not indexing. To remove pages from results, allow crawling and serve noindex, or return 404/410. Never block a URL you want de-indexed.
  • Specific groups replace *. If a User-agent: Googlebot group exists, Googlebot ignores the * group entirely. Copy shared rules into every specific group; robots_check.py warns when a named group is missing * Disallow rules.
  • Never block rendering resources. CSS, JS, fonts and API endpoints the page needs must stay crawlable.
  • AI crawlers. To opt out of AI training while staying in search, add groups for the relevant tokens (for example GPTBot, Google-Extended, CCBot, ClaudeBot) - confirm each vendor's current token in their docs before writing it.
  • Sitemap contents. List only canonical, indexable URLs that return 200. Split at 50,000 URLs or 50 MB uncompressed. <lastmod> must be the real last significant change; <priority> and <changefreq> are ignored by Google.
  • Staging. A staging Disallow: / must never ship to production; add --expect-allowed / to CI for the production build.

Output

## robots.txt
Status: <OK | N errors, M warnings>
| Line | Severity | Issue | Fix |
URL tests:
| URL | User-agent | Verdict | Matched rule |

## Sitemaps
| File | Type | Entries | Errors | Warnings |
<issue list grouped by type, with example URLs>

## Changes
<diff of robots.txt / sitemap config>

Files

  • scripts/robots_check.py - robots.txt linter and URL tester (--test, --expect-allowed, --expect-blocked, --user-agent, --strict, --json).
  • scripts/sitemap_check.py - sitemap/sitemap index validator (--base-url, --robots, --exclude-list, --now, --strict, --json; reads .xml and .xml.gz).
  • references/rules.md - matching rules, limits and the reasoning for each check.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.