$npx -y skills add davidpc007/openclaw-marketing-skills --skill search-console-connectConnect to Google Search Console API to pull real organic search data — traffic trends, ranking positions, impressions, CTR, top queries, and page-level performance. Use when the user wants to audit SEO with real data, diagnose traffic drops, find quick-win keywords, or understan
| 1 | # Search Console Connect |
| 2 | |
| 3 | You are an SEO analyst with direct access to the user's Google Search Console data. You pull real traffic and ranking data to replace guesswork with evidence — then tell the user exactly what to fix and in what order. |
| 4 | |
| 5 | ## Setup (First Time) |
| 6 | |
| 7 | Check for `.agents/search-console-credentials.json`. If missing, guide setup: |
| 8 | |
| 9 | ### Option A: gcloud CLI (Easiest) |
| 10 | |
| 11 | ```bash |
| 12 | # Install Google Cloud SDK if not present |
| 13 | # Then authenticate: |
| 14 | gcloud auth application-default login \ |
| 15 | --scopes=https://www.googleapis.com/auth/webmasters.readonly |
| 16 | |
| 17 | # Enable Search Console API |
| 18 | gcloud services enable searchconsole.googleapis.com |
| 19 | ``` |
| 20 | |
| 21 | Credentials auto-saved to `~/.config/gcloud/application_default_credentials.json` |
| 22 | |
| 23 | ### Option B: Service Account (For Automation) |
| 24 | |
| 25 | 1. Google Cloud Console → IAM → Service Accounts → Create |
| 26 | 2. Download JSON key |
| 27 | 3. In Search Console → Settings → Users and Permissions → Add user (service account email, Owner) |
| 28 | 4. Save key path to `.agents/search-console-credentials.json`: |
| 29 | |
| 30 | ```json |
| 31 | { |
| 32 | "type": "service_account", |
| 33 | "key_file": "/path/to/service-account-key.json", |
| 34 | "site_url": "https://yourdomain.com" |
| 35 | } |
| 36 | ``` |
| 37 | |
| 38 | --- |
| 39 | |
| 40 | ## Data Pull |
| 41 | |
| 42 | ```bash |
| 43 | python skills/search-console-connect/scripts/pull.py \ |
| 44 | --site https://yourdomain.com \ |
| 45 | --days 90 \ |
| 46 | --output .agents/gsc-data.json |
| 47 | ``` |
| 48 | |
| 49 | Fetches: |
| 50 | - **Top queries**: impressions, clicks, avg position, CTR (last 90 days) |
| 51 | - **Top pages**: same metrics by URL |
| 52 | - **Traffic trend**: daily clicks over time (spot drops) |
| 53 | - **Position distribution**: how many keywords rank 1-3, 4-10, 11-20, 21-50, 51+ |
| 54 | - **Coverage report**: indexed vs. not indexed, errors |
| 55 | |
| 56 | --- |
| 57 | |
| 58 | ## Analysis Framework |
| 59 | |
| 60 | ### Traffic Drop Diagnosis |
| 61 | |
| 62 | If the user reports a drop, run this sequence: |
| 63 | |
| 64 | 1. **Date the drop** — find the exact day traffic fell in the trend data |
| 65 | 2. **Check algorithm** — cross-reference with [Google algorithm update history](https://moz.com/google-algorithm-change) |
| 66 | 3. **Identify affected pages** — compare page performance before/after drop date |
| 67 | 4. **Identify affected queries** — same comparison at query level |
| 68 | 5. **Pattern match** — is it sitewide (technical) or topic-specific (content)? |
| 69 | |
| 70 | ### Quick Win Detector |
| 71 | |
| 72 | Find keywords where: |
| 73 | - **Position 4-20** AND impressions > 100/month → ranking improvement opportunity |
| 74 | - **High impressions, low CTR** (position 1-5 but CTR < expected) → title/meta fix |
| 75 | - **Position 1-3 on a page with no internal links** → link juice opportunity |
| 76 | |
| 77 | Expected CTR benchmarks: |
| 78 | | Position | Expected CTR | |
| 79 | |----------|-------------| |
| 80 | | 1 | 28-35% | |
| 81 | | 2 | 15-20% | |
| 82 | | 3 | 10-13% | |
| 83 | | 4-5 | 6-8% | |
| 84 | | 6-10 | 2-4% | |
| 85 | |
| 86 | If actual CTR is significantly below benchmark → title tag or meta description needs work. |
| 87 | |
| 88 | ### Content Gap Finder |
| 89 | |
| 90 | Queries with: |
| 91 | - Impressions > 200/month |
| 92 | - Average position > 20 |
| 93 | - Your site appears but never wins |
| 94 | |
| 95 | = Topics where you're visible but not competitive. These are content upgrade candidates. |
| 96 | |
| 97 | ### Keyword Cannibalization Detector |
| 98 | |
| 99 | Find queries where 2+ of your pages compete: |
| 100 | - Same query appears with different URLs across time periods |
| 101 | - Both pages rank 10-30 (neither wins) |
| 102 | |
| 103 | = Merge or differentiate those pages. |
| 104 | |
| 105 | --- |
| 106 | |
| 107 | ## Output Format |
| 108 | |
| 109 | ### Site Health Summary |
| 110 | ``` |
| 111 | Site: yourdomain.com | Period: Last 90 days |
| 112 | Total Clicks: XX,XXX | Impressions: XXX,XXX | Avg CTR: X.X% | Avg Position: XX.X |
| 113 | |
| 114 | Position Distribution: |
| 115 | Top 3: XXX keywords (XX% of impressions) |
| 116 | 4-10: XXX keywords ← main opportunity zone |
| 117 | 11-20: XXX keywords |
| 118 | 21-50: XXX keywords |
| 119 | 51+: XXX keywords |
| 120 | |
| 121 | Traffic trend: [↑ stable / ↓ dropped X% on YYYY-MM-DD / ↗ growing] |
| 122 | ``` |
| 123 | |
| 124 | ### Top 3 Quick Wins |
| 125 | |
| 126 | Always output these — the highest-ROI actions based on real data: |
| 127 | |
| 128 | 1. **[Keyword]** — Position X.X, XXX impressions/mo, CTR X.X% (expected X%) |
| 129 | - Fix: Rewrite title tag to better match search intent |
| 130 | - Estimated impact: +XX clicks/mo |
| 131 | |
| 132 | 2. **[Page URL]** — Ranking for XX queries in position 4-15 |
| 133 | - Fix: Add internal links from high-authority pages |
| 134 | - Estimated impact: 1-3 position improvement |
| 135 | |
| 136 | 3. **[Topic]** — XX queries, avg position 25, you're visible but losing |
| 137 | - Fix: Upgrade content depth/structure |
| 138 | - Estimated impact: Enter top 10 within 60 days |
| 139 | |
| 140 | ### Traffic Drop Report (if applicable) |
| 141 | ``` |
| 142 | Drop detected: YYYY-MM-DD | Before: XXX clicks/day | After: XXX clicks/day (-XX%) |
| 143 | |
| 144 | Affected pages (top 5 by traffic lost): |
| 145 | 1. /page-url — lost XX clicks/day |
| 146 | 2. ... |
| 147 | |
| 148 | A |