Skip to content

Chapter 10 of 1012 min readBy Deepak GuptaUpdated

A Claude Code Workflow for AI Search Growth

The earlier chapters explain what AI engines read and how to plan for them. This chapter is the operating workflow: how to turn your search, analytics and AI visibility exports into a prioritized plan with Claude Code, in a week instead of a quarter. It is the hands-on companion to Growth Engineering for the AI Search Era, and it assumes the measurement setup from Chapter 9 of From SEO to GEO.

Why a coding agent fits this work

A growth analysis is a series of joins: queries to pages, pages to conversions, conversions to citations. Spreadsheets break at that scale, and people estimate when they should count. A coding agent such as Claude Code writes a script for each step, runs it on your real exports, and keeps every result reproducible for next month.

The quality of the output depends far more on the workspace than on clever prompting. Give it clean folders, a written brief, and a rule that every number comes from a script.

The workspace

growth/
  CLAUDE.md                 # goals, ICP, rules (template below)
  data/
    raw/
      gsc/                  # performance by page+query, indexing, sitemaps, generative AI
      bing/                 # search performance, AI performance, crawl issues
      ga4/                  # landing pages x key events, AI Assistant channel
      crm/                  # leads and opportunities with first landing page
      crawl/                # Screaming Frog internal_all, schema, inlinks
      backlinks/            # referring domains, top linked pages, competitor links
      logs/                 # 30 days of bot requests
    clean/                  # normalized tables Claude Code writes
  scripts/                  # every analysis as a re-runnable script
  outputs/                  # CSVs and briefs, one folder per step

Put each export in its folder, then write the brief. Claude Code reads a CLAUDE.md file at the start of every session, so writing your goals, ICP and rules there once keeps every later prompt grounded in your business rather than generic SEO advice.

# Growth project: <company>

## Business
- Product: <one sentence, what it does and for whom>
- ICP: <role, company size, industry, trigger event>
- Conversion events, in order of value: demo request > trial > contact > newsletter
- Average deal size and sales cycle: <numbers>

