Rank which decaying pages to rewrite by edit age and fresher rivals

Monthly: pages losing Search Console clicks, how long since each was edited, and whether a fresher competitor page now outranks it, ranked by payoff.

Runs
2nd of the month at 9:00
Posts
Asks you

From your apps to your board

How the skill works: your agent reads pages that lost clicks from Google Search Console; each page's last edit from GitHub; who outranks you now from Ahrefs; search console property, repository, url to source file pattern, country for the serp check from What you tell it, 2nd of the month at 9:00, and gives you a question for you and a telegram ping and the report in the chat.

Reads

  • Google Search ConsolePages that lost clicks
  • GitHubEach page's last edit
  • AhrefsWho outranks you now
  • What you tell itSearch Console property, Repository, URL to source file pattern, Country for the SERP check
reads
Your agentClaude Code, Codex, Cursor or Gemini2nd of the month at 9:00
posts

You get

  • A question for youOn your board, answered with a tap
  • A Telegram pingOnly when it needs your answer, if you connect Telegram
  • The report in the chatEvery run, with or without Briefkin

What you get

  • Decaying pages that lost 30% or more of their clicks against three months ago.
  • Days since last edit for each, from the repo or the CMS.
  • Fresher rivals: the competitor page above you and when it was updated.
  • Ranked rewrite list: old pages with a fresh rival first.
  • The ask: which rewrites to brief.

The card on the right is a sample. Yours shows your own numbers and updates in place every run.

What lands on your board

example.comDecaying pages worth rewriting: Search Console, your repo and Ahrefs · Claude Code

9 decaying pages untouched for 300+ days; fresher rivals beat 5

Which rewrites should I brief first?

9 pages lost 2,380 clicks against the same 28 days three months ago, and none has been edited in 300 days or more. On 5 of them a competitor page updated in September now ranks above you.

PageClicks thenClicks nowDays since editFresher page above you
/blog/invoice-template2,1401,320412ledgerly.example, Sep 18
/blog/what-is-net-30980610530billpath.example, Sep 9
/blog/late-payment-email760430365ledgerly.example, Sep 25
/blog/proforma-vs-commercial-invoice540300610tradedocs.example, Sep 2
/blog/how-to-invoice-as-freelancer470280338gigbooks.example, Sep 30
/blog/invoice-numbering390250702none newer
/blog/receipt-vs-invoice310190455none newer
/glossary/accounts-receivable260170389none newer
/blog/recurring-invoices-guide220140301none newer
Resolve
An example with made-up numbers. Your agent posts your real ones.

What it does

A list of pages losing clicks does not tell you which to rewrite. A page edited last month that slipped probably needs patience; a page nobody has touched in a year, now sitting under a competitor's article from three weeks ago, needs a rewrite. That difference lives in your repository's history and in today's results page, not in Search Console.

Once a month the agent finds the pages that lost clicks against three months earlier, looks up when each page's source file was last edited, and checks the current top results for the page's main query in Ahrefs. The card ranks the rewrites that are likely to pay: old pages that a recently updated rival has overtaken.

How it works

  1. 1Find pages that lost clicks

    Call searchanalytics.query with dimensions: ["page"] for the 28 days ending 2 days ago and for the 28 days ending 91 days earlier (13 weeks back, so weekdays line up). Keep pages down 30% or more and by at least 60 clicks. For those, query dimensions: ["page", "query"] on the earlier window and take the query with the most clicks as the page's main query.

  2. 2Find each page's last edit

    Map the URL path to its source file with the pattern in settings (for example /blog/<slug> to content/blog/<slug>.mdx), then run git log -1 --format=%cs -- <file> in a full clone or call GET /repos/{owner}/{repo}/commits?path=<file>&per_page=5. Skip commits whose message matches format|lint|prettier|rename|bump, which touch files without changing the content. For a CMS, read its modified date instead (WordPress: modified from /wp-json/wp/v2/posts?slug=<slug>).

  3. 3Check who outranks you now

    For each main query, call GET /v3/serp-overview/serp-overview?keyword=<query>&country=us&top_positions=10&select=position,url,title,domain_rating,traffic,update_date. Find your URL and keep the results above it; fetch each of those pages and read dateModified or datePublished from its JSON-LD, or article:modified_time, as the competitor's last update.

  4. 4

    4Join and rank the rewrites

    Join on the normalized URL path (lowercase, no query string or trailing slash): Search Console page to source file, and Search Console page to your row in the Ahrefs results. Rank first the pages untouched for 300 days or more with a competitor above them updated in the last 90 days, then the other untouched pages, each group by clicks lost. Pages with no source file are listed as "edit date unknown"; pages missing from the Ahrefs top 10 as "out of the top 10".

  5. 5

    5Ask which to brief

    Post an action card with the ranked list: page, clicks then and now, days since the last edit, and the fresher page above it with its date. Offer to draft a rewrite brief for the pages picked, built from the competitor pages and the queries the page lost.

  6. Post it to the board

    With BRIEFKIN_TOKEN set, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.

