AI SEO Ops skill

python3 telemetry/versioncheck.py 2>/dev/null || true

by ericosiu·MIT license·★ 3,615 Stars on the repo·GitHub ↗

Use now

Files of AI SEO Ops

ericosiu/main1 file shown
SKILL.md
Show the full text177 lines

AI SEO Ops

Preamble (runs on skill start)

# Version check (silent if up to date)
python3 telemetry/version_check.py 2>/dev/null || true

# Telemetry opt-in (first run only, then remembers your choice)
python3 telemetry/telemetry_init.py 2>/dev/null || true

Privacy: This skill logs usage locally to ~/.ai-marketing-skills/analytics/. Remote telemetry is opt-in only. No code, file paths, or repo content is ever collected. See telemetry/README.md.


AI-powered SEO operations: keyword intelligence, competitor gap analysis, GSC optimization, and trend detection.

When to Use

  • User asks for keyword research, content brief, or SEO analysis
  • User wants to find quick-win keywords from Google Search Console
  • User needs a competitor gap analysis
  • User wants to identify trending topics for content creation
  • User asks about decaying content or traffic drops
  • User wants a prioritized list of keywords to target

Tools

Content Attack Brief (content_attack_brief.py)

Full keyword intelligence pipeline. Requires AHREFS_TOKEN and GSC auth.

# Run the full brief
python content_attack_brief.py

