用 Cursor + ResearchPipe 30 分钟写一个赛道扫描器

目标:每周一早上 8 点自动跑 N 个赛道扫描,结果发到飞书 / 微信群。

Step 0 - 准备

  • Cursor IDE(含 Claude Sonnet 或 GPT-4o)
  • Python 3.10+
  • ResearchPipe API key(rp.zgen.xin/dashboard 拿)

Step 1 - 把 docs 喂给 Cursor

在 Cursor 里 @docs https://rp.zgen.xin/docs 添加为知识源。

Step 2 - 一句话生成骨架

给 Cursor agent 模式:

Build a Python script using the ResearchPipe SDK that:
1. takes a list of sectors (具身智能 / 半导体国产化 / 创新药出海)
2. calls rp.research(input=f"{sector} 赛道全景研究", output_schema={...}) for each
3. extracts executive_summary + top deals + top risks per the schema
4. formats as Markdown
5. POSTs to a Feishu webhook URL

Step 3 - Cursor 生成代码(≈ 50 行)

from researchpipe import ResearchPipe
import requests, os

rp = ResearchPipe(api_key=os.environ["RESEARCHPIPE_KEY"])
SECTORS = ["具身智能", "半导体国产化", "创新药出海"]
FEISHU_URL = os.environ["FEISHU_WEBHOOK"]

SCHEMA = {
    "type": "object",
    "properties": {
        "executive_summary": {"type": "string"},
        "top_deals": {"type": "array", "items": {"type": "object"}},
        "top_risks": {"type": "array", "items": {"type": "object"}},
    },
    "required": ["executive_summary", "top_deals", "top_risks"],
}

def scan(sector: str) -> str:
    r = rp.research(input=f"{sector} 近 6 个月赛道全景", output_schema=SCHEMA)
    # research 返回 markdown answer + 解析的 schema 结果在 metadata
    # 也可直接用 r["answer"](自带 [N] 引用)
    return f"## {sector}\n\n{r['answer']}"

if __name__ == "__main__":
    body = "\n\n".join(scan(s) for s in SECTORS)
    requests.post(FEISHU_URL, json={"msg_type": "text", "content": {"text": body}})

Step 4 - 加 cron(Linux/macOS)

# crontab -e
0 8 * * 1 cd ~/scanner && /usr/bin/python3 scanner.py >> scanner.log 2>&1

Step 5 - 完事

每周一 8 点,飞书群里出现一份赛道扫描。一次调用花 ~12 credits(3 sector × 4c),月开销 ¥3 内。

下一步

  • rp.search(query, topic="primary_market") 把扫描转成可投标的公司清单
  • 把 cron 替换成你自己的调度系统(每天/每周/每月都行)