Content Decay Predictor
Builds per-URL clicks and impressions time-series from Search Console, fits a trend to detect sustained decline and inf…
Updated
Use this skill
$ npx skills add seoskills.sh/content-decay-predictorAbout this skill
Content Decay Predictor is a Content and Writing skill for AI agents, published in the seoskills.sh catalog. Reach for it when your work involves content briefs from SERP intent, editorial planning, and SEO writing. Install it with one command and it runs inside your own agent, so the work happens in your workflow, not a separate SEO tool.
SKILL.md
Content Decay Predictor
AGENT ROLE: Autonomous content-decay agent. Model each URL's organic trajectory, classify decay, project future loss, and emit the JSON in references/output.schema.json. Distinguish genuine sustained decay from seasonality and one-off dips.
OBJECTIVE
Identify URLs on a sustained downward organic trajectory, estimate how much more traffic they will lose if untouched, and rank them so refresh effort targets the biggest recoverable losses.
INPUTS
site_url(REQUIRED): verified GSC property.lookback_weeks(OPTIONAL, default 26): history window (needs ≥ 12 for a stable trend).min_baseline_clicks(OPTIONAL, default 20): weekly-clicks floor at peak to consider a URL worth analyzing.horizon_weeks(OPTIONAL, default 8): projection horizon.
AUTHENTICATION (Search Console API)
- REQUIRE
GOOGLE_APPLICATION_CREDENTIALS(SA) OR OAuth, scopehttps://www.googleapis.com/auth/webmasters.readonly.- IF absent THEN STOP
error.code="AUTH_MISSING_CREDENTIALS".
- IF absent THEN STOP
- Verified user on
site_url. IF403THEN STOPerror.code="AUTH_NO_SITE_ACCESS". - Endpoint:
searchAnalytics/querywithdimensions=["page","date"], weekly-aggregated client-side.
EXPECTED TOOL CALLS
- Run
scripts/decay.py --site {site_url} --weeks 26. - Fetch daily
page×dateclicks/impressions for the window (paged), aggregate to weekly per URL.
PROCEDURE (deterministic, per URL)
STEP 1 — BUILD the weekly clicks series over lookback_weeks.
STEP 2 — QUALIFY: skip URLs whose peak weekly clicks < min_baseline_clicks (too small to matter) → skipped.
STEP 3 — DESEASONALIZE: subtract a 4-week trailing seasonal component (or use a robust trend via Theil–Sen slope, which resists outliers).
STEP 4 — CLASSIFY:
peak_to_recent = mean(last 4 weeks) / max(rolling 4-week mean).decayingIF Theil–Sen slope < 0 ANDpeak_to_recent <= 0.7(lost ≥30% from peak) sustained ≥ 4 weeks.inflection_week= the week the sustained decline began. STEP 5 — PROJECT: extend the slopehorizon_weeksforward (floored at 0);projected_additional_loss = current_weekly − projected_weekly_at_horizon, summed over the horizon. STEP 6 — SCORErefresh_priority = projected_additional_loss(biggest recoverable loss first); EMIT decaying URLs sorted desc.
RATE LIMITS & ERROR HANDLING
- GSC
429/RESOURCE_EXHAUSTED→ backoff2^attempt(max 5) then STOPerror.code="RATE_LIMITED". - Only
finaldataStaterows; exclude the trailing incomplete week. - Large sites: cap analyzed URLs at the top 2000 by total clicks; note
truncated=true.
MISSING / INSUFFICIENT DATA
- IF a URL has < 12 weeks of data THEN mark
insufficient_historyand exclude from decay classification (cannot separate decay from noise). - Seasonality guard: a decline that matches a prior-year same-season dip is flagged
seasonal_suspected=true, notdecaying, when multi-year data exists; otherwise note the caveat. - Never predict negative traffic; floor projections at 0.
OUTPUT
One JSON object per references/output.schema.json. No prose.
FILES
scripts/decay.py— GSC weekly series, Theil–Sen trend, decay classification + projection.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
Install into your agent
More in Content and Writing
brief
Produce an editor-ready content brief for a target keyword or topic. Use when the user asks for a content brief, writing guidelines, article outline, SEO brief, what to include in a blog post, or how to structure content for a keyword. For choosing which topics to write about, see find-keywords. For a full site-wide SEO audit, see audit.
seo-content
Content quality and E-E-A-T analysis with AI citation readiness assessment, plus last-mile draft cleanup (AI-typical phrasing and invisible Unicode watermark characters). Use when user says "content quality", "E-E-A-T", "content analysis", "readability check", "thin content", "content audit", "humanize", "AI phrasing", "remove watermarks", or "invisible characters".
seo-content-brief
Generate competitive SEO content briefs with per-section word counts, competitor scoring, keyword density guidance, and page-type templates. Supports both new page briefs and improve-existing-page briefs. Use when user says "content brief", "write a brief", "content outline", "blog brief", "service page brief", "brief for", "writing brief", "content plan", or "outline for".
seo-content-optimizer
No description available.
seo-content-auditor
Analyzes provided content for quality, E-E-A-T signals, and SEO best practices. Scores content and provides improvement recommendations based on established guidelines.
Content Freshness Auditor
Crawls content and detects staleness signals — old publish and modified dates, outdated years and statistics, deprecate…