
SEO prompts for coding agents: a library you can paste
SEO prompts for Claude Code, Cursor and ChatGPT, grouped by job: page-two keywords, traffic drops, content gaps, titles, AI citations. Which need real data.
On this page
These SEO prompts are written for coding agents (Claude Code, Cursor, Codex, ChatGPT or Claude with connectors) that have your search data connected. Each section is one job, with two or three prompts to paste, a line on what comes back, and a link to the full method.
One thing first, because it decides whether any of this works.
Which SEO prompts need real data
Most of them. A language model has no access to your Search Console, your analytics or Google's search volumes. Ask it "which pages lost traffic" with nothing connected and it will still answer, from the look of your repo and what it remembers about the web. The answer will read well and be invented.
Each prompt below is marked:
- Needs data: the agent must be able to query your Search Console, GA4 or Google keyword data. In practice that means an MCP connection. The prompts here assume AgentGrown, which serves all three plus monthly AI visibility tracking, but they are plain language and work with any server that exposes the same data. Setup takes one command and is in the docs.
- Works without data: editing jobs where you supply the facts.
Add this line to any prompt when you are unsure what the agent is working from:
Every number you give must come from a tool call. Show the date range
and the data-through date. If you cannot get a number, say "not
available". Do not estimate.
SEO prompts for finding the work
Page-two wins
The question: which page should I fix first? Needs data (Search Console).
Which page should I fix first? Find queries where we rank between
positions 5 and 20 over the last 28 days with at least 100 impressions,
with the page that ranks for each. Rank them by impressions and how
close they are to the top 3.
For the top three from that list, read the page in this repo. Is the
query in the title, the h1 and the first paragraph? Then search the
query, open the top three results and tell me what each has that our
page lacks. Propose one change per page. Do not edit yet.
What comes back: a table of query, page, position and impressions, then a specific change for each shortlisted page. Full method: page-two wins.
Content gaps
The question: what do people search that we have no page for? Needs data (Search Console, Google keyword data).
What do people search that we have no page for? Pull queries from the
last 90 days with at least 50 impressions where our average position is
worse than 20. Compare them with the pages in this repo and list the
ones no existing page answers. Group them by topic.
For the three biggest groups, check Google search volume for the main
phrases in one batched lookup. For each group, tell me whether it needs
a new page or a new section on a page we already have, and which page.
What comes back: groups of queries you already get impressions for, with volume, and a new-page-or-section call for each. Full method: content gaps.
Keyword demand
The question: what should this page target? Needs data (Google keyword data, US and English).
What should this page target? Read <path to page>. Suggest five phrases
it could target, look up the search volume for all of them in one call,
and show which ones we already rank for and where.
Before you write the page I asked for, get keyword ideas for "<topic>".
Show the ten with the most volume that fit what we sell, and check that
we have no existing page already targeting any of them.
Run keywords_for_site on our own domain with ranked_only. Which of these
keywords have real volume but a page of ours ranking worse than 10?
What comes back: volume, CPC and competition for each phrase, joined with your current rankings. Note the limit: this tells you how often a phrase is searched, not which keywords another site ranks for. Full method: keyword demand, and the keyword research guide for the reasoning.
Weak titles
The question: which pages rank but don't get the click? Needs data (Search Console).
Which pages rank but don't get the click? List pages with an average
position of 5 or better and at least 500 impressions in the last 28
days, sorted by CTR, lowest first. Compare each with our other pages at
a similar position, not with an industry average.
For the worst one, show me every query that page gets clicks for. Then
write three new titles under 60 characters that keep the top two
queries and give a clearer reason to click. Explain each in one line.
What comes back: pages that are seen and skipped, then title options that keep the queries already paying. Full method: weak titles. The title tag checker tells you whether a title will be cut off.
Prompts for diagnosing what changed
Traffic drops
The question: which pages lost clicks this quarter? Needs data (Search Console, GA4).
Which pages lost clicks this quarter? Compare the last 90 days with the
90 before, by page, largest loss first. Ignore pages under 100
impressions.
For the top five losers, break each down by query with the same
comparison. Classify each loss: position fell, impressions fell at a
stable position (demand), or CTR fell at a stable position (snippet).
Check the same 90 days last year to rule out seasonality.
For the pages where position fell, check whether organic sessions and
key events fell too. Give me a table of page, clicks lost, cause and
what to refresh. Do not edit anything.
What comes back: the losing pages, the cause of each, and which are worth refreshing. A demand drop needs no fix. Full method: traffic drops.
What converts
The question: which organic pages bring signups? Needs data (GA4 with key events set up, Search Console).
Which organic pages bring signups? Show organic sessions and key events
by landing page for the last 90 days, sorted by key events. Add each
page's Search Console clicks and average position.
Which pages get a lot of organic sessions and almost no key events?
And which convert well but rank worse than position 5? The second list
is where I want to spend effort.
What comes back: landing pages ranked by what they bring, and the short list of pages that convert but are under-ranked. Full method: what converts.
Weekly check-in
The question: what changed since last week? Needs data (Search Console, GA4, site notes).
What changed since last week? Run the check-in, read the site notes, and
tell me in five lines what moved and why. Then give me the three things
most worth doing, each with the page and the evidence. Do not edit
anything.
Compare the last 7 days with the 7 before, by page. Flag anything that
moved more than 20% with at least 100 impressions, and say whether it is
position, impressions or CTR.
What comes back: a short summary and three actions. If you want it as a document, the SEO report template has a prompt that fills a full report. Full method: weekly check-in.
Did the change work?
The question: did last month's rewrite work? Needs data (Search Console, site notes).
Did last month's rewrite work? Read the site notes for changes shipped
more than 14 days ago that have no verdict yet. For each, compare the
page's clicks, impressions and position for the 28 days after the
change with the 28 days before, and add a note with the result.
I am about to merge this change. Add a site note with the page, the
query it targets, what changed and today's date, so a later session can
judge it.
What comes back: a before and after for each recorded change, saved where the next session will see it. The second prompt is the one people forget; without it there is nothing to compare. Full method: did the change work.
Prompts for editing safely and running on a schedule
Edit without losing rankings
The question: what does this page rank for before I change it? Needs data (Search Console).
What does this page rank for before I change it? Show every query
<url> got clicks or more than 50 impressions for in the last 90 days,
with position. Mark the ones that bring most of its clicks.
Now make the edit I asked for, but keep those top queries in the title,
the h1 and the opening paragraph. Show me the diff and tell me which
query phrases you kept and which you dropped.
What comes back: the page's queries, then an edit that preserves the phrases already earning clicks. Run the first prompt before any rewrite, redesign or URL change.
SEO autopilot
The question: run the SEO autopilot. Needs data (Search Console, site notes).
Run the SEO autopilot. Read the check-in and the notes, collect
candidates from page-two queries and decaying pages, pick the ONE change
worth the most clicks for the least work, check why the top three
results win, make the change in this repo and open a pull request. Do
not merge. Record what you shipped in the site notes.
Review the last five autopilot pull requests against the data. Which
pages moved since their change? Add a verdict to the notes for each one
older than 14 days.
What comes back: one pull request with the evidence in its description, and a note so the next run can judge it. In Claude Code the built-in version is the slash command /mcp__agentgrown__autopilot, and the same text is public so a scheduled job can pass it as the prompt. Full method: SEO autopilot, and Claude SEO for the scheduling command.
Prompts for AI answers
AI citations
The question: do AI answers mention us? Needs data (AI visibility tracking: ChatGPT and Perplexity, with Gemini and Claude on paid plans; asked monthly, US and English).
Do AI answers mention us? Read the AI visibility report. Give me
visibility and citation rate per engine, then the prompts where we are
missing on most engines and who is named instead.
No prompts are tracked yet. Look at what the site is about from the
check-in and our top queries, then propose 15 questions a buyer would
ask an AI assistant about our category. Never put our brand name in a
prompt. List the competitors to watch. Wait for my approval before
adding them.
For the three prompts where we are least visible, read the full
answers. Which sources are cited? Split them into independent pages
worth getting mentioned in and pages a competitor owns. Then group the
missing prompts into at most five pages to write, rewrite or merge, and
stop for my approval.
What comes back: mention and citation rates, the questions you are absent from, and a short plan of pages and outside sources. Mentions are found by matching brand names and domains in the answer text, not by scoring sentiment, and answers can differ from what the consumer apps show. Full method: AI citations and generative engine optimization.
Prompts that work without data
These are editing jobs. The agent needs your repo and the facts you give it, nothing else.
The target query for <path to page> is "<query>". Rewrite the title to
lead with it, under 60 characters, and move the direct answer into the
first paragraph. Take every fact from the page as it is now.
Find every page in this repo that mentions <topic> and does not link to
<path to page>. Add one link from each with descriptive anchor text.
Show me the list before you edit.
Check the JSON-LD on our article template against what the page
renders. List any field that is missing, empty or says something the
visible page does not.
Note that the first prompt only works because you supplied the query. Choosing it is the part that needs data.
How to write your own SEO prompts
The prompts above share a pattern you can reuse:
- Ask one question. "Which page should I fix first" gets a better answer than "audit my SEO".
- Name the window and the threshold. Last 28 days, at least 100 impressions, positions 5 to 20. Otherwise the agent picks its own and you cannot compare runs.
- Say what to return. A table with named columns, three actions, a verdict.
- Say when to stop. "Do not edit yet" until you trust the diagnosis.
- Ask for a note. A change that is not recorded cannot be judged next month.
For Claude Code, six of these jobs also ship as built-in workflows (check-in, striking distance, decay, AI visibility, setup and autopilot): type /mcp__agentgrown__ and pick one.
Questions
What are the best SEO prompts?
The ones that ask a specific question of real data and say what to return: which page, which query, which numbers. A prompt like 'which queries rank 5 to 20 with the most impressions, and which page ranks for each' beats 'give me an SEO strategy'.
Do SEO prompts work in ChatGPT without any data?
Only for editing: rewriting a title for a query you supply, checking structured data, tidying a page. Anything about demand, rankings or what changed needs your Search Console and GA4 data, or the model will guess.
How do I give Claude or ChatGPT my Search Console data?
Connect an MCP server that serves it. With AgentGrown you sign in with Google, pick your sites and add https://agentgrown.com/mcp to your agent. The alternative is pasting an export into the conversation.
Can I use these prompts with Cursor or Codex?
Yes. They are plain language and name no client-specific features. Any agent that supports remote MCP servers can run the ones that need data.
How do I stop an AI agent from making up SEO numbers?
Tell it that every number must come from a tool call and that it should say 'not available' otherwise. Then check that the answer shows a date range and a data-through date.
