home / skills / cdeistopened / opened-vault / gsc - archived 2026-01-29

gsc - archived 2026-01-29 skill

/.claude/skills/_archived/gsc - archived 2026-01-29

This skill lets you query Google Search Console to uncover SEO insights, indexing status, and optimization opportunities for your site.

npx playbooks add skill cdeistopened/opened-vault --skill gsc - archived 2026-01-29

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
3.9 KB
---
name: gsc
description: Query Google Search Console for SEO data - search queries, top pages, CTR opportunities, URL inspection, and sitemaps. Use when analyzing search performance, finding optimization opportunities, or checking indexing status.
---

# Google Search Console Skill

Query GSC for search analytics, indexing status, and SEO insights.

## Setup

### Required Environment Variables

Add to `.env`:
```
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_CLIENT_SECRET=your-client-secret
GOOGLE_REFRESH_TOKEN=your-refresh-token
```

### Setup Steps

1. **Enable API**: Go to [Google Cloud Console](https://console.cloud.google.com/apis/library/searchconsole.googleapis.com) and enable Search Console API
2. **Create OAuth Credentials**: In Google Cloud Console → APIs & Services → Credentials → Create OAuth client ID
3. **Add Scopes**: Configure `webmasters.readonly` scope on your OAuth consent screen
4. **Get Refresh Token**: Run initial auth flow to get refresh token
5. **Property Access**: Your Google account must have access to the Search Console properties

### First-time Auth

```bash
# Run the auth script to get your refresh token
python3 scripts/gsc_query.py auth
```

## Commands

### List Available Sites
```bash
python3 .claude/skills/gsc/scripts/gsc_query.py sites
```

### Top Search Queries
```bash
python3 .claude/skills/gsc/scripts/gsc_query.py top-queries \
  --site "https://opened.co" \
  --days 28 \
  --limit 20
```

### Top Pages by Traffic
```bash
python3 .claude/skills/gsc/scripts/gsc_query.py top-pages \
  --site "https://opened.co" \
  --days 28 \
  --limit 20
```

### Find Low-CTR Opportunities
High impressions but low click-through rate = optimization opportunities:
```bash
python3 .claude/skills/gsc/scripts/gsc_query.py opportunities \
  --site "https://opened.co" \
  --days 28 \
  --min-impressions 100
```

### Inspect URL Indexing Status
```bash
python3 .claude/skills/gsc/scripts/gsc_query.py inspect-url \
  --site "https://opened.co" \
  --url "/blog/waldorf-vs-montessori"
```

### List Sitemaps
```bash
python3 .claude/skills/gsc/scripts/gsc_query.py sitemaps \
  --site "https://opened.co"
```

### Raw Search Analytics (JSON)
```bash
python3 .claude/skills/gsc/scripts/gsc_query.py search-analytics \
  --site "https://opened.co" \
  --days 28 \
  --dimensions query page \
  --limit 100
```

## Available Dimensions
- `query` - Search query
- `page` - Landing page URL
- `country` - Country code
- `device` - DESKTOP, MOBILE, TABLET
- `date` - Date

## Metrics Returned
- **clicks** - Number of clicks from search
- **impressions** - Number of times shown in search
- **ctr** - Click-through rate (clicks/impressions)
- **position** - Average ranking position

## SEO Use Cases

### 1. Content Optimization
Find high-impression/low-CTR pages → improve titles & descriptions

### 2. Keyword Research
See what queries bring traffic → create more content around them

### 3. Technical SEO
Check indexing status, find crawl issues

### 4. Ranking Tracking
Monitor position changes over time

### 5. Sitemap Health
Verify sitemaps are submitted and error-free

## Integration with SEO Content Production

After publishing a new article:
```bash
# Check if indexed (wait 1-2 weeks)
python3 .claude/skills/gsc/scripts/gsc_query.py inspect-url \
  --site "https://opened.co" \
  --url "/blog/waldorf-vs-montessori"

# Monitor ranking position
python3 .claude/skills/gsc/scripts/gsc_query.py search-analytics \
  --site "https://opened.co" \
  --days 28 \
  --dimensions query \
  --filter "page=/blog/waldorf-vs-montessori"
```

## Notes

- Data has ~3 day delay (GSC limitation)
- Credentials shared with GA4 skill
- URL inspection requires the page to be in the property

## Troubleshooting

**"Access denied"**: Make sure your Google account has access to the GSC property

**"Invalid credentials"**: Run auth flow again to refresh tokens

**"No data"**: New pages take 1-2 weeks to appear in GSC

Overview

This skill queries Google Search Console to surface search analytics, indexing status, sitemap data, and CTR opportunities for SEO work. It helps you find high-impression queries, top landing pages, indexation problems, and sitemap health so you can prioritize content and technical fixes. Setup requires OAuth credentials and a refresh token for API access.

How this skill works

The skill calls the Search Console API to fetch search analytics, URL inspection results, and sitemap listings. It returns metrics such as clicks, impressions, CTR, and average position, and can filter by dimensions like query, page, country, and device. Use commands to list properties, run custom analytics queries, inspect a URL’s indexing status, and enumerate submitted sitemaps.

When to use it

  • Analyzing last 28–90 days of search performance for content planning
  • Finding pages with high impressions but low CTR to improve titles and meta descriptions
  • Verifying whether a new or updated URL is indexed by Google
  • Auditing submitted sitemaps and identifying sitemap errors
  • Exporting raw analytics (JSON) for deeper analysis or dashboarding

Best practices

  • Enable Search Console API and create OAuth client credentials before running queries
  • Store GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, and GOOGLE_REFRESH_TOKEN securely in environment variables
  • Run initial auth flow to obtain a refresh token and ensure your account has access to the target property
  • Query ranges with a 3-day data delay in mind; avoid expecting real-time results
  • Use dimensions (query, page, country, device, date) to segment data and prioritize high-impression, low-CTR items

Example use cases

  • List available Search Console properties to confirm access to the correct site
  • Generate top-queries and top-pages reports for a 28-day content review
  • Run an opportunities report to surface high-impression, low-CTR queries for title/description tests
  • Inspect a newly published article to confirm indexing status after a week or two
  • Fetch sitemaps to verify submissions and spot sitemap parsing or coverage issues

FAQ

What credentials are required?

You must create OAuth credentials in Google Cloud, enable the Search Console API, and run the auth flow to get a refresh token stored in environment variables.

Why am I seeing delayed data?

Search Console data typically has about a three-day delay; recent changes may not appear immediately.

What if I get access denied?

Ensure the Google account used for OAuth has explicit access to the Search Console property and then re-run the auth flow.