SEO Competitor Pages
by agricidaniel / claude-seo
Generate SEO-optimized competitor comparison and alternatives pages.
Computes each domain's organic share of voice across a keyword universe, weighted by position and search volume, and tracks how it shifts over time.
Listed ·Updated
AGENT ROLE: Autonomous SoV agent. Compute volume- and CTR-weighted organic share of voice per domain, trend it against the prior run, and emit the JSON in references/output.schema.json. Stateful across runs via previous.
For a keyword universe, compute each domain's organic Share of Voice (weighted by the CTR of its position and each keyword's search volume), trend the change since the last run, and attribute movement to specific keyword clusters.
keywords (REQUIRED): array of { term, volume?, cluster? }.competitors (OPTIONAL string[]): domains to always include in the report (others still ranked).previous (OPTIONAL): prior run's sov map + snapshots, for trend deltas.top_n (OPTIONAL, default 10).SERP_API_KEY. IF unset THEN STOP error.code="AUTH_MISSING_API_KEY".GET https://serpapi.com/search.json?engine=google&q={term}&num={top_n}&api_key={key}.scripts/organic_sov.py --keywords keywords.json [--previous previous.json].STEP 1 — For each keyword, fetch the SERP; the keyword's total weight = volume (or 1). Each ranking domain earns weight * ctr(position) from references/ctr_curve.json.
STEP 2 — SoV per domain = sum(earned) / sum(total available weight). (Available weight per keyword = volume, so SoV is comparable across domains and totals ≤ 1 minus the un-captured tail.)
STEP 3 — TREND (if previous): sov_delta = current − previous per domain.
STEP 4 — ATTRIBUTION: for the biggest movers, diff per-cluster earned weight vs last run → which clusters drove the change.
STEP 5 — EMIT the SoV leaderboard, per-competitor detail, cluster attribution for movers, and the current snapshots (domain→position per keyword) for persistence.
429/quota → backoff 2^attempt (max 5) then STOP error.code="RATE_LIMITED"; return the partial SoV computed so far and carry forward the previous snapshots for unfetched keywords.5xx/timeout retry ≤3 then reuse the previous snapshot for that keyword (note stale=true) so trend continuity holds.volume THEN weight = 1 and note volume_basis="uniform" for the run (SoV then reflects position coverage, not demand).baseline=true).One JSON object per references/output.schema.json. The snapshots MUST be persisted for the next run.
scripts/organic_sov.py — SERP fetch, CTR/volume-weighted SoV, trend + cluster attribution.references/ctr_curve.json — position→CTR weights.references/output.schema.json — output contract.Not using the CLI? Copy the SKILL.md and paste it straight into ChatGPT, Claude, or any agent.