How to use Claude Code for SEO
Updated
To use Claude Code for SEO, install SEO skills in your project, then have Claude work through the site in a fixed order: audit, technical fixes, structured data, content and AI search. A skill is a folder with a SKILL.md file of instructions that Claude Code loads when your request matches its description, or when you type a slash and the skill's name. Because Claude Code runs inside your repository, it can make the fixes in your code as well as report them.
Set up Claude Code for SEO work
Skills install with the open-source skills CLI, which runs through npx and needs no account. Install skills in Claude Code covers the setup in detail. The short version, run from your site's repository:
# Browse the seoskills.sh catalog and pick skills for Claude Code
npx skills add https://seoskills.sh -a claude-code
# Install one of our skills by its slug
npx skills add https://seoskills.sh --skill audit-remediation-prioritizer -a claude-code
# Install another author's skill from its GitHub repository
npx skills add https://github.com/coreyhaines31/marketingskills --skill seo-audit -a claude-code
The CLI writes skills to .claude/skills/ in the project, so you can commit them and your team gets the same set. Add -g to install to ~/.claude/skills/ for all your projects instead. Start Claude Code with claude and ask "What skills are available?" to confirm they loaded. If a session was already running before the project had a skills folder, run /reload-skills.
Open Claude Code in the repository that holds your site's code, so fixes land in the templates themselves. If your site runs on a CMS instead, any folder works: Claude can still audit live pages and analyze your data, then write out the changes for you to make in the CMS.
The workflow, step by step
These five steps cover both halves of the job, SEO analysis and optimization: Claude reads the site and your data, then makes the changes or drafts them for you. Run them in order, since each step works from what the one before produced. The skills named in each step are examples that fit the job, not a ranking. For a shortlist to start with, see SEO skills for Claude Code.
1. Audit the site
Start with an audit, so every later step works from a list of real issues. SEO Audit audits, reviews and diagnoses SEO issues on your site. Audit Remediation Prioritizer then turns the raw findings into one deduplicated roadmap, scored with RICE or ICE, with owners, effort and tickets ready to file. Have Claude save the findings to a file such as seo/audit.md, so later steps and later sessions work from the same list. Other audit skills are in SEO Audit.
Audit the SEO of https://example.com: the homepage, /pricing and the
three newest blog posts. Group the issues as critical, warning or minor.
Turn those findings into one deduplicated fix list scored with ICE,
with an owner and an effort estimate for each item.
2. Fix technical issues
Fix crawl, index and rendering problems before you touch content. SEO Technical audits crawlability, indexability, security, URLs, mobile, Core Web Vitals, rendering, structured data and IndexNow. If you have moved URLs, Redirect Chain Mapper follows every redirect hop for a list of URLs and flags chains, loops, mixed 301 and 302 use, and redirects that end in errors. Both are in Technical SEO.
Audit technical SEO for this site: crawlability, indexability, URLs,
mobile and rendering. Fix what lives in this repo, and list anything
that needs a server or CDN change.
Follow every redirect hop for the URLs in old-urls.txt and flag chains,
loops and redirects that end in an error.
3. Add structured data
On-Page Schema Coverage Auditor compares the structured data each page should carry for its content type with what is present and valid, and lists the exact properties to add. Schema adds, fixes or optimizes the markup itself. When your templates live in the repo, Claude can add the JSON-LD where each page is rendered. Both skills are in On-Page SEO.
Compare the structured data on our product, article and FAQ templates
with what each content type should carry, then add the missing
properties as JSON-LD.
4. Improve the content
Choose pages by evidence, then work on them one at a time. Content Decay Predictor fits a trend to each page's Search Console clicks and impressions and ranks the pages likely to keep losing traffic by projected click loss. It needs access to your Search Console data, and its SKILL.md lists the credentials it expects. For each page you pick, SEO Content evaluates usefulness, E-E-A-T, readability, thinness and AI citation readiness, then does last-mile draft cleanup. Brief and writing skills are in SEO Content Writing.
Which pages on example.com will keep losing Search Console traffic?
Rank them by projected click loss.
Evaluate /blog/keyword-research-guide for usefulness, E-E-A-T,
readability and thin sections, then clean up the draft.
5. Get ready for AI search
Last, check how AI search sees the pages you just fixed. SEO AI Crawlers audits AI crawler access and Google AI-feature eligibility for a page, including the snippet controls that gate AI Overviews. AI SEO covers optimizing content for AI search engines: getting cited by LLMs and appearing in AI-generated answers. More are in AI SEO (GEO and AEO).
Audit AI crawler access for example.com/pricing and check whether any
snippet controls keep it out of AI Overviews.
Optimize /pricing so AI search engines are more likely to cite it in
their answers.
How to write SEO prompts for Claude Code
Claude Code decides when to load a skill by reading its description, so the way you phrase a request matters:
- Use the description's words. "Audit technical SEO" matches SEO Technical. "Look over the site" may not match anything.
- Call the skill by name when it doesn't load. Type
/seo-audit. Whatever you add after the name reaches the skill, as in/seo-audit https://example.com/pricing. - Set the scope and the output. Name the URLs, templates or files, and say whether you want a table, a fix list or edits.
- Ask for the plan before large edits. When a change touches many templates, have Claude list the changes first so you can review them.
- Point it at data it can't see. Without an MCP server, save an export, such as a crawl or a Search Console report, in the project and name the file in your prompt.
- Invoke the skill again in long sessions. After Claude Code compacts a long conversation, it may keep only the start of a skill's instructions. If Claude stops following a skill, run it again.
Check a skill's page before you install or run it. Skill pages show the result of our security scan and label skills that pre-approve shell commands or web fetching, which lets Claude use those tools without asking during the turn that runs the skill. Skill safety explains the scan.
Add live data with MCP servers
A skill carries instructions, while your SEO data sits in Search Console, Ahrefs, DataForSEO or Semrush. MCP servers give Claude Code tools beyond its built-in set, including tools that query those services. With a Search Console server connected, for example, Claude can read your queries, clicks, impressions, CTR and positions, and inspect URLs for indexing problems. Some skills say which server they expect: SEO Dataforseo works with live SEO data through the DataForSEO MCP server. Others call a vendor's API directly, so read the SKILL.md before you connect anything. SEO MCP servers shows how to add each server, and Skills vs MCP servers explains how the two split the work.
Save the workflow as your own skill
Once the steps work for your site, save them as a project skill so the whole pass runs from one command. Create .claude/skills/seo-pass/SKILL.md:
---
name: seo-pass
description: Runs the monthly SEO pass for this site.
disable-model-invocation: true
---
1. Use the SEO Audit skill on the URLs in seo/pages.txt. Save the findings to seo/audit.md.
2. Use the Audit Remediation Prioritizer skill to score the findings.
3. Fix the technical and structured data issues that live in this repo.
4. List what still needs a person, and why.
With disable-model-invocation: true, only you can start it, by typing /seo-pass. Claude won't run it on its own. Commit the folder and everyone working in the repo can run the same pass, which gives you a repeatable SEO agent in one file. How to write a SKILL.md file covers the format.
Next
- SEO MCP servers: connect Search Console, Ahrefs, DataForSEO or Semrush data.
- How to write a SKILL.md file: turn your own SEO checklist into a skill.
- Skill safety: what to check before you install a skill.