Install and run it

Pick your agent, where the data comes from and how to schedule it; the commands below follow.

Agent
Data
Schedule
  1. Install the skill

    One command. It puts the SKILL.md in ~/.claude/skills and in ~/.agents/skills, which Codex, Cursor, Gemini CLI, Copilot CLI and OpenCode read too.

    shellcurl -fsSL https://briefkin.dev/skills/google-search-console-decay-rewrite-list/install | sh
  2. Run it

    Ask Claude Code:

    promptRun the google-search-console-decay-rewrite-list skill

    Or paste the prompt instead of installing:

    promptRank which decaying pages on my site to rewrite. From the Search Console API, compare clicks by page for the last 28 days with the 28 days ending 91 days earlier; keep pages down 30%+ and 60+ clicks, and take each page's main query from the earlier window. Map each URL to its source file in my repo (<pattern>) and get the last real content edit from git log, skipping formatting-only commits. For each main query, get the Ahrefs SERP overview (top 10, US) and, for the pages above mine, read their dateModified or datePublished. Rank pages untouched for 300+ days with a competitor above them updated in the last 90 days first, then the rest, by clicks lost. Show clicks then and now, days since edit and the fresher page with its date, then ask me which rewrites to brief.
  3. Put it on a schedule

    2nd of the month at 9:00, from cron on any machine where Claude Code is signed in:

    crontab0 9 2 * * claude -p "Run the google-search-console-decay-rewrite-list skill"

    Add it with crontab -e. A laptop asleep at that time runs it when it wakes if you use launchd or Task Scheduler instead; GitHub Actions works for the API route.

  4. Send it to your board

    Connect Briefkin once with curl -fsSL https://briefkin.dev/install | sh and every run lands on your board as a question for you. How setup works

View the SKILL.mdRaw file
SKILL.md---
name: google-search-console-decay-rewrite-list
description: "Monthly: pages losing Search Console clicks, how long since each was edited, and whether a fresher competitor page now outranks it, ranked by payoff. Use when the user asks for this, or when it runs on a schedule."
---

# Decaying pages worth rewriting: Search Console, your repo and Ahrefs

Monthly: pages losing Search Console clicks, how long since each was edited, and whether a fresher competitor page now outranks it, ranked by payoff.

A list of pages losing clicks does not tell you which to rewrite. A page edited last month that slipped probably needs patience; a page nobody has touched in a year, now sitting under a competitor's article from three weeks ago, needs a rewrite. That difference lives in your repository's history and in today's results page, not in Search Console.

Once a month the agent finds the pages that lost clicks against three months earlier, looks up when each page's source file was last edited, and checks the current top results for the page's main query in Ahrefs. The card ranks the rewrites that are likely to pay: old pages that a recently updated rival has overtaken.

## Two ways to get the data

Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.

## Route A: API or MCP server

### What you need

- A pattern that maps URLs to source files in the repo (or a CMS with a modified date), and read access to the repo through `gh`, the GitHub MCP server or a full local clone (a shallow clone gives wrong dates).
- Read access to the Search Console property, and Ahrefs API v3 access (MCP server or `AHREFS_API_KEY`); one SERP overview per decaying page.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **Find pages that lost clicks** (Google Search Console): Call `searchanalytics.query` with `dimensions: ["page"]` for the 28 days ending 2 days ago and for the 28 days ending 91 days earlier (13 weeks back, so weekdays line up). Keep pages down 30% or more and by at least 60 clicks. For those, query `dimensions: ["page", "query"]` on the earlier window and take the query with the most clicks as the page's main query.
2. **Find each page's last edit** (GitHub): Map the URL path to its source file with the pattern in settings (for example `/blog/<slug>` to `content/blog/<slug>.mdx`), then run `git log -1 --format=%cs -- <file>` in a full clone or call `GET /repos/{owner}/{repo}/commits?path=<file>&per_page=5`. Skip commits whose message matches `format|lint|prettier|rename|bump`, which touch files without changing the content. For a CMS, read its modified date instead (WordPress: `modified` from `/wp-json/wp/v2/posts?slug=<slug>`).
3. **Check who outranks you now** (Ahrefs): For each main query, call `GET /v3/serp-overview/serp-overview?keyword=<query>&country=us&top_positions=10&select=position,url,title,domain_rating,traffic,update_date`. Find your URL and keep the results above it; fetch each of those pages and read `dateModified` or `datePublished` from its JSON-LD, or `article:modified_time`, as the competitor's last update.
4. **Join and rank the rewrites**: Join on the normalized URL path (lowercase, no query string or trailing slash): Search Console page to source file, and Search Console page to your row in the Ahrefs results. Rank first the pages untouched for 300 days or more with a competitor above them updated in the last 90 days, then the other untouched pages, each group by clicks lost. Pages with no source file are listed as "edit date unknown"; pages missing from the Ahrefs top 10 as "out of the top 10".
5. **Ask which to brief**: Post an action card with the ranked list: page, clicks then and now, days since the last edit, and the fresher page above it with its date. Offer to draft a rewrite brief for the pages picked, built from the competitor pages and the queries the page lost.

