@roilab/crm-cli 0.1.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +125 -6
  2. package/SKILL.md +256 -7
  3. package/SURFACE.txt +148 -3
  4. package/dist/bin/crm.js +26 -2
  5. package/dist/bin/crm.js.map +1 -1
  6. package/dist/src/commands/access.js +104 -0
  7. package/dist/src/commands/access.js.map +1 -0
  8. package/dist/src/commands/brief.js +52 -0
  9. package/dist/src/commands/brief.js.map +1 -0
  10. package/dist/src/commands/chat.js +203 -0
  11. package/dist/src/commands/chat.js.map +1 -0
  12. package/dist/src/commands/commands.js +89 -0
  13. package/dist/src/commands/commands.js.map +1 -0
  14. package/dist/src/commands/comment.js +1 -0
  15. package/dist/src/commands/comment.js.map +1 -1
  16. package/dist/src/commands/generic.js +335 -5
  17. package/dist/src/commands/generic.js.map +1 -1
  18. package/dist/src/commands/integrations.js +236 -0
  19. package/dist/src/commands/integrations.js.map +1 -0
  20. package/dist/src/commands/mention.js +139 -0
  21. package/dist/src/commands/mention.js.map +1 -0
  22. package/dist/src/commands/options.js +21 -1
  23. package/dist/src/commands/options.js.map +1 -1
  24. package/dist/src/commands/report.js +209 -0
  25. package/dist/src/commands/report.js.map +1 -0
  26. package/dist/src/commands/review.js +136 -0
  27. package/dist/src/commands/review.js.map +1 -1
  28. package/dist/src/commands/skill.js +836 -0
  29. package/dist/src/commands/skill.js.map +1 -0
  30. package/dist/src/commands/task.js +298 -4
  31. package/dist/src/commands/task.js.map +1 -1
  32. package/dist/src/commands/time.js +242 -0
  33. package/dist/src/commands/time.js.map +1 -0
  34. package/dist/src/lib/skillBundles.js +84 -0
  35. package/dist/src/lib/skillBundles.js.map +1 -0
  36. package/dist/src/lib/skillManifest.js +77 -0
  37. package/dist/src/lib/skillManifest.js.map +1 -0
  38. package/dist/src/lib/skillSidecar.js +69 -0
  39. package/dist/src/lib/skillSidecar.js.map +1 -0
  40. package/dist/src/lib/skillWriter.js +162 -0
  41. package/dist/src/lib/skillWriter.js.map +1 -0
  42. package/dist/src/transport/envelope.js +12 -2
  43. package/dist/src/transport/envelope.js.map +1 -1
  44. package/dist/src/transport/http.js +27 -0
  45. package/dist/src/transport/http.js.map +1 -1
  46. package/dist/src/transport/run.js +6 -0
  47. package/dist/src/transport/run.js.map +1 -1
  48. package/dist/src/types.js.map +1 -1
  49. package/dist/src/utils/server-nudge.js +57 -0
  50. package/dist/src/utils/server-nudge.js.map +1 -0
  51. package/dist/src/utils/version-check.js +68 -0
  52. package/dist/src/utils/version-check.js.map +1 -1
  53. package/package.json +2 -1
  54. package/skill-bundles/tools/ahrefs-tool/SKILL.md +134 -0
  55. package/skill-bundles/tools/brightlocal-tool/SKILL.md +154 -0
  56. package/skill-bundles/tools/dataforseo-tool/SKILL.md +118 -0
  57. package/skill-bundles/tools/google-analytics-tool/SKILL.md +143 -0
  58. package/skill-bundles/tools/google-search-console-tool/SKILL.md +133 -0
  59. package/skill-bundles/tools/local-falcon-tool/SKILL.md +142 -0
  60. package/skill-bundles/tools/localseodata-tool/SKILL.md +388 -0
  61. package/skill-bundles/tools/lsa-spy-tool/SKILL.md +113 -0
  62. package/skill-bundles/tools/screaming-frog-tool/SKILL.md +166 -0
  63. package/skill-bundles/tools/semrush-tool/SKILL.md +121 -0
  64. package/skill-bundles/tools/serpapi-tool/SKILL.md +148 -0
  65. package/skill-bundles/tools/task-preflight/SKILL.md +149 -0
  66. package/skill-bundles/tools/tool-routing/SKILL.md +59 -0
  67. package/skill-bundles/tools/whitespark-tool/SKILL.md +129 -0
