gsc-cli 0.2.0__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/CLAUDE.md +5 -1
  2. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/PKG-INFO +26 -7
  3. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/README.md +25 -6
  4. gsc_cli-0.3.0/plugins/gsc-cli/.claude-plugin/icon.png +0 -0
  5. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/plugins/gsc-cli/.claude-plugin/plugin.json +9 -1
  6. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/plugins/gsc-cli/skills/gsc-ai-mode-detect/SKILL.md +22 -1
  7. gsc_cli-0.3.0/plugins/gsc-cli/skills/gsc-ai-mode-detect/references/ai-mode-query-patterns.md +105 -0
  8. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/plugins/gsc-cli/skills/gsc-analyze/SKILL.md +29 -8
  9. gsc_cli-0.3.0/plugins/gsc-cli/skills/gsc-audit/SKILL.md +154 -0
  10. gsc_cli-0.3.0/plugins/gsc-cli/skills/gsc-cannibalization/SKILL.md +246 -0
  11. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/plugins/gsc-cli/skills/gsc-compare/SKILL.md +121 -2
  12. gsc_cli-0.3.0/plugins/gsc-cli/skills/gsc-core/SKILL.md +555 -0
  13. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/plugins/gsc-cli/skills/gsc-inspect/SKILL.md +17 -5
  14. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/plugins/gsc-cli/skills/gsc-opportunities/SKILL.md +208 -6
  15. gsc_cli-0.3.0/plugins/gsc-cli/skills/gsc-sitemaps/SKILL.md +92 -0
  16. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/pyproject.toml +1 -1
  17. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/src/gsc/__init__.py +1 -1
  18. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/src/gsc/cli/genai.py +41 -6
  19. gsc_cli-0.3.0/src/gsc/cli/inspect_cmd.py +201 -0
  20. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/src/gsc/cli/multimodal.py +6 -4
  21. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/src/gsc/cli/query.py +64 -8
  22. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/src/gsc/models.py +62 -0
  23. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/tests/test_exports.py +81 -2
  24. gsc_cli-0.3.0/tests/test_formatters.py +61 -0
  25. gsc_cli-0.3.0/tests/test_inspect.py +242 -0
  26. gsc_cli-0.3.0/tests/test_profiles.py +184 -0
  27. gsc_cli-0.3.0/tests/test_query_branded.py +200 -0
  28. gsc_cli-0.3.0/tests/test_query_filter.py +44 -0
  29. gsc_cli-0.3.0/tests/test_query_machine_fields.py +68 -0
  30. gsc_cli-0.3.0/tests/test_query_metadata.py +83 -0
  31. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/uv.lock +6 -2
  32. gsc_cli-0.2.0/plugins/gsc-cli/skills/gsc-ai-mode-detect/references/ai-mode-query-patterns.md +0 -67
  33. gsc_cli-0.2.0/plugins/gsc-cli/skills/gsc-audit/SKILL.md +0 -79
  34. gsc_cli-0.2.0/plugins/gsc-cli/skills/gsc-cannibalization/SKILL.md +0 -140
  35. gsc_cli-0.2.0/plugins/gsc-cli/skills/gsc-core/SKILL.md +0 -256
  36. gsc_cli-0.2.0/plugins/gsc-cli/skills/gsc-sitemaps/SKILL.md +0 -47
  37. gsc_cli-0.2.0/src/gsc/cli/inspect_cmd.py +0 -26
  38. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/.claude-plugin/marketplace.json +0 -0
  39. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/.github/workflows/publish.yml +0 -0
  40. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/.gitignore +0 -0
  41. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/LICENSE +0 -0
  42. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/plugins/gsc-cli/LICENSE +0 -0
  43. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/plugins/gsc-cli/README.md +0 -0
  44. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/plugins/gsc-cli/skills/gsc-query/SKILL.md +0 -0
  45. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/plugins/gsc-cli/skills/gsc-sites/SKILL.md +0 -0
  46. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/src/gsc/auth.py +0 -0
  47. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/src/gsc/benchmarks.py +0 -0
  48. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/src/gsc/cli/__init__.py +0 -0
  49. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/src/gsc/cli/auth_cmd.py +0 -0
  50. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/src/gsc/cli/main.py +0 -0
  51. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/src/gsc/cli/sitemaps.py +0 -0
  52. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/src/gsc/cli/sites.py +0 -0
  53. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/src/gsc/client.py +0 -0
  54. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/src/gsc/data/seo-benchmarks.json +0 -0
  55. {gsc_cli-0.2.0 → gsc_cli-0.3.0}/src/gsc/formatters.py +0 -0
@@ -33,7 +33,7 @@ src/gsc/
33
33
  query.py # `gsc query` + parse_filter
34
34
  sitemaps.py # `gsc sitemaps` (list, get, submit, delete)
35
35
  inspect_cmd.py # `gsc inspect`
36
- multimodal.py # `gsc multimodal` (UI export of Web: multimodal; not in the API)
36
+ multimodal.py # `gsc multimodal` (UI export of Web: multimodal; API has it since 2026-11-16 as `--search-type webMultimodal`)
37
37
  genai.py # `gsc genai` (UI export of the Generative AI report + AI lift index)
38
38
  .claude-plugin/ # marketplace.json, so `/plugin marketplace add` finds the plugin
39
39
  plugins/gsc-cli/ # the Claude Code plugin: .claude-plugin/plugin.json + skills/