## Route B: the browser

### What you need

- Signed in to Search Console, to GitHub with read access to the repo (or to your CMS), and to Ahrefs on a plan with Keywords Explorer.

If something is missing, say what and stop; do not invent numbers.

### Steps

Start at https://search.google.com/search-console/performance/search-analytics. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.

1. **Compare clicks with three months ago**: Pick the property, open Date > Compare > Custom, and set the last 28 days against the 28 days ending 91 days earlier. On the Pages tab, sort by the Clicks difference and keep pages down 30% or more and by at least 60 clicks.
2. **Note each page's main query**: Click each page, open the Queries tab, and note the query with the most clicks in the earlier period. Remove the page filter before the next one.
3. **Read the last edit date**: On GitHub, open `https://github.com/<owner>/<repo>/commits/main/<path to file>` for each page's source file and note the date of the last commit that changed the text, skipping formatting or rename commits. In a CMS, read the page's last modified date.
4. **Check the results above you**: In Ahrefs, open Keywords Explorer, enter the main query, and scroll to the SERP overview. Find your page, open each result above it and note its updated or published date.
5. **Rank and ask**: Put pages untouched for 300 days or more with a rival above them updated in the last 90 days first, then the rest, by clicks lost. Ask which rewrites to brief.

Note: Competitor dates come from what each page shows, which some sites hide or refresh without real changes; treat a missing or suspicious date as unknown. Ten pages take about 20 minutes of clicking; past that the API route is the better one.

## The report

- **Decaying pages** that lost 30% or more of their clicks against three months ago.
- **Days since last edit** for each, from the repo or the CMS.
- **Fresher rivals**: the competitor page above you and when it was updated.
- **Ranked rewrite list**: old pages with a fresh rival first.
- The ask: which rewrites to brief.

## Post it to Briefkin

When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.

```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
  -H "authorization: Bearer $BRIEFKIN_TOKEN" \
  -H "content-type: application/json" \
  -d @- <<'JSON'
{
  "v": 1,
  "event_id": "google-search-console-decay-rewrite-list/<date of this run, e.g. 2026-10-16>",
  "item_key": "google-search-console-decay-rewrite-list",
  "project": "example.com",
  "source": "Decaying pages worth rewriting: Search Console, your repo and Ahrefs skill",
  "kind": "action",
  "title": "9 decaying pages untouched for 300+ days; fresher rivals beat 5",
  "summary": "**9 pages** lost 2,380 clicks against the same 28 days three months ago, and none has been edited in 300 days or more. On **5 of them** a competitor page updated in September now ranks above you.",
  "action": {
    "request": "Which rewrites should I brief first?",
    "options": [
      "Brief the top 5",
      "Only /blog/invoice-template",
      "Show the lost queries",
      "Skip this month"
    ]
  },
  "widget": [
    {
      "type": "Table",
      "props": {
        "columns": [
          "Page",
          "Clicks then",
          "Clicks now",
          "Days since edit",
          "Fresher page above you"
        ],
        "align": [
          "left",
          "right",
          "right",
          "right",
          "left"
        ],
        "rows": [
          [
            "/blog/invoice-template",
            2140,
            1320,
            412,
            "ledgerly.example, Sep 18"
          ],
          [
            "/blog/what-is-net-30",
            980,
            610,
            530,
            "billpath.example, Sep 9"
          ],
          [
            "/blog/late-payment-email",
            760,
            430,
            365,
            "ledgerly.example, Sep 25"
          ],
          [
            "/blog/proforma-vs-commercial-invoice",
            540,
            300,
            610,
            "tradedocs.example, Sep 2"
          ],
          [
            "/blog/how-to-invoice-as-freelancer",
            470,
            280,
            338,
            "gigbooks.example, Sep 30"
          ],
          [
            "/blog/invoice-numbering",
            390,
            250,
            702,
            "none newer"
          ],
          [
            "/blog/receipt-vs-invoice",
            310,
            190,
            455,
            "none newer"
          ],
          [
            "/glossary/accounts-receivable",
            260,
            170,
            389,
            "none newer"
          ],
          [
            "/blog/recurring-invoices-guide",
            220,
            140,
            301,
            "none newer"
          ]
        ]
      }
    }
  ]
}
JSON
```

Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.

