介绍
# Prospector
通过 Exa 公司搜索 + Apollo 联系人增强,寻找符合您的 ICP 的潜在客户。
## 前置条件
首先运行 `/prospector:setup` 来配置您的 API 密钥: - **Exa**(必需):https://exa.ai - 公司发现 - **Apollo**(必需):https://apollo.io - 联系人增强 - **Attio**(可选):https://attio.com - CRM 同步
您也可以通过环境变量设置密钥: - `PROSPECTOR_EXA_API_KEY` - `PROSPECTOR_APOLLO_API_KEY` - `PROSPECTOR_ATTIO_API_KEY`(可选)
## 使用方法
### 设置(一次性)
``` /prospector:setup ```
收集并验证 API 密钥,安全地存储在 `~/.config/prospector/config.json` 中。
### 寻找潜在客户
``` /prospector ```
询问 ICP 问题,搜索 Exa,通过 Apollo 进行增强,将 CSV 输出到桌面。
## 主命令:/prospector
当用户调用 `/prospector` 时,请遵循此工作流:
### 步骤 1:检查配置或环境变量
首先,验证环境变量或配置是否存在:
```bash python3 -c " import json import os from pathlib import Path config_path = Path.home() / '.config' / 'prospector' / 'config.json' env_exa = bool(os.getenv('PROSPECTOR_EXA_API_KEY')) env_apollo = bool(os.getenv('PROSPECTOR_APOLLO_API_KEY')) env_attio = bool(os.getenv('PROSPECTOR_ATTIO_API_KEY')) if not config_path.exists(): print('NOT_FOUND') else: with open(config_path) as f: config = json.load(f) print('FOUND') print(f'exa: {bool(config.get(\"exa_api_key\"))}') print(f'apollo: {bool(config.get(\"apollo_api_key\"))}') print(f'attio: {bool(config.get(\"attio_api_key\"))}') print(f'env_exa: {env_exa}') print(f'env_apollo: {env_apollo}') print(f'env_attio: {env_attio}') " ```
如果为 NOT_FOUND 且未设置环境变量,请告知用户先运行 `/prospector:setup`。
### 步骤 2:询问 ICP 问题
使用 AskUserQuestion 按顺序收集 ICP 标准:
**问题 1:行业** ``` header: "Industry" question: "What industry are you targeting?" options: - label: "SaaS" description: "Software as a Service companies" - label: "Fintech" description: "Financial technology companies" - label: "Healthcare" description: "Healthcare and health tech" - label: "E-commerce" description: "Online retail and marketplaces" - label: "AI/ML" description: "Artificial intelligence and machine learning" - label: "Any" description: "No industry filter" multiSelect: false ```
**问题 2:公司规模** ``` header: "Size" question: "What company size are you targeting?" options: - label: "1-10" description: "Early stage startups" - label: "11-50" description: "Seed to Series A" - label: "51-200" description: "Series A to B" - label: "201-500" description: "Growth stage" - label: "500+" description: "Enterprise" - label: "Any" description: "No size filter" multiSelect: false ```
**问题 3:融资阶段** ``` header: "Funding" question: "What funding stage are you targeting?" options: - label: "Pre-seed" description: "Pre-product market fit" - label: "Seed" description: "Building initial product" - label: "Series A" description: "Scaling product" - label: "Series B+" description: "Growth and expansion" - label: "Any" description: "No funding filter" multiSelect: false ```
**问题 4:地理位置** ``` header: "Geography" question: "What geography are you targeting?" options: - label: "United States" description: "US-based companies" - label: "Europe" description: "European companies" - label: "Global" description: "Worldwide" - label: "Any" description: "No geography filter" multiSelect: false ```
**问题 5:关键词(可选)** ``` header: "Keywords" question: "Any specific keywords that should appear in company descriptions? (optional)" options: - label: "Skip" description: "No keyword filter" - label: "Enter keywords" description: "I'll type specific keywords" multiSelect: false ```
如果输入“Enter keywords”,则询问文本输入。
**问题 6:联系人数量** ``` header: "Count" question: "How many contacts do you want to find?" options: - label: "25" description: "Quick search, lower API usage" - label: "50" description: "Balanced (recommended)" - label: "100" description: "Larger batch, more API usage" multiSelect: false ```
### 步骤 3:运行搜索
使用收集到的 ICP 执行 Python 脚本:
```bash cd [skill_directory]/scripts python3 -c " from prospector import run_search, export_csv, Config
icp = { 'industry': '[INDUSTRY]', 'company_size': '[SIZE]', 'funding_stage': '[FUNDING]', 'geography': '[GEOGRAPHY]', 'keywords': '[KEYWORDS or empty string]' }
leads = run_search(icp, num_contacts=[COUNT]) if leads: path = export_csv(leads) print(f'SUCCESS: {len(leads)} leads saved to {path}') else: print('NO_RESULTS: No leads found matching criteria') " ```
将占位符替换为问题中的实际值。
### 步骤 4:Attio 同步(如果已配置)
如果配置了 Attio 且找到了潜在客户,请询问:
``` header: "Attio" question: "Sync leads to Attio CRM?" options: - label: "Yes" description: "Sync companies and contacts to Attio" - label: "No" description: "Just keep the CSV" multiSelect: false ```
如果是:
```bash cd [skill_directory]/scripts python3 -c " from prospector import sync_to_attio, Config, Lead import json
# Load leads from the CSV we just created (or pass them directly) # For simplicity, re-run with sync leads = [...] # Pass leads from previous step
companies, people = sync_to_attio(leads) print(f'SYNCED: {companies} companies, {people} contacts') " ```
### 步骤 5:报告结果
告知用户: - 找到了多少潜在客户 - CSV 已保存的位置 - 如果进行了 Attio 同步,同步了多少条记录
## 错误处理
- **未找到配置**:告知用户运行 `/prospector:setup` - **无效的 API 密钥**:告知用户哪个密钥失败,建议重新运行设置 - **无结果**:建议放宽 ICP 标准 - **部分失败**:报告成功的内容,并警告失败的部分