@@ -0,0 +1,142 @@
1
+ ---
2
+ name: local-falcon-tool
3
+ description: When the user wants to run a geogrid scan, check existing scan reports, track ranking trends over time, monitor GBP changes via Falcon Guard, or analyze reviews. Also use when the user says "run a scan," "check my rankings," "Local Falcon," "how am I ranking," "ranking heatmap," or "scan this keyword." This is the execution tool — for interpreting results, also load geogrid-analysis.
4
+ ---
5
+
6
+ # Local Falcon Tool
7
+
8
+ > **Note:** LocalSEOData (`localseodata-tool`) now has a `geogrid_scan` endpoint for one-time ranking scans. Use LocalSEOData for quick audits and one-off scans. Local Falcon remains essential for trend reports, recurring campaigns, Falcon Guard monitoring, and AI platform scans (GAIO/ChatGPT/Gemini/Grok).
9
+
10
+ You have direct access to Local Falcon via MCP. This skill tells you WHEN to use each operation and WHAT to do with the results.
11
+
12
+ ## When to Use Local Falcon vs Other Tools
13
+
14
+ | You Need | Use Local Falcon | Use Instead |
15
+ |----------|-----------------|-------------|
16
+ | Rankings across a geographic area | ✅ Geogrid scans | — |
17
+ | Rankings at one specific point | ✅ Can do it but overkill | SerpAPI for quick spot-check |
18
+ | Competitor rankings in an area | ✅ Competitor reports auto-generated | — |
19
+ | Ranking trends over time | ✅ Trend reports | — |
20
+ | GBP monitoring for changes | ✅ Falcon Guard | — |
21
+ | Review analysis with sentiment | ✅ Reviews Analysis | — |
22
+ | Keyword search volume | ❌ | Semrush, Ahrefs, DataForSEO |
23
+ | Backlink data | ❌ | Ahrefs, Semrush |
24
+ | Website traffic data | ❌ | Google Analytics |
25
+ | Technical site audit | ❌ | Screaming Frog |
26
+
27
+ ## Before Running Any Scan
28
+
29
+ **Always check existing reports first.** Scans cost credits. Don't duplicate work.
30
+
31
+ ```
32
+ Step 1: listAllLocalFalconLocations → Find the place ID
33
+ Step 2: listLocalFalconScanReports (filter by placeId + keyword) → Check if a recent scan exists
34
+ Step 3: Only run a NEW scan if no recent report exists or the user explicitly wants fresh data
35
+ ```
36
+
37
+ ## Core Workflows
38
+
39
+ ### Run a New Ranking Scan
40
+
41
+ **When:** User wants to know how a business ranks for a keyword across a geographic area.
42
+
43
+ 1. **Find the business:** `listAllLocalFalconLocations` — search by name or address
44
+ - If not found: `searchForLocalFalconBusinessLocation` → `saveLocalFalconBusinessLocationToAccount`
45
+ 2. **Confirm scan parameters with user:**
46
+ - Keyword (what customers search)
47
+ - Grid size (see grid table below)
48
+ - Radius (see radius table below)
49
+ - Platform: google, apple, gaio, chatgpt, gemini, grok, aimode
50
+ - AI analysis: yes/no (Google only, recommended)
51
+ 3. **Run:** `runLocalFalconScan` — returns immediately with "submitted"
52
+ 4. **Poll:** `listLocalFalconScanReports` (filter by placeId) — check every 30 seconds
53
+ 5. **Retrieve:** `getLocalFalconReport` with fieldmask for analysis
54
+ 6. **Interpret:** Use `geogrid-analysis` skill to diagnose results
55
+
56
+ **Recommended fieldmask for analysis:**
57
+ `report_key,date,place_id,keyword,location,arp,atrp,solv,found_in,total_competitors,grid_size,radius,measurement,ai_analysis,image,heatmap`
58
+
59
+ ### Check Existing Reports
60
+
61
+ **When:** User asks about current/recent rankings, or you need baseline data.
62
+
63
+ 1. `listLocalFalconScanReports` with filters (placeId, keyword, date range)
64
+ 2. Use fieldmask: `report_key,date,keyword,location.name,arp,atrp,solv,grid_size,platform`
65
+ 3. If multiple reports exist for same keyword: `getLocalFalconTrendReport` for the trend view
66
+
67
+ ### Track Ranking Trends
68
+
69
+ **When:** User wants to see if rankings are improving or declining.
70
+
71
+ 1. `listLocalFalconTrendReports` (filter by placeId and keyword)
72
+ 2. `getLocalFalconTrendReport` — returns historical ARP, ATRP, SoLV per scan date
73
+ 3. Compare metrics across dates and correlate with optimization actions
74
+
75
+ **Key insight:** Trend reports only exist when 2+ scans have identical settings (same placeId, keyword, grid size, radius, coordinates). If settings differ between scans, no trend report is generated.
76
+
77
+ ### Run a Campaign (Recurring Scans)
78
+
79
+ **When:** User wants automated regular scanning.
80
+
81
+ 1. `listLocalFalconCampaignReports` — check existing campaigns first
82
+ 2. `createLocalFalconCampaign` — set up keyword(s), location(s), frequency, grid size
83
+ 3. Campaign runs automatically on schedule
84
+ 4. `getLocalFalconCampaignReport` — retrieve aggregated results
85
+
86
+ **Campaign vs individual scans:** Campaigns consolidate data in one report. Individual scans generate separate trend/location/keyword reports. Use campaigns for ongoing monitoring, individual scans for one-off analysis.
87
+
88
+ ### Competitive Analysis
89
+
90
+ **When:** User wants to know who's beating them.
91
+
92
+ 1. Every scan auto-generates a competitor report
93
+ 2. `getLocalFalconCompetitorReports` — list available reports
94
+ 3. `getLocalFalconCompetitorReport` — top competitors with ARP, ATRP, SoLV, reviews, ratings
95
+ 4. Use fieldmask: `date,keyword,grid_size,radius,businesses.*.name,businesses.*.place_id,businesses.*.arp,businesses.*.atrp,businesses.*.solv,businesses.*.reviews,businesses.*.rating`
96
+
97
+ ### Monitor GBP for Changes (Falcon Guard)
98
+
99
+ **When:** User wants to protect their GBP from unauthorized edits.
100
+
101
+ 1. `listLocalFalconGuardReports` — see what's currently monitored
102
+ 2. `addLocationsToFalconGuard` — add locations to monitoring
103
+ 3. `getLocalFalconGuardReport` — view change history and metrics (calls, clicks, directions for OAuth-connected locations)
104
+
105
+ ### Review Analysis
106
+
107
+ **When:** User wants AI-powered review insights.
108
+
109
+ 1. `listLocalFalconReviewsAnalysisReports` — check existing analyses
110
+ 2. `getLocalFalconReviewsAnalysisReport` — full sentiment analysis, topics, competitor comparison
111
+
112
+ ## Grid Size Selection
113
+
114
+ | Business Type | Grid Size | Radius | Rationale |
115
+ |---------------|-----------|--------|-----------|
116
+ | Coffee shop, salon, restaurant | 5×5 or 7×7 | 1-3 mi | Customers walk/drive short distances |
117
+ | Dentist, chiropractor, single-location medical | 7×7 or 9×9 | 3-7 mi | City-wide draw |
118
+ | HVAC, plumber, electrician | 9×9 or 11×11 | 7-15 mi | Wide service area |
119
+ | Hospital system, franchise chain | 13×13 or 15×15 | 10-20 mi | Regional coverage |
120
+ | Rural business | 7×7 or 9×9 | 15-30 mi | Large but sparse area |
121
+
122
+ **Rule of thumb:** Grid size should cover the realistic service area. Too small = misleading good results. Too big = misleading bad results.
123
+
124
+ ## Credit Awareness
125
+
126
+ - Always check credits before running scans: `viewLocalFalconAccountInformation`
127
+ - Larger grids cost more credits
128
+ - Campaigns multiply: locations × keywords × frequency
129
+ - AI analysis adds cost per scan
130
+ - Never re-run a scan without checking if results already exist
131
+
132
+ ## What to Do Next
133
+
134
+ | What You Got | Next Action | Skill |
135
+ |--------------|-------------|-------|
136
+ | Scan results with ARP/ATRP/SoLV | Interpret the data and diagnose issues | `geogrid-analysis` |
137
+ | Competitor report data | Analyze what competitors do differently | `local-competitor-analysis` |
138
+ | Trend showing decline | Diagnose cause using decision trees | `geogrid-analysis` diagnostic trees |
139
+ | GBP changes detected via Guard | Review and revert unauthorized edits | `gbp-optimization` |
140
+ | Review analysis results | Build review strategy from insights | `review-management` |
141
+
142
+ **Default next step:** Never return raw scan numbers to the user. Always interpret through `geogrid-analysis` first.
@@ -0,0 +1,388 @@
1
+ ---
2
+ name: localseodata-tool
3
+ description: When the user wants to pull local SEO data — SERP results, local pack rankings, business profile data, reviews, citations, audits, geogrid scans, keyword research, AI visibility, competitor analysis, or any local search intelligence. This is the DEFAULT data tool for LocalSEOSkills. Trigger on any data request before considering other tools. Also trigger on "LocalSEOData," "LSD," "run an audit," "check my rankings," "pull reviews," "citation check," "keyword opportunities," "AI visibility," or "geogrid scan."
4
+ ---
5
+
6
+ # LocalSEOData Tool
7
+
8
+ You have direct access to LocalSEOData via MCP. This is the **default data source** for LocalSEOSkills. Check here first before routing to other tools.
9
+
10
+ **MCP Server:** `https://mcp.localseodata.com/mcp`
11
+ **Docs:** `https://localseodata.com/docs`
12
+
13
+ ## When to Use LocalSEOData vs Other Tools
14
+
15
+ LocalSEOData covers most local SEO data needs in one place. Only use other tools when LocalSEOData genuinely can't do the job.
16
+
17
+ | You Need | LocalSEOData | Use Instead |
18
+ |----------|-------------|-------------|
19
+ | Local pack rankings | ✅ `local_pack` | — |
20
+ | Full SERP with all features | ✅ `organic_serp` | — |
21
+ | Google Maps results | ✅ `maps` | — |
22
+ | Local Finder results | ✅ `local_finder` | — |
23
+ | Geogrid ranking scan | ✅ `geogrid_scan` | Local Falcon for trends, campaigns, Falcon Guard |
24
+ | Business profile data | ✅ `business_profile` | REST API recommended (MCP support coming) |
25
+ | Google reviews | ✅ `google_reviews` | — |
26
+ | Multi-platform reviews | ✅ `multi_platform_reviews` | — |
27
+ | Review velocity trends | ✅ `review_velocity` | — |
28
+ | Citation audit (NAP consistency) | ✅ `citation_audit` | — |
29
+ | Full local SEO audit | ✅ `local_audit` | — |
30
+ | Reputation audit | ✅ `reputation_audit` | — |
31
+ | Profile health check | ✅ `profile_health` | REST API recommended (MCP support coming) |
32
+ | On-page SEO audit | ✅ `page_audit` | Screaming Frog for site-wide crawls |
33
+ | Competitor gap analysis | ✅ `competitor_gap` | — |
34
+ | Keyword opportunities | ✅ `keyword_opportunities` | — |
35
+ | Keyword suggestions | ✅ `keyword_suggestions` | — |
36
+ | Related keywords | ✅ `related_keywords` | — |
37
+ | Search volume data | ✅ `search_volume` | `keyword_suggestions` also includes volume |
38
+ | Keyword trends | ✅ `keyword_trends` | — |
39
+ | Keywords a site ranks for | ✅ `keywords_for_site` | — |
40
+ | Backlink summary | ✅ `backlink_summary` | Ahrefs for deep backlink analysis |
41
+ | Backlink gap analysis | ✅ `backlink_gap` | Ahrefs for detailed link profiles |
42
+ | AI Overview detection | ✅ `ai_overview` | — |
43
+ | AI Mode response | ✅ `ai_mode` | — |
44
+ | AI mentions across platforms | ✅ `ai_mentions` | — |
45
+ | AI visibility scoring | ✅ `ai_visibility` | — |
46
+ | AI top cited sources | ✅ `ai_top_sources` | — |
47
+ | AI top cited pages | ✅ `ai_top_pages` | — |
48
+ | AI keyword-level data | ✅ `ai_keyword_data` | — |
49
+ | Raw AI/LLM response for a prompt | ✅ `ai_llm_response` | — |
50
+ | AI scraper (extract from AI results) | ✅ `ai_scraper` | — |
51
+ | AI competitor comparison | ✅ `ai_compare` | — |
52
+ | Local Services Ads data | ✅ `local_services_ads` | LSA Spy for market-level tracking over time |
53
+ | Competitor ad intelligence | ✅ `competitor_ads` | — |
54
+ | Business listings by category | ✅ `business_listings` | — |
55
+ | Brand mentions | ✅ `brand_mentions` | — |
56
+ | Q&A from GBP | ✅ `qa` (or `business_qa`) | — |
57
+ | Local authority score | ✅ `local_authority` | — |
58
+ | Ranking trends over time | ❌ | Local Falcon trend reports |
59
+ | GBP change monitoring | ❌ | Local Falcon (Falcon Guard) |
60
+ | Recurring scan campaigns | ❌ | Local Falcon campaigns |
61
+ | Deep backlink analysis (anchors, lost links) | ❌ | Ahrefs |
62
+ | Full site crawl (technical SEO) | ❌ | Screaming Frog |
63
+ | Actual traffic/conversion data | ❌ | Google Analytics |
64
+ | Real click/impression data | ❌ | Google Search Console |
65
+ | LSA market tracking over time | ❌ | LSA Spy |
66
+
67
+ ## Location Resolution
68
+
69
+ Many endpoints require a location string. **The required format varies by endpoint type:**
70
+
71
+ | Endpoint Group | Format | Example |
72
+ |---------------|--------|---------|
73
+ | SERP (organic_serp, local_pack, local_services_ads) | Canonical from `location_search` | `"Syracuse, NY,New York,United States"` |
74
+ | Maps, Local Finder | Canonical from `location_search` | `"Syracuse, NY,New York,United States"` |
75
+ | Business (profile, health, reviews, qa, listings) | City, ST | `"Buffalo, NY"` |
76
+ | Reviews (multi_platform, velocity, reputation_audit) | City, ST | `"Buffalo, NY"` |
77
+ | Competitor (competitor_gap, competitor_ads) | City, ST | `"Buffalo, NY"` |
78
+ | Citation audit | Full address + phone (not location param) | `address: "123 Main St, Buffalo, NY 14201"` |
79
+ | Keyword endpoints (US) | City, Full State Name | `"Syracuse, New York"` |
80
+ | Keyword endpoints (Canada) | City, Province Abbreviation | `"Port Colborne, ON"` |
81
+ | AI endpoints (keyword-data, visibility, mentions) | City, Full State Name | `"Syracuse, New York"` |
82
+ | Local audit, local authority | City, ST | `"Buffalo, NY"` |
83
+ | Geogrid scan | City, ST | `"Buffalo, NY"` |
84
+ | Business listings | City, ST | `"Buffalo, NY"` |
85
+ | Brand mentions | Business name only (no location) | `business_name: "Ace Plumbing"` |
86
+
87
+ **Note:** The API now normalizes US state and Canadian province abbreviations automatically (e.g. "NY" to "New York", "ON" to "Ontario"). Both "Buffalo, NY" and "Buffalo, New York" should work for all endpoints.
88
+
89
+ - Use `location_search` first to resolve the exact location name (free, 0 credits, **GET** not POST)
90
+ - For Maps/Local Finder: use the canonical `name` field from `location_search` exactly (commas, no spaces after commas)
91
+ - For keyword/AI endpoints: "City, State" format works (abbreviations are expanded server-side)
92
+
93
+ ---
94
+
95
+ ## Core Workflows
96
+
97
+ ### Full Local SEO Audit (One Call)
98
+
99
+ **When:** User says "audit this business," "check my local SEO," or "what's wrong with my rankings."
100
+
101
+ **Use:** `local_audit`
102
+ ```
103
+ business_name: "Ace Plumbing"
104
+ location: "Buffalo, NY"
105
+ ```
106
+
107
+ Returns local pack position, organic rankings, profile completeness, review velocity, and competitors in a single call. **50 credits.**
108
+
109
+ This replaces manually combining data from 3-4 different tools.
110
+
111
+ ### Geogrid Ranking Scan
112
+
113
+ **When:** User wants to see how a business ranks across a geographic area.
114
+
115
+ **Use:** `geogrid_scan`
116
+ ```
117
+ business: "Ace Plumbing"
118
+ keyword: "plumber near me"
119
+ location: "Buffalo, NY"
120
+ grid_size: "7x7" # 5x5 (default), 7x7, or 9x9
121
+ radius_miles: 3 # default 3
122
+ ```
123
+
124
+ This is an async operation — the tool polls until results are ready. Returns a rank grid, average rank, and coverage stats.
125
+
126
+ **Credit costs:** 5x5 = 50 credits, 7x7 = 98 credits, 9x9 = 162 credits. (Formula: grid points × 2.)
127
+
128
+ **For interpretation:** Load the `geogrid-analysis` strategy skill.
129
+
130
+ **Limitations vs Local Falcon:**
131
+ - No trend reports (can't compare scans over time)
132
+ - No campaigns (no recurring automated scans)
133
+ - No Falcon Guard (no GBP change monitoring)
134
+ - No AI platform scans (GAIO, ChatGPT, Gemini — use `ai_visibility` endpoints instead)
135
+
136
+ Use LocalSEOData geogrid for one-time scans and audits. Use Local Falcon for ongoing monitoring.
137
+
138
+ ### Business Profile Pull
139
+
140
+ **When:** Need GBP data for audit, optimization, or reporting.
141
+
142
+ **Use:** `business_profile`
143
+ ```
144
+ business_name: "Ace Plumbing"
145
+ location: "Buffalo, NY"
146
+ ```
147
+
148
+ Returns: name, rating, reviews, address, phone, website, hours, categories, attributes, photos count, description, verification status. **2 credits.**
149
+
150
+ **Note:** For `business_profile` and `profile_health`, use the REST API directly. MCP support for these endpoints is in progress.
151
+
152
+ ### Review Intelligence
153
+
154
+ **When:** User wants review data, sentiment analysis, or velocity tracking.
155
+
156
+ **Multiple endpoints depending on need:**
157
+
158
+ | Need | Endpoint | Credits |
159
+ |------|----------|---------|
160
+ | Read recent reviews | `google_reviews` | 1 per 10 reviews |
161
+ | Reviews across platforms | `multi_platform_reviews` | 6 |
162
+ | Review velocity over time | `review_velocity` | 6 |
163
+ | Full reputation audit | `reputation_audit` | 30 |
164
+
165
+ **`review_velocity`** is the most useful for ongoing clients — shows reviews/month, rating trend, reply rate, sentiment themes.
166
+
167
+ **`reputation_audit`** is the heavy hitter — reputation score, sentiment analysis, response rate, and recommendations. Use for new client onboarding or quarterly reviews.
168
+
169
+ ### Citation Audit
170
+
171
+ **When:** User wants to check NAP consistency across directories.
172
+
173
+ **Use:** `citation_audit`
174
+ ```
175
+ business_name: "Ace Plumbing"
176
+ address: "123 Main St, Buffalo, NY 14201"
177
+ phone: "(716) 555-1234"
178
+ ```
179
+
180
+ Checks 20 major directories (Yelp, BBB, Facebook, YellowPages, etc.). Returns consistency score and per-directory details. **50 credits.**
181
+
182
+ **Note:** Requires all three fields (name, address, phone) for NAP comparison.
183
+
184
+ ### Keyword Research
185
+
186
+ **When:** User needs keyword ideas, search volumes, or competitive keyword data.
187
+
188
+ | Need | Endpoint | Credits | Notes |
189
+ |------|----------|---------|-------|
190
+ | Keyword ideas for a business | `keyword_opportunities` | 4 | Best starting point |
191
+ | Suggestions from a seed keyword | `keyword_suggestions` | 2 | — |
192
+ | Search volume for specific keywords | `search_volume` | 1 | Use `keyword_suggestions` instead (includes volume) |
193
+ | Related keywords | `related_keywords` | 2 | — |
194
+ | Keywords a domain ranks for | `keywords_for_site` | 3 | Use `keyword_suggestions` instead |
195
+ | Keyword trends over time | `keyword_trends` | 1 | — |
196
+
197
+ **Start with `keyword_opportunities`** — it finds keywords based on the business category and location, shows difficulty, current rank, and volume. Best starting point for strategy.
198
+
199
+ Use `keyword_suggestions` when the user has a specific seed keyword and wants variations.
200
+
201
+ ### Competitor Analysis
202
+
203
+ **When:** User wants to understand competitive landscape.
204
+
205
+ **Use:** `competitor_gap`
206
+ ```
207
+ business_name: "Ace Plumbing"
208
+ location: "Buffalo, NY"
209
+ keyword: "plumber"
210
+ competitors: 5
211
+ ```
212
+
213
+ Returns ranking gaps, review count differences, and rating advantages vs competitors. **10 credits.**
214
+
215
+ **For ad intelligence:** `competitor_ads` shows Google Ads campaigns from a competitor domain. **2 credits.**
216
+
217
+ **For backlink gaps:** `backlink_gap` compares your domain against up to 5 competitors for link opportunities. **10 credits.**
218
+
219
+ ### AI Visibility
220
+
221
+ **When:** User asks about AI search visibility, AI Overviews, ChatGPT mentions, or GEO.
222
+
223
+ | Need | Endpoint | Credits |
224
+ |------|----------|---------|
225
+ | Does Google show an AI Overview? | `ai_overview` | 1 |
226
+ | What does Google AI Mode say? | `ai_mode` | 2 |
227
+ | Where does AI mention this keyword? | `ai_mentions` | 5 |
228
+ | Which sites do AI models cite? | `ai_top_sources` | 5 |
229
+ | Which pages do AI models cite? | `ai_top_pages` | 5 |
230
+ | How visible is a domain across AI? | `ai_visibility` | 10 |
231
+ | Keyword-level AI data | `ai_keyword_data` | 1 |
232
+ | Raw LLM response for a prompt | `ai_llm_response` | 8 |
233
+ | Extract data from AI search results | `ai_scraper` | 3 |
234
+
235
+ **Start with `ai_overview`** to check if AIO exists for the keyword, then use `ai_visibility` for domain-level scoring across multiple keywords.
236
+
237
+ **`ai_llm_response`** lets you send a prompt directly to an LLM and see the response. Useful for checking what ChatGPT/Gemini says about a business.
238
+ ```
239
+ prompt: "Best plumber in Buffalo NY"
240
+ platform: "chat_gpt" # Options: chat_gpt, claude, gemini, perplexity
241
+ ```
242
+
243
+ **`ai_keyword_data`** returns AI-specific metrics for keywords (uses `keywords` array, not singular).
244
+ ```
245
+ keywords: ["plumber buffalo", "emergency plumber buffalo ny"]
246
+ location: "Buffalo, New York"
247
+ ```
248
+
249
+ **`ai_compare`** compares AI visibility across domains. Requires `domains` (array of 2-5) and `keywords` (array of 1-10). May return sparse data for smaller businesses.
250
+
251
+ ### SERP Data
252
+
253
+ **When:** User wants to see what Google shows for a search.
254
+
255
+ | Need | Endpoint | Credits |
256
+ |------|----------|---------|
257
+ | Full SERP (organic + local + ads + PAA + AIO) | `organic_serp` | 1 |
258
+ | Local pack only | `local_pack` | 1 |
259
+ | Google Maps results | `maps` | 1 |
260
+ | Local Finder results | `local_finder` | 1 |
261
+ | Local Services Ads | `local_services_ads` | 1 |
262
+
263
+ **`organic_serp`** is the most complete — returns everything on the page in one call.
264
+
265
+ ### On-Page Audit
266
+
267
+ **When:** User wants to check a specific URL for SEO issues.
268
+
269
+ **Use:** `page_audit`
270
+ ```
271
+ url: "https://aceplumbing.com/services/drain-cleaning"
272
+ ```
273
+
274
+ Checks 50+ factors: title, meta, headings, images, Core Web Vitals, schema, mobile-friendliness. **4 credits.**
275
+
276
+ For site-wide crawls across many pages, use Screaming Frog instead.
277
+
278
+ ### Local Authority Score
279
+
280
+ **When:** User wants a single score representing local search authority.
281
+
282
+ **Use:** `local_authority`
283
+ ```
284
+ business_name: "Ace Plumbing"
285
+ location: "Buffalo, NY"
286
+ keyword: "plumber"
287
+ ```
288
+
289
+ Returns 0-100 score with component breakdown (rankings, reviews, profile completeness, citations) and percentile ranking. **10 credits.**
290
+
291
+ Great for client reporting and tracking improvement over time.
292
+
293
+ ---
294
+
295
+ ## Credit Cost Reference
296
+
297
+ *All costs verified against source code (`credits.ts`) on Apr 10, 2026.*
298
+
299
+ | Endpoint | Credits |
300
+ |----------|---------|
301
+ | `ping` | 0 |
302
+ | `location_search` | 0 (GET) |
303
+ | `local_pack` | 1 |
304
+ | `organic_serp` | 1 |
305
+ | `local_services_ads` | 1 |
306
+ | `local_finder` | 1 |
307
+ | `maps` | 1 |
308
+ | `ai_overview` | 1 |
309
+ | `keyword_trends` | 1 |
310
+ | `qa` / `business_qa` | 1 |
311
+ | `search_volume` | 1 per 50 keywords (use `keyword_suggestions`) |
312
+ | `ai_keyword_data` | 1 per 50 keywords |
313
+ | `google_reviews` | 1 per 10 reviews |
314
+ | `business_profile` | 2 |
315
+ | `profile_health` | 2 |
316
+ | `ai_mode` | 2 |
317
+ | `keyword_suggestions` | 2 |
318
+ | `related_keywords` | 2 |
319
+ | `competitor_ads` | 2 |
320
+ | `ai_scraper` | 3 |
321
+ | `keywords_for_site` | 3 (use `keyword_suggestions`) |
322
+ | `brand_mentions` | 3 |
323
+ | `page_audit` | 4 |
324
+ | `keyword_opportunities` | 4 |
325
+ | `backlink_summary` | 5 (use Ahrefs for backlinks) |
326
+ | `ai_mentions` | 5 |
327
+ | `ai_top_sources` | 5 |
328
+ | `ai_top_pages` | 5 |
329
+ | `multi_platform_reviews` | 6 |
330
+ | `review_velocity` | 6 |
331
+ | `ai_llm_response` | 8 |
332
+ | `ai_compare` | 10 |
333
+ | `ai_visibility` | 10 |
334
+ | `backlink_gap` | 10 |
335
+ | `business_listings` | 10 per 50 results |
336
+ | `competitor_gap` | 10 |
337
+ | `local_authority` | 10 |
338
+ | `reputation_audit` | 30 |
339
+ | `citation_audit` | 50 |
340
+ | `local_audit` | 50 |
341
+ | `geogrid_scan` (5x5) | 50 |
342
+ | `geogrid_scan` (7x7) | 98 |
343
+ | `geogrid_scan` (9x9) | 162 |
344
+
345
+ ---
346
+
347
+ ## Endpoint Notes
348
+
349
+ | Endpoint | Note |
350
+ |----------|------|
351
+ | `search_volume` | Works via REST API. `keyword_suggestions` also returns volume data as an alternative |
352
+ | `keywords_for_site` | Works via REST API |
353
+ | `backlink_summary` | REST path is `/v1/backlinks/summary` (not `/v1/links/backlink-summary`) |
354
+ | `ai_compare` | Requires `keywords` (array), not `keyword` (string). May return sparse data for small businesses |
355
+ | `business/reviews` | Works. Also aliased as `google_reviews` |
356
+ | `citation_audit` | REST path is `/v1/audit/citation` (also `/v1/audit/citation-consistency`). Not `/v1/citations/consistency` |
357
+ | `local_audit` | Uses async job processing (submit + poll). MCP tool handles polling automatically |
358
+
359
+ **REST API vs MCP:** For business profile endpoints (`business_profile`, `profile_health`), the REST API is recommended. MCP may add an invalid `keyword` parameter to these endpoints. Composite endpoints (`local_audit`, `review_velocity`, `citation_audit`, `reputation_audit`) work via both REST and MCP.
360
+
361
+ ---
362
+
363
+ ## Combining Endpoints for Common Workflows
364
+
365
+ ### New Client Onboarding
366
+ 1. `local_audit` — overall picture (50 credits)
367
+ 2. `business_profile` — GBP details (2 credits, REST API recommended)
368
+ 3. `citation_audit` — NAP consistency (50 credits)
369
+ 4. `review_velocity` — review health (6 credits)
370
+ 5. `keyword_opportunities` — keyword strategy (4 credits)
371
+ 6. `competitor_gap` — competitive landscape (10 credits)
372
+ **Total: 122 credits for a complete new client assessment.**
373
+
374
+ ### Monthly Report Data Pull
375
+ 1. `local_pack` for target keywords — ranking check (1 credit each)
376
+ 2. `review_velocity` — monthly review trends (6 credits)
377
+ 3. `local_authority` — authority score tracking (10 credits)
378
+ 4. `ai_overview` for target keywords — AI visibility check (1 credit each)
379
+
380
+ ### Quick Rank Check
381
+ 1. `local_pack` — who's in the 3-pack (1 credit)
382
+ Done.
383
+
384
+ ### Prospecting / Sales Research
385
+ 1. `business_profile` — pull their GBP data (2 credits, REST API recommended)
386
+ 2. `profile_health` — find gaps to pitch on (2 credits, REST API recommended)
387
+ 3. `google_reviews` — review situation (1 credit)
388
+ **Total: 5 credits to build a pitch.**
@@ -0,0 +1,113 @@
1
+ ---
2
+ name: lsa-spy-tool
3
+ description: When the user wants to check Local Services Ads rankings, see who's ranking in LSA results, monitor LSA competitive landscape, or track LSA ranking changes. Trigger on "LSA rankings," "Local Services Ads," "Google Guaranteed," "Google Screened," "who's ranking in LSAs," or "LSA competitors."
4
+ ---
5
+
6
+ # LSA Spy Tool
7
+
8
+ You have direct access to LSA Spy via MCP. This skill tells you WHEN to use each operation and WHAT to do with the results.
9
+
10
+ ## When to Use LSA Spy vs Other Tools
11
+
12
+ | You Need | Use LSA Spy | Use Instead |
13
+ |----------|------------|-------------|
14
+ | Who's ranking in LSA results right now | ✅ | — |
15
+ | LSA ranking changes over time | ✅ | — |
16
+ | Find a specific business in LSA results | ✅ | — |
17
+ | Which markets have LSA coverage | ✅ | — |
18
+ | Map pack / organic rankings | ❌ | Local Falcon |
19
+ | LSA ad setup and optimization strategy | ❌ Use LSA Spy for data, then | `lsa-ads` skill for strategy |
20
+ | Keyword search volume | ❌ | Semrush, Ahrefs |
21
+
22
+ ## Core Workflows
23
+
24
+ ### Check Current LSA Rankings
25
+
26
+ **When:** User asks "who's ranking in LSAs" or "how are we doing in LSAs" for a market.
27
+
28
+ 1. `list_markets` — find the relevant market ID by category + city
29
+ 2. `get_rankings` — current top-ranking businesses with positions
30
+ 3. If looking for a specific business: `find_business` with the business name
31
+
32
+ **What the data tells you:**
33
+ - Position 1-3: These businesses get the vast majority of LSA leads
34
+ - Businesses appearing consistently: Strong review profile + responsiveness + budget
35
+ - Missing from results entirely: Either not running LSAs or profile issues
36
+
37
+ ### Check Who's in a Market
38
+
39
+ **When:** User wants the full competitive landscape, not just who's ranking right now.
40
+
41
+ 1. `list_markets` — find market ID
42
+ 2. `get_businesses` — ALL businesses that have appeared, with average rank and appearance frequency
43
+ 3. Sort by average rank to find consistent top performers
44
+ 4. Look for businesses with high appearance frequency but mediocre rank (they're spending but not optimizing)
45
+
46
+ **What to look for:**
47
+ - Number of total competitors: Saturated markets (50+) vs thin markets (under 15)
48
+ - Average rank spread: Tight (competitive) vs wide (a few businesses dominate)
49
+ - New entrants: Businesses appearing recently that weren't there before
50
+
51
+ ### Monitor Ranking Changes
52
+
53
+ **When:** User wants to track movement — who's going up, who's going down.
54
+
55
+ 1. `list_markets` — find market ID
56
+ 2. `get_ranking_changes` — set days parameter (7 for weekly, 30 for monthly view)
57
+
58
+ **What the changes tell you:**
59
+ - Business moved UP: Likely got more/better reviews, improved responsiveness, or competitors dropped
60
+ - Business moved DOWN: Lost reviews, slow response times, budget issues, or new competitors entered
61
+ - NEW entrant: Fresh competitor — check their review count and rating
62
+ - Business DISAPPEARED: Paused ads, lost Google Guaranteed/Screened badge, or got suspended
63
+
64
+ ### Market Intelligence
65
+
66
+ **When:** User considering entering LSAs or wants strategic overview.
67
+
68
+ 1. `list_markets` — see all tracked markets
69
+ 2. `get_market_details` — see tracked search queries for a specific market
70
+ 3. `get_rankings` + `get_businesses` — understand competitive density
71
+ 4. Cross-reference top rankers' review counts against user's business
72
+
73
+ ## Interpreting LSA Spy Data
74
+
75
+ ### What Drives LSA Rankings
76
+
77
+ LSA rankings are NOT like organic/map pack. The primary factors:
78
+ 1. **Reviews** — count and rating (most important)
79
+ 2. **Responsiveness** — how fast you answer/respond to leads
80
+ 3. **Proximity** — distance from searcher
81
+ 4. **Business hours** — being open when someone searches
82
+ 5. **Budget** — having sufficient weekly budget
83
+ 6. **Badge status** — Google Guaranteed or Google Screened active
84
+
85
+ ### Reading the Rankings
86
+
87
+ | What You See | What It Means |
88
+ |--------------|---------------|
89
+ | Same 3 businesses always in top 3 | They have review + responsiveness advantage — hard to displace without matching both |
90
+ | High turnover in rankings | Market is competitive, small changes in signals cause movement |
91
+ | Business with fewer reviews ranking higher | Likely better responsiveness score or closer proximity |
92
+ | Business disappeared suddenly | Badge issue, budget exhausted, or suspension |
93
+ | Many businesses with similar rank | Tight competition — reviews and responsiveness are the tiebreakers |
94
+
95
+ ### Key Metrics to Track
96
+
97
+ - **Average rank**: Where a business typically appears (lower is better)
98
+ - **Appearance frequency**: How often they show up at all (consistency matters)
99
+ - **Rank trend**: Moving up or down over time
100
+ - **Market density**: Total competitors — affects cost per lead and difficulty
101
+
102
+ ## What to Do Next
103
+
104
+ | What You Found | Next Action | Skill |
105
+ |----------------|-------------|-------|
106
+ | User not ranking in LSAs | Check if LSA profile is set up, verify Google Guaranteed/Screened badge | `lsa-ads` |
107
+ | User ranking but in position 5+ | Diagnose: reviews, responsiveness, budget | `lsa-ads`, `review-management` |
108
+ | Competitor has way more reviews | Build review generation strategy to close gap | `review-management` |
109
+ | User wants to enter a new LSA market | Assess competitive density, review requirements, estimated budget | `lsa-ads` |
110
+ | LSA data needs to go in a client report | Include LSA rankings alongside organic/map pack data | `local-reporting` |
111
+ | Want to compare LSA vs organic visibility | Run Local Falcon scan for same keywords | `local-falcon-tool` |
112
+
113
+ **Default next step:** LSA rankings without review context are incomplete. Always check the user's review count and rating against the top 3 LSA competitors before making recommendations.