What it produces:

  • Topic fingerprint from your content library
  • BOFU money keywords ranked by Impact × Confidence
  • Trending keywords with sparkline visualizations
  • Competitor gap analysis (keywords they rank for, you don't)
  • Decaying page alerts (traffic drops >30%)
  • Execution pipeline (auto-create → semi-auto → team)

Output: Prints formatted report to stdout + saves JSON to OUTPUT_DIR/content-attack-brief-latest.json

GSC Client (gsc_client.py)

Google Search Console API client. Works as CLI or importable library.

# CLI usage
python gsc_client.py --queries 50 --days 28
python gsc_client.py --striking                    # Striking distance keywords (pos 4-20)
python gsc_client.py --pages 100 --days 7
python gsc_client.py --trend                       # Daily click/impression trend
python gsc_client.py --devices                     # Mobile vs desktop split
python gsc_client.py --sites                       # List verified properties
python gsc_client.py --json --queries 25           # JSON output
# Library usage
from gsc_client import GSCClient

gsc = GSCClient()
rows = gsc.striking_distance(days=28, min_position=4, max_position=20)
for row in rows:
    print(f"{row['keys'][0]}: pos {row['position']:.1f}, {row['impressions']} impressions")
GSC Auth (gsc_auth.py)

One-time OAuth setup for Google Search Console access.

python gsc_auth.py
# Opens browser → Google Sign-In → saves token locally
Trend Scout (trend_scout.py)

Multi-source trend detection. No API keys required for basic functionality.

python trend_scout.py

Sources: Google Trends RSS, Hacker News, Reddit, X/Twitter (needs BRAVE_API_KEY), YouTube outlier detection

Output: Prints summary + saves JSON to OUTPUT_DIR/flash-trends-latest.json and markdown report.

Configuration

All scripts read from environment variables. Copy .env.example to .env and fill in your values.

Required:

  • GSC_SITE_URL — your Google Search Console property URL
  • GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET — for GSC OAuth
  • YOUR_DOMAIN — your root domain

Optional:

  • AHREFS_TOKEN — enables Ahrefs keyword data and competitor analysis
  • COMPETITORS — comma-separated competitor domains
  • BRAVE_API_KEY — enables X/Twitter trend scanning
  • CONTENT_VERTICALS — comma-separated topics for trend relevance scoring
  • TREND_SUBREDDITS — comma-separated subreddits to monitor

Scoring Model

Keywords are scored on two axes:

Impact (0-10): Volume + CPC + Funnel Stage + Trend direction Confidence (0-10): Keyword Difficulty + Current ranking position + Topic authority

Priority = Impact × Confidence (max 100)

Funnel Classification

  • BOFU: Commercial/transactional intent, or keywords containing "agency", "services", "pricing", "best", "vs", "hire"
  • MOFU: Informational with buying signals — "how to", "guide", "roi", "case study"
  • TOFU: Pure informational
  1. Weekly: Run content_attack_brief.py for the full intelligence report
  2. Daily: Run gsc_client.py --striking to monitor striking distance keywords
  3. 2x/week: Run trend_scout.py to catch trending topics early
  4. Monthly: Review competitor gaps and adjust COMPETITORS list

SEO/AEO/GEO Closed Loop

Use analytics readbacks before promoting any SEO, AEO, GEO, or content-refresh playbook change.

Inputs:

  • GSC clicks, impressions, CTR, average position, queries, pages
  • GA4 sessions, engaged sessions, conversions, assisted leads
  • Ahrefs rankings, backlinks, traffic estimates, keyword movement
  • ClickFlow opportunities where available
  • AI-search / answer-engine / GEO visibility where available
  • CMS/page change log

Judgment:

  • Compare baseline vs candidate windows.
  • Segment by page, query, topic, intent, and source.
  • Track confounders: seasonality, indexing lag, brand spikes, campaigns, tracking changes, and unrelated site edits.

Promotion rule:

  • Promote the playbook patch only if the candidate beats baseline or exposes a repeatable signal.
  • Otherwise mark it unproven, keep testing, or rollback.

Common readback windows:

  • Content refresh: 7, 14, 28, and 56 days
  • New content: 14, 28, 56, and 90 days
  • Technical SEO fix: daily for 7 days, then 28-day readback
  • AEO/GEO visibility: weekly, because answer engines are noisy gremlins with citations

Required readback fields:

  • change made
  • owner
  • page/query/topic affected
  • baseline window
  • candidate window
  • source systems pulled
  • primary and secondary metrics
  • caveats
  • decision: promote / keep testing / rollback / unproven
  • next playbook patch

Dependencies

pip install -r requirements.txt
1# AI SEO Ops
2 
3## Preamble (runs on skill start)
4 
5```bash
6# Version check (silent if up to date)
7python3 telemetry/version_check.py 2>/dev/null || true
8 
9# Telemetry opt-in (first run only, then remembers your choice)
10python3 telemetry/telemetry_init.py 2>/dev/null || true
11```
12 
13> **Privacy:** This skill logs usage locally to `~/.ai-marketing-skills/analytics/`. Remote telemetry is opt-in only. No code, file paths, or repo content is ever collected. See `telemetry/README.md`.
14 
15---
16 
17AI-powered SEO operations: keyword intelligence, competitor gap analysis, GSC optimization, and trend detection.
18 
19## When to Use
20 
21- User asks for keyword research, content brief, or SEO analysis
22- User wants to find quick-win keywords from Google Search Console
23- User needs a competitor gap analysis
24- User wants to identify trending topics for content creation
25- User asks about decaying content or traffic drops
26- User wants a prioritized list of keywords to target
27 
28## Tools
29 
30### Content Attack Brief (`content_attack_brief.py`)
31 
32Full keyword intelligence pipeline. Requires `AHREFS_TOKEN` and GSC auth.
33 
34```bash
35# Run the full brief
36python content_attack_brief.py
37```
38 
39**What it produces:**
40- Topic fingerprint from your content library
41- BOFU money keywords ranked by Impact × Confidence
42- Trending keywords with sparkline visualizations
43- Competitor gap analysis (keywords they rank for, you don't)
44- Decaying page alerts (traffic drops >30%)
45- Execution pipeline (auto-create → semi-auto → team)
46 
47**Output:** Prints formatted report to stdout + saves JSON to `OUTPUT_DIR/content-attack-brief-latest.json`
48 
49### GSC Client (`gsc_client.py`)
50 
51Google Search Console API client. Works as CLI or importable library.
52 
53```bash
54# CLI usage
55python gsc_client.py --queries 50 --days 28
56python gsc_client.py --striking # Striking distance keywords (pos 4-20)
57python gsc_client.py --pages 100 --days 7
58python gsc_client.py --trend # Daily click/impression trend
59python gsc_client.py --devices # Mobile vs desktop split
60python gsc_client.py --sites # List verified properties
61python gsc_client.py --json --queries 25 # JSON output
62```
63 
64```python
65# Library usage
66from gsc_client import GSCClient
67 
68gsc = GSCClient()
69rows = gsc.striking_distance(days=28, min_position=4, max_position=20)
70for row in rows:
71 print(f"{row['keys'][0]}: pos {row['position']:.1f}, {row['impressions']} impressions")
72```
73 
74### GSC Auth (`gsc_auth.py`)
75 
76One-time OAuth setup for Google Search Console access.
77 
78```bash
79python gsc_auth.py
80# Opens browser → Google Sign-In → saves token locally
81```
82 
83### Trend Scout (`trend_scout.py`)
84 
85Multi-source trend detection. No API keys required for basic functionality.
86 
87```bash
88python trend_scout.py
89```
90 
91**Sources:** Google Trends RSS, Hacker News, Reddit, X/Twitter (needs `BRAVE_API_KEY`), YouTube outlier detection
92 
93**Output:** Prints summary + saves JSON to `OUTPUT_DIR/flash-trends-latest.json` and markdown report.
94 
95## Configuration
96 
97All scripts read from environment variables. Copy `.env.example` to `.env` and fill in your values.
98 
99Required:
100- `GSC_SITE_URL` — your Google Search Console property URL
101- `GOOGLE_CLIENT_ID` / `GOOGLE_CLIENT_SECRET` — for GSC OAuth
102- `YOUR_DOMAIN` — your root domain
103 
104Optional:
105- `AHREFS_TOKEN` — enables Ahrefs keyword data and competitor analysis
106- `COMPETITORS` — comma-separated competitor domains
107- `BRAVE_API_KEY` — enables X/Twitter trend scanning
108- `CONTENT_VERTICALS` — comma-separated topics for trend relevance scoring
109- `TREND_SUBREDDITS` — comma-separated subreddits to monitor
110 
111## Scoring Model
112 
113Keywords are scored on two axes:
114 
115**Impact (0-10):** Volume + CPC + Funnel Stage + Trend direction
116**Confidence (0-10):** Keyword Difficulty + Current ranking position + Topic authority
117 
118**Priority = Impact × Confidence** (max 100)
119 
120## Funnel Classification
121 
122- **BOFU:** Commercial/transactional intent, or keywords containing "agency", "services", "pricing", "best", "vs", "hire"
123- **MOFU:** Informational with buying signals — "how to", "guide", "roi", "case study"
124- **TOFU:** Pure informational
125 
126## Recommended Workflow
127 
1281. **Weekly:** Run `content_attack_brief.py` for the full intelligence report
1292. **Daily:** Run `gsc_client.py --striking` to monitor striking distance keywords
1303. **2x/week:** Run `trend_scout.py` to catch trending topics early
1314. **Monthly:** Review competitor gaps and adjust `COMPETITORS` list
132 
133## SEO/AEO/GEO Closed Loop
134 
135Use analytics readbacks before promoting any SEO, AEO, GEO, or content-refresh playbook change.
136 
137Inputs:
138- GSC clicks, impressions, CTR, average position, queries, pages
139- GA4 sessions, engaged sessions, conversions, assisted leads
140- Ahrefs rankings, backlinks, traffic estimates, keyword movement
141- ClickFlow opportunities where available
142- AI-search / answer-engine / GEO visibility where available
143- CMS/page change log
144 
145Judgment:
146- Compare baseline vs candidate windows.
147- Segment by page, query, topic, intent, and source.
148- Track confounders: seasonality, indexing lag, brand spikes, campaigns, tracking changes, and unrelated site edits.
149 
150Promotion rule:
151- Promote the playbook patch only if the candidate beats baseline or exposes a repeatable signal.
152- Otherwise mark it `unproven`, keep testing, or rollback.
153 
154Common readback windows:
155- Content refresh: 7, 14, 28, and 56 days
156- New content: 14, 28, 56, and 90 days
157- Technical SEO fix: daily for 7 days, then 28-day readback
158- AEO/GEO visibility: weekly, because answer engines are noisy gremlins with citations
159 
160Required readback fields:
161- change made
162- owner
163- page/query/topic affected
164- baseline window
165- candidate window
166- source systems pulled
167- primary and secondary metrics
168- caveats
169- decision: promote / keep testing / rollback / unproven
170- next playbook patch
171 
172## Dependencies
173 
174```bash
175pip install -r requirements.txt
176```
177 

Discussion

Alternatives

Agentic Browsing ReadinessAudit and fix agent readiness: the Lighthouse Agentic Browsing fraction, accessibility tree for agents, robots.txt and Content-Signal for AI agents, WAF treatment of agent traffic, llms.txt, Markdown delivery, ai-catalog.json, /.well-known discovery files, and WebMCP tools. Exclude AI citability and brand signals (seo-geo) and commerce protocol depth (seo-ecommerce).Marketing · MITBacklink Profile AnalysisBacklink profile analysis: referring domains, anchor text distribution, toxic link detection, competitor gap analysis. Works with free APIs (Moz, Bing Webmaster, Common Crawl) and DataForSEO extension. Use when user says backlinks, link profile, referring domains, anchor text, toxic links, link gap, link building, disavow, or backlink audit.Marketing · MIT/setup-cmsConnect a CMS to notfair SEO tools. Guides users through configuring WordPress, Strapi, Contentful, or Ghost — tests the connection, and writes credentials to .env.local. Once set up, seo-analysis automatically cross- references CMS content against Google Search Console data. Use whenever the user says "connect my CMS", "set up WordPress", "configure Strapi", "add Contentful", "connect Ghost", or "CMS setup". Also trigger if the user asks why no CMS data appears in a seo-analysis report. · MITBacklink checkBacklink profile for any domain — referring domains, authority, anchors, new/lost links, and a side-by-side vs a competitor. Use when asked "check my backlinks", "backlink profile of X", "who links to them", or "link gap vs competitor".Marketing · MIT