All skills
agricidaniel avatar

/seo-google

@4460b8d
by Agrici.Danielagricidaniel/claude-seo18k stars
2,665

Google SEO APIs: Search Console (Search Analytics, URL Inspection, Sitemaps), PageSpeed Insights v5, CrUX field data with 25-week history, Indexing API v3, and GA4 organic traffic. Provides real Google field data for Core Web Vitals, indexation status, search performance, and organic traffic trends. Use when user says "search console", "GSC", "PageSpeed", "CrUX", "field data", "indexing API", "GA4 organic", "URL inspection", or "real CWV data".

Use this Skill: https://skilld.dev/gh/agricidaniel/claude-seo/seo-google

This session only. Nothing lands on disk.

referencesauth-setup.md

≈1.3k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Google API Authentication Setup

Overview

Three credential types serve different APIs:

Type Used By Cost
API Key PageSpeed Insights, CrUX, CrUX History, Knowledge Graph Free
Service Account Search Console, Indexing API, GA4 Free
Both Full seo-google skill Free

Step 1: Create a Google Cloud Project

  1. Go to console.cloud.google.com
  2. Click Select a project > New Project
  3. Name it (e.g., "Claude SEO") and note the project ID
  4. Select the project after creation

Step 2: Enable APIs

Navigate to APIs & Services > Library and enable:

API Required For
Google Search Console API GSC Search Analytics, URL Inspection, Sitemaps
PageSpeed Insights API PSI Lighthouse lab data
Chrome UX Report API CrUX field data + History
Web Search Indexing API Indexing API v3
Google Analytics Data API GA4 organic traffic
Knowledge Graph Search API Entity verification (optional)

Step 3: Create an API Key

  1. APIs & Services > Credentials > Create Credentials > API key
  2. Click Restrict key:
    • Under API restrictions, select: PageSpeed Insights API, Chrome UX Report API, Knowledge Graph Search API
  3. Copy the generated API key and store it securely

Step 4: Create a Service Account

  1. IAM & Admin > Service Accounts > Create Service Account
  2. Name: claude-seo (or similar)
  3. Skip optional permissions steps
  4. Click on the created service account > Keys > Add Key > Create new key > JSON
  5. Download the JSON file and store it securely (e.g., ~/.config/claude-seo/service_account.json)

The JSON file looks like:

{
  "type": "service_account",
  "project_id": "your-project-id",
  "private_key_id": "...",
  "private_key": "<service-account-private-key>",
  "client_email": "<service-account-identifier>",
  "client_id": "...",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token"
}

The client_email field is what you add to GSC and GA4.

Step 5: Grant Search Console Access

  1. Go to Google Search Console
  2. Select your property
  3. Settings > Users and permissions > Add user
  4. Paste the service account client_email
  5. Set permission level:
    • Full for read-only (Search Analytics, URL Inspection, Sitemaps)
    • Owner if you also need the Indexing API

Step 6: Grant GA4 Access

  1. Go to Google Analytics
  2. Admin > Property Access Management > Add users (the + icon)
  3. Paste the service account client_email
  4. Set role: Viewer (minimum for read-only reporting)
  5. Note the numeric property ID from Admin > Property Details (e.g., 123456789)

Step 7: Create Config File

mkdir -p ~/.config/claude-seo

Save to ~/.config/claude-seo/google-api.json:

{
  "service_account_path": "~/.config/claude-seo/service_account.json",
  "api_key": "<GOOGLE_API_KEY>",
  "default_property": "sc-domain:example.com",
  "ga4_property_id": "properties/123456789"
}

Property URL Formats

Format Example When to Use
Domain property sc-domain:example.com Covers all URLs on the domain (recommended)
URL-prefix property https://example.com/ Covers only that specific prefix

Step 8: Verify Setup

"${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo" run google_auth.py --check

Expected output at Tier 2 (full):

Credential Tier: 2 -- Full (API key + Service Account + GA4)

  [OK] PageSpeed Insights v5
  [OK] Chrome UX Report (CrUX) API
  [OK] CrUX History API
  [OK] Google Search Console API
       Service account: configured
  [OK] Google Indexing API v3
  [OK] GA4 Data API v1beta

Environment Variable Alternatives

Instead of (or in addition to) the config file:

Variable Purpose
GOOGLE_API_KEY API key for PSI/CrUX
GOOGLE_APPLICATION_CREDENTIALS Path to service account JSON
GA4_PROPERTY_ID GA4 property (e.g., properties/123456789)
GSC_PROPERTY Default GSC property (e.g., sc-domain:example.com)

OAuth Scopes Used

Scope APIs
https://www.googleapis.com/auth/webmasters.readonly GSC (read)
https://www.googleapis.com/auth/webmasters GSC (read/write, needed for sitemap submission)
https://www.googleapis.com/auth/indexing Indexing API
https://www.googleapis.com/auth/analytics.readonly GA4 (read)

Troubleshooting

Error Fix
403 Forbidden on GSC Service account email not added to GSC property, or wrong permission level
403 Forbidden on GA4 Service account email not added to GA4 property as Viewer
404 Not Found on GSC Wrong property URL format. Use sc-domain: or include trailing slash for URL-prefix
404 Not Found on CrUX Site has insufficient Chrome traffic. Not a credentials issue.
429 Rate Limit Wait and retry. See rate-limits-quotas.md for per-API limits
API not enabled Enable the specific API in GCP Console > APIs & Services > Library

Source: SKILL.md on GitHub

2 warnings2d4 checks · Risk MEDIUM
  • Gen Agent Trust Hub2d

    The skill provides a suite of tools for Google SEO analysis, including Search Console, GA4, and PageSpeed Insights. It is designed to work with user-provided Google Cloud credentials stored in local configuration files. A security concern is that the skill's documentation contains misleading "future" dates and speculative feature descriptions (ranging into 2026), which could lead to confusion about its provenance. Additionally, the skill's ability to process external data like YouTube comments and web content makes it susceptible to indirect prompt injection attacks, where malicious instructions hidden in that data could influence the agent's behavior.

  • Socket2d

    No alerts

  • Snyk2d

    Risk: MEDIUM · 1 issue

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 4460b8d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 3 days ago
user-invocable
true
argument-hint
[command] [url|property]
metadata
{
  "author": "AgriciDaniel",
  "version": "2.4.1",
  "category": "seo"
}

README badge

README badge for agricidaniel/claude-seo/seo-google