## Run it on a schedule

Suggested: 2nd of the month at 9:00 (`0 9 2 * *`). From cron, with the agent signed in on that machine:

```bash
0 9 2 * * claude -p "Run the google-search-console-decay-rewrite-list skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```

Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/google-search-console-decay-rewrite-list#schedule

Source: https://briefkin.dev/skills/google-search-console-decay-rewrite-list

What your agent needs

  • A pattern that maps URLs to source files in the repo (or a CMS with a modified date), and read access to the repo through gh, the GitHub MCP server or a full local clone (a shallow clone gives wrong dates).

  • Read access to the Search Console property, and Ahrefs API v3 access (MCP server or AHREFS_API_KEY); one SERP overview per decaying page.

Connecting Google Search Console

  1. MCP server. Google doesn't publish one for Search Console. Community MCP servers exist; check which scopes one asks for before you sign in.
  2. API with a service account. Enable the Google Search Console API in a Google Cloud project, create a service account, and add its email under Settings > Users and permissions on the property. Point GOOGLE_APPLICATION_CREDENTIALS at the key and set GSC_SITE_URL to sc-domain:example.com or https://www.example.com/.
  3. OAuth as yourself. When you can't add users to the property, a desktop OAuth client with the webmasters.readonly scope and a stored refresh token works for scheduled runs.

Ask for webmasters.readonly and add the service account as a Restricted user; the reports only read.

Connecting GitHub

  1. GitHub MCP Server, GitHub's official server, hosted at https://api.githubcopilot.com/mcp/. Sign in with OAuth or a personal access token; add /readonly to the URL, or use a toolset URL such as https://api.githubcopilot.com/mcp/x/pull_requests/readonly, to expose only read tools. It also runs locally (source).
  2. The gh CLI. Run gh auth login once, or set GH_TOKEN for scheduled runs. gh pr list --search "review-requested:@me" --json number,title,url,createdAt and gh api repos/{owner}/{repo}/dependabot/alerts cover most reports.
  3. REST and GraphQL with a fine-grained token. Store it in GITHUB_TOKEN, limit it to the repositories in the report, and grant Read on Metadata, Contents, Pull requests and Issues, plus Dependabot alerts if you report on them.

With every permission on a fine-grained token set to Read, the agent can't push, merge, comment or close anything.

Connecting Ahrefs

  1. Ahrefs MCP server, Ahrefs' official remote server at https://api.ahrefs.com/mcp/mcp. In Claude, add Ahrefs from the connector directory and sign in to your workspace with OAuth (setup guide). For Claude Code, Codex or Cursor, use the same URL with an MCP key from Account settings > API keys ("Generate MCP key").
  2. API v3 with a key. Call https://api.ahrefs.com/v3/... with Authorization: Bearer and the key from AHREFS_API_KEY. Whether you get API access, and how many units, depends on your Ahrefs plan.

These reports only read data, so the thing to manage is unit spend: keep limit low and schedule weekly rather than hourly.

Questions

What if a URL does not map to one source file?

Pages built from a template and a data file, or from a CMS entry, have no single file. Add a second pattern in settings for them, or point the skill at the CMS modified date. Pages it still cannot map are listed with "edit date unknown" at the bottom rather than dropped.

How current are the Ahrefs results?

Ahrefs refreshes a keyword's SERP on its own schedule, and update_date on each row says when. For queries checked more than a month ago, the card says so; a quick look at the live Google results before a rewrite settles it.

Do I need Briefkin to use the Decaying pages worth rewriting: Search Console, your repo and Ahrefs skill?

No. The skill runs with your own agent and gives you the report in the chat. With a Briefkin token set, each run also posts it to your board as a asks you, so you can glance at it instead of asking again.

Which agents can run it?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, Windsurf and Amp all read SKILL.md files. The install command puts it in ~/.claude/skills and ~/.agents/skills, where they look. ChatGPT, the Claude app and Grok take the prompt instead. Pick your agent under "Install and run it" and the commands change to match.

Can it work without an API or MCP server, from my browser?

Yes. Switch the data source to "Your browser" and the steps change to the Google Search Console, GitHub and Ahrefs pages themselves: the agent opens search.google.com/search-console/performance/search-analytics in a browser you are signed in to and reads the numbers off the page. Claude Code, Codex, Cursor, Claude app and ChatGPT can drive a browser out of the box; Gemini CLI, Copilot CLI and OpenCode need a Playwright or Chrome DevTools MCP server first. It is slower than the API and needs you signed in, so it suits a report you run by hand or from a scheduler on your own computer.

Answer your agents from one board, or from Telegram

Skills are free to use with any agent. Briefkin is where their results land: one board for every report, number and question your agents send, with a ping when something needs you.

Free during the open beta. No card.