@@ -95,3 +95,7 @@ OAuth login always requests read-write scope. For service accounts,
95
95
  lags ~2–3 days).
96
96
  - Python 3.11+, `from __future__ import annotations` in every module, full type
97
97
  hints. Lint/format with `ruff` (line-length 100): `uv run ruff check .`.
98
+ - Tests check behavior through the public interface (the CLI command or the
99
+ `GSCClient` method), not internals. A test that would still pass if every
100
+ function returned `None` or an empty result proves nothing: rewrite it to
101
+ assert concrete values, or delete it.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: gsc-cli
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Google Search Console CLI and backend for Claude Code SEO-analysis skills.
5
5
  Project-URL: Homepage, https://seoconsult.bg
6
6
  Project-URL: Documentation, https://github.com/seoconsultbg/gsc-cli#readme
@@ -53,16 +53,18 @@ skills.
53
53
  - **Everything as JSON.** `--format json` on any command → feed rankings, CTR, and
54
54
  impressions into scripts, notebooks, or LLM prompts without scraping the UI.
55
55
  - **Search Analytics done right.** Query by `query`, `page`, `country`, `device`,
56
- or `date`, with repeatable AND-combined `--filter` expressions.
56
+ `date`, or Google's branded / non-branded split (`brandedClassification`), with
57
+ repeatable AND-combined `--filter` expressions. `--search-type webMultimodal`
58
+ returns Google Lens / Circle to Search traffic.
57
59
  - **URL Inspection & sitemaps.** Check index coverage for any URL and list/submit/
58
60
  delete sitemaps.
59
61
  - **Multi-profile auth.** OAuth2 *and* service accounts, with per-site
60
62
  auto-detection - juggle many client properties from one config.
61
63
  - **Table / CSV / JSON** output for humans and machines alike.
62
- - **The data the API leaves out.** Google Lens / Circle to Search traffic
63
- (Web: multimodal) and the Generative AI report (AI Overviews + AI Mode) exist
64
- only as UI exports. `gsc multimodal` and `gsc genai` parse those exports and
65
- join them with API numbers for the same dates.
64
+ - **The data the API leaves out.** The Generative AI report (AI Overviews + AI
65
+ Mode) exists only as a UI export. `gsc genai` parses it and joins it with API
66
+ numbers for the same dates. `gsc multimodal` parses older Web: multimodal
67
+ exports (the API serves that data since 2026-11-16).
66
68
 
67
69
  ## Install
68
70
 
@@ -95,7 +97,7 @@ e.g. `--filter 'query contains running shoes'`.
95
97
  | `gsc auth` | `login`, `add-profile`, `list/remove-profile`, `status` |
96
98
  | `gsc sites` | List and inspect verified properties |
97
99
  | `gsc query` | Search Analytics (clicks, impressions, CTR, position) |
98
- | `gsc inspect` | URL Inspection API - index/coverage verdict for a URL |
100
+ | `gsc inspect` | URL Inspection API - index/coverage verdict, crawler, sitemaps, referring URLs and rich results for a URL; `--urls-file` inspects a list within the 2,000/day, 600/min quota |
99
101
  | `gsc sitemaps` | `list`, `get`, `submit`, `delete` |
100
102
  | `gsc multimodal` | Parse a Web: multimodal export; `--compare` adds the camera share per page |
101
103
  | `gsc genai` | Parse a Generative AI report export; `--compare` adds the AI lift index per page |
@@ -118,6 +120,12 @@ its share of organic impressions. Above 1, AI uses the page more than its organi
118
120
  weight would suggest. Pages with fewer than 100 AI or 1,000 organic impressions are
119
121
  marked `qualified: false`, because small numbers give silly ratios.
120
122
 
123
+ Since 2026-12-01 the report also shows clicks and CTR; on the property we checked,
124
+ the clicks go back to the first days of the report. `gsc genai` then adds
125
+ `ai_clicks` and `ai_ctr` to every row, and an older impressions-only export parses
126
+ as before. AI clicks are already counted in the Web clicks of the Performance
127
+ report, so never add them on top.
128
+
121
129
  Add `--bands` to see how AI impressions split across position bands (1-3, 4-10,
122
130
  11-20, 21+). On the sites we have checked so far, most AI visibility sits on pages
123
131
  ranking 4-10, not in the top 3. Informational pages score high lift. Stock, deals
