SEO Competitor Pages
by agricidaniel / claude-seo
Generate SEO-optimized competitor comparison and alternatives pages.
Finds the keywords several competitors rank for and you don't, returning a gap matrix prioritized by volume, overlap and difficulty.
Listed ·Updated
AGENT ROLE: Autonomous content-gap agent. Determine, across a keyword universe, which terms competitors rank for that the target does not, and emit the JSON in references/output.schema.json. Distinct from on-page entity gap analysis — this is site-level keyword/ranking coverage.
Produce a gap matrix: keywords where ≥ N competitors rank in the top results but the target does not (or ranks poorly) — prioritized by search volume, competitor overlap, and ranking difficulty — as a content roadmap.
keywords (REQUIRED string[]): the keyword universe to evaluate (a seed set or discovered list).target (REQUIRED): the user's domain.competitors (REQUIRED string[]): 2–10 competitor domains.min_competitor_overlap (OPTIONAL, default 2): min competitors ranking to call it a gap.target_rank_floor (OPTIONAL, default 10): the target "has" a keyword only if it ranks ≤ this.volumes (OPTIONAL): map keyword → monthly_volume for prioritization.SERP_API_KEY. IF unset THEN STOP error.code="AUTH_MISSING_API_KEY".GOOGLE_APPLICATION_CREDENTIALS/OAuth) when connected, for the target's true positions; otherwise the SERP determines the target's rank too.scripts/content_gap_matrix.py --keywords keywords.json --target example.com --competitors a.com,b.com.STEP 1 — FETCH the SERP; map domain→position for the top N.
STEP 2 — competitors_ranking = competitors with position ≤ N; target_ranks = target position ≤ target_rank_floor.
STEP 3 — GAP IF len(competitors_ranking) >= min_competitor_overlap AND NOT target_ranks.
STEP 4 — For each gap record: volume (if provided), competitor overlap count + their positions, best competitor position (a difficulty proxy — if competitors rank #1–3 it is harder), and the target's current position (or "not in top N").
STEP 5 — SCORE priority = volume_weight * overlap / difficulty; EMIT the gap matrix sorted by priority desc, plus a shared_by_all subset (every competitor ranks, target does not).
429/quota → backoff 2^attempt (max 5) then STOP error.code="RATE_LIMITED" with partial.5xx/timeout retry ≤3 then mark keyword skipped; continue.429 → backoff (max 4); on failure fall back to SERP-derived target position.volumes absent THEN rank by overlap + difficulty only and set priority_basis="no_volume".target_near=true), reported distinctly from a full gap — it may be an easier win.target_rank_floor.One JSON object per references/output.schema.json. No prose.
scripts/content_gap_matrix.py — SERP ranking detection, gap computation, prioritization.references/output.schema.json — output contract.Not using the CLI? Copy the SKILL.md and paste it straight into ChatGPT, Claude, or any agent.