## Site
- Domain: <domain>, CMS/framework: <stack>
- Money pages: /pricing, /demo, /product/*, /integrations/*
- Content hubs: /blog, /guides, /research

## Competitors
- <competitor 1>, <competitor 2>, <competitor 3>
- Publications our buyers and journalists read: <list>

## Data
- Raw exports in data/raw (see folder names). Date range: <range>
- AI visibility: <tool> via MCP server (live, read-only) or exports in data/raw/ai

## Rules
- Write a script for every analysis. Never estimate numbers by reading files.
- Normalize URLs before joining: lowercase host, strip tracking params, consistent trailing slash.
- Rank opportunities by lead potential, then effort. Traffic alone is not a reason.
- Plan first, wait for my approval, then execute.
- Save outputs as CSV in outputs/<step>/ with a short README of findings.
- Do not change the live site. Propose changes as diffs or briefs.

Bring AI visibility data in through MCP

Search Console and Bing cover Google and Microsoft surfaces. For ChatGPT, Perplexity, Claude and Gemini you need a cross-engine AI visibility tool. If it offers an MCP (Model Context Protocol) server, connect it so the data stays live in the same session as your exports. In Claude Code, a hosted server is one command:

claude mcp add --transport http <name> <server-url>

Then run /mcp inside Claude Code and sign in. GrackerAI, my company, offers a read-only MCP server at https://portal.gracker.ai/mcp (setup docs); any tool with an MCP server or a CSV export fills the same slot. The value is the join: one session can find pages that rank on page one, convert well, and are still never cited by ChatGPT. Those are your highest-leverage rewrites.

The ten prompts, in order

Run these one at a time in a single project, so each step builds on files the last one wrote. Review the plan before approving each step. The first run takes a few days of review; later runs take hours.

Step 1. Ingest and normalize

Read every file in data/raw. Build a data dictionary in outputs/01-ingest/README.md: source, columns, date range, row count, and known limits (sampling, row caps, impressions-only reports). Normalize URLs per CLAUDE.md and build one page-level table in data/clean/pages.csv joining GSC, Bing, GA4, CRM, crawl and backlink data. Report join rates and every URL that failed to match. List missing or inconsistent data before any analysis. Write all of it as scripts in scripts/.

You get: a single source of truth per URL, and an honest list of data gaps before they distort later steps.

Step 2. Technical health and 404 recovery

Using GSC and Bing indexing data, the crawl, and logs, list every 404, soft 404, redirect chain, redirect loop, canonical conflict, noindexed page in the sitemap, and "crawled, currently not indexed" URL. For each 404 that has impressions, backlinks, or internal links pointing to it, propose a 301 target with a one-line reason. Flag important pages that AI crawlers never fetched. Output redirects.csv, internal-link-fixes.csv, and a fix list ranked by impact x effort.

You get: a redirect map that recovers link equity, and a list of indexing problems ranked by what they cost you.

Step 3. Query to page mapping

Map every query to the pages that receive its impressions. Flag cannibalization (two or more URLs splitting one intent), striking-distance queries (position 5 to 20 with real impressions), and pages whose CTR is well below the site median for their position band. For the top 30 opportunities by lead potential, draft new titles and meta descriptions, and say which page should own each cannibalized query.

You get: quick wins that need copy changes, not new content.

Step 4. Content inventory and decisions

Score every indexable page on: 12-month click trend, conversions and pipeline (GA4 + CRM), AI citations (Bing AI Performance + your AI visibility data), referring domains, and last-updated date. Classify each page as keep, refresh, merge, redirect, or remove, with the reason and the target URL for merges. Flag pages older than 12 months that still earn citations or leads: these are refresh priorities. Output content_decisions.csv.

You get: a keep, refresh, merge or remove call on every URL, defended with data.

Step 5. Content and prompt gaps

Cluster all GSC queries, Bing grounding queries, and tracked AI prompts into topics. Tag each topic by buyer stage: problem, solution, comparison, implementation. Using the AI visibility data, find prompts where competitors are mentioned or cited and we are not, and list the domains cited in those answers. Show topics with demand and no matching page, and missing page types: comparisons, alternatives, integrations, use cases, pricing explainers. Rank by lead potential, then effort. Write a one-paragraph brief for the top 15.

You get: a content roadmap built from real demand in both search and AI answers, ranked by revenue potential.

Step 6. Structured data and entity consistency

Extract JSON-LD from every crawled page and group by template. Report missing, invalid, or inconsistent schema. Generate valid JSON-LD per template: Organization (with sameAs to every official profile), SoftwareApplication or Product, Article with author as Person, BreadcrumbList, and HowTo or FAQPage only where the content truly matches. Check that the company name, product name, founders, and description are identical across schema, the about page, and official profiles. Output one JSON-LD file per template and a validation report.

You get: clean, consistent entity data that search engines and AI systems can trust.

Step 7. AI answer readiness

For the top 50 pages by leads and impressions, check: is the main answer stated in the first 100 words; does each section stand on its own when read in isolation; are claims backed by a number, a source, or first-hand experience; is there a named author with credentials; is the updated date visible and accurate; is the page server-rendered and reachable by AI crawlers. Using the AI visibility data, compare what AI engines say about us against what the pages say, and flag inaccurate claims. Rewrite the intro and one key section for the top 10 pages as examples. Do not add filler or keyword stuffing.

You get: pages written so a person and a retrieval system both get the answer fast, plus a list of wrong claims AI engines make about you.

Step 8. Citation-worthy assets

From the backlink data, find the competitor and industry pages that earn the most referring domains, and classify what they are (research, statistics, tools, templates, glossaries). Using the AI visibility data, list the source types AI engines cite most for our priority prompts. Propose 5 assets we can own: an annual benchmark report from our product data, a sourced statistics page, a methodology page, a glossary, and a free tool. For each, give the outline, the data we need, the update cadence, and 20 publications or writers likely to cite it.

You get: a short list of assets designed to be cited by journalists, analysts and AI engines, with the outreach list attached.

Step 9. Conversion paths

For every page with meaningful traffic, check whether the call to action matches intent: education pages should offer a next read or a resource, comparison and pricing pages should offer a demo or trial. List pages with traffic and zero conversions, pages missing internal links to money pages, and AI-referred landing pages with high exits. Draft specific fixes: CTA copy, placement, internal links, and one lead magnet per topic cluster.

You get: more pipeline from the traffic you already have, which is usually the cheapest growth available.

Step 10. Product insights and the monthly loop

Mine queries, grounding queries, AI prompts, and sales and support notes for: feature requests, integrations people search for, objections, use cases we do not serve, and competitor frustrations ("X alternative", "X too expensive"). Summarize them as a product input memo. Then build scripts/monthly.py that re-runs steps 2 to 5 on fresh exports, diffs the results against last month, and writes a scorecard: clicks, leads by landing page, AI citations and share of voice, referring domains, indexing errors.

You get: a product memo grounded in market demand, and a growth system that runs every month instead of a one-time audit.

Tip

Re-run Steps 2 to 5 every month on fresh exports, Steps 6, 8 and 10 every quarter, and Step 4 with a content prune once a year. The monthly script from Step 10 makes the loop cheap.

Search data is a product input

Search queries and AI prompts are the largest unprompted survey of your market you will get: people type what they want, in their own words, with no sales rep in the room. Step 10 turns them into a product memo. These are the patterns to look for:

Signal in the data What it usually means Product or GTM response
"<your product> + <tool> integration" queries with no page Buyers need the integration to adopt Build it, or document the workaround, then publish the integration page
"<competitor> alternative" and "<competitor> too expensive" A competitor is losing buyers on price or fit Honest comparison page, migration guide, pricing tier aimed at switchers
"How to <task> in <your product>" with high exits The feature exists but is hard to find or use Fix the UX first, then the docs
"<your product> pricing" with low CTR or high bounce Pricing is unclear or hidden Publish clear pricing, or explain why it is custom
AI engines state wrong facts about you Your own pages are vague, stale or contradicted elsewhere Publish a product facts page and correct the sources AI cites
Prompts where AI recommends a competitor for a use case you serve You have no proof for that use case Ship a case study, a template and a dedicated use-case page

If AI engines state wrong facts about your product, the fix usually belongs to the product team, not the content calendar. Product-Resident GEO covers that layer in depth.

Key takeaways

  • Treat AI search growth as a series of data joins and let a coding agent script every step, so results are counted, not estimated, and can be re-run monthly.
  • The workspace matters more than the prompts: clean raw folders, a CLAUDE.md brief with goals, ICP and rules, and an outputs folder per step.
  • Connect cross-engine AI visibility data through an MCP server so it sits beside your Search Console, GA4 and CRM exports in one session.
  • Run the ten prompts in order: ingest, technical health, query mapping, content decisions, gaps, entities, answer readiness, citation assets, conversion paths, and product insights.
  • Search and AI prompt data is also a product roadmap input: integration queries, competitor frustrations and wrong AI claims all point to product work.