@@ -154,6 +162,17 @@ A command resolves its profile by precedence: explicit `--profile`/`$GSC_PROFILE
154
162
  → the profile whose `sites` list contains the target URL → `default`. Full details
155
163
  in [CLAUDE.md](CLAUDE.md).
156
164
 
165
+ ## Troubleshooting
166
+
167
+ - **`invalid_grant` / "Error refreshing OAuth token" about a week after login.** Your
168
+ OAuth consent screen is External and still in "Testing", and Google expires those
169
+ refresh tokens after 7 days. Publish the app (Google Cloud Console > OAuth consent
170
+ screen > Publish app) and run `gsc auth login` again.
171
+ - **Old logins stop working after many re-logins.** Google keeps at most 100 refresh
172
+ tokens per account per OAuth client and revokes the oldest without warning.
173
+ - **Service account works but `gsc sites list` is empty.** Add the service account's
174
+ `client_email` as a user on each Search Console property.
175
+
157
176
  ## Contributing
158
177
 
159
178
  Issues and PRs welcome. Lint/format with `ruff` (line-length 100):
@@ -20,16 +20,18 @@ skills.
20
20
  - **Everything as JSON.** `--format json` on any command → feed rankings, CTR, and
21
21
  impressions into scripts, notebooks, or LLM prompts without scraping the UI.
22
22
  - **Search Analytics done right.** Query by `query`, `page`, `country`, `device`,
23
- or `date`, with repeatable AND-combined `--filter` expressions.
23
+ `date`, or Google's branded / non-branded split (`brandedClassification`), with
24
+ repeatable AND-combined `--filter` expressions. `--search-type webMultimodal`
25
+ returns Google Lens / Circle to Search traffic.
24
26
  - **URL Inspection & sitemaps.** Check index coverage for any URL and list/submit/
25
27
  delete sitemaps.
26
28
  - **Multi-profile auth.** OAuth2 *and* service accounts, with per-site
27
29
  auto-detection - juggle many client properties from one config.
28
30
  - **Table / CSV / JSON** output for humans and machines alike.
29
- - **The data the API leaves out.** Google Lens / Circle to Search traffic
30
- (Web: multimodal) and the Generative AI report (AI Overviews + AI Mode) exist
31
- only as UI exports. `gsc multimodal` and `gsc genai` parse those exports and
32
- join them with API numbers for the same dates.
31
+ - **The data the API leaves out.** The Generative AI report (AI Overviews + AI
32
+ Mode) exists only as a UI export. `gsc genai` parses it and joins it with API
33
+ numbers for the same dates. `gsc multimodal` parses older Web: multimodal
34
+ exports (the API serves that data since 2026-11-16).
33
35
 
34
36
  ## Install
35
37
 
@@ -62,7 +64,7 @@ e.g. `--filter 'query contains running shoes'`.
62
64
  | `gsc auth` | `login`, `add-profile`, `list/remove-profile`, `status` |
63
65
  | `gsc sites` | List and inspect verified properties |
64
66
  | `gsc query` | Search Analytics (clicks, impressions, CTR, position) |
65
- | `gsc inspect` | URL Inspection API - index/coverage verdict for a URL |
67
+ | `gsc inspect` | URL Inspection API - index/coverage verdict, crawler, sitemaps, referring URLs and rich results for a URL; `--urls-file` inspects a list within the 2,000/day, 600/min quota |
66
68
  | `gsc sitemaps` | `list`, `get`, `submit`, `delete` |
67
69
  | `gsc multimodal` | Parse a Web: multimodal export; `--compare` adds the camera share per page |
68
70
  | `gsc genai` | Parse a Generative AI report export; `--compare` adds the AI lift index per page |
@@ -85,6 +87,12 @@ its share of organic impressions. Above 1, AI uses the page more than its organi
85
87
  weight would suggest. Pages with fewer than 100 AI or 1,000 organic impressions are
86
88
  marked `qualified: false`, because small numbers give silly ratios.
87
89
 
90
+ Since 2026-12-01 the report also shows clicks and CTR; on the property we checked,
91
+ the clicks go back to the first days of the report. `gsc genai` then adds
92
+ `ai_clicks` and `ai_ctr` to every row, and an older impressions-only export parses
93
+ as before. AI clicks are already counted in the Web clicks of the Performance
94
+ report, so never add them on top.
95
+
88
96
  Add `--bands` to see how AI impressions split across position bands (1-3, 4-10,
89
97
  11-20, 21+). On the sites we have checked so far, most AI visibility sits on pages
90
98
  ranking 4-10, not in the top 3. Informational pages score high lift. Stock, deals
@@ -121,6 +129,17 @@ A command resolves its profile by precedence: explicit `--profile`/`$GSC_PROFILE
121
129
  → the profile whose `sites` list contains the target URL → `default`. Full details
122
130
  in [CLAUDE.md](CLAUDE.md).
123
131
 
132
+ ## Troubleshooting
133
+
134
+ - **`invalid_grant` / "Error refreshing OAuth token" about a week after login.** Your
135
+ OAuth consent screen is External and still in "Testing", and Google expires those
136
+ refresh tokens after 7 days. Publish the app (Google Cloud Console > OAuth consent
137
+ screen > Publish app) and run `gsc auth login` again.
138
+ - **Old logins stop working after many re-logins.** Google keeps at most 100 refresh
139
+ tokens per account per OAuth client and revokes the oldest without warning.
140
+ - **Service account works but `gsc sites list` is empty.** Add the service account's
141
+ `client_email` as a user on each Search Console property.
142
+
124
143
  ## Contributing
125
144
 
126
145
  Issues and PRs welcome. Lint/format with `ruff` (line-length 100):
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gsc-cli",
3
3
  "displayName": "GSC CLI",
4
- "version": "0.2.0",
4
+ "version": "0.3.0",
5
5
  "description": "Google Search Console analysis skills for Claude Code: performance overviews, period compares, cannibalization, quick wins, indexing audits and AI Mode query residue. Runs the open-source gsc CLI on your machine.",
6
6
  "author": {
7
7
  "name": "SEO Consult",
@@ -19,6 +19,14 @@
19
19
  "cannibalization",
20
20
  "ai-overviews"
21
21
  ],
