seoskills.sh
Catalog/seoskills/internal

GSC CTR Anomaly Detector

Pulls query-level performance from Search Console and flags queries whose actual click-through rate deviates significan…

0 installs

Use this skill

$ npx skills add seoskills.sh/gsc-ctr-anomaly-detector
Repository
seoskills/internal
GitHub stars
License

SKILL.md

---
name: GSC CTR Anomaly Detector
description: Pulls query-level performance from Search Console and flags queries whose actual click-through rate deviates significantly from the expected CTR for their average position, isolating title, meta, or SERP-feature causes. Use when the user asks why clicks are low despite rankings, wants CTR optimization targets, or title/meta rewrite priorities.
category: keyword-research
---

# GSC CTR Anomaly Detector

AGENT ROLE: Autonomous CTR-diagnostics agent. Compare each query's real CTR to the position-expected benchmark, flag significant deviations, and emit the JSON in `references/output.schema.json`.

## OBJECTIVE
Find queries that under- or over-perform their position's expected CTR, quantify the click opportunity, and attribute likely cause — so title/meta rewrites are prioritized by impact, not guesswork.

## INPUTS
- `site_url` (REQUIRED): verified GSC property (`sc-domain:...` or URL-prefix).
- `start_date`/`end_date` (OPTIONAL): default last 28 complete days (GSC lag ~3 days; never `today`).
- `min_impressions` (OPTIONAL, default 100): demand floor to suppress noise.
- `deviation_sigma` (OPTIONAL, default 2.0): robust-z threshold on the CTR residual.
- `ctr_curve` (OPTIONAL): a property-specific position→CTR curve; default `references/ctr_curve.json`.

## AUTHENTICATION (Search Console API)
1. REQUIRE `GOOGLE_APPLICATION_CREDENTIALS` (SA) OR OAuth, scope `https://www.googleapis.com/auth/webmasters.readonly`.
   - IF absent THEN STOP `error.code="AUTH_MISSING_CREDENTIALS"`.
2. Identity MUST be a verified user on `site_url`. IF `403` THEN STOP `error.code="AUTH_NO_SITE_ACCESS"`.
3. Endpoint: `POST https://searchconsole.googleapis.com/webmasters/v3/sites/{urlEncoded}/searchAnalytics/query`.

## EXPECTED TOOL CALLS
- Run `scripts/ctr_anomaly.py --site {site_url} --min-impr {n} --sigma {x}`.
- Query with `dimensions=["query","page"]`, `dataState="final"`, paged via `startRow`.

## PROCEDURE (deterministic)
STEP 1 — FETCH query/page rows (paged).
STEP 2 — FILTER to `impressions >= min_impressions`.
STEP 3 — For each row: `expected_ctr = curve[round(position)]`; `residual = actual_ctr − expected_ctr`.
STEP 4 — Build the residual distribution across all rows; compute robust center (median) + MAD; `robust_z = (residual − median) / (1.4826*MAD)`.
STEP 5 — FLAG:
  - `underperformer` IF `robust_z <= −deviation_sigma` → `opportunity_clicks = round(impressions * (expected_ctr − actual_ctr))` (positive).
  - `overperformer` IF `robust_z >= +deviation_sigma` → study as a winning title/meta pattern to replicate.
STEP 6 — ATTRIBUTE (heuristic, per underperformer): fetch the page's `<title>`/meta description (≤1 GET, honor robots); IF the query's head terms are absent from the title THEN cause hint `title_mismatch`; IF position ≤ 3 but CTR low AND the SERP likely has features THEN `serp_feature_suppression`; else `weak_snippet`.
STEP 7 — EMIT underperformers sorted by `opportunity_clicks` desc; include a small `overperformers` list.

## RATE LIMITS & ERROR HANDLING
- GSC: `429`/`RESOURCE_EXHAUSTED` → backoff `2^attempt` (max 5) then STOP `error.code="RATE_LIMITED"`.
- Only trust `final` `dataState` rows.
- On-page title fetch failure → `cause="unknown"` for that row; never block the run.

## MISSING / INSUFFICIENT DATA
- IF 0 rows above `min_impressions` THEN `status="no_data"`, empty arrays, no error.
- IF `position > 20` THEN clamp expected_ctr to the 20+ bucket; do not extrapolate.
- Residual stats require ≥ 30 rows for stability; below that set `confidence="low"` and widen sigma by +0.5.

## OUTPUT
One JSON object per `references/output.schema.json`. No prose.

## FILES
- `scripts/ctr_anomaly.py` — GSC client, residual + robust-z scoring, cause attribution.
- `references/ctr_curve.json` — position→expected-CTR benchmark.
- `references/output.schema.json` — output contract.

Not using the CLI? Copy the SKILL.md and paste it straight into ChatGPT, Claude, or any agent.

Embed a badge

seoskills.sh install badge

More in Keyword Research

Keyword Researchcalm-north/seojuice-skills

find-keywords

Build a prioritized keyword list for a website, topic, or campaign. Use when the user asks about keyword research, finding keywords to target, building a keyword list, search demand, keyword difficulty, intent mapping, or which keywords to prioritize. For writing content around keywords, see brief. For grouping keywords into clusters, see build-clusters.

6.9K installs
Keyword Researchagricidaniel/claude-seo

seo-plan

Strategic SEO planning for new or existing websites. Industry-specific templates, competitive analysis, content strategy, and implementation roadmap. Use when user says "SEO plan", "SEO strategy", "SEO planning", "content strategy", "keyword strategy", "content calendar", "site architecture", or "SEO roadmap".

5.4K installs
Keyword Researchagricidaniel/claude-seo

seo-cluster

SERP-based semantic topic clustering for content architecture planning. Groups keywords by actual Google SERP overlap (not text similarity), designs hub-and-spoke content clusters with internal link matrices, and generates interactive visualizations. Optionally executes content creation if claude-blog is installed. Use when user says "topic cluster", "content cluster", "semantic clustering", "pillar page", "hub and spoke", "content architecture", "keyword grouping", or "cluster plan".

5K installs
Keyword Researchagricidaniel/claude-seo

seo-sxo

Search Experience Optimization: reads Google SERPs backwards to detect page-type mismatches, derives user stories from search intent signals, and scores pages from multiple persona perspectives. Identifies why well-optimized pages fail to rank by analyzing what Google rewards for each keyword. Use when user says "SXO", "search experience", "page type mismatch", "SERP analysis", "user story", "persona scoring", "why isn't my page ranking", "intent mismatch", or "wireframe".

4.4K installs
Keyword Researchcalm-north/seojuice-skills

target-serp

Identify and capture SERP features for target keywords — featured snippets, People Also Ask boxes, knowledge panels, and rich results. Use when the user asks about featured snippets, position zero, PAA optimization, rich results, schema markup for SERP features, or how to get more SERP real estate.

2K installs
Keyword Researchnexscope-ai/amazon-skills

amazon-keyword-research

Amazon keyword research and market opportunity analysis for sellers. Retrieve autocomplete suggestions (long-tail keywords), analyze competitor landscape, and assess market opportunity for any keyword on 12 Amazon marketplaces (US/UK/DE/FR/IT/ES/JP/CA/AU/IN/MX/BR). No API key required. Make sure to use this skill whenever the user mentions Amazon product research, finding products to sell on Amazon, Amazon keyword ideas, niche analysis, competition analysis for Amazon, market opportunity on Amazon, comparing Amazon keywords, evaluating whether a product is worth selling, Amazon autocomplete da

1.3K installs