$npx -y skills add TheMattBerman/seo-kit --skill seo-agentSelf-improving SEO system. Finds keywords via DataForSEO, writes content that ranks, monitors GSC for what's climbing, then writes MORE content to push winners higher. A feedback loop, not a one-shot tool.
| 1 | # SEO Agent — The Self-Improving SEO Loop |
| 2 | |
| 3 | Most SEO tools do one thing. Discover keywords. Write content. Check rankings. Done. |
| 4 | |
| 5 | This isn't that. |
| 6 | |
| 7 | The SEO Agent is a **feedback loop** — a system that finds opportunities, acts on them, watches what happens, and feeds those results back into the next round of work. Every cycle makes the next cycle smarter. Rankings climb. The content library grows. And you're always pushing the keywords that are *already moving* instead of starting from scratch. |
| 8 | |
| 9 | > "Don't just rank. Rank, learn, and rank higher." |
| 10 | |
| 11 | --- |
| 12 | |
| 13 | ## The Loop |
| 14 | |
| 15 | ``` |
| 16 | DISCOVER → WRITE → MONITOR → OPTIMIZE → REPEAT |
| 17 | ``` |
| 18 | |
| 19 | **1. DISCOVER** (`seo-discover.sh`) |
| 20 | Pull your current GSC rankings. Find what's in the strike zone (positions 5-20). Hit DataForSEO for related keywords you're missing. Score opportunities by volume, competition, and current position. Output a prioritized hit list. |
| 21 | |
| 22 | **2. WRITE** (You + Claude) |
| 23 | Take the top opportunity from discovery. Generate publication-ready SEO content — outline, draft, optimized headers, FAQs, schema markup. Brand voice from `workspace/brand/voice-profile.md` baked in. |
| 24 | |
| 25 | **3. MONITOR** (`seo-monitor.sh`) |
| 26 | Run weekly. Pull current GSC data. Compare to last snapshot. Flag what's climbing, what's dropping, what just cracked the strike zone. This is your radar. |
| 27 | |
| 28 | **4. OPTIMIZE** (`seo-compete.sh` + Claude) |
| 29 | Take the winners from monitoring — content climbing from 15 → 8. Write supporting articles that link to them. Add internal links from existing content. Push the climbers over the finish line. |
| 30 | |
| 31 | **5. REPEAT** |
| 32 | Discovery now has more context. Monitor has more history. Every loop compounds. |
| 33 | |
| 34 | --- |
| 35 | |
| 36 | ## The Strike Zone |
| 37 | |
| 38 | Positions 5–20 are where SEO leverage lives. |
| 39 | |
| 40 | - **Position 1–4**: Already winning. Defend. |
| 41 | - **Position 5–20**: ⚡ **THE STRIKE ZONE** — close enough to move, not yet getting the clicks. A supporting article, better internal links, or a refreshed page can jump these 5–10 spots. That's the difference between 2% CTR and 8% CTR. |
| 42 | - **Position 21+**: Too far out. Needs a full content build. |
| 43 | |
| 44 | The Agent focuses energy here by default. |
| 45 | |
| 46 | --- |
| 47 | |
| 48 | ## Scripts |
| 49 | |
| 50 | All scripts live in `~/clawd/skills/seo-agent/scripts/`. All use bash + curl + jq. No Python. No npm. |
| 51 | |
| 52 | ### seo-discover.sh — Find Your Next Opportunity |
| 53 | |
| 54 | ```bash |
| 55 | ./seo-discover.sh --site sc-domain:example.com [--seeds "keyword1,keyword2"] [--limit 20] |
| 56 | ``` |
| 57 | |
| 58 | What it does: |
| 59 | 1. Pulls your GSC top queries (last 28 days) |
| 60 | 2. Filters for strike zone keywords (positions 5–20) |
| 61 | 3. Hits DataForSEO for keyword suggestions around your top queries |
| 62 | 4. Gets search volume + competition for all candidates |
| 63 | 5. Scores and ranks opportunities |
| 64 | 6. Outputs a prioritized JSON list |
| 65 | |
| 66 | **Output fields:** `keyword`, `current_position`, `search_volume`, `competition`, `opportunity_score` |
| 67 | |
| 68 | Add `--json` for raw machine-readable output. Default is a human-readable table. |
| 69 | |
| 70 | ### seo-monitor.sh — Track What's Moving |
| 71 | |
| 72 | ```bash |
| 73 | ./seo-monitor.sh --site sc-domain:example.com [--days 28] |
| 74 | ``` |
| 75 | |
| 76 | What it does: |
| 77 | 1. Pulls current GSC data |
| 78 | 2. Loads previous snapshot from `~/clawd/workspace/seo-agent/snapshots/` |
| 79 | 3. Diffs positions: climbing, dropping, new entries |
| 80 | 4. Highlights strike zone keywords ready to push |
| 81 | 5. Flags content losing ground (act before it falls further) |
| 82 | 6. Saves new snapshot for next comparison |
| 83 | |
| 84 | Snapshots stored at: `~/clawd/workspace/seo-agent/snapshots/SITE-YYYY-MM-DD.json` |
| 85 | |
| 86 | ### seo-compete.sh — Find Their Keywords, Take Them |
| 87 | |
| 88 | ```bash |
| 89 | ./seo-compete.sh --site example.com --competitor competitor.com [--limit 30] |
| 90 | ``` |
| 91 | |
| 92 | What it does: |
| 93 | 1. Uses DataForSEO to find all keywords your competitor ranks for |
| 94 | 2. Cross-references against your rankings |
| 95 | 3. Returns the gap — keywords they're winning that you're not targeting |
| 96 | 4. Scored by their position + search volume (easiest wins first) |
| 97 | |
| 98 | This feeds directly back into DISCOVER as a seed list. |
| 99 | |
| 100 | --- |
| 101 | |
| 102 | ## Configuration |
| 103 | |
| 104 | On first use, create `~/clawd/workspace/seo-agent/config.yaml`: |
| 105 | |
| 106 | ```yaml |
| 107 | site: "sc-domain:example.com" |
| 108 | competitors: |
| 109 | - competitor1.com |
| 110 | - competitor2.com |
| 111 | content_directory: "./content" |
| 112 | monitor_frequency: "weekly" |
| 113 | target_positions: [5, 20] # the strike zone |
| 114 | min_search_volume: 100 |
| 115 | ``` |
| 116 | |
| 117 | Scripts read this config automatically. Override any setting with CLI flags. |
| 118 | |
| 119 | --- |
| 120 | |
| 121 | ## Setup |
| 122 | |
| 123 | ### 1. DataForSEO Credentials |
| 124 | ```bash |
| 125 | export DATAFORSEO_LOGIN=your@email.com |
| 126 | export DATAFORSEO_PASSWORD=yourpassword |
| 127 | ``` |
| 128 | |
| 129 | ### 2. Google Search Console Auth |
| 130 | Same auth as `gsc-report`. If you've set that up, you're ready. |
| 131 | |
| 132 | Options: |
| 133 | - `export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json` |
| 134 | - |