company-research
browserbase/skills
利用 Browserbase Search API 以及“规划→调研→综合”的工作模式,发现并调研符合理想客户画像的公司,从而生成带评分报告并导出为 CSV 文件。
...展开全部企业调研
发现并深入研究目标销售企业。利用Browserbase搜索API进行发现,并采用“规划→研究→综合”的模式进行深度丰富——最终输出带评分的研究报告和CSV文件。
所需: BROWSERBASE_API_KEY 环境变量和 browse CLI 已安装。
首次运行设置:首次运行时,系统会提示您批准 browse cloud fetch, browse cloud search, cat, mkdir, sed等权限。请针对每一项选择“是,且不再询问:browse cloud fetch:*”(或等效选项),以在本会话中自动批准。如需永久批准,请将这些项添加到您的 ~/.claude/settings.json 下的 permissions.allow:
"Bash(browse:*)", "Bash(bunx:*)", "Bash(bun:*)", "Bash(node:*)",
"Bash(cat:*)", "Bash(mkdir:*)", "Bash(sed:*)", "Bash(head:*)", "Bash(tr:*)", "Bash(rm:*)"
路径规则:在所有 Bash 命令中始终使用完整的字面路径——切勿使用 ~ 或 $HOME (两者都会触发“shell 展开语法”的授权提示)。将主目录解析一次后,在所有地方均使用该路径。构建子代理提示时,请用 {SKILL_DIR} 替换为完整的字面路径。
输出目录:所有研究成果均存入 ~/Desktop/{company_slug}_research_{YYYY-MM-DD}/。该目录包含 .md ,此外还有一份最终的 .csv。用户将在其桌面上同时获得评分电子表格和完整的研究文件。
重要提示 — 工具限制(适用于主代理和所有子代理):
- 所有网络搜索:请使用
browse cloud search。切勿使用WebSearch。 - 所有页面内容提取:请使用
node {SKILL_DIR}/scripts/extract_page.mjs "。该脚本通过" browse cloud fetch --output,解析标题、元标签及可见正文文本,并在抓取失败或返回由 JavaScript 渲染的简略内容时自动回退至browse get markdown。切勿手动编写browse cloud fetch | sed管道——它会剥离元标签,且无法解析标准输出(stdout)的JSON封装。切勿使用WebFetch。 - 所有研究成果:子代理为每家公司编写一个 Markdown 文件,并
{OUTPUT_DIR}/{company-slug}.md使用bash heredoc。切勿使用Write工具或python3 -c。有关文件格式的说明,请参见references/example-research.md了解文件格式。 - 报告 + CSV 编译:使用
node {SKILL_DIR}/scripts/compile_report.mjs {OUTPUT_DIR} --open——可一步生成 HTML 报告和 CSV 文件,并在浏览器中打开概览页面。 - URL 去重:使用
node {SKILL_DIR}/scripts/list_urls.mjs /tmp。 - 子代理必须仅使用 Bash 工具。不允许使用其他工具。
- 主代理绝不读取原始的发现 JSON 批处理文件。请使用
list_urls.mjs进行去重。
关键 — 防幻觉规则(适用于主代理和所有子代理):
- 绝不推断
product_description,industry,或target_audience从网站的字体、框架(Framer/Next.js/React)、设计系统或排版风格中推断。这些仅是表面特征,无法反映公司销售的产品。 - 切勿让用户自身的 ICP 渗入目标公司的描述中。如果你不知道目标公司从事什么业务,请写
Unknown——切勿将其与目标的ICP进行模式匹配。 product_description必须引用或改写来自extract_page.mjs输出内容(TITLE、META_DESCRIPTION、OG_DESCRIPTION、HEADINGS 或 BODY)中引用或改写特定短语。如果上述字段均未提供可识别的产品陈述,请写Unknown — homepage content not accessible.- 如果
product_description是Unknown,大写icp_fit_score上限为3,并将icp_fit_reasoning为Insufficient evidence — homepage returned no readable content.
CRITICAL — 尽量减少权限提示:
- 子代理必须使用链式 heredocs,将所有文件写入操作批量合并为单个 Bash 调用。一个 Bash 调用 = 一次权限提示。
- 使用
&&链式处理将所有搜索和所有获取操作合并为单个Bash调用。
管道概述
请按顺序执行以下 5 个步骤。请勿跳过步骤或更改顺序。
- 公司调研 — 深入了解用户所在的公司、产品及其销售对象
- 深度模式选择 — 根据用户希望的目标数量选择研究深度
- 发现阶段 — 通过多种搜索查询找到目标公司
- 深度调研与评分 — 调研每家企业,评估其与理想客户画像(ICP)的契合度
- 报告与CSV — 呈现调研结果,生成带评分的CSV文件
步骤 0:设置输出目录
开始前,请在用户的桌面上创建输出目录:
OUTPUT_DIR=~/Desktop/{company_slug}_research_{YYYY-MM-DD}
mkdir -p "$OUTPUT_DIR"
将 {company_slug} 替换为用户的公司名称(小写,用连字符分隔),并将 {YYYY-MM-DD} 替换为今天的日期。将 {OUTPUT_DIR} (作为完整的字面路径,而非使用 ~) 传递给所有子代理的提示,以便它们将研究文件写入该目录。
同时清理之前运行产生的发现批处理文件:
rm -f /tmp/company_discovery_batch_*.json
步骤 1:深入的公司调研
这是最重要的一步。后续所有工作的质量都取决于对用户公司的深入理解。
向用户询问其公司名称或网址
检查是否已有现成资料:
- 列出文件:
{SKILL_DIR}/profiles/(忽略example.json) - 如果存在匹配的档案 → 加载该档案,并向用户提示:“我从 {researched_at} 获取了您的档案。信息仍然准确吗?”如果准确 → 跳至步骤 2。
- 如果不存在个人资料 → 继续进行下方的深度调研。
- 列出文件:
使用“计划→调研→综合”模式,对用户所在公司进行全面的深度调研。 参见
references/research-patterns.md以获取子问题模板和研究方法。关键调研步骤:
- 搜索:
browse cloud search "{company name}" --num-results 10 - 获取主页:
node {SKILL_DIR}/scripts/extract_page.mjs "{company website}" - 通过网站地图发现网站页面(切勿硬编码路径,例如
/about或/customers):browse cloud fetch --allow-redirects "{company website}/sitemap.xml"——网站地图规模较小,原始browse cloud fetch即可- 扫描包含关键词的 URL:
customer,case-stud,pricing,about,use-case,industry,solution - 可选地,还可获取
/llms.txt页面描述 - 挑选 3-5 个最相关的 URL,并使用
extract_page.mjs(非原始数据browse cloud fetch)
- 搜索外部背景和竞争对手
- 按置信度汇总发现结果
整合为一份概况: 公司、产品、现有客户、竞争对手、使用场景。 请勿包含ICP或细分垂直领域——这些属于每次执行时的决策。
- 搜索:
将用户画像提交给用户确认。未获确认前请勿继续。
将已确认的概况保存至
{SKILL_DIR}/profiles/{company-slug}.json使用
AskUserQuestion复选框:- “您瞄准的是哪些细分市场?”——选项源自公司调研
- “公司发展阶段?”——初创企业、中型企业、大型企业、全部
- “企业数量/深度?”——快速(
100)、深度(50),更深入(约25) - 这是唯一的用户交互。此后,系统将静默运行直至结果准备就绪。
步骤2:深度模式选择
| 模式 | 按公司进行研究 | 最适合 |
|---|---|---|
quick |
首页 + 1-2次搜索 | 约100家企业,广泛扫描 |
deep |
2-3个子问题,5-8次工具调用 | 约50家企业,深入研究 |
deeper |
4-5个子问题,10-15次工具调用 | 约25家企业,全面情报 |
第三步:发现
公式: ceil(requested_companies / 35) 需要搜索查询。建议将发现范围扩大至约2-3倍,因为筛选过程通常会剔除50-70%的结果。
按以下模式生成搜索查询:
- 行业 + 公司发展阶段 + 地理位置(“金融科技初创公司 A 轮融资 湾区”)
- 技术栈 + 应用场景(“使用 Selenium 进行网页抓取的公司”)
- 竞争对手关联性(“{目标客户群(ICP)中的知名公司}的替代方案”)
- 买家画像 + 痛点(“在浏览器自动化方面遇到困难的工程团队”)
流程:
- 一次性启动所有发现子代理(每条消息最多约6个)。每个子代理通过单次Bash调用执行查询:
browse cloud search "{query}" --num-results 25 --output /tmp/company_discovery_batch_{N}.json - 所有波次完成后,进行去重:
node {SKILL_DIR}/scripts/list_urls.mjs /tmp - 过滤 URL 列表——移除:
- 博客文章、新闻报道(globenewswire.com、techcrunch.com 等)
- 目录网站/聚合网站(tracxn.com、crunchbase.com、g2.com)
- 用户自身的竞争对手和现有客户(来自个人资料) 仅保留公司主页。
参见 references/workflow.md 以获取子代理提示模板和波次管理信息。
第 4 步:深度调研与评分
启动子代理并行调研公司。参见 references/workflow.md 以获取信息丰富化子代理提示模板。参见 references/research-patterns.md 以了解完整的研究方法论。
流程:
将筛选后的 URL 按子代理划分为不同组别(快速组:约 10 个,深度组:约 5 个,更深度组:约 2-3 个)
一次性启动所有信息丰富化子代理(每条消息最多约6个)
每个子代理仅使用 Bash —— 针对每家公司:
A阶段——规划(快速模式下跳过): 根据目标客户画像(ICP)和信息丰富字段,将问题分解为2-5个子问题。
B阶段——研究循环: 搜索并获取网页,提取研究结果。遵守步骤预算(快速模式:2-3,深度模式:5-8,更深度模式:10-15)。
C 阶段 — 综合分析: 根据证据对 ICP 契合度进行 1-10 分评分。根据研究结果填充丰富字段。
子代理通过链式 heredocs,在单个 Bash 调用中写入所有 Markdown 文件,以
{OUTPUT_DIR}/待所有子代理完成后,进入第 5 步
关键:在每个子代理的提示中逐字包含已确认的 ICP 描述。将完整的字面 {OUTPUT_DIR} 路径传递给每个子代理。
步骤 5:报告与 CSV
生成 HTML 报告 + CSV(自动在浏览器中打开概览):
node {SKILL_DIR}/scripts/compile_report.mjs {OUTPUT_DIR} --open这将生成:
{OUTPUT_DIR}/index.html— 包含评分表格的概览页面(在浏览器中打开){OUTPUT_DIR}/companies/*.html— 各公司详情页(从概览页链接进入){OUTPUT_DIR}/results.csv— 带评分数据的电子表格,可导入到 Google 表格或 CRM 系统
在聊天中也显示摘要:
## Company Research Complete
- **Total companies researched**: {count}
- **Depth mode**: {mode}
- **Score distribution**:
- Strong fit (8-10): {count}
- Partial fit (5-7): {count}
- Weak fit (1-4): {count}
- **Report opened in browser**: ~/Desktop/{company_slug}_research_{date}/index.html
- 以表格形式展示按 ICP 评分排序的顶尖公司:
| Company | Score | Product | Industry | Fit Reasoning |
|---------|-------|---------|----------|---------------|
| Acme | 9 | AI inventory management | E-commerce SaaS | Series A, uses Selenium, expanding to EU |
- 针对排名前3-5的公司,展示简要研究摘要——关键发现、为何它们是理想匹配对象,以及应从何种具体角度与之接洽。
可提供深入分析特定公司、调整评分标准或使用不同查询条件重新运行发现流程的服务。
---
name: company-research
description: Discovers and researches companies matching an ideal customer profile, using Browserbase Search API and a Plan→Research→Synthesize pattern to produce scored reports and CSV exports.
license: MIT
---
# Company Research
Discover and deeply research companies to sell to. Uses Browserbase Search API for discovery and a Plan→Research→Synthesize pattern for deep enrichment — outputting a scored research report and CSV.
**Required**: `BROWSERBASE_API_KEY` env var and `browse` CLI installed.
**First-run setup**: On the first run you'll be prompted to approve `browse cloud fetch`, `browse cloud search`, `cat`, `mkdir`, `sed`, etc. Select **"Yes, and don't ask again for: browse cloud fetch:\*"** (or equivalent) for each to auto-approve for the session. To permanently approve, add these to your `~/.claude/settings.json` under `permissions.allow`:
```json
"Bash(browse:*)", "Bash(bunx:*)", "Bash(bun:*)", "Bash(node:*)",
"Bash(cat:*)", "Bash(mkdir:*)", "Bash(sed:*)", "Bash(head:*)", "Bash(tr:*)", "Bash(rm:*)"
```
**Path rules**: Always use the full literal path in all Bash commands — NOT `~` or `$HOME` (both trigger "shell expansion syntax" approval prompts). Resolve the home directory once and use it everywhere. When constructing subagent prompts, replace `{SKILL_DIR}` with the full literal path.
**Output directory**: All research output goes to `~/Desktop/{company_slug}_research_{YYYY-MM-DD}/`. This directory contains one `.md` file per researched company plus a final `.csv`. The user gets both the scored spreadsheet and the full research files on their Desktop.
**CRITICAL — Tool restrictions (applies to main agent AND all subagents)**:
- All web searches: use `browse cloud search`. NEVER use WebSearch.
- All page content extraction: use `node {SKILL_DIR}/scripts/extract_page.mjs "<url>"`. This script fetches via `browse cloud fetch --output`, parses title + meta tags + visible body text, and automatically falls back to `browse get markdown` when fetch fails or returns thin JS-rendered content. NEVER hand-roll a `browse cloud fetch | sed` pipeline — it strips meta tags and doesn't parse the stdout JSON envelope. NEVER use WebFetch.
- All research output: subagents write **one markdown file per company** to `{OUTPUT_DIR}/{company-slug}.md` using bash heredoc. NEVER use the Write tool or `python3 -c`. See `references/example-research.md` for the file format.
- Report + CSV compilation: use `node {SKILL_DIR}/scripts/compile_report.mjs {OUTPUT_DIR} --open` — generates HTML report and CSV in one step, opens overview in browser.
- URL deduplication: use `node {SKILL_DIR}/scripts/list_urls.mjs /tmp` after discovery.
- **Subagents must use ONLY the Bash tool. No other tools allowed.**
- **Main agent NEVER reads raw discovery JSON batch files.** Use `list_urls.mjs` for dedup.
**CRITICAL — Anti-hallucination rules (applies to main agent AND all subagents)**:
- NEVER infer `product_description`, `industry`, or `target_audience` from a site's fonts, framework (Framer/Next.js/React), design system, or typography. These are cosmetic and say nothing about what the company sells.
- NEVER let the user's own ICP leak into a target's description. If you don't know what the target does, write `Unknown` — do not pattern-match them onto the ICP.
- `product_description` MUST quote or paraphrase a specific phrase from `extract_page.mjs` output (TITLE, META_DESCRIPTION, OG_DESCRIPTION, HEADINGS, or BODY). If none of those fields yield a recognizable product statement, write `Unknown — homepage content not accessible`.
- If `product_description` is `Unknown`, cap `icp_fit_score` at 3 and set `icp_fit_reasoning` to `Insufficient evidence — homepage returned no readable content`.
**CRITICAL — Minimize permission prompts**:
- Subagents MUST batch ALL file writes into a SINGLE Bash call using chained heredocs. One Bash call = one permission prompt.
- Batch ALL searches and ALL fetches into single Bash calls using `&&` chaining.
## Pipeline Overview
Follow these 5 steps in order. Do not skip steps or reorder.
1. **Company Research** — Deeply understand the user's company, product, and who they sell to
2. **Depth Mode Selection** — Choose research depth based on how many targets they want
3. **Discovery** — Find target companies using diverse search queries
4. **Deep Research & Scoring** — Research each company, score ICP fit
5. **Report & CSV** — Present findings, compile scored CSV
---
## Step 0: Setup Output Directory
Before starting, create the output directory on the user's Desktop:
```bash
OUTPUT_DIR=~/Desktop/{company_slug}_research_{YYYY-MM-DD}
mkdir -p "$OUTPUT_DIR"
```
Replace `{company_slug}` with the user's company name (lowercase, hyphenated) and `{YYYY-MM-DD}` with today's date. Pass `{OUTPUT_DIR}` (as a full literal path, not with `~`) to all subagent prompts so they write research files there.
Also clean up discovery batch files from prior runs:
```bash
rm -f /tmp/company_discovery_batch_*.json
```
## Step 1: Deep Company Research
This is the most important step. The quality of everything downstream depends on deeply understanding the user's company.
1. Ask the user for their company name or URL
2. **Check for an existing profile**:
- List files in `{SKILL_DIR}/profiles/` (ignore `example.json`)
- If a matching profile exists → load it, present to user: "I have your profile from {researched_at}. Still accurate?" If yes → skip to Step 2.
- If no profile exists → proceed with deep research below.
3. **Run a full deep research on the user's company** using the Plan→Research→Synthesize pattern.
See `references/research-patterns.md` for sub-question templates and research methodology.
**Key research steps:**
- Search: `browse cloud search "{company name}" --num-results 10`
- Fetch homepage: `node {SKILL_DIR}/scripts/extract_page.mjs "{company website}"`
- **Discover site pages via sitemap** (do NOT hardcode paths like `/about` or `/customers`):
1. `browse cloud fetch --allow-redirects "{company website}/sitemap.xml"` — sitemap is small, raw `browse cloud fetch` is fine
2. Scan for URLs with keywords: `customer`, `case-stud`, `pricing`, `about`, `use-case`, `industry`, `solution`
3. Optionally also fetch `/llms.txt` for page descriptions
4. Pick 3-5 most relevant URLs and extract with `extract_page.mjs` (NOT raw `browse cloud fetch`)
- Search for external context and competitors
- Accumulate findings with confidence levels
**Synthesize into a profile**:
Company, Product, Existing Customers, Competitors, Use Cases.
Do NOT include ICP or sub-verticals — those are per-run decisions.
4. Present the profile to the user for confirmation. Do not proceed until confirmed.
5. **Save the confirmed profile** to `{SKILL_DIR}/profiles/{company-slug}.json`
6. **Ask clarifying questions** using `AskUserQuestion` with checkboxes:
- "Which segments are you targeting?" with options derived from the company research
- "Company stage?" — Startups, Mid-market, Enterprise, All
- "How many companies / depth?" — Quick (~100), Deep (~50), Deeper (~25)
- This is the ONLY user interaction. After this, execute silently until results are ready.
## Step 2: Depth Mode Selection
| Mode | Research per company | Best for |
|------|---------------------|----------|
| `quick` | Homepage + 1-2 searches | ~100 companies, broad scan |
| `deep` | 2-3 sub-questions, 5-8 tool calls | ~50 companies, solid research |
| `deeper` | 4-5 sub-questions, 10-15 tool calls | ~25 companies, full intelligence |
## Step 3: Discovery
**Formula**: `ceil(requested_companies / 35)` search queries needed. Over-discover by ~2-3x because filtering typically drops 50-70%.
Generate search queries with these patterns:
- Industry + company stage + geography ("fintech startups series A Bay Area")
- Technology stack + use case ("companies using Selenium for web scraping")
- Competitor adjacency ("alternatives to {known company in ICP}")
- Buyer persona + pain point ("engineering teams struggling with browser automation")
**Process**:
1. Launch ALL discovery subagents at once (up to ~6 per message). Each runs its queries in a SINGLE Bash call:
```bash
browse cloud search "{query}" --num-results 25 --output /tmp/company_discovery_batch_{N}.json
```
2. After all waves complete, deduplicate: `node {SKILL_DIR}/scripts/list_urls.mjs /tmp`
3. **Filter the URL list** — remove:
- Blog posts, news articles (globenewswire.com, techcrunch.com, etc.)
- Directories/aggregators (tracxn.com, crunchbase.com, g2.com)
- The user's own competitors and existing customers (from profile)
Keep only company homepages.
See `references/workflow.md` for subagent prompt templates and wave management.
## Step 4: Deep Research & Scoring
Launch subagents to research companies in parallel. See `references/workflow.md` for the enrichment subagent prompt template. See `references/research-patterns.md` for the full research methodology.
**Process**:
1. Split filtered URLs into groups per subagent (quick: ~10, deep: ~5, deeper: ~2-3)
2. Launch ALL enrichment subagents at once (up to ~6 per message)
3. Each subagent uses ONLY Bash — for each company:
**Phase A — Plan** (skip in quick mode):
Decompose into 2-5 sub-questions based on ICP and enrichment fields.
**Phase B — Research Loop**:
Search and fetch pages, extract findings. Respect step budget (quick: 2-3, deep: 5-8, deeper: 10-15).
**Phase C — Synthesize**:
Score ICP fit 1-10 with evidence. Fill enrichment fields from findings.
4. Subagents write ALL markdown files in a SINGLE Bash call using chained heredocs to `{OUTPUT_DIR}/`
5. After ALL subagents complete, proceed to Step 5
**Critical**: Include the confirmed ICP description verbatim in every subagent prompt. Pass the full literal `{OUTPUT_DIR}` path to every subagent.
## Step 5: Report & CSV
1. **Generate HTML report + CSV** (opens overview in browser automatically):
```bash
node {SKILL_DIR}/scripts/compile_report.mjs {OUTPUT_DIR} --open
```
This generates:
- `{OUTPUT_DIR}/index.html` — overview page with scored table (opens in browser)
- `{OUTPUT_DIR}/companies/*.html` — individual company pages (linked from overview)
- `{OUTPUT_DIR}/results.csv` — scored spreadsheet for import into sheets/CRM
2. **Present a summary in chat** too:
```
## Company Research Complete
- **Total companies researched**: {count}
- **Depth mode**: {mode}
- **Score distribution**:
- Strong fit (8-10): {count}
- Partial fit (5-7): {count}
- Weak fit (1-4): {count}
- **Report opened in browser**: ~/Desktop/{company_slug}_research_{date}/index.html
```
3. Show the **top companies** sorted by ICP score in a table:
```
| Company | Score | Product | Industry | Fit Reasoning |
|---------|-------|---------|----------|---------------|
| Acme | 9 | AI inventory management | E-commerce SaaS | Series A, uses Selenium, expanding to EU |
```
4. For the top 3-5 companies, show a brief research summary — key findings, why they're a good fit, and what specific angle to approach them with.
Offer to dig deeper into specific companies, adjust scoring criteria, or re-run discovery with different queries.





首页
