Skills

Google Search Console

Traps to avoid when querying Google Search Console through treg, cases where the API...

Install

npx skills add superdesigndev/treg --skill google-search-console -g -a claude-code -y
Category
Engineering
Updated
3d ago
License
See repository
Context cost
Lightabout 1,072 tokens
Runs scripts
No, instructions only

What it does

Traps to avoid when querying Google Search Console through treg, cases where the API returns a confident wrong answer instead of an error, especially around totals and recent-date trends. Use whenever answering questions about organic search clicks, impressions, rankings, or index status.

Search Console via treg, what will silently mislead you

You already know the Search Console API. This file is only the things that return a plausible wrong answer with no error. Verified live on 2026-07-22 against sc-domain:example.com, with each trap confirmed by watching three independent agents.

Site id: treg connections ls → resource_ref. If it's empty, no site is pinned, list them with treg connections resources <id> and say which one you chose and why. Don't present an inferred site as configured, and don't report the blank as a fault, it isn't one.

When nothing is pinned and the question doesn't name a site, pick the site whose domain matches the question and state that you inferred it. Note that subdomains are separate properties, so sc-domain:example.com and sc-domain:app.example.com are different answers, say which you used.

1. Recent days are incomplete, do not report them as a trend

3 of 3 agents concluded "organic traffic is down ~47%". It wasn't.

GSC lags ~2, 3 days and simply omits missing days, a 14-day request returns 11, 12 rows with no warning. Worse, the newest present days read low. The tail looked like this:

07-15: 640   07-16: 610   07-17: 500   07-18: 520   07-19: 430   ← last 3 days incomplete

Cross-checked against GA4 organic sessions for the same dates, the decline does not exist, and GA4 shows 07-20 and 07-21 recovering to 746 and 849, days GSC hasn't reported at all.

Two rules:

  • End ranges ≥3 days before today, and never start a window on a local peak.
  • Before calling any GSC trend real, cross-check GA4 organic sessions for the same dates. Two independent sources disagreeing means the GSC tail is an artifact.

2. Dimension sums do NOT equal site totals

Illustrative (the point is that dimension sums miss the true total, not the absolutes):

Read the whole SKILL.md on GitHub

More in Engineering