How do I start doing SEO with Claude Code?
You need a website, Claude Code and twenty minutes. No code. Every step after this one is a prompt you type; it ends in a file, and the next step reads that file. Nothing in this playbook changes your site.
- Add your site to Google Search Console if it is not there yet. It is free, and it takes a few days to fill with data.
- Install Claude Code and open it in an empty folder.
- Set up treg.to. Paste the line below into Claude Code and follow it. A new verified account gets $1.00 of credit, once. Our steps 1 to 9 cost $0.42.
- Connect Search Console with the second line. Claude gives you a Google link; you approve it in the browser. It runs on your own Google account, and those calls are free.
- Save seven lines about your site as
site.md. Write “I don’t know” for competitors if you do not; step 4 finds them.
paste into Claude Codeset up treg — https://treg.to/llms.txt
thenUsing treg, connect my Google Search Console. Give me the link to approve, then list the sites you can read.
Site: [your site address] Brand: [the name people search for] What: [what you sell, in one line] Who it is for: [who, and when they need it] Topic: [the one subject you want to be found for first] Best for: [the one case where you are the right answer] Competitors: [three sites, or "I don't know"]
The example in every step is our own site, treg.to, with the topic “ad library data”. We print no figures from our own Search Console, only the shape of what came back. Other sites in the runs are shown as Site A, B and C.
What this playbook cannot do. It cannot make a site rank. It shows what you rank for, fixes what is on the page and drafts what is missing. The rest is other people finding you useful.
How do I see what my site already ranks for?
You have. site.md from the start page, and Search Console connected.
type thisRead site.md. Using treg, read Search Console for my site, last 3 months. Save baseline.md: clicks, impressions, click rate and average position; the top 25 queries and the top 25 pages by clicks; the split between queries that contain my brand and those that do not. Then save striking.csv: queries at positions 5 to 20 with at least 100 impressions, sorted by impressions, with the page that ranks. Use only numbers from Search Console. Change nothing.
You get. baseline.md and striking.csv, in about two minutes, free. These are our own Search Console figures, so we print the shape and not the numbers.
| File | What is in it |
|---|---|
| baseline.md | Totals for 91 days. Top 25 queries, top 25 pages. Three rows for the split: brand, non-brand, and queries Search Console withholds. |
| striking.csv | Queries at positions 5 to 20, each with impressions, clicks, position and the page that ranks. |
Check.
- The brand split. If nearly every click contains your brand name, Google is not yet bringing you strangers. That was true for us.
- The withheld row. Search Console hides rare queries, so the brand and non-brand rows will not add up to the total.
- Junk queries. Ours had a pasted spreadsheet header and a forum name. Delete them before you read the list.
- Compare clicks, not impressions, across 27 Apr 2026. Google misreported impressions for almost a year before that date.
striking.csv is your first work queue: pages already near page one.Go deeperSearch Console in your agentSearch Console queries and clicksGoogle Analytics reports
Can Google and AI search read my site?
You have. baseline.md from step 1.
type thisRead site.md and baseline.md. Check whether Google and AI search can read my site. Read robots.txt and the sitemap. For each of Googlebot, Bingbot, OAI-SearchBot, Claude-SearchBot and PerplexityBot say allowed or blocked. Using treg, inspect my top 10 pages from baseline.md in Search Console: indexed or not, and why. Fetch each of those pages as served and check the title, the h1, the canonical and noindex. Save audit.md: at most ten fixes, ranked, each with its evidence. Fix nothing.
thenRead audit.md. Four more checks, added to audit.md under a new heading. One: does any Disallow line in robots.txt cover a folder of pages I want found? Two: do any of my top 10 pages carry nosnippet, data-nosnippet or max-snippet? Three: can each of the top 10 be reached from the home page in three clicks or fewer, and are there broken links on the way? Four: is there an About page that says who runs the site, and does each article name its author? Fix nothing.
You get. audit.md: who can read the site, and ten fixes at most. Ours took six minutes and cost nothing; the four extra checks took four more.
| Check | What came back |
|---|---|
| Five crawlers in robots.txt | All allowed |
| Sitemap | 652 pages, all load, none marked noindex |
| Top 10 pages in Search Console | All indexed |
| Top 10 pages as served | Five have a broken main heading when scripts are off |
| One page | Indexed although robots.txt blocks it, so its noindex tag is never read |
| Blocked folders, snippet limits | None |
| Three clicks from the home page | Nine of ten. One top page has no link pointing to it at all |
| About page, authors | No About page. No article shows its author to a reader |
Check.
- The search bots, not the training bots. OAI-SearchBot, Claude-SearchBot and PerplexityBot decide whether you can be cited. GPTBot and ClaudeBot are for training.
- The audit fetched pages from your computer. Only Googlebot is confirmed from Google’s side, by Search Console. A firewall can still block the others.
- In Search Console, open Settings and look at “Search generative AI”. It must say included. Claude cannot read this setting.
- Ten fixes, ranked. Ask for a longer list and you get a hundred small ones and fix none.
Skip these. Google’s own pages say Search ignores llms.txt, needs no special schema for AI features, and does not want content cut into small pieces for AI. The FAQ rich result ended in May 2026. Several popular SEO skills still recommend them.
Go deeperIs this page indexed, and why notSearch Console in your agentFree web access for agents
How do I do keyword research with real numbers?
You have. site.md and striking.csv.
type thisRead site.md and striking.csv. Using treg, find keywords for my topic. Start from the queries in striking.csv and add related keywords from a keyword data provider. Get US monthly volume and difficulty for each, and name the provider. Never estimate a number. Then get the Google US results for the 30 with the most volume, save them as serps.json, and group keywords that share three or more of the same top-ten pages. Save keywords.csv: keyword, volume, difficulty, group, and my page if I rank. Cap $0.50.
You get. keywords.csv and serps.json. Ours had 292 keywords and 30 sets of results, in four and a half minutes, for $0.23.
Check.
- The provider is named and no number is estimated. A blank difficulty is honest. A round guess is not.
- The result links are real pages. Our first pull returned Google redirect links, so no two keywords shared a page. Claude noticed, said so, and pulled again from a second provider.
- Volumes in a group do not add up. Close spellings share one number.
- Your striking list may not match your topic. Ours did not, so Claude started from the topic and said so.
serps.json to find who you are up against.Go deeperKeyword volume and CPCGoogle results for a keywordSEO data for AI agentsDataForSEOScrapeCreatorsWays to get SEO data
How do I find what competitors rank for and I do not?
You have. serps.json from step 3.
type thisRead site.md and serps.json. Name the five sites that appear most often in the top ten, leaving out Google, Meta, YouTube, Reddit, LinkedIn and Wikipedia. For the top three, using treg, get the keywords each ranks for in Google US, positions 1 to 20. Keep the ones about my topic where my site is not in serps.json or striking.csv. Save gaps.csv: keyword, volume, who ranks, their page. Then mark the ten I could honestly write about, given site.md. Cap $0.50.
You get. gaps.csv. Ours had 146 keywords from three sites, with ten marked, in three minutes, for $0.10.
| Site | What it is | Keywords kept |
|---|---|---|
| Site A | A tool built on this exact topic | 128 |
| Site B | A social platform ranking for its own name | 23 |
| Site C | An ecommerce platform’s blog | 21 |
Check.
- Who the three are. A platform that ranks for its own brand is not a gap you can close. Swap it for the next site on the list.
- The same keyword can show two volumes. Ours showed 74,000 in one file and 90,500 in the other, from two endpoints of one provider. Both are estimates.
- “Could honestly write about” is the filter that matters. Ten is plenty.
Go deeperKeywords a domain ranks forBacklink profile of a domainSerpstatSE RankingSemrush on your own key
How do I check what ChatGPT says when buyers ask?
You have. site.md.
type thisRead site.md. Write 10 questions a buyer of what I sell would ask ChatGPT. None may name my brand. Using treg, ask each one to ChatGPT three times, US, with web search. Save ai-answers.md: for each question, the brands named, the pages cited, and in how many of the three runs my brand was named. Then list the ten pages cited most across all questions. Cap $1.
thenRead site.md and ai-answers.md. Using treg, ask ChatGPT three times, US, with web search: what is my brand and who is it for? Use the brand and site in site.md. Add a section to ai-answers.md: what it said, anything wrong or out of date compared with site.md, and the page each wrong fact came from. Cap $0.05.
You get. ai-answers.md. Ours held 30 answers, in 13 minutes, for $0.08. The brand check added three more for under a cent.
Check.
- Three runs, not one. The same question names different brands each time. Count runs, not a single answer.
- Read the questions before you trust the result. If they sound like your homepage, rewrite them.
- The cited pages are your to-do list. Most of ours were comparison lists on other sites.
- This is ChatGPT only. Engines disagree with each other. Google shows its own AI numbers in Search Console, by page and with no queries.
- One screenshot of one answer proves nothing, yours or anyone else’s. Ask for the before, and for three runs.
- Telling the chatbot it is wrong changes nothing for the next person. Fix the page it read.
The brand check. Asked by name, ChatGPT knew us in all three runs and described us the same way each time. Asked without the name, it never brought us up. One figure was out of date, and it came from another site’s article about us. A second figure looked wrong and was not: our own site.md was the stale one.
What moves it. No AI company publishes formatting advice for being cited; their pages cover crawler access only. Google says AI search is still search. Practitioners who report progress say it came from other sites: comparison pages, directories and review listings that name you. Check the answer again after each change, or you will never know.
Go deeperHow AI answers mention your brandThe AEO workflowAI search endpoints and pricescloro
How do I write a content brief from the live search results?
You have. keywords.csv and gaps.csv.
type thisRead site.md, keywords.csv and gaps.csv. Pick one keyword group to write a page for and say why in two lines. Using treg, read the top five Google results for its main keyword. Write brief.md: who searches this and what they want; what every top page covers; what none of them covers; a title; the headings; and the facts only I can supply, as questions to me. Then stop.
You get. brief.md. Ours took three minutes and about half a cent, and ended with 13 questions for us.
| Keyword picked | “meta ad library api”, 320 searches a month, difficulty 30 |
| Why | It asks for what we sell, and the site ranking tenth does it with a home page |
| Top five read | The platform’s own documentation, two product pages, a forum thread, the platform’s search page |
| What none covers | The cost of one real job, and an agent doing the work |
| Questions to us | 13, such as: one real run with the date, the count and the cost |
Check.
- The pick. Small and exact beats large and vague. Change it if you disagree.
- What was read only in part. Ours said a forum thread came back without its comments.
- The ranking can differ by provider. Two providers gave different top fives; the brief says which it used.
- Answer the questions yourself. They are the part no other page has.
Go deeperGoogle results for a keywordFree web access for agentsWeb reading endpoints
How do I draft a page without invented facts?
You have. brief.md and your answers to its questions.
type thisRead brief.md. My answers: [your answers to the brief's questions, in plain sentences]. Anything else: I do not know. Write draft.md from brief.md. Use only facts in site.md and my answers. Where you need a fact you do not have, write [NEED: ...] and do not guess. Answer the search in the first paragraph. Then list every sentence that contains a number, for me to check.
You get. draft.md, with a marker wherever a fact is missing, and a list of every sentence with a number. Ours took a minute and a half.
Check.
- Every [NEED]. Fill it from what you know or delete the sentence. Do not let Claude fill it.
- Every number, against its source. Google calls this check critical before you publish, and includes the title and description.
- Does the first paragraph answer the search? If it does, leave the rest plain. No block of questions added for its own sake.
- Would you put your name on it? Then do: add who wrote it and why they know the subject. Google’s guidance names author and About pages as how it tells who is behind a page.
- A question block only for real questions the page has not answered, taken from your Search Console queries. No special markup is needed.
How many pages. One at a time. Google’s spam policy is about many pages made to rank and not to help, however they are made. Nobody we read could name a safe number, and people who published in bulk report pages dropping out of the index.
Which pages should I refresh, and how?
You have. Search Console connected, and at least six months of data.
type thisRead site.md. Using treg, compare Search Console clicks by page for the last 3 months with the 3 months before. List the ten pages whose clicks fell most, with the queries that fell. For the first one, fetch the page as served and read the top three Google results for its main query. Write refresh.md: what is out of date, what to add, a new title. Add only; remove nothing. Do not edit the site.
You get. refresh.md: ten pages that lost clicks, and a plan for the first. Ours took three and a half minutes. The figures are our own, so we print none.
| What happened | What Claude did |
|---|---|
| Our site had almost no data in the earlier 3 months | Said the comparison was empty, split the last 3 months in half, and labelled the result as that |
| The top page fell after a launch week | Said most of the fall was the spike ending, not a ranking loss |
| Two pages fell to zero impressions | Said it looked like changed addresses, not lost rankings |
| The plan for the first page | What is out of date, each item checked against the pages now ranking |
Check.
- Why it fell, before you rewrite. A spike ending, a holiday, a changed address or lost links are not fixed by new words.
- Add only. The worst story we read was an agent that replaced three live articles with stubs and reported success.
- The dates. Compare the fall with Google’s published list of ranking updates before you rewrite anything.
- A page that still ranks: leave it alone.
- No decay threshold is standard. “Fell most in clicks” is our choice.
log.md.Go deeperSearch Console queries and clicksGoogle results for a keyword
How do I add internal links with Claude Code?
You have. striking.csv, draft.md and a sitemap.
type thisRead site.md, striking.csv and draft.md. Read my sitemap. For the draft and for the top five pages in striking.csv, suggest three internal links each: the page to link from, the sentence to add there, and the anchor text. Use only pages that are in the sitemap, and fetch each one to confirm it loads. Save links.md. Change nothing.
You get. links.md. Ours had 18 suggestions, each from a page that loads and does not link there yet, in four minutes.
| Found on the way | Why it matters |
|---|---|
| Three live pages already aim at the draft’s keyword | Decide which one should rank before you add a fourth |
| One live page says the opposite of the draft | Fix one of them |
A number in site.md differs from the live site | The draft would have published the old one |
| Most impressions on one page are people looking for another company | No link will turn those into clicks |
Check.
- Each sentence reads naturally where it would sit. If not, skip that link.
- Pages that already target the same keyword. Two of your own pages competing help neither.
- Template pages. A sentence added to one may have to go into the template.
How do I publish safely and check that Google indexed it?
You have. A page you have published yourself, and draft.md.
type thisUsing treg, inspect [the new page address] in Search Console. Is it indexed? If not, give Google's reason. Check that the page is in my sitemap and that the pages in links.md now link to it. Fetch the live page and confirm that the title and the first paragraph match draft.md. List any placeholder text, example.com links or buttons that go nowhere. Change nothing.
You get. A yes or no on indexing, with Google’s reason, and a check that what is live is what you approved. Ours took two minutes, on a page we had published eleven days before.
| Check | What came back |
|---|---|
| Indexed | Yes, crawled the day before |
| In the sitemap | Yes, once |
| Linked from the three pages in links.md | None of the three. Google found the page through the sitemap and two outside links, none of ours |
| Title and first paragraph match draft.md | Yes, word for word |
| Placeholders, example.com, dead buttons | None. One outside link returned an error; Claude said to open it by hand |
Check.
- Ask Claude to check the served page, not its own report of what it did.
- Not indexed after a few days is normal. A sitemap does not make Google index a page.
- To ask Google to look, use Request indexing in Search Console, by hand. Google’s Indexing API is only for job postings and livestreams.
- IndexNow tells Bing and others about a new page. Google does not take part.
- Before you publish, search the page’s keyword signed out and save what Google’s AI answer says and links to, with the date. Do the same a week after. Without the first one you cannot say anything changed.
Who publishes. You do. Let the agent read anything and write only files. If you let it edit the site, have it open a change for you to review, and never let it merge its own work.
log.md.Go deeperIs this page indexed, and why nottreg.to in Claude Code
What should I do every week?
You have. baseline.md, ai-answers.md and log.md.
type thisRead log.md. For each change older than 28 days, using treg, compare Search Console clicks and position for that page in the 28 days before and after. Write one line each: better, worse or no change. Then pull striking.csv again and name the one page to work on this week. Once a month, ask the ten questions in ai-answers.md again and show what changed.
You get. One line per past change, and one page to work on. Ours took three minutes, over six changes from October.
| Change in log.md | Verdict |
|---|---|
| Corrected examples on a launch page | Worse, but the launch spike was already ending. Not the edit |
| Rewrote a page’s opening | No change, while the whole site grew. So it fell behind |
| Removed a row from a comparison | Better |
| Three new pages | No before to compare. First 28 days recorded instead |
| This week | The launch page: a how-to query where it sits low on page one |
Check.
- 28 days is our choice. Practitioners wait from one week to two months, and during a Google update the numbers move on their own.
- One change a week on one page. Then the log means something.
- A verdict against the whole site, not only the page. Ours: a page that held steady while the site grew had lost ground.
- New pages have no before. Note their first 28 days and compare the next 28.
- Sales and signups per landing page, not impressions. Impressions at position 60 are not progress, and Google’s own advice for AI search is to measure what visitors do.
- Ask new customers how they found you, with “an AI assistant” as one of the answers. No report shows it.
- If nothing moves after the page work is done, the gap is reputation: other sites that mention you. Step 12 is where that starts.
How do I get other sites to mention me?
You have. ai-answers.md from step 5.
type thisRead site.md and ai-answers.md. Take the ten pages cited most. Fetch each one. For each say: what kind of page it is, who runs it, whether it names my brand, and how a company gets added (a form, an editor's address, or not possible). Save mentions.md. Then draft a short pitch for the three I could most honestly ask, using only facts in site.md, with [NEED: ...] where a fact is missing. Use my brand name or site address as the link text, never a keyword. Send nothing.
You get. mentions.md: the ten pages ChatGPT leans on, how to get onto each, and three draft pitches. Ours took three minutes.
Check.
- Who runs each list. Ours were all competitors’ own blogs. Look for independent lists, directories and review sites too.
- Every [NEED]. Ours wanted the sender’s name, a price and a page to link to. A pitch with a guessed fact is worse than none.
- The link text is your name or your address. Google lists keyword links in articles and press releases sent to other sites as link spam.
- Never pay for a mention or ask friends to post one. Google’s spam policy names both paid links and attempts to manipulate AI answers.
- Measure it. Ask step 5’s ten questions before you send, and again a month later.
Other honest routes. Answer journalists and podcast hosts who ask for sources in your field. Publish one number from your own customers that others can quote. Add an About page that says who you are; step 2 showed we had none. A press release is a document for journalists. Nobody has shown that it teaches an AI anything.
log.md.Go deeperThe AEO workflowHow AI answers mention your brandBacklink profile of a domain
Ways to get SEO data into Claude
Read on 27 Nov 2026 from each provider’s own pages. We ran the first and last rows ourselves. Prices change; check before you choose.
| Way | What you get | Cost | The catch |
|---|---|---|---|
| Google Search Console | Your own queries, pages, clicks and index status | Free | Your site only. Nothing about anyone else |
| Search Console’s AI report | Impressions in AI Overviews and AI Mode, by page | Free | No queries, no clicks. Read it in the browser |
| Ahrefs’ hosted connector | Rankings, keywords and backlinks for any site | A paid plan, Lite or higher | Each call spends API units |
| Semrush’s hosted connector | Keywords, rankings and competitors | Plans that include 50,000 API units | Units refresh on renewal |
| DataForSEO directly | Keywords, results, rankings and backlinks | Pay as you go, $50 minimum top-up | Its Google result links came back as redirects in our run |
| treg.to | Search Console on your own account, plus keyword, results, ranking, backlink and AI answer data from several providers | Search Console free. Our steps 1 to 9 cost $0.42 | Pay per call. No dashboard |
Your own site only: Search Console, and nothing else is needed. Already paying for Ahrefs or Semrush: use their connector. No subscription and a few jobs a week: pay per call.
Claude Code skills and connectors for SEO, and what each needs from you
We read these repositories on 27 Nov 2026. We have not run them end to end. Star counts are from that day.
| Repository | Stars | What it does | What you bring |
|---|---|---|---|
| coreyhaines31/marketingskills | 62.9k | Nine SEO skills: audit, AI SEO, schema, site structure, content plan | Nothing for the skills. Your own keys for live data |
| AgriciDaniel/claude-seo | 32.7k | An audit with 28 sub-skills. Reports only, apart from index submissions | Nothing required. Optional Google, DataForSEO and other keys |
| every-app/open-seo | 29.0k | An open-source SEO app with its own connector | A data account, or its hosted plan |
| zubair-trabzada/geo-seo-claude | 11.9k | An AI-search audit with scores. It has no ranking or volume data | Nothing |
| TheCraigHewitt/seomachine | 7.6k | Long articles written into WordPress as drafts | Search Console and Analytics keys, a DataForSEO login, a WordPress password |
| AminForou/mcp-gsc | 2.3k | A community Search Console connector, 21 tools | Your own Google Cloud OAuth client |
| Illyism/seo-skills | 2.2k | 30 skills. Several edit your code and open or merge changes | Most need nothing. Some need Ahrefs or DataForSEO |
What to check before you install one: which data it needs from you, and whether it only reports or also changes your site. Several score things Google says it ignores, such as llms.txt. Google has published no official Search Console connector; the ones here are community projects.
Every run behind this playbook
| Run | Date | What came back | Metered on treg.to |
|---|---|---|---|
| Steps 1 to 9, each printed prompt typed as written, in order, in one empty folder (9 prompts, 40 minutes) | 27 Nov | baseline.md, striking.csv, audit.md, a 292-keyword file, gaps.csv, 30 ChatGPT answers, brief.md, draft.md, refresh.md, links.md | $0.42 |
| Steps 10 and 11, in a new folder: a page published 19 Nov, three planned links, and seven real changes from our log | 30 Nov | Index, sitemap, link and match checks; a verdict per change and one page for the week | $0 |
| Three more prompts in the same folder: four extra audit checks, the brand check, and step 12 | 30 Nov | Extra checks in audit.md, three brand answers, mentions.md with three draft pitches | $0.01 |
| One open-source skill’s keyword grouping, on 12 keywords, on two providers | 26 Nov | On the first provider the result links were redirects and nothing grouped. On the second, 11 groups | $0.03 |
Step 12’s pitches were drafted and not sent. Claude Code’s own usage is not in these figures.
Glossary and questions
| Search Console | Google’s free report of the searches and pages that bring people to your site (step 1). |
| Impression | One time your page was shown in a result. Not a visit. |
| Position | Where your page sits in the results, averaged. 1 is the top. |
| Striking distance | Queries where you already rank just off the top, positions 5 to 20 here (step 1). |
| Indexed | Google has stored the page and can show it (steps 2 and 10). |
| Search bot | The crawler that decides whether an AI assistant can cite you: OAI-SearchBot, Claude-SearchBot, PerplexityBot (step 2). |
| Difficulty | A provider’s estimate, 0 to 100, of how hard a keyword is to rank for. Each provider has its own (step 3). |
| Brief | One page that says who searches, what the top pages cover, what they miss, and what only you can add (step 6). |
| AEO, GEO | Names for being named in AI answers. Google says it is still search (step 5). |
| Internal link | A link from one of your pages to another (step 9). |
Can Claude Code do keyword research on its own?
No. The model has no search data of its own, so any volume or difficulty it gives without a data source is invented. Connect one: Search Console for your own site, and a keyword data provider for everything else. In our run the volumes came from DataForSEO through treg.to, and the prompt says never estimate a number.
Will Google penalise AI-written content?
Google's guidance does not ban AI content. Its spam policy is about scale without value: many pages made to rank and not to help. The same guidance calls a manual fact check of AI content critical before publishing, and that covers titles, descriptions and structured data too. So write few pages, from your own facts, and check every one.
Do I need llms.txt or special schema to appear in AI answers?
Not for Google. Google's own page says Search ignores llms.txt, that no special schema is needed for AI features, and that there is no need to break content into small pieces. To be cited by ChatGPT, Claude or Perplexity, their search crawlers must be allowed in robots.txt. Their documentation gives no formatting advice beyond access.
How long until SEO changes show results?
There is no rule. Practitioners we read wait days to two weeks for technical fixes, one to three weeks for titles, four to eight weeks for content, and longer for links. This playbook logs every change with a date and reads the result after 28 days. That number is our choice, not Google's.
How much does it cost to run this playbook?
In our 27 Nov 2026 run steps 1 to 9 cost $0.42 on treg.to: keyword data $0.23, competitor rankings $0.10, 30 ChatGPT answers $0.08 and page reads about a cent. The brand check and step 12, run on 30 Nov, added under a cent. Search Console calls are free because they run on your own Google account. Claude Code's own usage is separate.
Can an agent get my site to rank?
It cannot promise that, and neither can this playbook. An agent can show what you rank for, fix what is on the page and draft what is missing. It cannot create demand or the reputation that comes from other sites mentioning you. The most common complaint we read was a technically clean site whose traffic did not move. Step 12 is a first, honest action on that.