Skip to main content
Back to Blog
11 min readBrass-SEO Team

Claude Code as Your SEO Engineer

Most technical SEO work is repetitive code. Crawl the site. Pull the data. Cross-reference. Generate the fix. Apply it. A developer charges $100–$200 per hour to write the script and run it. An agency wraps the same work in a monthly retainer. Both are paying for code that an AI coding assistant now writes in minutes.

Claude Code is Anthropic's CLI for working with Claude on coding tasks. Brass-SEO's site itself is built and maintained with Claude Code; this blog post was written through it. The same workflow that builds and ships a SaaS product runs equally well for technical SEO automation. This post covers five concrete workflows that move technical SEO work from "hire a developer" into "hire an AI for $20 per month."

Quick Navigation


What Claude Code Is

Claude Code is Anthropic's command-line interface for Claude that can read files, write files, run shell commands, and execute multi-step coding tasks autonomously. Brass-SEO uses it for development, content production, and the technical SEO automation covered in this post. Anthropic's pricing puts Claude Code on the same plan as Claude Pro at $20 per month or via the Anthropic API on usage-based billing.

The CLI installs with a single command and runs inside any terminal. Once installed, you can point it at a project directory and ask it to perform tasks in natural language. It reads your code, understands the structure, and proposes changes. You approve or reject. The cycle is fast.

For SEO purposes, the relevant capabilities are: file reading and writing, bash command execution, parsing HTML/XML/JSON, and running scripts. Everything that follows in this post uses only these four primitives.


Why It Fits SEO Work

Technical SEO is built from repetitive operations against structured data. Pull a list of URLs. Crawl each one. Parse the HTML. Extract title tags, meta descriptions, headings. Compare against rules. Output a report. These operations are pure code work that an AI assistant can write and execute end-to-end.

The historical alternatives all had friction:

  • Developers ($100–$200/hour) write better code but take days to schedule and cost real money
  • Screaming Frog and similar ($259/year) work for standard audits but break on custom requirements
  • No-code SEO platforms ($150+/month) handle common cases but lock you out of edge cases

Claude Code sits between these. It writes the script in 5 minutes, runs it in another 5, and the output is yours to keep and re-run. The first-time cost is the time to specify what you want. Each re-run after that is free.

For the broader comparison of SEO tool costs, see The Real Cost of SEO Tools in 2026.


Workflow 1: Bulk Title Tag Rewrites Across 100 Posts

When you have hundreds of pages with weak title tags, manual rewriting is the wrong move. A Claude Code session that reads each page's content, generates 3–5 title candidates per page, and outputs a CSV for human review takes 15 minutes to set up and 30 minutes to run on a 100-page site.

The prompt to give Claude Code:

I have a blog at _posts/*.md with frontmatter containing a title field.
Read each post's frontmatter title and the first 300 words of body content.
For each post, generate 3 title candidates that:
- Are 40-55 characters long
- Lead with the primary keyword
- Avoid generic phrases like "Complete Guide to" or "Everything About"
Output as a CSV: slug, current_title, candidate_1, candidate_2, candidate_3

Claude Code reads the files, generates the candidates, writes the CSV. Open the CSV in a spreadsheet, pick the winner per row, paste back into a second prompt that updates the frontmatter title: field.

Time: 30 minutes for 100 posts. Manual equivalent: a freelance writer at $50/hour would charge 8–12 hours of work, or $400–$600.

For the underlying CTR research that justifies title rewrites, see Title Tags and CTR: What the Public Data Shows.


Workflow 2: Schema Audit and Repair

Structured data (Article schema, FAQ schema, BreadcrumbList) is often broken silently — typos, missing required fields, or wrong types. Google's Rich Results Test catches these one page at a time. Claude Code catches them across the whole site in one pass.

The prompt:

Crawl all pages at sitemap.xml on my site. For each page, extract any
JSON-LD blocks. Validate each block against schema.org structure for
its declared @type. Output a list of pages with invalid or missing
schema, with specific errors.

Claude Code writes a small crawler script (Node.js or Python), runs it, parses the schema blocks, validates each, and outputs a structured report. You can then ask it to write the fixes directly into the affected files.

Time: 60 minutes for setup + run on a 200-page site. Manual equivalent: a technical SEO consultant at $150/hour quotes 4–8 hours for the same audit, or $600–$1,200.

For the broader schema context, see Schema Markup: The SEO Trick Hiding in Your HTML and Schema Markup and AI Search: What Research Shows.


Orphan pages (zero internal links pointing to them) and dead-end pages (zero outgoing internal links) hurt SEO. Mapping the internal link graph of a site reveals both, plus the more interesting cases: high-impression pages that link to nothing related, and pillar pages that nobody links back to.

The prompt:

Crawl all pages on the site at example.com. For each page, list:
- Internal links pointing to it (count + list)
- Internal links it points out (count + list)
Output a graph as JSON or a CSV with columns: url, inbound_count,
outbound_count, inbound_urls (semicolon-separated), outbound_urls.
Flag pages with inbound_count = 0 as orphans.
Flag pages with outbound_count = 0 as dead ends.

Claude Code generates the crawler, runs it, builds the graph, outputs the report. The actionable next step is a second prompt: "For each orphan, suggest 2-3 existing pages that should link to it based on topical similarity."

Time: 90 minutes. Manual equivalent: roughly impossible at scale without dedicated tools (Sitebulb at $50/month does this, but on its own schedule with its own report format).

For the broader internal linking framework, see Internal Linking: The Free SEO Tactic You're Ignoring.


Workflow 4: Custom Site Audit Scripts

Standard audit tools check standard things. Custom rules require custom scripts. Brass-SEO's own blog uses a custom audit script (scripts/audit-blog-content.mjs) that checks for cannibalization, title hygiene, FAQ schema presence, and Quick Navigation sections. The script was written by Claude Code in one session.

A starter prompt for your own custom audit:

Write a Node.js script that scans my blog at _posts/*.md and reports:
- Posts with titles over 60 characters
- Posts missing a ## Frequently Asked Questions heading
- Posts with excerpt under 120 or over 165 characters
- Posts where the same 3+ significant keywords appear in 2+ title tags (cannibalization signal)
Output a JSON report with totals and per-post issues.

Claude Code writes the script in 5 minutes. You run it any time the site changes. The script becomes a living artifact you own, not a feature of someone else's product.

For an example of a working blog audit script, see Brass-SEO's scripts/audit-blog-content.mjs in the public repo or the audit framework documented in the Q3 content audit.


Workflow 5: Sitemap and Robots.txt Generation

CMS-generated sitemaps and robots.txt files often include URLs you don't want indexed (draft pages, internal search results, low-value tag pages). Cleaning them up by hand is tedious. Claude Code generates the clean version from a set of rules.

The prompt:

My site has these pages and patterns. Generate sitemap.xml that includes
only the pages I want indexed and excludes the patterns I list. Output
the XML directly.

Include: /blog/*, /about, /pricing, /[main-section-pages]
Exclude: /tag/*, /search/*, /draft/*, /admin/*, /api/*

Also generate a robots.txt that disallows the excluded patterns and
allows the included ones, plus sitemap reference.

Claude Code generates both files. You inspect, deploy. Time: 15 minutes. Manual equivalent: 1–2 hours of careful work and likely a typo somewhere.

For more on these specific files, see What Is an XML Sitemap and Do You Need One? and Robots.txt: The File That Can Hide Your Site from Google.


What Could Go Wrong

Three categories of risk are worth naming:

Bad code shipped to production. Claude Code writes correct code most of the time, but "most of the time" is not "always." A schema fix script with a bug can corrupt structured data across hundreds of pages. The mitigation: always run on a dev branch first, test the script on 5 pages, then expand to the full set. Brass-SEO never lets Claude Code push to production directly. The preview-first workflow in CLAUDE.md is the standard guardrail.

Hallucinated facts in SEO recommendations. When Claude Code generates content recommendations alongside the technical fixes, it can confabulate. If you ask it to suggest title tags or meta descriptions, verify the suggestions against your actual brand voice and verifiable facts.

Black-hat tactics by accident. A motivated user could prompt Claude Code to do things that violate Google's guidelines (auto-generating thin content, link injection, doorway pages). Claude has guardrails against the worst of these, but the practical defense is your own judgment: if the workflow feels like cheating, it probably is.

For the broader risk framing, see How to Run a 15-Minute SEO Audit (Free Checklist) and What a Good SEO Audit Actually Tells You.


The Cheaper Alternatives

Claude Code at $20/month is the most capable option, but it's not the only one. For non-developers comfortable with web interfaces:

  • ChatGPT ($20/month) with code interpreter handles most of these workflows, slightly slower
  • Claude.ai (Claude's web interface) at $20/month handles file uploads and code generation but doesn't directly run scripts in your environment
  • GitHub Copilot ($10–$20/month) automates code-completion inside an existing editor, less suited for full-script generation

Brass-SEO uses Claude Code specifically because the CLI workflow integrates with version control. Every change becomes a commit. The audit trail matters.

For the broader AI tools landscape, see AI SEO Tools: Small Business Guide 2026.


Frequently Asked Questions

Do I need to know how to code to use Claude Code for SEO?

Less than you'd think. You need comfort with running terminal commands and understanding what scripts do at a high level. Claude Code writes the code; you tell it what you want and inspect the output. The barrier is closer to "comfortable using a CLI" than "knows JavaScript."

Is Claude Code overkill for a small site under 100 pages?

For one-off tasks, yes. For ongoing SEO work, no. A custom audit script written once and re-run monthly compounds in value. The 30-minute setup is repaid the first time you re-run it.

How does this compare to using ChatGPT with code interpreter?

ChatGPT's code interpreter runs in OpenAI's sandbox and can't directly modify files on your machine. Claude Code runs in your terminal and can write directly to your project. For SEO work that needs to update files in your repo, Claude Code wins. For one-off analysis where you upload a CSV and want an answer, ChatGPT's code interpreter is fine.

What if I break my site running these scripts?

Use version control. Run all scripts on a feature branch first. Test on 5 pages, verify the output is correct, then expand to the full set. Brass-SEO's own workflow uses the preview-first deploy pattern (CLAUDE.md documents it) so that no script can break production without an intermediate verification step.

Does Brass-SEO replace Claude Code?

Different tools for different layers. Brass-SEO is the conversational SEO data layer (GSC + GA4 analysis, AI Citability audits). Claude Code is the engineering automation layer (custom scripts, technical SEO). Many guerilla SEO operators run both: Brass-SEO at $25/month for data, Claude Code at $20/month for code. Combined cost is still lower than a single Semrush seat. For setup, see Set Up Brass-SEO in 2 Minutes.

Ready to try Brass-SEO?

Get AI-powered SEO insights from your Google Search Console and Analytics data.