agentleFS
isiahw1isiahw1/claude-skills/skills/google-search-console/SKILL.md

google-search-console

Skill0 starsChanged 11 months agoApache-2.0View on GitHub

Query and analyze Google Search Console data for SEO insights. Use when users want to analyze search performance, find content optimization opportunities, check URL index status, manage sitemaps, or make data-driven content decisions. Supports multiple properties and covers keyword discovery, CTR analysis, position tracking, and technical SEO checks.

  • Reads credentials

We split this skill into the rules it gives an agent

8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check if search intent matches content

    line 107
  2. Distinctive:

    Add rich snippets/structured data

    line 108
  3. Distinctive:

    Check index status for specific URLs:

    line 180
  4. Distinctive:

    Use shorter date ranges for expensive queries

    line 348
  5. Distinctive:

    When filtering data, these operators are available:

    line 372
  6. Distinctive:

    "You do not own this site": Ensure service account email is added as user in Search Console Settings > Users and permissions with Full …

    line 393
  7. Distinctive:

    Quota exceeded: Wait 15 minutes (short-term) or spread queries throughout day (long-term).

    line 397
  8. Very specific:

    "Invalid site URL": Use exact format from Search Console (include trailing slash for URL-prefix properties, use sc-domain: prefix for …

    line 399

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Google Search Console

Query Google Search Console API for search performance data, URL inspection, sitemap management, and comprehensive SEO analysis.

Quick Start

Prerequisites

  • Google Cloud project with Search Console API enabled
  • OAuth credentials or Service Account JSON
  • Site verified in Google Search Console

First Query

# Using the wrapper library (recommended)
import searchconsole

account = searchconsole.authenticate(
    client_config='client_secrets.json',
    serialize='credentials.json'  # Saves tokens for reuse
)

# List available properties
for site in account:
    print(site.url)

# Query last 7 days of data
site = account['https://example.com/']
report = site.query.range('today', days=-7).dimension('query').get()
df = report.to_dataframe()

Authentication Setup

See references/setup_guide.md for step-by-step credential creation.

API Capabilities Overview

This skill provides full access to all Google Search Console API endpoints:

APICapabilitiesScripts
Search AnalyticsClicks, impressions, CTR, position by any dimensionsearch_analytics.py, top_pages.py
URL InspectionIndex status, mobile usability, rich results, AMPurl_inspection.py
SitemapsList, submit, delete, health monitoringsitemaps.py
SitesList properties, get site infocomprehensive_report.py

Search Types Supported

  • web - Standard web search results
  • image - Google Images results
  • video - Video search results
  • news - Google News results
  • discover - Google Discover feed
  • googleNews - Google News app/website

Dimensions Available

  • query - Search keywords
  • page - URL of the page
  • country - Country code (ISO 3166-1 alpha-3)
  • device - Device type (DESKTOP, MOBILE, TABLET)
  • date - Date of the search
  • searchAppearance - How the result appeared in search

Search Appearance Types

  • AMP_ARTICLE - AMP articles
  • AMP_STORY - AMP stories
  • INSTANT_APP - Android Instant Apps
  • JOB_LISTING - Job posting rich results
  • JOB_DETAILS - Job details rich results
  • MERCHANT_LISTINGS - Product listings
  • ORGANIC_SHOPPING - Organic shopping results
  • PRODUCT_SNIPPETS - Product rich snippets
  • RECIPE_FEATURE - Recipe rich results
  • REVIEW_SNIPPET - Review stars
  • SPECIAL_ANNOUNCEMENT - COVID-19 announcements
  • SUBSCRIBED_CONTENT - Reader Revenue Manager content
  • VIDEO - Video rich results
  • WEB_LIGHT - Web Light results
  • WEBLINKING - Regular web results

Core Workflows

1. Content Optimization (Low CTR / High Impressions)

Find pages with traffic potential but poor click-through rates:

# Run scripts/analyze_opportunities.py or use this pattern:
df = site.query \
    .range('today', days=-28) \
    .dimension('query', 'page') \
    .get().to_dataframe()

# Filter: high impressions, low CTR, decent position
opportunities = df[
    (df['impressions'] > 100) &
    (df['ctr'] < 0.03) &  # Below 3% CTR
    (df['position'] < 20)  # Within striking distance
].sort_values('impressions', ascending=False)

Action items from this data:

  • Improve title tags and meta descriptions for low-CTR pages
  • Check if search intent matches content
  • Add rich snippets/structured data

2. Best Performing Pages Analysis

Comprehensive analysis of top pages with scoring and categorization:

# Full top pages report with performance scores
uv run python scripts/top_pages.py \
    --site "https://example.com/" \
    --key-file service_account.json \
    --sort-by performance_score

# With device breakdown
uv run python scripts/top_pages.py \
    --site "https://example.com/" \
    --key-file service_account.json \
    --breakdown device

# Compare to previous period
uv run python scripts/top_pages.py \
    --site "https://example.com/" \
    --key-file service_account.json \
    --compare-period

Features:

  • Performance scoring (0-100) based on clicks, impressions, CTR, position
  • Tier categorization (Star Performers, Solid Performers, Developing, Low Traffic)
  • Period-over-period comparison with change tracking
  • Device, country, query, and search appearance breakdowns

3. Keyword Discovery

Find queries you're ranking for but haven't optimized:

df = site.query \
    .range('today', days=-90) \
    .dimension('query') \
    .get().to_dataframe()

# High impressions but not in top 10
discoveries = df[
    (df['impressions'] > 500) &
    (df['position'] > 10) &
    (df['position'] < 30)
].sort_values('impressions', ascending=False)

4. Performance Tracking

Monitor ranking trends over time:

# Daily breakdown for trend analysis
df = site.query \
    .range('today', days=-90) \
    .dimension('date', 'query') \
    .filter('query', 'your keyword', 'contains') \
    .get().to_dataframe()

# Group by date to see trends
trends = df.groupby('date').agg({
    'clicks': 'sum',
    'impressions': 'sum',
    'position': 'mean'
})

5. Technical SEO (URL Inspection)

Check index status for specific URLs:

# Using scripts/url_inspection.py or directly:
from googleapiclient.discovery import build
from google.oauth2 import service_account

credentials = service_account.Credentials.from_service_account_file(
    'service_account.json',
    scopes=['https://www.googleapis.com/auth/webmasters.readonly']
)

service = build('searchconsole', 'v1', credentials=credentials)

result = service.urlInspection().index().inspect(body={
    'inspectionUrl': 'https://example.com/page',
    'siteUrl': 'https://example.com/'
}).execute()

# Check index status
index_status = result['inspectionResult']['indexStatusResult']
print(f"Verdict: {index_status['verdict']}")
print(f"Coverage: {index_status['coverageState']}")
print(f"Last crawl: {index_status.get('lastCrawlTime', 'Never')}")

# Check mobile usability
mobile = result['inspectionResult'].get('mobileUsabilityResult', {})
print(f"Mobile: {mobile.get('verdict', 'N/A')}")

# Check rich results
rich = result['inspectionResult'].get('richResultsResult', {})
if rich.get('detectedItems'):
    for item in rich['detectedItems']:
        print(f"Rich Result: {item['richResultType']}")

6. Sitemap Management

Full sitemap lifecycle management:

# List all sitemaps
uv run python scripts/sitemaps.py \
    --site "https://example.com/" --key-file service_account.json list

# Submit a new sitemap
uv run python scripts/sitemaps.py \
    --site "https://example.com/" --key-file service_account.json \
    submit https://example.com/sitemap.xml

# Check sitemap health
uv run python scripts/sitemaps.py \
    --site "https://example.com/" --key-file service_account.json health

# Delete a sitemap
uv run python scripts/sitemaps.py \
    --site "https://example.com/" --key-file service_account.json \
    delete https://example.com/old-sitemap.xml

Health check provides:

  • Total sitemaps count
  • URLs submitted vs indexed
  • Index rate percentage
  • Errors and warnings per sitemap

7. Comprehensive Performance Report

Generate all-in-one SEO report using every API endpoint:

# Full comprehensive report
uv run python scripts/comprehensive_report.py \
    --site "https://example.com/" --key-file service_account.json

# With URL inspection for top 10 pages
uv run python scripts/comprehensive_report.py \
    --site "https://example.com/" --key-file service_account.json \
    --inspect-top-pages 10

# Export to directory
uv run python scripts/comprehensive_report.py \
    --site "https://example.com/" --key-file service_account.json \
    --output-dir ./gsc_report/

Report includes:

  • Performance by all search types (web, image, video, news, discover, googleNews)
  • Device breakdown (desktop, mobile, tablet)
  • Country breakdown
  • Search appearance analysis
  • Daily trends with best/worst days
  • Top pages and queries
  • Sitemap health status
  • Optimization opportunities
  • URL inspection results (optional)

API Endpoints Reference

EndpointUse CaseQuota
searchAnalytics.queryPerformance data (clicks, impressions, CTR, position)200 QPM
urlInspection.index.inspectCheck URL index status, mobile usability, rich results2,000/day/property
sitemaps.listList all submitted sitemapsStandard
sitemaps.getGet specific sitemap detailsStandard
sitemaps.submitSubmit new sitemapStandard
sitemaps.deleteRemove sitemapStandard
sites.listList verified propertiesStandard
sites.getGet site detailsStandard
sites.addAdd new site (requires verification)Standard
sites.deleteRemove siteStandard

See references/api_endpoints.md for complete API documentation.

Bundled Scripts

scripts/auth.py

Authentication utilities supporting both OAuth and Service Account:

uv run --with google-api-python-client,google-auth-oauthlib python scripts/auth.py

scripts/search_analytics.py

Query search performance data with common filters:

uv run python scripts/search_analytics.py --site "https://example.com/" --days 28

scripts/top_pages.py

Comprehensive top pages analysis with scoring:

uv run python scripts/top_pages.py --site "https://example.com/" --key-file service_account.json

scripts/url_inspection.py

Batch check URL index status:

uv run python scripts/url_inspection.py --site "https://example.com/" --urls urls.txt

scripts/analyze_opportunities.py

Generate content optimization report:

uv run python scripts/analyze_opportunities.py --site "https://example.com/" --output report.csv

scripts/sitemaps.py

Full sitemap management (list, submit, delete, health):

uv run python scripts/sitemaps.py --site "https://example.com/" --key-file service_account.json list

scripts/comprehensive_report.py

All-in-one SEO report using every endpoint:

uv run python scripts/comprehensive_report.py --site "https://example.com/" --key-file service_account.json

Rate Limits & Best Practices

Quotas:

  • 20 queries/second, 200 queries/minute per user
  • Queries with page + query dimensions are expensive
  • URL Inspection: 2,000 URLs/day per property
  • Data has 2-3 day delay (not real-time)

Optimization tips:

  • Cache API responses (data updates daily, not real-time)
  • Use shorter date ranges for expensive queries
  • Batch URL inspections across properties if hitting limits
  • Paginate large result sets (max 25,000 rows per request)

See references/analysis_patterns.md for advanced analysis formulas.

Multiple Properties

Query across multiple sites:

account = searchconsole.authenticate(client_config='client_secrets.json')

all_data = []
for site in account:
    df = site.query.range('today', days=-7).dimension('query').get().to_dataframe()
    df['site'] = site.url
    all_data.append(df)

combined = pd.concat(all_data, ignore_index=True)

Filter Operators

When filtering data, these operators are available:

OperatorDescriptionExample
containsSubstring matchpage contains /blog/
equalsExact matchquery equals "buy shoes"
notContainsExclude substringpage notContains /tag/
notEqualsExclude exact matchdevice notEquals MOBILE
includingRegexRegex matchpage includingRegex ^/product/[0-9]+$
excludingRegexRegex excludequery excludingRegex (brand)

Data Aggregation Types

TypeDescription
autoDefault, uses byPage for Search Analytics
byPageOne row per page URL
byPropertyAggregate across entire property

Common Issues

"You do not own this site": Ensure service account email is added as user in Search Console Settings > Users and permissions with Full access.

Empty results: Data has 2-3 day delay. Query older dates.

Quota exceeded: Wait 15 minutes (short-term) or spread queries throughout day (long-term).

"Invalid site URL": Use exact format from Search Console (include trailing slash for URL-prefix properties, use sc-domain: prefix for domain properties).

Download now (ZIP)

  • Other versions10 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 10

    1. superdesigndev/treg★ 5.7ksame name
    2. runxhq/runx★ 97same name
    3. AceDataCloud/Skills★ 17same name
    4. hsynozdamar-byte/claude-skills-edited★ 4same name
    5. nc9/skills★ 4same name
    6. jakenuts/agent-skills★ 2same name
    7. windsor-ai/claude-windsor-ai-plugin★ 1same name
    8. Bobagi/claude-skills★ 0same name
    9. gmmh1/claude-paid-media-skills★ 0same name
    10. thenavidm/google-search-console-mcp-cli★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use google-ads.

    Other files people use alongside this one.

    Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
    • pedronauckSkill

      google-ads

      Query, audit, and optimize Google Ads campaigns. Use an attached browser or the Google Ads API for campaign, keyword, budget, conversion-tracking, and wasted-spend analysis, or when the user explicitly requests a reviewed account change. Defaults to read-only reporting; account mutations require a bounded preview and action-time approval.

      Also in 3 projects that use this

  • In this repository2 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.