22
+ "userConfig": {
23
+ "client_secrets": {
24
+ "type": "file",
25
+ "title": "Google OAuth client_secrets.json",
26
+ "description": "Path to the OAuth client file from Google Cloud Console. Used once by `gsc auth login`; the file stays on your machine and is sent only to Google.",
27
+ "required": false
28
+ }
29
+ },
22
30
  "documentationUrl": "https://github.com/seoconsultbg/gsc-cli#readme",
23
31
  "supportUrl": "https://github.com/seoconsultbg/gsc-cli/issues"
24
32
  }
@@ -2,6 +2,8 @@
2
2
  name: gsc-ai-mode-detect
3
3
  description: Detect and estimate the AI Mode / AI Overviews conversational residue that leaks into the GSC Performance report as ordinary query rows (pasted prompts, "yes go on", follow-ups), and quantify the anonymized undercount. Use when the user asks to track AI Mode traffic, find AI conversation queries in GSC, or measure how much of the query pool is hidden. Not for AI-answer visibility monitoring (ai-visibility-tracking) or agentic fan-out zero-click mining (gsc-opportunities).
4
4
  allowed-tools: Bash(gsc *)
5
+ metadata:
6
+ version: "1.0.1"
5
7
  ---
6
8
 
7
9
  # gsc-ai-mode-detect
@@ -79,6 +81,25 @@ Over the full pool from step 1, tag candidates into segments client-side:
79
81
  document chunks, "my location is", non-Latin/Cyrillic scripts. Count them as
80
82
  known-unmeasured, never silently fold them into a segment.
81
83
 
84
+ **Optional: Gemini Decisions API for the gray zone** (added 2026-11-12; primary: Google blog
85
+ 11.11.2026 and the Gemini API terms effective 23.03.2026, both read). `gemini-decision-1` scores
86
+ fixed options instead of generating text. One `choice` question whose options are segments 1-6
87
+ above plus "ordinary query", each with a one-line criterion, returns the winner, per-option
88
+ probabilities and a 0-1 confidence; up to 1,000 questions per input, $0.10 per 1M input tokens,
89
+ output not billed, free quota in AI Studio. Use it on the gray-zone rows only, never on the whole
90
+ pool: the Tier 1 regex stays the prefilter.
91
+
92
+ - **Validate before trusting it on a property.** Hand-label about 50 gray rows, run the
93
+ classifier on them and report the agreement. If it is low (start from 80% as the bar), keep
94
+ Claude's labels and say so in the report.
95
+ - **Low confidence stays gray.** Rows under a confidence cut (start at 0.7) go to manual review
96
+ and are reported as gray, not forced into a segment.
97
+ - **Data.** GSC queries are the client's data. For users in the EEA, Switzerland and the UK the
98
+ paid-tier data terms apply to the free quota too (no use for training), but prompts are still
99
+ logged for abuse checks: strip anything that looks like a name, phone or email first, and for a
100
+ clinic drop queries that tie a person to a condition.
101
+ - The benchmarks are Google's own; quality on BG/RU conversational queries is untested.
102
+
82
103
  Report per-segment: row count, summed clicks, summed impressions, and 3-5 example
83
104
  strings. Sort by clicks (residue with clicks is the real AI Mode footprint).
84
105
 
@@ -111,7 +132,7 @@ lower bound within the remaining (100−X)%."
111
132
  multimodal (Lens, Circle to Search, image upload) has no query text, but it is also
112
133
  absent from the API `web` total (API `web` = UI "Web (text)"), so it neither inflates
113
134
  nor explains `anonymized_share`. Do not attribute the gap to image queries. If you
114
- report total Web visibility, add the multimodal export on top (`gsc multimodal`).
135
+ report total Web visibility, add `--search-type webMultimodal` on top (in the API since 16.11.2026, see `gsc-core`).
115
136
 
116
137
  ## Presentation
117
138
 
