{"success":true,"name":"seo-drift","description":">","category":"unitary","path":"unitary/seo-drift/SKILL.md","file":"SKILL.md","content":"---\nname: seo-drift\ndescription: >\n  SEO drift monitoring: capture baselines of SEO-critical elements, detect changes,\n  and track regressions over time. Git for SEO: baseline, diff, and track changes\n  to your on-page SEO. Use when user says \"SEO drift\", \"baseline\", \"track changes\",\n  \"did anything break\", \"SEO regression\", \"compare SEO\", \"before and after\",\n  \"monitor SEO changes\", or \"deployment check\".\nuser-invocable: true\nargument-hint: \"baseline|compare|history <url>\"\nlicense: MIT\nmetadata:\n  author: AgriciDaniel\n  original_author: \"Dan Colta (Pro Hub Challenge)\"\n  version: \"2.3.1\"\n  category: seo\n---\n> Imported from [PRIVATE_HOST] `~/unitary/agents/artisto/skills-off/claude-seo-rest/seo-drift`. Paths are relative to `[PRIVATE_HOST]:[PATH]`; run commands there via `ssh [PRIVATE_HOST] 'cd ~/unitary && ...'`. Owner send rules from skill i7-remote-ops still apply.\n\n\n# SEO Drift Monitor (April 2026)\n\nGit for your SEO. Capture baselines, detect regressions, track changes over time.\n\n---\n\n## Commands\n\n| Command | Purpose |\n|---------|---------|\n| `/seo drift baseline <url>` | Capture current SEO state as a \"known good\" snapshot |\n| `/seo drift compare <url>` | Compare current page state to stored baseline |\n| `/seo drift history <url>` | Show change history and past comparisons |\n\n---\n\n## What It Captures\n\nEvery baseline records these SEO-critical elements:\n\n| Element | Field | Source |\n|---------|-------|--------|\n| Title tag | `title` | `parse_html.py` |\n| Meta description | `meta_description` | `parse_html.py` |\n| Canonical URL | `canonical` | `parse_html.py` |\n| Robots directives | `meta_robots` | `parse_html.py` |\n| H1 headings | `h1` (array) | `parse_html.py` |\n| H2 headings | `h2` (array) | `parse_html.py` |\n| H3 headings | `h3` (array) | `parse_html.py` |\n| JSON-LD schema | `schema` (array) | `parse_html.py` |\n| Open Graph tags | `open_graph` (dict) | `parse_html.py` |\n| Core Web Vitals | `cwv` (dict) | `pagespeed_check.py` |\n| HTTP status code | `status_code` | `fetch_page.py` |\n| HTML content hash | `html_hash` (SHA-256) | Computed |\n| Schema content hash | `schema_hash` (SHA-256) | Computed |\n\n---\n\n## How Comparison Works\n\nThe comparison engine applies **17 rules across 3 severity levels**. Load\n`references/comparison-rules.md` for the full rule set with thresholds,\nrecommended actions, and cross-skill references.\n\n### Severity Levels\n\n| Level | Meaning | Response Time |\n|-------|---------|---------------|\n| **CRITICAL** | SEO-breaking change, likely traffic loss | Immediate |\n| **WARNING** | Potential impact, needs investigation | Within 1 week |\n| **INFO** | Awareness only, may be intentional | Review at convenience |\n\n---\n\n## Storage\n\nAll data is stored locally in SQLite:\n\n```\n~/.cache/claude-seo/drift/baselines.db\n```\n\n### Tables\n\n- **baselines**: Captured snapshots with all SEO elements\n- **comparisons**: Diff results with triggered rules and severities\n\nURL normalization ensures consistent matching: lowercase scheme/host, strip\ndefault ports (80/443), sort query parameters, remove UTM parameters, strip\ntrailing slashes.\n\n---\n\n## Command: `baseline`\n\nCaptures the current state of a page and stores it.\n\n**Steps:**\n1. Validate URL (SSRF protection via `google_auth.validate_url()`)\n2. Fetch page via `\"${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo\" run fetch_page.py <URL>`\n3. Parse HTML via `\"${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo\" run parse_html.py <URL>`\n4. Optionally fetch CWV via `\"${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo\" run pagespeed_check.py <URL>` (use `--skip-cwv` to skip)\n5. Hash HTML body and schema content (SHA-256)\n6. Store snapshot in SQLite\n\n**Execution:**\n```bash\n\"${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo\" run drift_baseline.py <url>\n\"${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo\" run drift_baseline.py <url> --skip-cwv\n```\n\n**Output:** JSON with baseline ID, timestamp, URL, and summary of captured elements.\n\n---\n\n## Command: `compare`\n\nFetches the current page state and diffs it against the most recent baseline.\n\n**Steps:**\n1. Validate URL\n2. Load most recent baseline from SQLite (or specific `--baseline-id`)\n3. Fetch and parse current page state\n4. Run all 17 comparison rules\n5. Classify findings by severity\n6. Store comparison result\n7. Output JSON diff report\n\n**Execution:**\n```bash\n\"${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo\" run drift_compare.py <url>\n\"${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo\" run drift_compare.py <url> --baseline-id 5\n\"${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo\" run drift_compare.py <url> --skip-cwv\n```\n\n**Output:** JSON with all triggered rules, old/new values, severity, and actions.\n\nAfter comparison, offer to generate an HTML report:\n```bash\n\"${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo\" run drift_report.py <comparison_json_file> --output drift-report.html\n```\n\n---\n\n## Command: `history`\n\nShows all baselines and comparisons for a URL.\n\n**Execution:**\n```bash\n\"${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo\" run drift_history.py <url>\n\"${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo\" run drift_history.py <url> --limit 10\n```\n\n**Output:** JSON array of baselines (newest first) with timestamps and comparison summaries.\n\n---\n\n## Cross-Skill Integration\n\nWhen drift is detected, recommend the appropriate specialized skill:\n\n| Finding | Recommendation |\n|---------|----------------|\n| Schema removed or modified | Run `/seo schema <url>` for full validation |\n| CWV regression | Run `/seo technical <url>` for performance audit |\n| Title or meta description changed | Run `/seo page <url>` for content analysis |\n| Canonical changed or removed | Run `/seo technical <url>` for indexability check |\n| Noindex added | Run `/seo technical <url>` for crawlability audit |\n| H1/heading structure changed | Run `/seo content <url>` for E-E-A-T review |\n| OG tags removed | Run `/seo page <url>` for social sharing analysis |\n| Status code changed to error | Run `/seo technical <url>` for full diagnostics |\n\n---\n\n## Error Handling\n\n| Scenario | Action |\n|----------|--------|\n| URL unreachable | Report error from `fetch_page.py`. Do not guess state. Suggest user verify URL. |\n| No baseline exists for URL | Inform user and suggest running `baseline` first. |\n| SSRF blocked (private IP) | Report `validate_url()` rejection. Never bypass. |\n| SQLite database missing | Auto-create on first use. No error. |\n| CWV fetch fails (no API key) | Store `null` for CWV fields. Skip CWV rules during comparison. |\n| Page returns 4xx/5xx | Still capture as baseline (status code IS a tracked field). |\n| Multiple baselines exist | Use most recent unless `--baseline-id` specified. |\n\n---\n\n## Security\n\n- **All URL fetching** goes through `\"${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo\" run fetch_page.py`, which enforces SSRF protection\n  (blocks private IPs, loopback, reserved ranges, GCP metadata endpoints)\n- **No curl, no subprocess HTTP calls** -- only the project's validated fetch pipeline\n- **All SQLite queries** use parameterized placeholders (`?`), never string interpolation\n- **TLS always verified** -- no `verify=False` anywhere in the pipeline\n\n---\n\n## Typical Workflows\n\n### Pre/Post Deployment Check\n```\n/seo drift baseline https://example.com     # Before deploy\n# ... deploy happens ...\n/seo drift compare https://example.com      # After deploy\n```\n\n### Ongoing Monitoring\n```\n/seo drift baseline https://example.com     # Initial capture\n# ... weeks later ...\n/seo drift compare https://example.com      # Check for drift\n/seo drift history https://example.com      # Review all changes\n```\n\n### Investigating a Traffic Drop\n```\n/seo drift compare https://example.com      # What changed?\n/seo drift history https://example.com      # When did it change?\n```\n","linked_files":[],"origin":"brimind","owner_id":null,"source":"router"}