Stop AI agents from scraping your website without hurting your Google rankings: have a coding agent audit how your site answers bots, verify real Googlebot by IP, and serve scrapers a polite no instead of an error they retry: AI agent prompt
More people now paste a site's URLs into a coding agent and ask it to copy everything, which can cost the owner data, server and API spend. On Oct 28, 2026 a founder posted on X that when he returned 403 errors, the agents spoofed a Googlebot user agent, probed his /api/ routes and launched headless browsers, so he built a 6-layer 'AI Agent Firewall' and open-sourced it as a SKILL.md file. Its core rules: don't send a bare 403 or 429 (agents treat it as a puzzle to retry), serve an HTTP 200 page with no data that tells the agent scraping isn't allowed and links to the official product, verify Googlebot by IP and network rather than user agent, lock sitemaps and public JSON APIs, add per-IP rate limits and test the setup by attacking your own URLs. The post passed 19,000 views and 650 bookmarks within a day. The prompt below runs a safe version of that audit on your own site.
The prompt
Help me protect my own website from AI agents and scripts that scrape it, without hurting search indexing. My site: [domain, what's valuable on it (e.g. listings, prices, a dataset), stack (e.g. Next.js on Cloudflare, WordPress, Express)]. Where I want scrapers sent instead: [signup page, API page or product URL]. 1) Audit first, change nothing: list which pages, sitemaps and /api/ routes expose the valuable data or trigger expensive work, and how each currently responds to a normal browser, curl, a fake 'Googlebot' user agent and a headless browser. 2) Propose a layered plan: a robots.txt and llms.txt policy (which crawlers to allow and which to disallow), verifying real Googlebot by IP and network rather than user agent, a polite HTTP 200 notice page with no data rows and noindex headers for blocked requests, browser-header checks, per-IP rate limits, and locking public JSON endpoints. 3) For each layer, explain the risk of blocking real visitors, accessibility tools or search engines, and how to test that Google can still crawl my pages. 4) Write the code changes for my stack as a reviewable diff, behind a setting I can switch off. 5) Give me a test checklist I can run only against my own site. Don't deploy anything or touch any site I don't own; show me every change first.
Fill in the blanks, then copy
This prompt has 1 [bracket] to fill in. Type your details below and the prompt updates as you go. Your answers stay in this browser and are reused on other prompts with the same blanks. Nothing is sent to us.
Example values are fictional, just to show how a filled-in prompt reads. Replace them with your real details.How to use it
- Copy the prompt above.
- Replace every [bracket] with your own details (use the fill-in-the-blanks box above, which remembers your answers for the next prompt).
- Paste it into Claude Code, Cursor, Codex and review the answer before you use it.
Works with: Claude Code, Cursor, Codex, Cloudflare Workers
Real-world example: x.com/illyism/status/2115357045264425386
Before you use it: what to check
Already built into this prompt
- Don't deploy anything or touch any site I don't own; show me every change first.
Check yourself
- Check every figure, price and total against your own records before anything is sent, posted or booked. A person approves refunds, discounts, payments and price changes.
- Read and edit the draft before it reaches a customer or goes public. If you later automate this prompt, start with "draft and notify me", not "send automatically".
- Check names, dates, numbers and any claim against your own source material before you use the answer. AI can misread or invent details.
Using an AI agent? Download this prompt as a SKILL.md agent skill with these checks built in, or get the .zip for Claude.ai. How to install skills.
Want to make this prompt even better? Grade it with the free prompt grader or build your own with the AI prompt generator.
32 copy-paste agent prompts (PDF) plus 5 new prompts every week.
Get it free