@@ -0,0 +1,105 @@
1
+ # AI Mode residue query patterns (BG / EN / RU)
2
+
3
+ Paste-ready regex for isolating the conversational residue that AI Mode / AI
4
+ Overviews sessions leave in the GSC Performance report as ordinary query rows:
5
+ answer artifacts ("yes go on"), clarifying follow-ups, and whole pasted prompts.
6
+
7
+ All patterns are RE2 (the flavor GSC Custom regex and the Search Analytics API
8
+ `includingRegex` operator both use). Prefix `(?i)` for case-insensitive. These are
9
+ a **prefilter that builds a candidate set, never a verdict** - single common tokens
10
+ (more / още / ещё) fire on real short queries, so precision comes from the
11
+ multi-word phrases and the imperative-at-start anchors, not the bare words.
12
+
13
+ ## Tier 1 - high precision (safe for server-side `--filter includingRegex`)
14
+
15
+ Multi-word continuations, confirmations and imperative prompt openers. These
16
+ strings almost never appeared in GSC before AI Overviews, so a match is a strong
17
+ AI-Mode-residue signal with few false positives.
18
+
19
+ ```
20
+ (?i)(^(write|draft|generate|summari[sz]e|explain|act as|rewrite|translate|compare|give me|make me|list all|create a)\b|\b(yes go on|go on please|sounds good|show me more|tell me more|any other options|what else can|and then what|continue please|more examples|give me more)\b|^(напиши|състави|обясни|резюмирай|генерирай|направи ми|дай ми|сравни|преведи|изброй)\b|\b(покажи още|разкажи още|други варианти|какво още|а след това|продължи с)\b|^(напиши|составь|объясни|резюмируй|сгенерируй|сделай мне|дай мне|сравни|переведи|перечисли)\b|\b(покажи ещё|расскажи ещё|другие варианты|что ещё|а дальше|продолжай с)\b)
21
+ ```
22
+
23
+ ## Tier 2 - noisy (client-side only, treat as weak candidates)
24
+
25
+ Bare confirmations/greetings/follow-ups. High recall, low precision - never
26
+ filter server-side on these alone; collect, then let Tier 3 (model/Claude) judge.
27
+
28
+ - EN: `^(yes|ok|okay|sure|thanks|thank you|hi|hello|hey|more|continue|next|nope|no)$`
29
+ - BG: `^(да|добре|ок|благодаря|здравей|здрасти|още|продължи|не)$`
30
+ - RU: `^(да|хорошо|ок|спасибо|привет|здравствуй|ещё|еще|продолжай|дальше|нет)$`
31
+
32
+ ## Edge classes the regex WILL miss (name them in the report, do not pretend coverage)
33
+
34
+ Per the source, pattern lists lose whole border classes - list them as
35
+ known-unmeasured rather than pretending the extract is complete:
36
+
37
+ - Rank-tracker position-check probes (look conversational, are not human AI Mode).
38
+ - Agentic-harness prompts (a tool talking to search, not a person in AI Mode).
39
+ - Pasted text chunks / documents dropped into the prompt box.
40
+ - `my location is ...` / location-disclosure lines.
41
+ - Any non-Latin, non-Cyrillic script (Tamil, Tanglish, Hinglish mix) - the source's
42
+ own model needed synthetic training data in 8 languages to catch these; a regex in
43
+ three scripts does not. If the property has traffic in other scripts, say the
44
+ extract undercounts them specifically.
45
+
46
+ ## Templated prompts with a location header
47
+
48
+ (added 2026-10-13, reported by DrMax on a new test site, RU Telegram.) Rows that are a
49
+ whole instruction rather than a query:
50
+
51
+ `context: location: germany (not for language). do not include location references in your response. question: <goal>: <what to check> and <how to avoid a problem>?`
52
+
53
+ The question part is in the user's language and always has the same two-part shape
54
+ (what to look at / what is required, then how to avoid a problem). Paste-ready filter:
55
+
56
+ ```
57
+ (?i)^context:\s*location:
58
+ ```
59
+
60
+ Origin, resolved the same day: the reporter then wrote that he had been debugging his
61
+ own "GSC Page Action Planner" plugin and that "GSC stole my queries" - the rows were
62
+ the prompts his own tooling sent through an AI search that queried Google, not Google
63
+ rewriting users' questions. Lesson for any property: before reading odd rows as a
64
+ Google mechanism, ask who on the team (or which tracker, agent or plugin) has been
65
+ running prompts about the site's topics. Count such rows as machine-issued, never as
66
+ human demand, and never build pages per row.
67
+
68
+ Update (added 2026-11-14): the wrapper is a scraping-provider fingerprint, not one person's tool. Trakkr Research Study 012 (Mack Grenfell, 25.08.2026; vendor data, Trakkr sells a tracker) matches `context: location: ... (not for language)` to Bright Data's public Google AI scraping examples. On our properties (GSC 15.07.2025-11.11.2026) it also shows on three of our properties (a Slovak question, a German one, and 196 rows on an English-language site), none of them our own tests.
69
+
70
+ ## Prompt-tracker fingerprints
71
+
72
+ (added 2026-11-14; Simone De Palma, TUI, BrightonSEO 10.2026, and Trakkr Study 012; checked on 18 of our properties, GSC 15.07.2025-11.11.2026.) AI-visibility trackers send templated prompts to engines that search Google, and the template leaks into the Performance report as query rows:
73
+
74
+ - **Location and language suffix:** `... (in united kingdom. be sure to reply in english)` (De Palma's slide), also `(in united states. ...)` and `(the user's location is worldwide. be sure to ...)`. Ours: 4 of 18 properties (an English-language site 36 rows / 506 impressions, the other three 3, 1 and 1), English prompts included on the Slovak sites.
75
+ - **Persona openers:** `i am a/an ...`, `as a ...`, `about me:`, `my main motivations:`, `my main pain points:`, and unresolved slots such as `enterprise_1000_5000` or `[company_name]` (Trakkr). On an English-language site: 574 rows / 5,132 impressions.
76
+ - **Forced ranking:** `you must provide a forced ranking from best to worst` (Trakkr; none on ours).
77
+
78
+ Paste-ready (RE2):
79
+
80
+ ```
81
+ (?i)(be sure to reply in [a-z]+\)|not for language|^context: ?location:|forced ranking|^(as an? |i am an? |about me:)|my main (motivations|pain points):|\[(person|company)_name\]|_(states|kingdom|america|plus)\b)
82
+ ```
83
+
84
+ On ours every matching row had 0 clicks and 94% of the impressions were desktop (5,739 of 6,106 on an English-language site). `^as an?` also catches a real "as a beginner..." question, so read the rows and confirm the family by zero clicks, a desktop-heavy split and a steady daily cadence before excluding it. Count them in segment 7 (machine-issued), never as demand or AI Mode residue. Scale is small: 6,106 of 8.39M impressions on that site (0.07%); Trakkr reports 2.32% on its own property, a tracker vendor's site. A match says that some tracker runs prompts about the niche; it does not say which customer or agency runs it, and a grounded prompt that surfaces the site in GSC means the model searched and Google showed the page, not that the model "remembers" the brand.
85
+
86
+ ## Long fully-formed questions
87
+
88
+ Very long, grammatically complete natural-language questions are also residue, but
89
+ length alone is not a pattern - a long question WITH clicks is usually a normal
90
+ question query. Gate any length heuristic on the near-zero-click set only, and hand
91
+ the pattern (not the single row) to Tier 3 judgment. This overlaps with the
92
+ machine-issued fan-out set that `gsc-opportunities` already handles - see the
93
+ cross-reference in SKILL.md so the two are not double-counted.
94
+
95
+ Paste-ready length gate (10+ words; from BrightLocal's local AI study,
96
+ 2026-09-16), to run only on the near-zero-click set as above:
97
+
98
+ ```
99
+ ^(?:\S+\s+){9,}\S+$
100
+ ```
101
+
102
+ BrightLocal also suggests `(?i)(site:.*official|official.*site:)` to spot
103
+ `site:` searches aimed at a brand's official pages (Lily Ray reports ChatGPT
104
+ adding `site:` to its fan-outs). Treat any hit as machine-issued: it belongs to
105
+ the `gsc-opportunities` fan-out set, not to human AI Mode residue. Operator queries do reach GSC (checked 2026-11-14 on 18 of our properties, GSC 15.07.2025-11.11.2026): 16 had `site:` or `-site:` rows, 177 rows / 3,088 impressions, all with 0 clicks. Four kinds: own-domain checks (`site:https://www.example.sk/`, 659 impressions; often people or tools checking the index), a topic limited to a domain or TLD (`site:.bg сглобяема къща цена на квадрат българия 2025`; De Palma reads `site:tui.co.uk <topic> tui` as ChatGPT grounding, his label, unverified), long `-site:reddit.com -site:youtube.com ...` exclusion chains (trackers or agents, see `gsc-opportunities`), and a foreign domain plus unrelated words (scraping noise). None of them is human demand.
@@ -51,16 +51,17 @@ list` if unspecified).
51
51
  --dimensions device
52
52
  ```
