auto-update-llms-robots-txt

auto-update-llms-robots-txt is a cursor rule for Cursor from gurbaaz27/cursorrules. It costs 0 tokens per session (1,923 once invoked), scanned A, original, CC0-1.0.

A repository rule that updates llms.txt and robots.txt when website pages change. These files describe pages to language-model crawlers and search-engine crawlers, including pages they should not access.

In plain words
What is it for?
Use it when creating, editing, or deleting routes so public pages are listed and authenticated areas such as account or admin pages are disallowed.
Why use it?
It reduces the risk that new or changed pages are missing from crawler guidance or that private pages are accidentally exposed for crawling.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/gurbaaz27/cursorrules/auto-update-llms-robots-txt
Clone the repo
git clone --depth 1 https://github.com/gurbaaz27/cursorrules

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for auto-update-llms-robots-txt

README.md
[![agentmods](https://agentmods.dev/badge/rules/gurbaaz27/cursorrules/auto-update-llms-robots-txt.svg)](https://agentmods.dev/rules/gurbaaz27/cursorrules/auto-update-llms-robots-txt)
Your own site
<a href="https://agentmods.dev/rules/gurbaaz27/cursorrules/auto-update-llms-robots-txt"><img src="https://agentmods.dev/badge/rules/gurbaaz27/cursorrules/auto-update-llms-robots-txt.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,923 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01923
Opus 5 $0.00000 $0.00962
Sonnet 5 $0.00000 $0.00385
Haiku 4.5 $0.00000 $0.00192

Measured 6d ago against content hash b7ff5f119228, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

auto-update-llms-robots-txt scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rules/web/auto-update-llms-robots-txt.mdc · 270 lines

How it starts

The opening of the file, as written. The whole thing — 270 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Auto-Update llms.txt and robots.txt

When a page file is created, edited, or deleted, you MUST update both llms.txt and robots.txt to reflect the current state of all crawlable pages.

Detection Rules

1. Identify Protected/Authenticated Routes

A page is considered protected (should be disallowed) if ANY of the following conditions are met:

By Path Pattern:

  • Located under /auth/, /admin/, /dashboard/, /account/, /settings/, /profile/, /private/, /internal/, /api/
  • Path contains [...auth], (auth), (protected), (private), (admin)
  • Located under route groups like (dashboard), (admin), (authenticated)

By Code Analysis:

  • Uses authentication HOCs: withAuth, withSession, requireAuth, ProtectedRoute, AuthGuard
  • Uses auth hooks: useAuth, useSession, useUser, useProtectedRoute
  • Has middleware protection (check for middleware.ts/js in parent directories)
  • Contains auth checks: getServerSession, getSession, auth(), requireAuthentication
  • Uses route guards or navigation guards (Vue Router, Angular)
  • Has export const config = { auth: true } or similar metadata
  • Contains redirects to login pages for unauthenticated users

By File/Folder Naming:

  • Files prefixed with _ (often private in some frameworks)
  • Located in folders named protected/, private/, secure/

2. Identify Public Routes

A page is considered public (should be allowed) if:

  • No authentication logic detected
  • Explicitly marked as public: export const config = { auth: false }
  • Common public pages: /, /about, /contact, /pricing, /blog/*, /docs/*, /faq, /terms, /privacy, /help

File Locations

Look for existing files in these locations (in order of priority):

llms.txt:

  1. /public/llms.txt
  2. /static/llms.txt
  3. /llms.txt (root)

robots.txt:

  1. /public/robots.txt
  2. /static/robots.txt
  3. /robots.txt (root)

If files don't exist, create them in /public/ (or /static/ for frameworks that use it).

Read the full file on GitHub · 270 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 270 lines · 0 tokens per session scan A b7ff5f119228

Subscribe to this mod's changes

auto-update-llms-robots-txt is a cursor rule published in the GitHub repository gurbaaz27/cursorrules (1 stars, last pushed 8mo ago), licensed CC0-1.0. It costs nothing until one of its globs matches a file; then it loads 1,923 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.