HOME SKILLS BLOG GITHUB
// SKILL

SEO DRIFT MONITORING
GIT FOR ON-PAGE SEO

Every deploy is a chance for SEO to silently regress. A removed meta description, a renamed h1, a stripped schema block, a flipped canonical. You catch it months later in Search Console, after rankings dropped. SEO Drift Monitoring fixes that. Baseline your pages, diff against any future state, get a structured report of what changed and how bad it is.

CONTRIBUTED BY DAN COLTA · PRO HUB CHALLENGE · original repo
$
/seo drift baseline https://your-site.com

REQUIRES CLAUDE SEO INSTALLED IN CLAUDE CODE

Claude SEO drift monitoring with baseline, compare, and history commands
// HOW IT WORKS

BASELINE. DIFF. TRACK.

SEO drift is the slow erosion of on-page signals between deploys. Each change is small in isolation. A title gets shortened by a CMS template tweak. A canonical points to a stale URL after a refactor. A hreflang return tag goes missing when a translation ships. A JSON-LD block gets stripped by an over-eager security middleware. None of it triggers an alert. All of it shows up in Search Console three months later as a ranking dip you have to reverse-engineer.

The drift skill captures a SQLite-backed snapshot of every SEO-critical element on a page, labels it, and gives you a diff against any future state. Wire it into your deploy pipeline and the build fails the moment a critical regression lands. No more bisecting through commits to find what broke.

The Six Pillars

Drift monitoring is built on six load-bearing capabilities. Each is described below.

01
BASELINE CAPTURE
One command captures a SQLite snapshot of every SEO-critical element. Label it ('pre-release-v2.1'). Replay against any future state.
02
17 COMPARISON RULES
Title, meta, canonical, hreflang, schema, OG, robots, h1-h6, image alt, anchor distribution. Each rule has a severity tier.
03
SEVERITY TIERS
Critical (fix now): canonical flip, robots noindex added. Warning (review): meta length swing, h1 changed. Info (track): minor copy edits.
04
SQLITE HISTORY
Every baseline persisted locally. Compare against any prior snapshot. History command surfaces drift between consecutive captures.
05
CI-READY
Deterministic writes. Non-zero exit on critical drift. Wire into pre-deploy + post-deploy hooks. Fail the build on critical drift, not after rankings drop.
06
DEPLOYMENT GUARD
Pair with claude-seo audit for full-stack confidence: drift catches the small stuff, audit catches the systemic stuff.
// USAGE

HOW TO RUN DRIFT

Commands

CommandWhat it does
/seo drift baseline <url> [--label NAME]Captures the current state of a page and stores it as a labeled snapshot in SQLite
/seo drift compare <url> [--against LABEL]Fetches current page state and diffs against the most recent (or labeled) baseline, returning a severity-tagged report
/seo drift history <url>Lists every baseline for the URL with timestamps and surfaces drift between consecutive captures

Severity Tiers

Every rule fires at one of three severity levels. The level drives both visual signal in the report and exit code in CI.

TierMeaningExamples
CRITICALSEO-breaking change. Likely traffic loss. Fix immediately.Canonical flipped to wrong URL, robots noindex added, schema block removed, hreflang return tag broken, status code changed to 4xx/5xx
WARNINGPotential impact. Investigate within a sprint.Meta description length swung beyond healthy range, h1 text changed, OG image removed, h2 hierarchy reordered, internal anchor distribution shifted
INFOAwareness only. May be intentional. Track for trend.Minor copy edits to title, image alt text rewritten, OG description tweaked, schema block reformatted but semantically equivalent

CI Integration

The skill exits non-zero on critical drift. Wire it into your deploy pipeline so a regression fails the build before it ships to production. Sample shell snippet for a typical pre-deploy + post-deploy flow:

#!/usr/bin/env bash
# pre-deploy.sh: capture current production state as a baseline
/seo drift baseline https://example.com --label "pre-deploy-$(git rev-parse --short HEAD)"

# ... deploy happens ...

# post-deploy.sh: compare new production state against the baseline we just took
/seo drift compare https://example.com --against "pre-deploy-$(git rev-parse --short HEAD)"
# exits non-zero on critical drift, fails the build, blocks the next stage

The SQLite database (.seo-drift.db) lives in the project root and should be committed to the repo so every developer and every CI run shares the same baseline history. Baselines are deterministic, so two runs against an unchanged page produce identical snapshots.

What Gets Captured

Each baseline records the SEO-critical fields below. The 17 comparison rules operate on subsets of these fields.

  • Title tag and meta description
  • Canonical URL, meta robots, and hreflang (including return tags)
  • Heading hierarchy: h1, h2, h3 arrays
  • JSON-LD schema blocks (parsed and hashed)
  • Open Graph and Twitter Card tags
  • Core Web Vitals via PageSpeed Insights (optional, skip with --skip-cwv)
  • HTTP status code
  • SHA-256 hashes of full HTML body and schema content for fast change detection
// FAQ

QUESTIONS ABOUT DRIFT

SEO drift is unintentional change to SEO-critical page elements between deploys. The title tag gets shortened by a CMS migration. The canonical points to the wrong URL after a refactor. The hreflang return tags break when a translation gets published. Schema markup gets stripped by a security middleware. Each change is small. Together they erode rankings. Drift monitoring catches them at deploy time, not three months later.
Title, meta description, h1, h2-h6 structure, canonical, hreflang (including return tags), meta robots, OG tags, Twitter Card tags, structured data (JSON-LD blocks), image alt text, internal anchor distribution. 17 comparison rules cover the high-signal regressions. Each rule has a severity: critical (immediate fix), warning (review within a sprint), info (track for trend).
Locally in SQLite (.seo-drift.db in your project root). Each baseline is timestamped with a label (e.g., 'pre-release-v2.1'). Compare against any prior baseline with /seo drift compare. The history command lists every baseline and surfaces drift between consecutive captures so you can see what changed when.
Yes. /seo drift baseline writes deterministically, /seo drift compare exits non-zero on critical drift. Wire it into a deploy hook (pre-deploy: baseline current main; post-deploy: compare against current main) and fail the build on critical drift. The skill is designed for that workflow.
Dan Colta via the AI Marketing Hub Pro Hub Challenge. Original at github.com/dancolta/seo-drift-monitor. Integrated into Claude SEO v1.9.0 with Dan's permission. Security-hardened during integration: all curl usage eliminated, SSRF protections enforced.
// RELATED SKILLS

EXPLORE MORE

VIEW ALL 23 SKILLS →

CATCH SEO REGRESSIONS
IN 30 SECONDS.

$
git clone --depth 1 https://github.com/AgriciDaniel/claude-seo.git && bash claude-seo/install.sh
VIEW ON GITHUB ALL SKILLS >