Communitygithub.com

aiagentwithdhruv/skills

使用Apify抓取并验证商业线索,通过LLM进行分类,丰富电子邮件信息,并保存到Google Sheets。当用户要求查找线索、抓取企业、生成潜在客户列表或为任何行业/地点构建线索数据库时使用。

skills 是什么?

该技能是一个全面的商业线索抓取与验证工具,专为AI代理设计,可自动化从发现到存储的完整线索管理流程。它首先使用Apify的`code_crafter/leads-finder`演员抓取线索,并通过测试抓取(25条)验证至少80%的线索与目标行业匹配,确保数据质量。对于1000条以上的大规模抓取,它支持按地理位置分区并行抓取(针对美国、欧盟、英国、加拿大和澳大利亚自动分区),实现3-5倍的性能提升。抓取后,技能提供可选的LLM分类(如区分SaaS产品企业)和通过AnyMailFinder进行的电子邮件丰富功能。最终输出是一个Google Sheet URL,包含所有经过验证的线索,支持与`classify-leads`、`instantly-campaigns`等技能无缝链式集成。该技能在Claude Code、Cursor和其他支持脚本执行的AI代理平台上运行,成本约为每条线索$0.01-0.02加上LLM分类费用$0.30/千条。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/aiagentwithdhruv/skills/tree/HEAD/scrape-leads

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

线索抓取与验证

目标

使用Apify(code_crafter/leads-finder)抓取线索,验证其相关性(行业匹配度>80%),并保存到Google Sheet中。对于大规模抓取(1000条以上),使用并行抓取以获得3-5倍的性能提升。

输入

  • 行业:目标行业(例如,“水管工”、“软件代理机构”)
  • 地点:目标地点(例如,“德克萨斯州”、“美国”、“加利福尼亚州”)。脚本会自动格式化以适应Apify的要求(美国州名会自动添加“, us”后缀)。
  • 总数:所需线索的总数量

脚本

所有脚本位于./scripts/目录下:

  • scrape_apify.py - 单次抓取,适用于少于1000条线索
  • scrape_apify_parallel.py - 并行抓取,适用于1000条及以上线索
  • classify_leads_llm.py - 基于LLM的线索分类
  • enrich_emails.py - 通过AnyMailFinder进行电子邮件丰富
  • update_sheet.py - 批量更新表格
  • read_sheet.py - 从Google Sheets读取数据

流程

小规模抓取(少于1000条线索)

  1. 测试抓取

    python3 ./scripts/scrape_apify.py --query "行业" --location "地点" --max_items 25 --no-email-filter --output .tmp/test_leads.json
    
  2. 验证

    • 读取.tmp/test_leads.json
    • 检查是否至少20/25(80%)的线索符合行业要求
    • 通过:进入步骤3
    • 失败:停止并询问用户优化关键词
  3. 完整抓取

    python3 ./scripts/scrape_apify.py --query "行业" --location "地点" --max_items 总数 --no-email-filter --output .tmp/leads.json
    
  4. [可选] LLM分类(适用于复杂细分领域)

    python3 ./scripts/classify_leads_llm.py .tmp/leads.json --classification_type product_saas --output .tmp/classified_leads.json
    
  5. 上传至Google Sheet

    python3 ./scripts/update_sheet.py .tmp/leads.json --title "线索 - 行业"
    
  6. 丰富缺失的电子邮件

    python3 ./scripts/enrich_emails.py SHEET_URL
    

大规模抓取(1000条及以上线索)

  1. 测试抓取(与上述相同,使用25条)

  2. 并行完整抓取

    python3 ./scripts/scrape_apify_parallel.py \
      --query "行业" \
      --total_count 4000 \
      --location "美国" \
      --strategy regions \
      --no-email-filter
    

    地理分区自动进行:

    • 美国:4个区域(东北部、东南部、中西部、西部)
    • 欧盟/欧洲:4个区域(西部、南部、北部、东部)
    • 英国:4个区域(东南英格兰、北英格兰、苏格兰/威尔士、西南英格兰)
    • 加拿大:4个区域(安大略省、魁北克省、西部、大西洋地区)
    • 澳大利亚:4个区域(新南威尔士州、维多利亚州/塔斯马尼亚州、昆士兰州、西澳大利亚州/南澳大利亚州)
  3. 继续执行小规模抓取的步骤4-6

输出

唯一可交付成果是Google Sheet URL。 .tmp/目录中的本地JSON文件是临时中间文件。

边缘情况

  • 未找到线索:询问用户扩大搜索范围
  • API错误:检查.env中的凭据
  • 低质量分类:如果超过80%为“不明确”,则改进抓取关键词

环境

需要在.env中设置:

APIFY_API_TOKEN=your_token
GOOGLE_APPLICATION_CREDENTIALS=path/to/credentials.json
ANTHROPIC_API_KEY=your_key
ANYMAILFINDER_API_KEY=your_key

模式

输入

名称类型必填描述
industry字符串是目标行业(例如,“水管工”、“软件代理机构”)
location字符串是目标地点(例如,“德克萨斯州”、“美国”)
total_count整数是所需线索的总数量
classification_type字符串否LLM分类类型(例如,“product_saas”)

输出

名称类型描述
sheet_url字符串包含抓取线索的Google Sheet URL
lead_count整数找到的线索数量

凭据

名称来源
APIFY_API_TOKEN.env
GOOGLE_APPLICATION_CREDENTIALS.env
ANTHROPIC_API_KEY.env
ANYMAILFINDER_API_KEY.env

可链式集成的技能

与此技能良好链式集成的技能:classify-leads、casualize-names、instantly-campaigns、onboarding-kickoff

成本

每条线索$0.01-0.02 + 分类费用$0.30/千条

Individual skills in this repo

This repo contains 10 individual skills — each has its own dedicated page.

aiagentwithdhruv/skills

Add new Modal webhooks for event-driven execution. Use when user asks to create a webhook, add an endpoint, or set up event triggers.

aiagentwithdhruv/skills

Answer Euron Gen AI Bootcamp doubts instantly. Covers Euri API setup across all frameworks (Python, LangChain, OpenAI SDK, TypeScript, n8n, curl), MCP server setup, common errors, model recommendations, and token limits. Use when someone in the bootcamp asks a question.

aiagentwithdhruv/skills

Manage emails across multiple Gmail accounts with unified tooling. Use when user asks to check email, read inbox, label emails, archive messages, or manage Gmail across accounts.

aiagentwithdhruv/skills

Auto-label Gmail emails into Action Required, Waiting On, and Reference categories. Use when user asks to label emails, triage inbox, categorize emails, or organize Gmail.

aiagentwithdhruv/skills

Scrape Google Maps for B2B leads with deep website enrichment and contact extraction. Use when user asks to find local businesses, scrape Google Maps, generate contractor lists, or build local service business databases.

aiagentwithdhruv/skills

Run Claude orchestrator locally with Cloudflare tunneling. Use when user asks to run locally, start local server, or test webhooks locally.

aiagentwithdhruv/skills

MCP server for AI-powered macOS control — apps, display, audio, files, screenshots, clipboard

aiagentwithdhruv/skills

Deploy execution scripts to Modal cloud. Use when user asks to deploy to Modal, push code to cloud, or update Modal functions.

aiagentwithdhruv/skills

Query Skool community content using RAG pipeline with vector search. Use when user asks to search Skool knowledge, find community answers, or query Skool content.

aiagentwithdhruv/skills

Scrape Upwork jobs and generate personalized proposals with cover letters. Use when user asks to find Upwork jobs, create Upwork proposals, or apply to Upwork listings.

相关技能