sitemap-audit — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited sitemap-audit (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Diagnostic SEO audit. Report only — never modifies code or Search Console state. Cross-references the codebase with live production to catch issues that live-only tools miss (like framework metadata cascade bugs).
_Read ~/.claude/skills/sitemap-audit/preferences.md using the Read tool. If not found, proceed with onboarding._
_On startup, use Bash to detect (skip any that fail):_
pwd_package.json (Next.js / Astro / Nuxt / SvelteKit / generic), astro.config.*, nuxt.config.*_src/app/ (App Router) or pages/ (Pages Router)_git status, git log -1 --format=%h_Check $ARGUMENTS for subcommands:
helpDisplay:
sitemap-audit — SEO health check across codebase + live production
Usage:
/sitemap-audit Audit site from preferences
/sitemap-audit <url> Audit a specific URL (one-off)
/sitemap-audit config Set preferences
/sitemap-audit reset Clear preferences
/sitemap-audit help This help
What it checks:
1. Sitemap fetchability + XML validity + URL count
2. robots.txt content + sitemap pointer consistency
3. Every URL in sitemap: 200 status, self-canonical match
4. Response headers: Content-Type, X-Robots-Tag, HSTS
5. Apex ↔ www redirect chain depth + consistency
6. Codebase anti-patterns (framework-specific)
7. SSR vs JS-only rendering (Googlebot compatibility)
8. DNS: site verification TXT records for GSC
9. (Optional, with permission) Live GSC check via Chrome extension
Output: prioritized report (P0 blocks indexing / P1 hurts rankings / P2 nice-to-have).
Current preferences: [read from preferences.md or "none — will onboard"]Then stop.
configUse `AskUserQuestion` to collect:
Q1 — "Production URL to audit? (e.g. https://www.example.com)"
Q2 — "Repo path for codebase-aware checks?"
pwd)", "Specify path", "Skip codebase checks"Q3 — "Do you have a Google Search Console property you want the skill to explore? (optional, requires Claude for Chrome extension)"
Q4 — "Save report to a file after each run?"
.sitemap-audit/report-<date>.md in repo", "Yes — custom path"Save to ~/.claude/skills/sitemap-audit/preferences.md. Summary. Stop.
resetDelete ~/.claude/skills/sitemap-audit/preferences.md. Confirm: Preferences cleared. Stop.
Show one-line invitation (don't block):
First time running /sitemap-audit? Run `/sitemap-audit config` for persistent setup,
or answer a couple of one-off questions to continue.Then ask (via AskUserQuestion or inline) ONLY: production URL (required), codebase path (default: cwd). Skip GSC on first run.
Continue to Audit steps below.
Execute these in order. Run independent curls in parallel. Every finding must cite evidence (exact curl output, file:line, or DNS record).
Record HTTP status + final URL + Content-Type + first hop for each:
curl -sI <url>/
curl -sI <url>/sitemap.xml
curl -sI <url>/robots.txt
curl -sI <url-apex>/ # if www is canonical, or vice versa
curl -sIL <url-apex>/sitemap.xml # follow to detect redirect chain depthFlag P0 if:
application/xml or text/xmlcurl -s <sitemap-url> | xmllint --noout - # VALID or error
curl -s <sitemap-url> | grep -c "<loc>" # URL countFlag P0 if XML invalid. Flag P1 if URL count is 0 or exceeds 50,000 (sitemap split needed).
For each <loc>:
<link rel="canonical">Count: correct canonical (matches own URL), no canonical (Google self-canonicals by default, acceptable), WRONG canonical (points elsewhere — P0).
Classify wrong canonicals by where they point:
alternates.canonical leaking)On homepage + sitemap + a sample article:
X-Robots-Tag — any noindex here silently de-indexes the URL. P0 if found unexpectedly.Strict-Transport-Security — presence is good.Content-Type — text/html; charset=utf-8 expected for pages.If site has both apex and www:
<link rel="canonical"> on homepage)Sitemap: pointer use the canonical host?Common P0 pattern: sitemap + robots canonicalize one host, but page-level <link rel="canonical"> points to the other. Seen in Next.js sites that fix sitemap/robots but forget metadataBase or hardcoded URLs in layouts.
Only if codebase path is set. Detect framework from package.json, run framework-specific checks.
#### Next.js App Router (15+)
Read these files:
next.config.*, next.config.tssrc/app/layout.tsx (root) — scan for metadata.alternates.canonicalsrc/app/sitemap.ts — check baseUrl consistency with production canonical hostsrc/app/robots.ts — check sitemap: pointer matchessrc/lib/metadata.ts or similar — grep for hardcoded URLs: grep -rn "https?://<apex-domain>" src/Anti-patterns to flag:
alternates.canonical set in src/app/layout.tsx cascades to every child route that doesn't override. Result: every page claims to be the homepage. Fix: remove root canonical; let pages self-canonical or add explicit per-route.siteUrl in src/lib/metadata.ts is apex but sitemap/robots/redirect canonicalize to www (or vice versa). Grep: grep -rn "https://<apex>" src/ --include="*.ts" --include="*.tsx".metadataBase, so relative URLs in metadata won't resolve.readdirSync(join(process.cwd(),...)) in sitemap.ts can fail in serverless if files not bundled. Prefer compile-time aggregation.lastModified give Google no crawl-priority signal.#### Next.js Pages Router
pages/sitemap.xml.ts or similar; flag if missing.<Head> in _document.js / _app.js for canonical setup._document (applies site-wide, same cascade trap).#### Astro
astro.config.mjs for site (required for canonical URLs).@astrojs/sitemap integration — flag P1 if site has >20 pages and no sitemap integration.<BaseHead> or layout for canonical.#### Nuxt
nuxt.config.ts → site or @nuxtjs/sitemap module.useHead canonical usage.#### SvelteKit
svelte.config.js → kit.prerender.+layout.svelte <svelte:head> for canonical.#### Generic / unknown framework
<link rel="canonical" patterns in source.curl -s <url>/ | grep -oE "<h1|<article|<main" | head -5
curl -s <url>/ | grep -c "<meta\|<link"Flag P0 if the HTML response is essentially empty (client-rendered SPA). Googlebot renders JS but delays indexing.
dig +short <apex-domain> A
dig +short <apex-domain> TXT
dig +short www.<apex-domain> CNAMEFlag:
google-site-verification=... TXT. If present, Domain property is set up in GSC (ideal).Only if user granted permission in preferences or this run.
Using the Claude for Chrome extension (mcp__claude-in-chrome__*):
https://search.google.com/search-console/sitemaps?resource_id=sc-domain%3A<domain> (or ?resource_id=<encoded-url> for URL-prefix properties)get_page_text to read the sitemaps tableDo NOT modify GSC state (no remove/resubmit). Read-only.
If any sitemap shows "Couldn't fetch" and production verifies healthy → flag as P1 with explicit user action: "remove + resubmit sitemap in GSC (use trailing slash trick to cache-bust if removal alone doesn't clear it)."
Format:
╔═══════════════════════════════════════════════════════════════╗
║ sitemap-audit — <domain> ║
║ <date> · <framework> · <N urls> in sitemap ║
╚═══════════════════════════════════════════════════════════════╝
SUMMARY
P0 (blocks indexing): <n>
P1 (hurts rankings): <n>
P2 (nice-to-have): <n>
P0 — Blocks indexing
• <finding>
Evidence: <file:line or curl output>
Fix: <specific action>
P1 — Hurts rankings
• ...
P2 — Nice-to-have
• ...
CLEAN PASSES
✓ Sitemap XML valid
✓ All <N> URLs return 200
✓ robots.txt consistent
...
NEXT ACTIONS (prioritized)
1. [P0] <most important fix>
2. [P0] <next>
3. [P1] <next>
GSC ACTIONS (manual — skill does not modify GSC)
• <specific click path if applicable>After displaying the report, ask:
Want me to open a fix PR for P0/P1 findings? This would modify code only — never GSC. You'll review the PR before merge.
If yes:
fix/seo-sitemap-audit-<date>If no: done.
If preferences.md has saveReport: true: write the report to the configured path.
Save to ~/.claude/skills/sitemap-audit/preferences.md:
# /sitemap-audit preferences
Updated: <date>
## Defaults
- url: https://www.example.com
- repoPath: /Users/x/Dev/myproject
- gscMode: ask-per-run | always-skip | always-run
- saveReport: false | path
- framework: nextjs-app | nextjs-pages | astro | nuxt | sveltekit | genericLearn silently:
always-skip.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.