53
53
 
54
- 6. Multimodal (image-as-query) share - only if the user has a UI export for the same
55
- window (Search type -> Web -> Multimodal -> Export; the API cannot filter it, see
56
- `gsc-core`). Ask for it on image-heavy sites (e-commerce, travel, local, products):
54
+ 6. Multimodal (image-as-query) share - from the API for the same window (`webMultimodal`,
55
+ available since 16.11.2026, see `gsc-core`). It matters on image-heavy sites
56
+ (e-commerce, travel, local, products):
57
57
 
58
58
  ```bash
59
- gsc --format json multimodal "<SITE_URL>" <EXPORT.zip> --compare \
60
- --start-date <START> --end-date <END>
59
+ gsc --format json query "<SITE_URL>" --start-date <START> --end-date <END> \
60
+ --search-type webMultimodal --dimensions page
61
61
  ```
62
62
 
63
- Without an export, say so in the report instead of skipping silently.
63
+ Group only by page, country, device or date (grouping by query returns HTTP 400). An
64
+ older UI export still parses with `gsc multimodal "<SITE_URL>" <EXPORT.zip> --compare`.
64
65
 
65
66
  ## Analysis
66
67
 
@@ -71,12 +72,32 @@ list` if unspecified).
71
72
  - **Top queries/pages:** which drive the most clicks; flag high-impression /
72
73
  low-position (11–20 striking distance) and page-1 / low-CTR rows per `gsc-core`.
73
74
  - **Device:** clicks/CTR/position by device; call out underperformance (often
74
- mobile).
75
- - **Multimodal (if exported):** property-level camera share of Web impressions; top
75
+ mobile). For a per-page view, pull `--dimensions page,device` and flag pages
76
+ with at least ~100 impressions on each device where the mobile position is 5+
77
+ worse than desktop (mobile rendering or content problem - check the mobile
78
+ render). Treat a CTR-only gap with caution: mobile CTR is structurally lower
79
+ (zero-click, SERP features), so it is a weak signal on its own.
80
+ - **Brand vs non-brand** (updated 2026-11-17): first Google's split, `-d brandedClassification`
81
+ (`gsc-core`); the two classes sum to the property total, anonymized queries included. No
82
+ rows means the property is not eligible or the window starts before 2026-02-21: then total
83
+ the brand queries with a regex filter (`--filter 'query includingRegex <brand|misspellings>'`),
84
+ not by summing a row-capped pull. Name the definition used (Google's class or our word list)
85
+ and report the non-brand share of clicks. Any "healthy share" cut-off is a judgment call -
86
+ say which one you use and why for this site.
87
+ - **Multimodal:** pull `--search-type webMultimodal` for the same window (API since
88
+ 16.11.2026; `gsc multimodal` only for exports already on disk). Report the camera share
89
+ of Web impressions = webMultimodal / (web + webMultimodal); top
76
90
  pages by multimodal impressions; pages where multimodal `ctr` is far below
77
91
  `text_ctr` (image matches, click is lost) - route to `seo-images` / `ecommerce-optimization`.
78
92
  - **Quick wins:** 3–5 striking-distance or low-CTR opportunities.
79
93
 
94
+ - **Local pages: four query baskets** (DrMax §5.7.2). For a branch or city page split its
95
+ queries into "service + place", "service without a place name", "staff name (+ place)" and
96
+ "address / directions / phone". Growth only in the last basket means the page serves
97
+ existing customers and brings no new ones.
98
+ - **New-page cohort.** Report pages first published in the last 90 days separately, so their
99
+ launch growth does not hide decline on mature pages.
100
+
80
101
  ## Presentation
81
102
 
82
103
  Lead with the summary line and trend direction. Then short tables for top queries,
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: gsc-audit
3
+ description: Indexing audit for a Google Search Console property via the gsc CLI — inspect top pages for index/coverage issues and check sitemap health. Use when the user asks why pages are not indexed or wants a technical/indexing health check.
4
+ allowed-tools: Bash(gsc *)
5
+ ---
6
+
7
+ # gsc-audit
8
+
9
+ Audit indexing health: inspect the most important pages and review sitemaps. See
10
+ `gsc-core` for verdict/coverage meanings and benchmarks.
11
+
12
+ ## Setup
13
+
14
+ Window for finding top pages: `END = today − 3`, `START = today − 31`.
15
+
16
+ ## Workflow
17
+
18
+ 1. Find the top pages by clicks/impressions:
19
+
20
+ ```bash
21
+ gsc --format json query "<SITE_URL>" --start-date <START> --end-date <END> \
22
+ --dimensions page --row-limit 25
23
+ ```
24
+
25
+ 2. Inspect each top page (the URL Inspection API is rate-limited — keep the set
26
+ small, ~10–20):
27
+
28
+ ```bash
29
+ gsc --format json inspect "<SITE_URL>" "<PAGE_URL>"
30
+ ```
31
+
32
+ Quota, checked on Google's usage-limits page (added 2026-11-10, Manuel Madeddu, BrightonSEO 10.2026): 2,000 inspections per day and 600 per minute per property. For more than a handful of URLs put them in a file and run `gsc --format json inspect "<SITE_URL>" --urls-file urls.txt` (throttled, one row per URL, summary on stderr). On larger audits spend the quota where it changes a decision: URLs a source-vs-rendered crawl flagged, money pages, and one or two URLs per template instead of all of them. Inspection shows the last crawled version, not the live page - check `last_crawl_time` before judging a fix shipped after it.
33
+
34
+ 3. Check sitemap health:
35
+
36
+ ```bash
37
+ gsc --format json sitemaps list "<SITE_URL>"
38
+ ```
39
+
40
+ ## Analysis
41
+
42
+ - **Per page:** `verdict`, `coverage_state`, `robots_txt_state`, `page_fetch_state`,
43
+ and whether `google_canonical` ≠ `user_canonical`. A page is indexed only when
44
+ `verdict == "PASS"`; review every non-PASS page by its `coverage_state`. Do not match the
45
+ substring "not indexed": on our saved inspect JSON (04.11.2026) it caught 16 of 262
46
+ non-PASS rows and missed "URL is unknown to Google" (157), noindex (54), alternate (24),
47
+ redirect (8) and duplicate (3) (added 192, SEO Myaso CC 4.6). Also flag a fetch/robots
48
+ problem or a `last_crawl_time` older than ~30 days (stale).
49
+ - **Sitemaps:** read `submitted`, `errors`, `warnings`, `is_pending` and `last_downloaded`.
50
+ Do not compute indexed/submitted from the API: `contents[].indexed` is marked
51
+ "Deprecated; do not use" by Google and was 0 in 23 of our 25 content rows while the pages
52
+ were indexed. Coverage per sitemap comes from the UI (Page indexing filtered by sitemap)
53
+ or from URL Inspection on a sample of the sitemap's URLs.
54
+ `errors = 0` does not mean the listed URLs are clean - see `gsc-sitemaps` step 5.
55
+ - **Filter the pages that are meant to stay out of the index before reporting.** Keep a
56
+ per-site list of URL patterns that are not indexed on purpose: cart, checkout, account,
57
+ login, internal search, thank-you pages, filtered or tag archives, pagination where it is
58
+ noindexed. Drop matches from the problem list and report them as one line ("N expected
59
+ exclusions"). Without this filter the report is mostly noise. In one documented case
60
+ (Habr 1090116, 2026), 11 indexing problems on 197 HTML pages came down to 1 real issue,
61
+ because the other 10 were normal service pages. A page from that list that does get
62
+ impressions is itself a finding: it is indexed when it should not be.
63
+
64
+ ## "Crawled - currently not indexed" is unreliable — verify before reporting
65
+
66
+ Never report a growing "Crawled - currently not indexed" count as deindexation on
67
+ its face. A significant share of URLs in that bucket are actually INDEXED and
68
+ receiving impressions (AJ Kohn, tracked 2x/month across all 1000 examples; holds
69
+ even on <100-page sites, where 10-15 are typically live). Glenn Gabe attributes
70
+ much of it on large sites to reporting lag on URLs that still rank in the top ~1000.
71
+
72
+ - **Verify a sample, don't trust the label.** Take URLs from the bucket and run
73
+ `gsc inspect` on each; `verdict: PASS` / coverage "Submitted and indexed" - or the
74
+ URL showing impressions in a `query --dimensions page` pull - means it is actually
75
+ indexed despite the bucket. Compute **% actually indexed** of the sample.
76
+ - **The real signal is the TREND of that %, not the raw count.** Record
77
+ `% actually indexed` on a schedule (~2x/month). A FALLING % (e.g. 97% -> 70%) is
78
+ the alarm - that is when pages genuinely start dropping out; a rising raw count
79
+ with a stable high % is mostly reporting noise. Without the periodic check you
80
+ miss the moment real deindexation begins.
81
+ - **Same staleness hits `google_canonical` mismatches and 404s,** especially
82
+ rarely-crawled pages - verify those with `gsc inspect` too before acting, and
83
+ confirm freshness via `last_crawl_time`.
84
+ - **Sampling caveat.** GSC caps the report at 1000 examples, exposes no direct API
85
+ to it, and keeps only ~3 months of history - so persist results yourself and treat
86
+ the 1000 as a sample whose representativeness is unproven on very large buckets.
87
+ gsc-cli makes the loop cheap: pull candidate URLs -> `gsc inspect` each -> store
88
+ `verdict` + date -> chart the % over time (beats a manual ~7-min/1000 pass or a
89
+ browser extension).
90
+
91
+ ## Status decoder (Page indexing, UI)
92
+
93
+ Alarm levels per DrMax, SEO Monstr 2027 §2.3.3, corrected and extended with the five statuses the
94
+ author skips (the levels are a working heuristic; the status meanings and the Removals window
95
+ are Google Help):
96
+
97
+ - **High**: Crawled, currently not indexed (verify per the section above before acting);
98
+ Discovered, currently not indexed (crawl demand, traps, TTFB); Soft 404; Duplicate, Google
99
+ chose different canonical than user; Blocked due to access forbidden (403: usually a WAF
100
+ hitting real Googlebot, allowlist the verified ranges, never a hand list); Server error
101
+ (5xx); Redirect error.
102
+ - **Medium**: Duplicate without user-selected canonical; Duplicate, submitted URL not selected
103
+ as canonical (the sitemap generator exports raw URLs, not the canonical field).
104
+ - **Control** (expected if intentional): Excluded by noindex; Blocked by robots.txt; Indexed
105
+ though blocked by robots.txt; Blocked due to unauthorized request (401); Blocked due to
106
+ other 4xx.
107
+ - **Normal**: Alternate page with proper canonical; Page with redirect (keep both out of the
108
+ sitemap and the navigation).
109
+
110
+ Two traps: a Crawled-not-indexed or indexed-count jump of about 10x within days is a hack or
111
+ spam-injection signature until proven otherwise (check `site:` with spam terms and Security
112
+ issues); the Removals tool hides a URL for about six months and does not remove it from the
113
+ index, so pair it with `noindex` or 410. Request indexing on an unchanged page that was already
114
+ crawled and rejected returns the same verdict.
115
+
116
+ ## Validate fix and the report filter (UI only)
117
+
118
+ Graft 2026-11-06, checked against Google's Page indexing report help (answer 7440203); prompted
119
+ by a shared agent runbook for one GSC console. There is no API for fix validation: the Search
120
+ Console API has no validation method, and URL Inspection returns the indexed version, not a
121
+ live test.
122
+
123
+ - **The filter above the report** switches between All known pages, All submitted pages,
124
+ Unsubmitted pages only and a single sitemap. Read the issue in the context you mean to fix;
125
+ a count under one filter is not the count under another.
126
+ - **Validation under a sitemap filter covers only the URLs in that sitemap at the moment of the
127
+ request.** Google's own tip: put only the important affected URLs in a separate sitemap,
128
+ submit it, filter the report by it and validate there; a subset finishes faster than the
129
+ whole group. The sitemap holds only canonical URLs that return 200 (clean it before
130
+ submitting, see `gsc-sitemaps`).
131
+ - **Validate only when the fix is live everywhere in that scope.** Validation stops at the
132
+ first remaining instance it finds; check a few of the affected URLs live before clicking.
133
+ - **One click per cycle.** Do not click Validate fix again until the cycle has passed or
134
+ failed. States: Started -> Looking good -> Passed or Failed; usually up to about two weeks,
135
+ sometimes longer. Start new validation after a failure rechecks the Failed URLs and new
136
+ instances found since; Passed URLs are not rechecked.
137
+ - **Passed is not indexed.** It means the issue is gone from those URLs; indexing is a
138
+ separate state, checked with `gsc inspect`. Fixing without validating also works: counts
139
+ update whenever Google recrawls an affected page.
140
+ - **Do not validate expected exclusions** (intentional robots.txt blocks, intentional
141
+ noindex, Alternate page with proper canonical, Page with redirect).
142
+ - **One issue seen under two filters** (all known pages and a sitemap) gets one validation,
143
+ not two.
144
+ - **The example list is capped at 1,000 URLs** and is not guaranteed to list every affected
145
+ URL even below that number; never present it as the full population.
146
+ - An issue drops out of the table 90 days after its last instance is gone; a recurrence
147
+ within that window reopens it with the original first-detected date.
148
+
149
+ ## Presentation
150
+
151
+ Open with a count of top pages indexed vs not. Table of problem pages with their
152
+ coverage state and the likely cause. Then a sitemap-health table. End with a
153
+ prioritized fix list (indexing blockers first). State the window and ~3-day lag, and
154
+ note URL Inspection rate limits.