Everyone tells you to "set up your sitemap" and "secure your env variables", but almost nobody hands you the actual steps. So I wrote the exact 116-line prompt I use, and I'm giving it away for free. Paste it into Claude Code, Cursor, Copilot, Windsurf or any other AI coding agent, and it audits your project and fixes the gaps for you.
What This Prompt Covers
The prompt turns your AI coding agent into a senior full-stack engineer with technical SEO and application security expertise. It first analyzes your existing codebase and framework, then completes four tasks in order:
- robots.txt: a correct, framework-aware file that allows public pages, blocks private routes like
/api/and admin paths, and points to your sitemap. - Sitemap: a dynamic
sitemap.xmlthat covers your whole site, including blog posts, product pages and any generated routes, not just the home page. - Secrets and environment variables: a scan for hard-coded keys, a safe
.env.example, a proper.gitignore, and a check that server-only secrets never reach client code. - Admin and sensitive routes: keeping admin panels and private endpoints out of search results and behind proper protection.
AI Search Engine Optimization (AEO and GEO)
Ranking on Google is no longer the only goal. People now get answers from ChatGPT, Claude, Perplexity and Google AI Overviews, so your site also needs to be readable by AI crawlers. The prompt adds explicit rules for AI user agents such as GPTBot and ClaudeBot in your robots.txt, so you decide which AI systems can read your public content. It also keeps your sitemap clean and complete, which helps both traditional search engines and AI search tools discover every page you want cited.
Secure Your Environment Variables the Right Way
Leaked .env files are one of the most common and most expensive mistakes in small projects. One committed API key can drain a billing account overnight. The prompt walks your agent through the basics that most tutorials skip:
- Searching the repo for hard-coded API keys, tokens and database URLs.
- Moving secrets into environment variables and documenting them in
.env.examplewith placeholder values only. - Making sure
.envfiles are ignored by git and never exposed through public folders. - Separating public variables (like
NEXT_PUBLIC_*) from server-only secrets.
If you already pushed a real key to a public repository, rotate it immediately. Removing it from the code is not enough, because it stays in git history.
How to Use It in 4 Steps
- Open the free prompt page using the button on this page, or from the store linked on my profile.
- Press the copy button to copy the full 116 lines.
- Open your project in Claude Code or your AI coding tool and paste the prompt.
- Run it, then review the changes the agent proposes before you commit them.
Works With Any Stack
The prompt first detects what you are using, so it adapts to Next.js, React, Laravel, Node and Django projects. It generates the right file in the right place for your framework instead of giving you generic advice.
Who Is This For?
It is built for solo developers, indie hackers, bloggers and anyone shipping projects with AI assistance who wants the technical SEO and security basics handled properly. If you build mostly by prompting, this one gives your agent a precise checklist instead of vague instructions.
Final Thoughts
A complete sitemap, a sensible robots.txt, AI-crawler rules and locked-down environment variables are the foundation every website needs, and they take minutes with the right prompt. Grab it, paste it, run it, and always review what your AI agent changes before you deploy.
















