gsc-cli 0.2.1__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 (53) hide show
  1. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/CLAUDE.md +5 -1
  2. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/PKG-INFO +15 -7
  3. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/README.md +14 -6
  4. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/plugins/gsc-cli/.claude-plugin/plugin.json +1 -1
  5. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/plugins/gsc-cli/skills/gsc-ai-mode-detect/SKILL.md +22 -1
  6. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/plugins/gsc-cli/skills/gsc-ai-mode-detect/references/ai-mode-query-patterns.md +19 -3
  7. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/plugins/gsc-cli/skills/gsc-analyze/SKILL.md +29 -8
  8. gsc_cli-0.3.0/plugins/gsc-cli/skills/gsc-audit/SKILL.md +154 -0
  9. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/plugins/gsc-cli/skills/gsc-cannibalization/SKILL.md +84 -1
  10. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/plugins/gsc-cli/skills/gsc-compare/SKILL.md +120 -2
  11. gsc_cli-0.3.0/plugins/gsc-cli/skills/gsc-core/SKILL.md +555 -0
  12. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/plugins/gsc-cli/skills/gsc-inspect/SKILL.md +17 -5
  13. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/plugins/gsc-cli/skills/gsc-opportunities/SKILL.md +83 -5
  14. gsc_cli-0.3.0/plugins/gsc-cli/skills/gsc-sitemaps/SKILL.md +92 -0
  15. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/pyproject.toml +1 -1
  16. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/src/gsc/__init__.py +1 -1
  17. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/src/gsc/cli/genai.py +41 -6
  18. gsc_cli-0.3.0/src/gsc/cli/inspect_cmd.py +201 -0
  19. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/src/gsc/cli/multimodal.py +6 -4
  20. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/src/gsc/cli/query.py +64 -8
  21. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/src/gsc/models.py +62 -0
  22. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/tests/test_exports.py +81 -2
  23. gsc_cli-0.3.0/tests/test_formatters.py +61 -0
  24. gsc_cli-0.3.0/tests/test_inspect.py +242 -0
  25. gsc_cli-0.3.0/tests/test_profiles.py +184 -0
  26. gsc_cli-0.3.0/tests/test_query_branded.py +200 -0
  27. gsc_cli-0.3.0/tests/test_query_filter.py +44 -0
  28. gsc_cli-0.3.0/tests/test_query_machine_fields.py +68 -0
  29. gsc_cli-0.3.0/tests/test_query_metadata.py +83 -0
  30. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/uv.lock +6 -2
  31. gsc_cli-0.2.1/plugins/gsc-cli/skills/gsc-audit/SKILL.md +0 -88
  32. gsc_cli-0.2.1/plugins/gsc-cli/skills/gsc-core/SKILL.md +0 -272
  33. gsc_cli-0.2.1/plugins/gsc-cli/skills/gsc-sitemaps/SKILL.md +0 -65
  34. gsc_cli-0.2.1/src/gsc/cli/inspect_cmd.py +0 -26
  35. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/.claude-plugin/marketplace.json +0 -0
  36. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/.github/workflows/publish.yml +0 -0
  37. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/.gitignore +0 -0
  38. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/LICENSE +0 -0
  39. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/plugins/gsc-cli/.claude-plugin/icon.png +0 -0
  40. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/plugins/gsc-cli/LICENSE +0 -0
  41. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/plugins/gsc-cli/README.md +0 -0
  42. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/plugins/gsc-cli/skills/gsc-query/SKILL.md +0 -0
  43. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/plugins/gsc-cli/skills/gsc-sites/SKILL.md +0 -0
  44. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/src/gsc/auth.py +0 -0
  45. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/src/gsc/benchmarks.py +0 -0
  46. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/src/gsc/cli/__init__.py +0 -0
  47. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/src/gsc/cli/auth_cmd.py +0 -0
  48. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/src/gsc/cli/main.py +0 -0
  49. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/src/gsc/cli/sitemaps.py +0 -0
  50. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/src/gsc/cli/sites.py +0 -0
  51. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/src/gsc/client.py +0 -0
  52. {gsc_cli-0.2.1 → gsc_cli-0.3.0}/src/gsc/data/seo-benchmarks.json +0 -0
  53. {gsc_cli-0.2.1 → 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.1
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
@@ -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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gsc-cli",
3
3
  "displayName": "GSC CLI",
4
- "version": "0.2.1",
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",
@@ -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
 
@@ -65,6 +65,24 @@ Google mechanism, ask who on the team (or which tracker, agent or plugin) has be
65
65
  running prompts about the site's topics. Count such rows as machine-issued, never as
66
66
  human demand, and never build pages per row.
67
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
+
68
86
  ## Long fully-formed questions
69
87
 
70
88
  Very long, grammatically complete natural-language questions are also residue, but
@@ -84,6 +102,4 @@ Paste-ready length gate (10+ words; from BrightLocal's local AI study,
84
102
  BrightLocal also suggests `(?i)(site:.*official|official.*site:)` to spot
85
103
  `site:` searches aimed at a brand's official pages (Lily Ray reports ChatGPT
86
104
  adding `site:` to its fan-outs). Treat any hit as machine-issued: it belongs to
87
- the `gsc-opportunities` fan-out set, not to human AI Mode residue. It is
88
- unverified whether such operator queries reach GSC at all, so an empty result
89
- proves nothing.
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.
@@ -41,7 +41,21 @@ Group the rows by `query` and collect the pages under each:
41
41
  - For each cannibalized query, rank its competing pages by clicks/impressions and
42
42
  identify the likely "primary" (best position + most clicks).
43
43
  - Estimate severity by total impressions at stake and how close the competing pages'
44
- positions are (closer = worse split).
44
+ positions are (closer = worse split). Put numbers on "close" (added 204, 2026-11-04,
45
+ SEO Myaso CC 4.3 `mapping-and-cannibalization.md`; the author's thresholds, one demo site
46
+ with 31 conflicts): (a) the second URL holds >= 15% of the query's impressions; (b) the
47
+ average positions differ by < 3, counted only when the second URL has >= 5% of
48
+ impressions, so one or two stray impressions cannot turn a low conflict into a sharp one.
49
+ Both = high, one = medium, none = low.
50
+ - Two false conflicts to take out before ranking them: (1) **every** URL with >= 5% of the
51
+ impressions sits in the top 3 - usually sitelinks or a double listing (GSC reports
52
+ sitelinks as separate pages at the main result's position); name the query, check it by
53
+ eye, do not plan a merge. (2) A URL outside the current inventory (GSC pages from the last
54
+ 14 days ∪ sitemap ∪ crawl, compared by host + path, case- and percent-encoding-insensitive):
55
+ an old address Google still remembers after a move, a deleted page, or a live page the
56
+ inventory missed. Mark it "open before merging"; after a URL move such phantom pairs fade
57
+ on their own over ~90 days (the demo: 80 of 333 conflicts were old /blog/ vs new
58
+ /articles/ copies of the same posts).
45
59
 
46
60
  Ignore queries where one page clearly dominates (others are negligible).
47
61
 
@@ -111,6 +125,10 @@ hidden-intent shares = keep both and differentiate; near-total overlap = genuine
111
125
  duplication.
112
126
  Judge the **whole query pool, not one query** (Artur Ferreira, LinkedIn, 2026-10): if each URL owns its own set of queries and they meet on one or two, merging kills reach; it is a problem only when both keep colliding across the queries they exist for and the priority URL never settles. URL rotation on a single query is a signal to look, not proof - positions move for many reasons. Measure first, merge second.
113
127
 
128
+ **Intended URL per query (added 2026-11-28).** For the money queries keep a short map query ->
129
+ intended URL. Flag a query when the top page in GSC (page dimension, not a tracker's position)
130
+ differs from the intended URL for two weeks or more, then read it with the whole-pool rule above.
131
+
114
132
  **Why this skill is GSC-native.** Detecting the same split from a rank tracker
115
133
  (count how many of a site's URLs surface in the top 100 for a query) got more
116
134
  expensive and less complete after Google removed the `&num=100` SERP parameter
@@ -119,6 +137,41 @@ query+page report has no such ceiling and reports every URL that earned
119
137
  impressions, so prefer it as the primary detector; reserve a rank tracker for
120
138
  confirming the live SERP position of the URLs GSC already flagged.
121
139
 
140
+ ## Content-level check: pages that do not share queries yet
141
+
142
+ (added 2026-11-19; method from Addonist's free Content Cannibalization Tool, an open-source
143
+ Streamlit app on OpenAI embeddings, read on its own page. Its companion Google Sheets text
144
+ extractor is not needed here.) The query+page pull only sees pages that already earn
145
+ impressions on the same query. Two near-identical pages can stay apart in GSC: one is new or
146
+ not indexed, Google folded one into the other as a duplicate, or they split the topic across
147
+ different wordings so no single query shows both. Check content, not queries, before a launch,
148
+ after a migration or content import, and on template-heavy sites (locations, programmes,
149
+ events, products).
150
+
151
+ 1. **Text.** Get each page's main text with
152
+ `python "$HOME/.claude/skills/seo/scripts/render_page.py" <url> --mode auto --json`
153
+ (`extracted_text`; it renders JavaScript and records the redirect chain). Compare final
154
+ URLs only, and drop pages whose text is very short or unrelated to the page: a 200 can be a
155
+ bot challenge.
156
+ 2. **Strip what most pages share.** Split each text into lines and remove the lines that
157
+ appear on most pages (our default: more than half), such as menus, footers, cookie banners
158
+ and CTA blocks that survive extraction. Compare what is left; otherwise every page looks
159
+ similar to every other.
160
+ 3. **Two scores per pair.** Meaning: cosine similarity of embeddings of the remaining text
161
+ (any general-purpose model, one model per run, as in
162
+ `seo-cluster/references/vector-preclustering.md`; long pages get trimmed to the model's
163
+ input limit, so list them). Wording: word overlap (Jaccard) on the full text. High on both
164
+ means the same content (duplicate or near-duplicate); high meaning with low overlap means
165
+ the same topic written twice in different words. No cut-off is validated: report the pair
166
+ counts at several levels (the tool shows 80, 85, 88, 90, 95 and 98%) and read the closest
167
+ pairs first.
168
+ 4. **Template pages apart.** Pages that match mainly through a shared template, with little
169
+ text of their own (a city or a date swapped in), go to their own group. That is a thin
170
+ template problem, not a merge decision between two articles.
171
+ 5. **The score does not pick the keeper.** For each group, pull each page's clicks and queries
172
+ from GSC and the links pointing at it, then use the resolutions in this skill (consolidate +
173
+ 301, differentiate, noindex,follow), with `latent-intent` Сценарий Е for a close pair.
174
+
122
175
  ## The reverse case: one URL, several intents (split candidates)
123
176
 
124
177
  (added 2026-10-14, Jan-Willem Bobbink cases via a RU retelling: an e-commerce site that cut
@@ -159,5 +212,35 @@ page under its own hypotheses instead of merging.
159
212
  (added 2026-08-23, after rampstackco/claude-skills, MIT; numbers are the author's heuristics, unverified)
160
213
 
161
214
  - Beyond consolidate / differentiate / redirect, a fourth option: **noindex,follow + self-canonical** on the secondary page when it must exist for UX or business reasons (product variant, utility page) but should not rank. Keep its canonical pointing at itself - canonical and noindex do different jobs, and cross-canonical plus noindex sends mixed signals. Confirm in GSC after about a week that the noindex took; keep the page fully functional for users.
215
+ - **Cross-template canonical is a gamble, not a fix** (added 2026-10-22, Matthew Mellinger via an EN retelling; two cases where a service page was canonicalised to the homepage and the homepage won the query). `rel="canonical"` is a hint meant for duplicate or near-duplicate pages; between different templates Google often ignores it. When Google does honour it, the losing page leaves the index with **all** of its queries, not only the contested one. Before using it, pull every query the losing page earns in GSC (`gsc query ... --dimensions query --filter 'page equals <url>'`): if it carries meaningful clicks on other queries, differentiate it or move that content instead. Check in URL Inspection after 2-4 weeks which URL Google chose as canonical.
162
216
  - After any resolution, monitor 60 days: canonical URL rank on the query (should stabilize and improve), merged/redirected URLs dropping out (expected), cluster impressions + clicks rising, zero internal links left to deprecated URLs.
163
217
  - If the canonical has not improved by day 60, recheck in order: do the redirects fire (test 5 random old URLs); is another page on the site still competing for the query; is the canonical strong enough on its own against the top results.
218
+
219
+ ### When the homepage, a category and a subcategory all have to stay
220
+
221
+ (added 2026-11-30, from a Sape blog case, 30.11.2026, Roman Mikhalchuk: a boat-motor shop,
222
+ 130 commercial queries, Yandex first; vendor content, positions from a rank tracker only,
223
+ no traffic or sales)
224
+
225
+ 301, canonical and noindex do not apply when the URLs swapping for one cluster are the
226
+ homepage, the category and a subcategory the shop needs. In the case the relevant URL
227
+ changed between rank checks (homepage 49 queries, subcategory 38, category 9). Rewriting
228
+ the category, weakening the homepage text and moving the category text onto the homepage
229
+ did nothing. Returning the cluster to the URL that had ranked for it before took the
230
+ homepage out of the cluster within about 10 days; the category and the subcategory kept
231
+ swapping. Order for us:
232
+
233
+ 1. Find the URL that held the cluster before, in GSC (16 months, `query` + `page` for the
234
+ cluster's head terms), before rewriting anything. Ask the client only when GSC does not
235
+ reach back far enough.
236
+ 2. Take the head term off the pages that should not win: the homepage title, H1 and text,
237
+ and the anchors of menu, breadcrumb and in-text links that send the head term to the
238
+ subcategory. Internal anchors with the exact head term go to the target only.
239
+ 3. Measure by the number of cluster queries landing on each URL per week
240
+ (`--dimensions query,page,date`), not by average position, and check again in season:
241
+ in the case the subcategory took 72 of the 130 queries back in summer.
242
+
243
+ The case then held the category with two waves of paid Sape articles, all with exact
244
+ commercial anchors, while behavioral-factor manipulation was also running; the second wave
245
+ went live the day the December 2025 core update started. That part is a link scheme under
246
+ Google's spam policies and is not part of the method here.