forked from bchanot/claude
feat(seo): wire GSC+CrUX data into /seo FULL (STEP 0 account select, CWV field, GSC perf)
This commit is contained in:
@@ -69,6 +69,11 @@ Therefore: submit to GSC + Bing Webmaster minimum on every FULL audit.
|
||||
- **Google Search Console** (FREE) — https://search.google.com/search-console
|
||||
Covers Google search + AI Overviews grounding. URL inspection tool
|
||||
requests live re-indexing (faster than waiting for crawl).
|
||||
- **Connexion GSC pour /seo (données réelles)** — `make seo-connect`
|
||||
(depuis le repo claude-config, une fois par compte) : consentement
|
||||
OAuth lecture seule (webmasters.readonly), stocke un refresh token
|
||||
local (0600). Ensuite /seo FULL lit requêtes/positions/indexation
|
||||
sans réinvite.
|
||||
- **IndexNow protocol** (FREE) — https://www.indexnow.org
|
||||
Proactive ping to Bing + Yandex + Seznam + DuckDuckGo. One-line
|
||||
API call per URL change. Plugins: Yoast (built-in), RankMath,
|
||||
|
||||
+47
-5
@@ -198,12 +198,18 @@ verify WebFetch + WebSearch available. If missing:
|
||||
|
||||
```
|
||||
PLUGIN CHECK
|
||||
curl/Bash : YES (always)
|
||||
WebFetch : YES / NO / N/A (LOCAL)
|
||||
WebSearch : YES / NO / N/A (LOCAL)
|
||||
STATUS : READY | DEGRADED (missing: <list>)
|
||||
curl/Bash : YES (always)
|
||||
WebFetch : YES / NO / N/A (LOCAL)
|
||||
WebSearch : YES / NO / N/A (LOCAL)
|
||||
GSC/CrUX creds : READY (account: <label>) | DEGRADED (no account — anonymous PageSpeed only)
|
||||
STATUS : READY | DEGRADED (missing: <list>)
|
||||
```
|
||||
|
||||
GSC/CrUX creds status comes from the `(account, property)` passed in
|
||||
context (STEP 1). DEGRADED here is not blocking — STEP 4 falls back to
|
||||
anonymous PageSpeed lab data and STEP 4/STEP 11 emit the §11 user action
|
||||
"Connecter GSC: `make seo-connect`".
|
||||
|
||||
---
|
||||
|
||||
## STEP 4 — LIVE TECHNICAL AUDIT `[FULL only]`
|
||||
@@ -244,7 +250,22 @@ Evaluate each present/missing:
|
||||
- **VSI** (Visual Stability Index) — new 2026 signal, Google Core Web
|
||||
Vitals 2.0
|
||||
|
||||
Use PageSpeed Insights API (no auth needed for basic usage):
|
||||
When a GSC account+property were passed in context, fetch CrUX field
|
||||
data first (**tilde path mandatory** — this agent runs from the
|
||||
audited project's directory, not the claude-config repo):
|
||||
|
||||
```bash
|
||||
bash ~/.claude/lib/seo-data/fetch.sh crux --url "https://$DOMAIN" --strategy mobile
|
||||
bash ~/.claude/lib/seo-data/fetch.sh crux --url "https://$DOMAIN" --strategy desktop
|
||||
```
|
||||
|
||||
If `status=ok`, use `lcp_p75_ms` / `inp_p75_ms` / `cls_p75` as the
|
||||
PRIMARY CWV figures (75th percentile, real users). Keep the PageSpeed
|
||||
lab run below as a SECONDARY diagnostic. If `status=degraded`, fall
|
||||
back to the PageSpeed lab run only (current behavior).
|
||||
|
||||
Use PageSpeed Insights API (no auth needed for basic usage) — SECONDARY
|
||||
diagnostic, or PRIMARY when CrUX degraded:
|
||||
|
||||
```bash
|
||||
curl -s "https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=https://$DOMAIN&strategy=mobile&category=PERFORMANCE&category=ACCESSIBILITY&category=BEST_PRACTICES&category=SEO" \
|
||||
@@ -257,6 +278,23 @@ Extract (via jq if available, otherwise WebFetch to transform):
|
||||
- `lighthouseResult.audits.cumulative-layout-shift.numericValue`
|
||||
- Mobile + desktop separately
|
||||
|
||||
### Performance GSC (90 j) `[FULL only, account+property present]`
|
||||
|
||||
When STEP 0/STEP 1 recorded a GSC account+property (not "none"):
|
||||
|
||||
```bash
|
||||
bash ~/.claude/lib/seo-data/fetch.sh queries --account "$GSC_ACCOUNT" --property "$GSC_PROPERTY" --days 90 --dim query
|
||||
bash ~/.claude/lib/seo-data/fetch.sh inspect --account "$GSC_ACCOUNT" --property "$GSC_PROPERTY" --url "https://$DOMAIN/"
|
||||
```
|
||||
|
||||
Report: top queries; flag **QUICK WINS** = rows with position between 4
|
||||
and 10 AND high impressions (candidates to push onto page 1 with a
|
||||
title/meta/content tweak). Report index coverage from `inspect`. All
|
||||
emitted into SEO.md §2 (technical) and §8 (quick wins).
|
||||
|
||||
If `status=degraded` → note it in §2 and emit the §11 user action
|
||||
"Connecter GSC: `make seo-connect`".
|
||||
|
||||
### SEO technical files
|
||||
|
||||
```bash
|
||||
@@ -573,6 +611,10 @@ FIX: AUTO (<what agent will do>) | USER (<what user must do>)
|
||||
| Competitive position | 5% | 10% | |
|
||||
| Legal compliance | 10% | 5% | |
|
||||
|
||||
**Technical axis note:** CWV scored on CrUX field data (75th percentile,
|
||||
real users, from STEP 4) when available; otherwise lab PageSpeed
|
||||
Lighthouse run.
|
||||
|
||||
### LOCAL depth — 4 axes
|
||||
|
||||
| Axis | Weight (local B2C) | Weight (SaaS/national/content) | Score /20 |
|
||||
|
||||
@@ -117,6 +117,13 @@ tf "doctor checks seo-data" "$REPO/doctor.sh" "seo-data"
|
||||
tf "gitleaks allowlist store" "$REPO/.gitleaks.toml" "seo-data/tokens"
|
||||
tf "gitignore venv" "$REPO/.gitignore" ".venv-seo-data"
|
||||
|
||||
echo "── integration locks ──"
|
||||
tf "skill step0 account select" "$REPO/skills/seo/SKILL.md" "COMPTE GOOGLE"
|
||||
tf "analyzer calls fetch crux" "$REPO/agents/seo-analyzer.md" "fetch.sh crux"
|
||||
tf "analyzer calls fetch queries" "$REPO/agents/seo-analyzer.md" "fetch.sh queries"
|
||||
tf "analyzer gsc subsection" "$REPO/agents/seo-analyzer.md" "Performance GSC"
|
||||
tf "catalog gsc oauth entry" "$REPO/agents/resources/automation-catalog.md" "make seo-connect"
|
||||
|
||||
echo ""
|
||||
echo "seo-data engine: $PASS pass, $FAIL fail"
|
||||
[ "$FAIL" -eq 0 ]
|
||||
|
||||
@@ -63,6 +63,43 @@ If `$ARGUMENTS` contains `local`/`code-only`/`quick`/`rapide` → default LOCAL.
|
||||
If `$ARGUMENTS` contains `full`/`complet`/`externe`/`live` → default FULL.
|
||||
If `$ARGUMENTS` contains a production URL → suggest FULL.
|
||||
|
||||
### Compte Google (FULL only)
|
||||
|
||||
**Skip if LOCAL** — jump straight to Business context.
|
||||
|
||||
For FULL depth, offer to attach a connected Google account so the
|
||||
seo-analyzer can pull real GSC/CrUX data instead of anonymous PageSpeed
|
||||
only. List connected accounts (**tilde path mandatory** — this skill
|
||||
runs from the audited project's directory, not the claude-config repo):
|
||||
|
||||
```bash
|
||||
bash ~/.claude/lib/seo-data/fetch.sh accounts
|
||||
```
|
||||
|
||||
```
|
||||
COMPTE GOOGLE pour cet audit FULL :
|
||||
|
||||
1. <label> — <property 1>, <property 2>, ...
|
||||
2. <label> — <property>
|
||||
...
|
||||
[connecter un nouveau compte] — lancer `make seo-connect` (depuis le
|
||||
repo claude-config, une fois par compte), puis relancer /seo
|
||||
[Ignorer] — continuer sans GSC/CrUX (PageSpeed anonyme uniquement,
|
||||
dégradation normale — cf. SEO.md §11)
|
||||
|
||||
Quel compte / quelle property ? (numéro, ou "ignorer")
|
||||
```
|
||||
|
||||
If `fetch.sh accounts` returns an empty list (`"accounts": []`), skip
|
||||
the numbered list and show only `[connecter un nouveau compte]` /
|
||||
`[Ignorer]`.
|
||||
|
||||
Record the choice in the shared context block:
|
||||
```
|
||||
GSC ACCOUNT: <label> | none
|
||||
GSC PROPERTY: <property> | none
|
||||
```
|
||||
|
||||
### Business context (one grouped block)
|
||||
|
||||
**Both depths:**
|
||||
@@ -172,6 +209,8 @@ BUSINESS CONTEXT:
|
||||
Known citations: ...
|
||||
Known competitors: ...
|
||||
Time budget: ...
|
||||
GSC account: <label> | none (FULL only)
|
||||
GSC property: <property> | none (FULL only)
|
||||
|
||||
You are the classical-SEO half of a parallel SEO+GEO audit. Do NOT
|
||||
audit GEO/AI signals (llms.txt, AI crawlers, QAPage/Speakable schemas,
|
||||
|
||||
Reference in New Issue
Block a user