Runcastle

SEO On-Page Audit

MIT0 downloads

by runcastle

v1.0.0
Homepage ↗

Fetches a single target page and audits its on-page SEO — title, meta, headings, canonical, Open Graph, structured data, alt text, internal links, word count — then writes a prioritized, fix-by-fix action list you can hand to a developer.

Topology

Disclosures

Disclosures — declared side-effect surface

Everything below runs on your machine or inside the sandbox when you use this workflow. Mismatches between these declarations and the actual code block publishing.

Host hooks

Commands executed on YOUR host machine by Sandcastle lifecycle hooks.

  • cp .env.example .env

Sandbox hooks

Commands executed inside the sandbox container.

None declared.

Network access

Fetches the single {{TARGET_URL}} page via curl inside the sandbox. No other hosts are contacted.

Shell expansion

Prompt files contain !`command` blocks — the agent CLI executes these commands at prompt-load time. They are highlighted amber in the prompt files below.

Files

On-page SEO audit: {{TARGET_URL}}

You are a technical SEO specialist. Audit the on-page SEO of a single URL and write a prioritized, actionable fix list. Be specific: quote the actual markup you found, and give the exact change to make.

The page to audit

!curl -sL --max-time 30 {{TARGET_URL}}

Your task

Using the fetched HTML above (and only what it contains), audit {{TARGET_URL}} across these on-page factors:

  1. Title tag — present? length (aim ~50–60 chars)? unique, keyword-led, compelling?
  2. Meta description — present? length (~140–160 chars)? does it earn the click?
  3. Headings — exactly one <h1>? logical h2/h3 hierarchy? keyword coverage?
  4. Canonical — is there a <link rel="canonical">? does it point where it should?
  5. Open Graph & Twitter cardsog:title, og:description, og:image, twitter:card present?
  6. Structured data — any JSON-LD / schema.org markup? which types? valid-looking?
  7. Image alt text — do <img> tags have descriptive alt attributes? which are missing?
  8. Internal links — are there internal links with descriptive anchor text? any orphan feel?
  9. Word count & content depth — roughly how much body copy? thin or substantive?

Output

Write your findings to seo/audit.md as a prioritized list (highest-impact, easiest-win issues first). For each issue use this shape:

  • Issue — what is wrong or missing (quote the markup).
  • Why it matters — the SEO impact in one sentence.
  • Fix — the exact change, with example markup where useful.

Start the file with a one-line verdict and a short scorecard table (factor → pass / warn / fail). If the fetch returned little usable HTML, say so explicitly rather than inventing findings. Commit the file with a message like seo: on-page audit for {{TARGET_URL}}.

When seo/audit.md is written and committed, output <promise>COMPLETE</promise>.

README

SEO On-Page Audit

Point it at a URL and get a developer-ready, prioritized on-page SEO fix list — without pasting page source into a chat window or clicking through five separate audit tools. One Claude Code agent fetches the live page and grades every on-page factor that actually moves rankings.

What it does

You give it a single TARGET_URL. A Claude Code auditor fetches the live HTML and audits it end to end: the title tag and meta description (presence, length, click-worthiness), heading structure (one h1, sane hierarchy), the canonical link, Open Graph and Twitter card tags, JSON-LD / schema.org structured data, image alt text, internal linking and anchor text, and overall content depth.

The output is seo/audit.md: a one-line verdict, a pass/warn/fail scorecard, and a prioritized list of issues. Each issue names the exact markup that is wrong, explains the SEO impact in a sentence, and gives the precise fix — highest-impact, easiest wins first.

How it works

main.ts runs a single Sonnet auditor for one iteration on the docker sandbox. The prompt pulls the page with a !`curl -sL --max-time 30 {{TARGET_URL}}` shell-expansion block — which is why the manifest discloses usesShellExpansion and network access to that one URL. A host hook (cp .env.example .env) seeds your token into the worktree before the run. The topology is a single node: fetch page → audit → fix list.

Requirements

Set CLAUDE_CODE_OAUTH_TOKEN in .sandcastle/.env (run claude setup-token). Edit TARGET_URL at the top of .sandcastle/main.ts to the page you want audited. Build the image once with npx @ai-hero/sandcastle docker build-image, then run npx tsx .sandcastle/main.ts. The only network call is the single curl to your target URL; nothing else leaves the sandbox but the model request.