competitor-analysis
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCompetitor Analysis
竞品分析
Analyze a user's competitors. Uses Browserbase Search API for discovery and a 4-lane Plan→Research→Synthesize pattern for enrichment — outputting an HTML report with overview, per-competitor deep dives, a side-by-side feature/pricing matrix, and a chronological mentions feed.
Required: env var and the CLI installed ().
BROWSERBASE_API_KEYbrowsenpm install -g browseFirst-run setup: On the first run you'll be prompted to approve , , , , , etc. Select "Yes, and don't ask again for: browse cloud fetch:*" (or equivalent) for each. To permanently approve, add these to your under :
browse cloud fetchbrowse cloud searchcatmkdirsed~/.claude/settings.jsonpermissions.allowjson
"Bash(browse:*)", "Bash(bunx:*)", "Bash(bun:*)", "Bash(node:*)",
"Bash(cat:*)", "Bash(mkdir:*)", "Bash(sed:*)", "Bash(head:*)", "Bash(tr:*)", "Bash(rm:*)"Path rules: Always use full literal paths in Bash — NOT or . Resolve the home directory once and use it everywhere. When building subagent prompts, replace with the full literal path.
~$HOME{SKILL_DIR}Output directory: All output goes to . This directory contains one file per competitor plus the generated HTML views and CSV.
~/Desktop/{company_slug}_competitors_{YYYY-MM-DD}/.mdCRITICAL — Tool restrictions (applies to main agent AND all subagents):
- All web searches: use . NEVER WebSearch.
browse cloud search - All page fetches: use (returns markdown by default; add
browse cloud fetch --allow-redirectsif you need the original HTML, then pipe through--format rawto extract text). NEVER WebFetch. 1 MB response limit — fall back tosed ... | tr -s ' \n'(afterbrowse get markdown) for JS-heavy pages.browse open <url> --remote - All research output: subagents write one markdown file per competitor to using bash heredoc. NEVER use the Write tool or
{OUTPUT_DIR}/{competitor-slug}.md. Seepython3 -cfor the file format.references/example-research.md - Report compilation: use — generates
node {SKILL_DIR}/scripts/compile_report.mjs {OUTPUT_DIR} --user-company "{user_company}" --open,index.html,competitors/*.html,matrix.html,mentions.htmlin one step and opens overview.results.csv - URL deduplication: .
node {SKILL_DIR}/scripts/list_urls.mjs /tmp --prefix competitor - Subagents must use ONLY the Bash tool.
- Main agent NEVER reads raw discovery JSON batch files.
CRITICAL — Minimize permission prompts:
- Subagents MUST batch ALL file writes into a SINGLE Bash call using chained heredocs.
- Batch ALL searches and ALL fetches into single Bash calls via chaining.
&&
分析用户的竞品。使用Browserbase Search API进行竞品发现,并采用四维度的计划→调研→整合模式进行信息补充,最终输出包含概览、单竞品深度剖析、功能/价格对比矩阵、按时间排序的提及动态的HTML报告。
必填项:需配置环境变量,且已安装 CLI工具(执行)。
BROWSERBASE_API_KEYbrowsenpm install -g browse首次运行设置:首次运行时,系统会提示你批准、、、、等命令。为每个命令选择**"Yes, and don't ask again for: browse cloud fetch:*"**(或等效选项)。若要永久批准,可将以下内容添加到中的字段:
browse cloud fetchbrowse cloud searchcatmkdirsed~/.claude/settings.jsonpermissions.allowjson
"Bash(browse:*)", "Bash(bunx:*)", "Bash(bun:*)", "Bash(node:*)",
"Bash(cat:*)", "Bash(mkdir:*)", "Bash(sed:*)", "Bash(head:*)", "Bash(tr:*)", "Bash(rm:*)"路径规则:在Bash中始终使用完整的字面路径——禁止使用或。仅解析一次主目录并全局使用该路径。构建subagent提示词时,将替换为完整的字面路径。
~$HOME{SKILL_DIR}输出目录:所有输出内容均保存至。该目录包含每个竞品对应的文件,以及生成的HTML视图和CSV文件。
~/Desktop/{company_slug}_competitors_{YYYY-MM-DD}/.md重要提示——工具限制(适用于主Agent和所有subagent):
- 所有网页搜索:使用。禁止使用WebSearch。
browse cloud search - 所有页面抓取:使用(默认返回markdown格式;若需要原始HTML,添加
browse cloud fetch --allow-redirects参数,然后通过--format raw提取文本)。禁止使用WebFetch。响应限制为1MB——对于JS密集型页面,改用sed ... | tr -s ' \n'(需先执行browse get markdown)。browse open <url> --remote - 所有调研输出:subagent需使用bash heredoc将每个竞品的调研内容写入单独的markdown文件,路径为。禁止使用Write工具或
{OUTPUT_DIR}/{competitor-slug}.md命令。文件格式可参考python3 -c。references/example-research.md - 报告编译:执行——一步生成
node {SKILL_DIR}/scripts/compile_report.mjs {OUTPUT_DIR} --user-company "{user_company}" --open、index.html、competitors/*.html、matrix.html、mentions.html文件,并自动打开概览页面。results.csv - URL去重:执行。
node {SKILL_DIR}/scripts/list_urls.mjs /tmp --prefix competitor - subagent仅允许使用Bash工具。
- 主Agent禁止读取原始的发现JSON批量文件。
重要提示——最小化权限提示:
- subagent必须通过链式heredoc将所有文件写入操作批量处理为单次Bash调用。
- 通过链式调用,将所有搜索和抓取操作批量处理为单次Bash调用。
&&
Pipeline Overview
流程概述
Follow these 8 steps in order. Do not skip or reorder.
- User Company Research — Deeply understand the user's company, produce +
precise_category+category_include_keywordsexclusion_list - Depth Mode + Seed Input — Choose depth, accept optional seed competitor URLs
- Discovery (3 parallel waves) — Wave A (alternatives), Wave B (precise category), Wave C (comparison-page graph via "X vs Y" title parsing)
- Gate — fetches each candidate's hero text (via
scripts/gate_candidates.mjs) and drops wrong-category URLsbrowse cloud fetch - Confirm enrichment set with the user — Present PASS / UNKNOWN / rejected-brand-matches via . User ticks the real ones, adds any the discovery missed. Skipping this step is wasteful because enrichment is expensive (25 subagents × depth budget) and the gate is imperfect (JS-heavy homepages, Cloudflare challenges, semantic-variant taglines)
AskUserQuestion - Deep Enrichment (5 subagents per competitor in deep/deeper modes) — Marketing, Discussion, Social, News, Technical — each lane a separate subagent writing to ; then
partials/consolidates. In deep/deeper modes, Step 5d adds a 6th Battle Card synthesis lane AFTER Step 5c fact-check completes — produces per-competitor Landmines / Objection Handlers / Talk Tracks grounded in cited evidence.merge_partials.mjs - Screenshots — via the
capture_screenshots.mjsCLI captures a 1280×800 homepage hero per competitorbrowse - HTML Report — Overview + per-competitor (with embedded hero screenshot + Battle Card card) + matrix + mentions views
请按以下8个步骤依次执行,不得跳过或调整顺序。
- 用户公司调研——深入了解用户公司,生成(精准分类)+
precise_category(分类包含关键词)+category_include_keywords(排除列表)exclusion_list - 深度模式 + 初始输入——选择调研深度,接收可选的初始竞品URL
- 竞品发现(3轮并行)——A轮(替代产品)、B轮(精准分类)、C轮(通过解析"X vs Y"标题提取对比页面图谱)
- 筛选门控——通过
scripts/gate_candidates.mjs获取每个候选竞品的核心文本,剔除不符合分类的URLbrowse cloud fetch - 与用户确认待调研竞品集合——通过展示通过/未知/已排除的品牌匹配结果。用户勾选真实竞品,并补充未被发现的竞品。跳过此步骤会造成资源浪费,因为调研成本高昂(25个subagent × 深度预算),且门控机制并非完美(JS密集型首页、Cloudflare验证、语义变体标语均可能导致误判)
AskUserQuestion - 深度调研(深度/超深度模式下,每个竞品对应5个subagent)——营销、讨论、社交、新闻、技术维度,每个维度由独立的subagent负责并写入目录;随后由
partials/整合内容。在深度/超深度模式下,步骤5c事实核查完成后,新增第6个维度——战斗卡片合成,生成基于引用证据的单竞品雷区/异议处理话术/沟通脚本。merge_partials.mjs - 截图——通过CLI执行
browse,为每个竞品截取1280×800像素的首页核心区域截图capture_screenshots.mjs - HTML报告——包含概览+单竞品详情(嵌入首页截图+战斗卡片)+对比矩阵+提及动态视图
Step 0: Setup Output Directory
步骤0:设置输出目录
bash
OUTPUT_DIR=~/Desktop/{company_slug}_competitors_{YYYY-MM-DD}
mkdir -p "$OUTPUT_DIR"Replace with the user's company name (lowercase, hyphenated) and with today's date. Pass as a full literal path to every subagent.
{company_slug}{YYYY-MM-DD}{OUTPUT_DIR}Clean up discovery batch files from prior runs:
bash
rm -f /tmp/competitor_discovery_batch_*.jsonRe-runs must start from a clean . ingests every in the directory, and only overwrites the slugs in the current set — it never deletes ones dropped from a new enrichment set. Since the directory is keyed by date, a same-day re-run with a different competitor set would leave stale competitors in the overview, matrix, CSV, and screenshots. Either use a fresh directory or clear the prior per-competitor files first:
$OUTPUT_DIRcompile_report.mjs{slug}.mdmerge_partials.mjsbash
rm -f "$OUTPUT_DIR"/*.md && rm -rf "$OUTPUT_DIR"/partials "$OUTPUT_DIR"/screenshotsbash
OUTPUT_DIR=~/Desktop/{company_slug}_competitors_{YYYY-MM-DD}
mkdir -p "$OUTPUT_DIR"将替换为用户公司名称(小写,连字符分隔),替换为当前日期。将完整的字面路径传递给所有subagent。
{company_slug}{YYYY-MM-DD}{OUTPUT_DIR}清理之前运行留下的发现批量文件:
bash
rm -f /tmp/competitor_discovery_batch_*.json重新运行必须从干净的开始。会读取目录中所有文件,而仅覆盖当前集合中的竞品文件——不会删除新调研集合中已移除的旧竞品文件。由于目录按日期命名,同一天内使用不同竞品集合重新运行会导致概览、矩阵、CSV和截图中存在过时的竞品信息。需使用新目录或先清理之前的单竞品文件:
$OUTPUT_DIRcompile_report.mjs{slug}.mdmerge_partials.mjsbash
rm -f "$OUTPUT_DIR"/*.md && rm -rf "$OUTPUT_DIR"/partials "$OUTPUT_DIR"/screenshotsStep 1: User Company Research
步骤1:用户公司调研
This step sets the baseline for what "competitor" means AND produces the verified data the Step 5b matrix will use for the row.
userCompanyRule: The user's company gets the same 5-lane research depth as competitors. Do NOT fill in matrix.json from memory — it will ship false claims to the user's own team. On a search-API run (user company Exa, 2026-04-23), skipping this step produced a matrix that claimed Exa had a "published uptime SLA" (there is no numeric public SLA — only a status page) and marked its MIT-licensed Python SDK as (the repo is github.com/exa-labs/exa-py, LICENSE confirmed MIT). Both errors would have surfaced in the "Where you're winning" card as fabricated moats.
userCompanyopen-source: falseProcess:
-
Ask the user for their company name or URL.
-
Check for an existing profile at. If it exists, load it and confirm with the user: "I have your profile from {researched_at}. Still accurate?" — if yes, skip to Step 2 BUT still run the partial-lane enrichment below so matrix synthesis has fresh feature evidence. The profile format is shared with
{SKILL_DIR}/profiles/{company-slug}.json(same shape). If a user already has a profile saved undercompany-research, you may copy it into this skill's profiles directory rather than re-researching.company-research/profiles/ -
Run the full 5-lane enrichment on the user's company — identical to the competitor pattern in Step 5. For each lane, spawn a Bash-only subagent that writes to:
{OUTPUT_DIR}/partials/{user-slug}.{lane}.md- marketing — tagline, positioning, pricing tiers, features, integrations, open-source components (SDK repos + licenses), regions offered, compliance (SOC 2 / HIPAA / trust portal URL)
- technical — REST + streaming API support (with docs URLs), SDK languages, MCP server URL, neural vs keyword retrieval modes, reranking / highlights / live-crawl specifics, published uptime SLA (actual %, not status page), third-party retrieval-quality benchmarks
- discussion, social, news — optional in quick mode, recommended in deep+
See → "Self-Research" for sub-questions. Each finding MUST cite a URL.
references/research-patterns.md
-
Runon the user's partials too — produces
merge_partials.mjs, the canonical source Step 5b reads from for{OUTPUT_DIR}/{user-slug}.mdflags.userCompany -
Synthesize into a profile: Company, Product, Existing Customers, Competitors (seed list), Use Cases, precise_category, category_include_keywords, exclusion_list. Do NOT include ICP — this skill doesn't need it.
- : one sentence describing the category. e.g., "AI web search API for agents with neural + keyword retrieval". Avoid vague words like "tools" / "platform".
precise_category - : 8-15 phrases a direct competitor's marketing would likely contain (hero or title). Include semantic variants.
category_include_keywords - : phrases that indicate a different category — used by the gate to reject false positives (e.g.
exclusion_list,antidetect browser,scraping api,screenshot api). Seeresidential proxy→ "Synthesis Output" for the exact format and Exa as a worked example.references/research-patterns.md
-
Present the profile + the user-companyto the user for confirmation. Do not proceed until confirmed.
.md -
Save the confirmed profile to.
{SKILL_DIR}/profiles/{company-slug}.json
此步骤定义了"竞品"的基准,同时为步骤5b的对比矩阵提供行的验证数据。
userCompany规则:用户公司需获得与竞品相同的5维度调研深度。禁止凭记忆填充信息——错误信息会传递给用户团队。在某次基于搜索API的运行中(用户公司为Exa,日期2026-04-23),跳过此步骤导致对比矩阵错误宣称Exa拥有"已发布的正常运行时间SLA"(实际上没有公开的数字SLA,仅提供状态页面),并将其MIT许可的Python SDK标记为(该仓库地址为github.com/exa-labs/exa-py,已确认许可证为MIT)。这两个错误都会在"你的优势"卡片中被当作虚假的护城河。
userCompanyopen-source: false流程:
-
向用户询问其公司名称或URL。
-
检查是否存在已有档案:查看。若存在,加载档案并与用户确认:"我有你在{researched_at}的档案,是否仍然准确?"——若用户确认是,跳至步骤2,但仍需运行部分维度的调研,以便对比矩阵合成时有最新的功能证据。 该档案格式与
{SKILL_DIR}/profiles/{company-slug}.json共享(结构相同)。若用户已在company-research下保存档案,可将其复制到本技能的profiles目录,无需重新调研。company-research/profiles/ -
对用户公司执行完整的5维度调研——与步骤5中的竞品调研模式完全相同。针对每个维度,启动仅使用Bash的subagent,将内容写入:
{OUTPUT_DIR}/partials/{user-slug}.{lane}.md- marketing(营销)——标语、定位、定价层级、功能、集成、开源组件(SDK仓库+许可证)、服务区域、合规认证(SOC 2 / HIPAA / 信任门户URL)
- technical(技术)——REST+流API支持(含文档URL)、SDK语言、MCP服务器URL、神经检索vs关键词检索模式、重排序/高亮/实时抓取细节、已发布的正常运行时间SLA(实际百分比,而非状态页面)、第三方检索质量基准
- discussion(讨论)、social(社交)、news(新闻)——快速模式下可选,深度+模式下推荐执行
具体子问题可参考→"Self-Research(自我调研)"。每个发现必须引用URL。
references/research-patterns.md
-
对用户公司的部分文件运行——生成
merge_partials.mjs,这是步骤5b读取{OUTPUT_DIR}/{user-slug}.md标记的标准数据源。userCompany -
整合为档案:公司、产品、现有客户、竞品(初始列表)、使用场景、precise_category(精准分类)、category_include_keywords(分类包含关键词)、exclusion_list(排除列表)。无需包含ICP(理想客户画像)——本技能不需要此信息。
- :一句话描述分类,例如"面向Agent的AI网页搜索API,支持神经+关键词检索"。避免使用"工具"/"平台"等模糊词汇。
precise_category - :8-15个直接竞品营销内容(核心文案或标题)中可能包含的短语,需涵盖语义变体。
category_include_keywords - :表示不同分类的短语——用于门控机制排除误判的竞品(例如
exclusion_list、antidetect browser、scraping api、screenshot api)。 具体格式和示例可参考residential proxy→"Synthesis Output(整合输出)"中的Exa案例。references/research-patterns.md
-
将档案+用户公司的文件展示给用户确认。获得确认后方可继续。
.md -
保存已确认的档案至。
{SKILL_DIR}/profiles/{company-slug}.json
Step 2: Depth Mode + Seed Input
步骤2:深度模式 + 初始输入
Ask clarifying questions via with checkboxes:
AskUserQuestion- Known competitors? Text area for URLs/names (optional — discovery will find more).
- Depth mode?
- — marketing surface only, many competitors, ~2-3 tool calls each
quick - — + external signal (mentions, reviews, news), ~5-8 tool calls each
deep - — + public benchmarks + strategic diff vs user's company, ~10-15 tool calls each
deeper
- Target count? Rough number of competitors to research (e.g., 10 / 20 / 50).
This is the ONLY user interaction. After this, execute silently until the report is ready.
| Mode | Research per competitor | Best for |
|---|---|---|
| Lane 1 only (homepage + pricing) | Scanning ~30-50 competitors fast |
| Lanes 1+2 | ~15-25 competitors with external signal |
| All 4 lanes (+ benchmarks + strategic diff) | ~5-15 competitors with full intel |
通过向用户询问以下澄清问题(带复选框):
AskUserQuestion- 已知竞品? 文本框用于输入URL/名称(可选——发现流程会找到更多竞品)。
- 深度模式?
- (快速):仅调研营销表层,覆盖更多竞品,每个竞品约2-3次工具调用
quick - (深度):+外部信号(提及、评论、新闻),每个竞品约5-8次工具调用
deep - (超深度):+公开基准+与用户公司的战略差异,每个竞品约10-15次工具调用
deeper
- 目标数量? 待调研竞品的大致数量(例如10/20/50)。
这是唯一的用户交互步骤。完成后,将静默执行直至报告生成。
| 模式 | 单竞品调研内容 | 适用场景 |
|---|---|---|
| 仅维度1(首页+定价) | 快速扫描约30-50个竞品 |
| 维度1+2 | 约15-25个竞品,包含外部信号 |
| 全部4个维度(+基准+战略差异) | 约5-15个竞品,获取完整情报 |
Step 3: Discovery (3 parallel waves)
步骤3:竞品发现(3轮并行)
Formula: queries per wave. Over-discover ~3x because the gate drops ~40-60%.
ceil(target_count / 20)Evaluation on a search-API run shows all three waves are additive — skip any and you lose real competitors:
Wave A — Generic alternatives (broad; heavy aggregator noise, filtered out later)
"alternatives to {user_company}""{user_company} competitors"
Wave B — Precise category (uses from the profile)
precise_category- verbatim
"{precise_category}" - 2-3 queries composed from the most distinctive tokens (e.g. ,
"web search api for ai agents")"retrieval API for LLMs"
Wave C — Comparison-page graph (highest precision)
"{user_company} vs"- ,
"{seed1} vs","{seed2} vs"(seeds from the profile's"{seed3} vs"list)competitors - After the searches, run to parse
scripts/extract_vs_names.mjspatterns from result titles — this uniquely surfaces competitors that don't appear as URL hits."X vs Y"
Process:
- Issue 3 parallel Bash calls (one per wave) in a SINGLE message — NOT subagents. Each Bash call chains its 2-4 queries with
browse cloud search. See&&→ "Discovery — parallel Bash, not subagents" for the exact recipe. Subagents are too heavy for a workload of 6-12references/workflow.mdcalls.browse cloud search - After all waves complete:
bash
node {SKILL_DIR}/scripts/list_urls.mjs /tmp --prefix competitor > /tmp/competitor_urls.txt node {SKILL_DIR}/scripts/extract_vs_names.mjs /tmp --prefix competitor \ --seed "{user_company},{seed1},{seed2},{seed3}" \ > /tmp/competitor_vs_names.jsonl - Filter — remove blog posts, news, AI-tool directories (seektool.ai, respan.ai, agentsindex.ai, toolradar.com, aitoolsatlas.ai, vibecodedthis.com, etc.), review aggregators (g2.com, capterra.com), databases (crunchbase.com, tracxn.com), user's own domain. See
/tmp/competitor_urls.txtfor the full noise-domain list.references/workflow.md - For entries that have a resolved
vs_names, add them. For unresolved names, optionally rundomainand pick the top root domain.browse cloud search "{name}" --num-results 3 - Merge with user-provided seed URLs. Dedup by hostname → .
/tmp/competitor_candidates.txt
公式:每轮执行次查询。需超量发现约3倍的竞品,因为门控机制会剔除约40-60%的候选。
ceil(target_count / 20)基于搜索API运行的评估显示,三轮发现是互补的——跳过任何一轮都会遗漏真实竞品:
A轮——通用替代产品(范围广;聚合器噪音多,后续会过滤)
"alternatives to {user_company}""{user_company} competitors"
B轮——精准分类(使用档案中的)
precise_category- 直接使用
"{precise_category}" - 2-3个由最具辨识度的词汇组成的查询(例如、
"web search api for ai agents")"retrieval API for LLMs"
C轮——对比页面图谱(精准度最高)
"{user_company} vs"- 、
"{seed1} vs"、"{seed2} vs"(种子来自档案中的"{seed3} vs"列表)competitors - 搜索完成后,运行解析结果标题中的"X vs Y"模式——这能独特地发现未作为URL结果出现的竞品。
scripts/extract_vs_names.mjs
流程:
- 在单次消息中发起3个并行的Bash调用(每轮一个)——不使用subagent。每个Bash调用通过
browse cloud search链式执行其2-4个查询。具体示例可参考&&→"Discovery — parallel Bash, not subagents(发现——并行Bash,不使用subagent)"。对于6-12次references/workflow.md调用的工作量,subagent过于笨重。browse cloud search - 所有轮次完成后:
bash
node {SKILL_DIR}/scripts/list_urls.mjs /tmp --prefix competitor > /tmp/competitor_urls.txt node {SKILL_DIR}/scripts/extract_vs_names.mjs /tmp --prefix competitor \ --seed "{user_company},{seed1},{seed2},{seed3}" \ > /tmp/competitor_vs_names.jsonl - 过滤——移除博客文章、新闻、AI工具目录(seektool.ai、respan.ai、agentsindex.ai、toolradar.com、aitoolsatlas.ai、vibecodedthis.com等)、评论聚合器(g2.com、capterra.com)、数据库(crunchbase.com、tracxn.com)以及用户自身的域名。完整的噪音域名列表可参考
/tmp/competitor_urls.txt。references/workflow.md - 对于中已解析出
vs_names的条目,添加其URL;对于未解析的名称,可选择性执行domain并选择排名第一的根域名。browse cloud search "{name}" --num-results 3 - 与用户提供的初始竞品URL合并,按主机名去重→生成。
/tmp/competitor_candidates.txt
Step 4: Gate (category-fit filter)
步骤4:门控(分类匹配筛选)
Drop candidates whose marketing identifies them as a different category before enrichment burns tool calls on them.
bash
cat /tmp/competitor_candidates.txt \
| node {SKILL_DIR}/scripts/gate_candidates.mjs \
--include "{profile.category_include_keywords joined with commas}" \
--exclude "{profile.exclusion_list joined with commas}" \
--concurrency 6 \
> /tmp/competitor_gated.jsonl
grep '"status":"PASS"' /tmp/competitor_gated.jsonl \
| node -e 'require("fs").readFileSync(0,"utf-8").split("\n").filter(Boolean).forEach(l => { try { console.log(JSON.parse(l).url); } catch {} })' \
> /tmp/competitor_passed.txtThe gate fetches each candidate's homepage via , extracts the first 800 chars of visible text, and classifies position-aware: exclude in → REJECT; include in → PASS; hybrid title → hero200 tiebreak; otherwise fall through.
browse cloud fetch --allow-redirects --format raw<title><title>Evaluated on a search-API run with 12 mixed candidates: 7/7 real competitors passed, 4/4 wrong-category rejected, 1 known-hybrid edge case rejected.
在调研消耗工具调用前,剔除那些营销内容显示属于不同分类的候选竞品。
bash
cat /tmp/competitor_candidates.txt \
| node {SKILL_DIR}/scripts/gate_candidates.mjs \
--include "{profile.category_include_keywords joined with commas}" \
--exclude "{profile.exclusion_list joined with commas}" \
--concurrency 6 \
> /tmp/competitor_gated.jsonl
grep '"status":"PASS"' /tmp/competitor_gated.jsonl \
| node -e 'require("fs").readFileSync(0,"utf-8").split("\n").filter(Boolean).forEach(l => { try { console.log(JSON.parse(l).url); } catch {} })' \
> /tmp/competitor_passed.txt门控机制通过获取每个候选竞品的首页,提取前800个可见文本字符,并根据位置进行分类:标题中包含排除关键词→拒绝;标题中包含包含关键词→通过;混合标题→取核心200字符判断;否则进入未知状态。
browse cloud fetch --allow-redirects --format raw基于搜索API运行的评估:12个混合候选中,7个真实竞品全部通过,4个错误分类的全部被拒绝,1个已知混合边缘案例被拒绝。
Step 4.5: Confirm enrichment set with the user
步骤4.5:与用户确认待调研竞品集合
This step is mandatory. Do NOT skip to enrichment just because the gate ran.
Enrichment is expensive: 5 competitors × 5 lane-subagents = 25 subagents, ~10-15 minutes of wall clock, ~300 calls. Running it on the wrong set wastes all of that. The gate also has known blind spots:
browse cloud- JS-heavy homepages (e.g. Tavily, Firecrawl) — returns near-empty text, so keyword matching has nothing to match on → REJECT or UNKNOWN
browse cloud fetch - Cloudflare challenge pages (e.g. Perplexity) — title becomes "Just a moment..." → no category signal
- Semantic variants — "search foundation" / "retrieval backbone" don't lexically match a list centered on "search API"
- Domain ambiguity — (the browser) vs
brave.com(the actual API product) can confuse classificationapi-dashboard.search.brave.com
The user almost always has domain knowledge the skill lacks. Ask them.
Process — the main agent:
-
Readand group rows:
/tmp/competitor_gated.jsonl- PASS bucket: everything with status=PASS.
- UNKNOWN bucket: status=UNKNOWN (fetch failed — always surface, these are the silent misses).
- Rejected-brand bucket: top ~10 REJECT rows whose title mentions a well-known brand pattern (e.g. contains the token from a user-supplied seed list, or appears frequently in the Wave C "X vs Y" graph).
-
Present the buckets to the user, one table per bucket, with URL + title + reason (for rejects).
-
Usewith a checkbox list of all candidates across the three buckets, plus a free-text "add more" field. The prompt should be explicit:
AskUserQuestion"Here are the gate's picks plus a few it was unsure about. Tick the ones that are real competitors in your space, and paste any URLs I missed (comma-separated). Enrichment will run on ONLY the ticked set." -
Write the confirmed set to(one URL per line). This is the input for Step 5 — not
/tmp/competitor_enrichment_set.txt./tmp/competitor_passed.txt
If the user doesn't respond or explicitly says "just run it", fall back to as-is, but warn in chat that the run may waste budget on wrong-category hits.
/tmp/competitor_passed.txtExa test, 2026-04-24: gate auto-passed 22 of 101 candidates but missed Tavily (generic title), Jina AI (semantic mismatch — "search foundation"), Firecrawl (JS-heavy fetch failure), and Perplexity (Cloudflare challenge). All four are real direct competitors. This step catches them.
此步骤为必填项。不得仅因门控机制运行完成就跳过调研确认。
调研成本高昂:5个竞品×5个维度subagent=25个subagent,约10-15分钟耗时,约300次调用。在错误的集合上运行会浪费所有资源。门控机制也存在已知的盲区:
browse cloud- JS密集型首页(例如Tavily、Firecrawl)——返回近乎空的文本,关键词匹配无内容可匹配→拒绝或未知
browse cloud fetch - Cloudflare验证页面(例如Perplexity)——标题变为"Just a moment..."→无分类信号
- 语义变体——"search foundation"/"retrieval backbone"与以"search API"为核心的列表在词汇上不匹配
- 域名歧义——(浏览器)vs
brave.com(实际API产品)可能导致分类混淆api-dashboard.search.brave.com
用户几乎总是拥有技能所不具备的领域知识,需向用户确认。
流程——主Agent:
-
读取并分组:
/tmp/competitor_gated.jsonl- 通过桶:所有status=PASS的条目。
- 未知桶:status=UNKNOWN的条目(抓取失败——必须展示,这些是潜在的遗漏)。
- 已排除品牌桶:约10个标题提及知名品牌模式的REJECT条目(例如包含用户提供的初始列表中的词汇,或频繁出现在C轮"X vs Y"图谱中)。
-
向用户展示这些分组,每个分组对应一个表格,包含URL+标题+拒绝原因(针对已排除条目)。
-
使用提供三个桶中所有候选的复选框列表,以及一个自由文本的"添加更多"字段。提示词需明确:
AskUserQuestion"以下是门控筛选出的候选,加上一些不确定的条目。请勾选你所在领域的真实竞品,并粘贴我遗漏的URL(逗号分隔)。调研将仅针对勾选的集合执行。" -
将确认后的集合写入(每行一个URL)。这是步骤5的输入——而非
/tmp/competitor_enrichment_set.txt。/tmp/competitor_passed.txt
若用户未回复或明确表示"直接运行",则默认使用,但需在聊天中警告此次运行可能会因错误分类的候选而浪费预算。
/tmp/competitor_passed.txtExa测试(2026-04-24):门控自动通过了101个候选中的22个,但遗漏了Tavily(通用标题)、Jina AI(语义不匹配——"search foundation")、Firecrawl(JS密集型抓取失败)和Perplexity(Cloudflare验证)。这四个都是真实的直接竞品,此步骤可捕获它们。
Step 5: Deep Enrichment
步骤5:深度调研
Two modes. See for prompt templates and wave management. See for the lane-by-lane methodology.
references/workflow.mdreferences/research-patterns.md分为两种模式。提示词模板和批量管理可参考。各维度方法可参考。
references/workflow.mdreferences/research-patterns.mdQuick mode — single subagent per batch
快速模式——每批次一个subagent
- Input: (user-confirmed set from Step 4.5), ~8 competitors per subagent.
/tmp/competitor_enrichment_set.txt - One subagent runs Lane A only (marketing surface). 2-3 tool calls each.
- Writes directly to .
{OUTPUT_DIR}/{slug}.md
- 输入:(步骤4.5中用户确认的集合),每个subagent处理约8个竞品。
/tmp/competitor_enrichment_set.txt - 一个subagent仅运行A维度(营销表层)。每个竞品2-3次工具调用。
- 直接写入。
{OUTPUT_DIR}/{slug}.md
Deep / Deeper mode — 5 subagents PER competitor (parallel lane fan-out)
深度/超深度模式——每个竞品对应5个并行subagent(维度并行展开)
For each competitor, launch 5 parallel subagents, one per lane:
- A. Marketing (): pricing, features, positioning, integrations, customers, team, funding, HQ. Owns canonical frontmatter.
marketing - B. Discussion (): Reddit, HN, forums, Dev.to, Hashnode. Broad queries beyond
discussion— alsosite:,"{competitor}" review 2026,"{competitor}" issues OR problems."{competitor}" discussion - C. Social (): LinkedIn posts, YouTube videos, Twitter/X. Snippets only — do NOT fetch.
social - D. News & Comparisons (): TechCrunch, Verge, VentureBeat, Forbes, Businesswire, Substack, blog reviews. Every mention needs a date.
news - E. Technical & Benchmarks (): GitHub benchmark repos/PRs, performance posts. Writes Benchmarks + technical Findings.
technical
Budget per lane: deep = 5-8 tool calls, deeper = 10-15.
Launch ALL competitor × lane subagents in a SINGLE Agent tool message. For 10 competitors × 5 lanes = 50 parallel Agent calls in one message. Do NOT split into batches per competitor or per lane — wall clock collapses to the slowest single agent (~3-5 min). Splitting into 5 rounds of 10 cost 25 minutes of wall clock vs 5 minutes parallel on a real measured run; do not do it.
Each subagent writes a partial to .
{OUTPUT_DIR}/partials/{slug}.{lane}.mdCritical: Pass the user's company name, product, and key features verbatim into every subagent prompt so the technical lane can do strategic diffing. Pass the full literal path to every subagent.
{OUTPUT_DIR}针对每个竞品,启动5个并行subagent,每个维度一个:
- A. Marketing(营销):定价、功能、定位、集成、客户、团队、融资、总部。负责标准前置内容。
- B. Discussion(讨论):Reddit、HN、论坛、Dev.to、Hashnode。使用广泛的查询,而非仅——例如
site:、"{competitor}" review 2026、"{competitor}" issues OR problems。"{competitor}" discussion - C. Social(社交):LinkedIn帖子、YouTube视频、Twitter/X。仅提取片段——禁止抓取完整内容。
- D. News & Comparisons(新闻与对比):TechCrunch、Verge、VentureBeat、Forbes、Businesswire、Substack、博客评论。每个提及需包含日期。
- E. Technical & Benchmarks(技术与基准):GitHub基准仓库/PR、性能文章。写入基准数据+技术发现。
每个维度的预算:深度模式=5-8次工具调用,超深度模式=10-15次工具调用。
**在单次Agent工具消息中启动所有竞品×维度的subagent。**例如10个竞品×5个维度=50个并行Agent调用,一次性发起。不得按竞品或维度分批发起——并行执行可将耗时压缩至最慢的单个Agent的耗时(约3-5分钟)。某次实际运行中,按5轮每轮10个调用分批发起耗时25分钟,而并行发起仅耗时5分钟;请勿分批执行。
每个subagent将部分内容写入。
{OUTPUT_DIR}/partials/{slug}.{lane}.md重要提示:需将用户公司名称、产品和核心功能原样传递给每个subagent的提示词,以便技术维度进行战略差异分析。需将完整的字面路径传递给每个subagent。
{OUTPUT_DIR}Merge partials → canonical per-competitor file
合并部分内容→标准单竞品文件
After all subagents for all competitors complete:
bash
node {SKILL_DIR}/scripts/merge_partials.mjs {OUTPUT_DIR}Unions the 5 partials per competitor into one — dedup'd Mentions (sorted by date desc), dedup'd Benchmarks, merged Findings, canonical frontmatter from the marketing lane.
{OUTPUT_DIR}/{slug}.md所有竞品的所有subagent完成后:
bash
node {SKILL_DIR}/scripts/merge_partials.mjs {OUTPUT_DIR}将每个竞品的5个部分内容合并为一个文件——去重后的提及内容(按日期降序排序)、去重后的基准数据、合并后的发现、来自营销维度的标准前置内容。
{OUTPUT_DIR}/{slug}.mdSynthesize the comparison matrix (write matrix.json
)
matrix.json合成对比矩阵(写入matrix.json
)
matrix.jsonSubagents write and as prose, not as pipe-separated atomic feature labels. So a naive -split axis becomes one-blob-per-competitor with no overlap — the rendered matrix shows a useless diagonal.
key_featuresintegrations|The main agent fixes this by synthesizing a shared taxonomy across competitors and writing . auto-detects this file and renders the matrix from it instead of from the pipe split.
{OUTPUT_DIR}/matrix.jsoncompile_report.mjsProcess — main agent:
-
Read ALLfiles, INCLUDING the user's company file
{slug}.mdproduced in Step 1. The user is competitor #0 for matrix purposes — treat with identical rigor.{user-slug}.md -
Produce a canonical list of 12-20 atomic features — each must be a yes/no proposition a competitor either has or doesn't (e.g. "MCP server", "SOC 2", "Site crawler", "Reranker"). Avoid sentence-length features. Avoid features only one competitor has.
-
Produce a canonical list of 10-20 integrations (frameworks, marketplaces, SDK languages).
-
For each company INCLUDING THE USER, map each taxonomy entry to/
truebased on the enrichment data in theirfalsefile. Every flag must be traceable to a Research Findings bullet with a cited URL. If the user's file says "exa-py MIT-licensed (github.com/exa-labs/exa-py)", the Open-source feature is.mdwith that URL as the source. If not mentioned, leavetrue.false -
Write the result toin this shape:
{OUTPUT_DIR}/matrix.jsonjson{ "category": "AI search APIs", "features": [{ "name": "Web Search API", "description": "..." }, ...], "integrations": [{ "name": "LangChain" }, ...], "userCompany": { "name": "Exa", "winningSummary": "Exa's moats are its first-party neural index and the integrated Research API — no one else in the set ships a semantic/embeddings-native retrieval primitive alongside a multi-step agentic research endpoint. It's also the only provider with a crawler product bundled in, and ties with SerpAPI on breadth of SDK language coverage.", "losingSummary": "Exa trails competitors on operational transparency — SerpAPI, Serper, and Tavily all publish hourly throughput SLAs, and Exa lacks a dedicated news endpoint that SerpAPI, Serper, and You.com all ship. Image/visual search is also missing vs 4 of 5 competitors.", "features": { "Web Search API": true, "Site crawler": true, ... }, "integrations": { "LangChain": true, ... } }, "competitors": { "tavily": { "features": { "Web Search API": true, "Site crawler": true, ... }, "integrations": { "LangChain": true, "Databricks Marketplace": true, ... } }, "serpapi": { "features": {...}, "integrations": {...} } } }is required. The overview page renders two cards — "Where {user} is winning" and "Where {user} is losing". PopulateuserCompanyanduserCompany.featuresfrom the self-research profile (Step 1). Without this field those two cards don't render.userCompany.integrationsWrite order (two passes — this resolves the apparent ordering tension below). In this step (5b) write all/featurescells forintegrationsand every competitor, plus a draftuserCompany/winningSummary. The drafts exist only to tell the Step 5c fact-checker which claims are high-stakes (it prioritizes cells named in the summaries). After Step 5c flips cells on verified evidence, rewrite the two summaries so the prose reflects only fact-checked cells. The JSON shape above shows the finalized post-fact-check object.losingSummary/userCompany.winningSummaryare strongly preferred (analyst-style prose, 2-4 sentences each). When present, the cards render as paragraphs instead of bulleted lists — reads like a briefing, not a spreadsheet. If absent, the cards fall back to a bulleted list of winning/losing items with who-else-has-it.losingSummary
If this step is skipped, the matrix view falls back to the raw pipe-split axis (useless for atomic comparison) and the strategic summary doesn't render. Do not skip.
subagent以散文形式写入和,而非竖线分隔的原子功能标签。因此,简单的竖线分割会导致每个竞品的内容是独立的大段文本,无重叠——渲染后的矩阵会呈现无用的对角线。
key_featuresintegrations主Agent通过在所有竞品间合成共享分类体系并写入来解决此问题。会自动检测该文件,并据此渲染矩阵,而非使用竖线分割的原始内容。
{OUTPUT_DIR}/matrix.jsoncompile_report.mjs流程——主Agent:
-
读取所有文件,包括步骤1生成的用户公司文件
{slug}.md。用户公司作为矩阵中的第0个竞品——需以相同的严谨性处理。{user-slug}.md -
生成12-20个原子化的功能列表——每个功能必须是竞品具备或不具备的是非命题(例如"MCP服务器"、"SOC 2"、"站点爬虫"、"重排序器")。避免句子长度的功能描述。避免仅单个竞品具备的功能。
-
生成10-20个集成列表(框架、市场、SDK语言)。
-
针对每个公司(包括用户公司),根据其文件中的调研数据,将每个分类条目映射为
.md/true。**每个标记必须可追溯到带有引用URL的调研发现要点。**如果用户公司的文件显示"exa-py MIT许可(github.com/exa-labs/exa-py)",则开源功能标记为false,并以该URL为来源。若未提及,则标记为true。false -
将结果写入,格式如下:
{OUTPUT_DIR}/matrix.jsonjson{ "category": "AI search APIs", "features": [{ "name": "Web Search API", "description": "..." }, ...], "integrations": [{ "name": "LangChain" }, ...], "userCompany": { "name": "Exa", "winningSummary": "Exa的护城河是其自研神经索引和集成的Research API——集合中没有其他厂商在语义/嵌入原生检索原语的同时提供多步骤Agent化研究端点。它也是唯一捆绑爬虫产品的提供商,并且在SDK语言覆盖广度上与SerpAPI持平。", "losingSummary": "Exa在运营透明度上落后于竞品——SerpAPI、Serper和Tavily都发布了每小时吞吐量SLA,而Exa缺少SerpAPI、Serper和You.com都提供的专属新闻端点。与5个竞品中的4个相比,Exa还缺少图片/视觉搜索功能。", "features": { "Web Search API": true, "Site crawler": true, ... }, "integrations": { "LangChain": true, ... } }, "competitors": { "tavily": { "features": { "Web Search API": true, "Site crawler": true, ... }, "integrations": { "LangChain": true, "Databricks Marketplace": true, ... } }, "serpapi": { "features": {...}, "integrations": {...} } } }为必填项。概览页面会渲染两张卡片——"{用户公司}的优势"和"{用户公司}的劣势"。从自我调研档案(步骤1)中填充userCompany和userCompany.features。若无此字段,这两张卡片将无法渲染。userCompany.integrations写入顺序(两次传递——解决以下明显的顺序矛盾)。在此步骤(5b)中,写入和所有竞品的所有userCompany/features单元格,以及草稿版integrations/winningSummary。草稿仅用于告知步骤5c的事实核查员哪些主张是高风险的(优先核查摘要中提及的单元格)。步骤5c根据验证证据修改单元格后,重写两个摘要,使文本仅反映经过事实核查的单元格。上述JSON格式为最终的核查后对象。losingSummary强烈建议填写/userCompany.winningSummary(分析师风格的散文,每部分2-4句话)。填写后,卡片会以段落形式渲染,而非项目符号列表——更像简报而非电子表格。若未填写,卡片会退化为包含优势/劣势项及其他竞品情况的项目符号列表。losingSummary
若跳过此步骤,矩阵视图会退化为使用原始竖线分割的内容(无法进行原子化对比),且战略摘要无法渲染。请勿跳过。
Fact-check the matrix — spot-check the high-stakes cells (default)
对比矩阵事实核查——抽查高风险单元格(默认)
Do not trust the taxonomy pass alone for high-stakes cells. It is LLM inference from prose and will hallucinate moats. Observed during a search-API run (2026-04-23): matrix.json claimed SOC 2 was unique to the user's company; verification showed three of the other competitors also have SOC 2 Type II.
But verifying every cell is the opposite mistake. A 7-company × 33-axis matrix has 231 cells. The Apr 2026 search-API run got stuck at 111+ tool calls in fact-check before interrupt — the subagent kept going on table-stakes cells (REST API, JSON responses, Python SDK) that are universal in the category.
Default = spot-check, not full sweep. Only verify cells that meaningfully change the strategic narrative.
Launch a single fact-check subagent (Bash-only) with a hard 25-call budget that targets ONLY these high-stakes axes:
-
Everyand
userCompany.featurescell (the user's own moats — these go straight into "Where you're winning" prose). Typical: 17 + 16 = 33 cells, but most are obvious (your own product). Focus on:userCompany.integrations- Anything claimed as a moat in
winningSummary - Anything claimed as a gap in
losingSummary - Compliance (SOC 2, HIPAA, ISO 27001, GDPR)
- Open-source license claims (MIT / Apache 2.0 / AGPL — observed wrong on a competitor's SDK)
- Published uptime SLA (status page ≠ SLA)
- Anything claimed as a moat in
-
Across competitors, only the cells that drive the win/loss summary:
- For each "Winning" claim, verify the user has it AND verify the competitors don't.
- For each "Losing" claim, verify the named competitors do have it.
- Compliance + license + SLA across all competitors (high-trust, frequently wrong).
-
Do NOT verify:
- Universal table-stakes (REST API, JSON responses, Python SDK, API-key auth) — every search API has these.
- cells with no claim being made (no moat lost or won).
false - Integration cells unless they appear in the win/loss summary.
You are a matrix spot-check subagent. Budget: 25 browse cloud calls TOTAL across all cells.
Stop and return what you have when you hit the budget — partial fact-check is
better than blocking the rest of the pipeline.
TOOL RULES: Bash ONLY. browse cloud search + browse cloud fetch. Count your calls; stop at 25.
PRIORITY ORDER (highest-stakes first — work down until budget):
1. Every cell that appears in userCompany.winningSummary or losingSummary
2. Compliance cells (SOC 2, HIPAA, ISO 27001) for user + every competitor
3. Open-source / self-hostable + license cells across all competitors
4. Pricing tier numbers ($X/mo, /hr) for user + competitors named in summaries
5. Funding / employee_estimate fields (only if cited in summaries)
Skip:
- Universal cells (REST API, JSON responses, Python SDK, API-key auth, etc.)
- `false` cells where no claim is being made
- Integration matrix cells unless they appear in summaries
For each cell verified:
- If `true` — find one source URL (docs, trust portal, GitHub LICENSE, etc).
- If `false` — one targeted browse cloud search. Flip ONLY on first-party evidence.
Output: matrix.json with `sources: { "Feature": "https://..." }` on the
verified cells (other cells stay as-is). Cells-changed log to
{OUTPUT_DIR}/matrix_fact_check.md with each flip + URL + quoted evidence.
Report back: "spot-check: N cells verified, M flipped, B/25 budget used".Full-sweep mode (opt-in, slower): if the user explicitly says "full fact check" or for a high-stakes deliverable (board deck, press release), set the budget to 80 calls and verify every non-universal cell. Default is spot-check.
After the subagent completes, re-read matrix.json, recompile, and surface delta to the user. The summary is much more trustworthy with spot-check than without — and ships in 3-5 minutes instead of stalling the pipeline.
matrix_fact_check.md不得仅依赖分类传递的结果信任高风险单元格。这是基于散文的LLM推理,会产生虚假的护城河。在2026-04-23的搜索API运行中观察到:matrix.json宣称SOC 2是用户公司独有的;但验证显示其他三个竞品也拥有SOC 2 Type II认证。
但核查所有单元格是另一种错误。7家公司×33个维度的矩阵有231个单元格。2026年4月的搜索API运行在核查到111+次工具调用时陷入停滞——subagent持续核查在该分类中普遍存在的基础单元格(REST API、JSON响应、Python SDK)。
默认模式=抽查,而非全面核查。仅核查会显著改变战略叙事的单元格。
启动一个仅使用Bash的事实核查subagent(硬预算25次调用),仅针对以下高风险维度:
-
所有和
userCompany.features单元格(用户自身的护城河——这些会直接进入"你的优势"文本)。典型情况:17+16=33个单元格,但大多数是显而易见的(你自己的产品)。重点关注:userCompany.integrations- 中宣称的任何护城河
winningSummary - 中宣称的任何差距
losingSummary - 合规认证(SOC 2、HIPAA、ISO 27001、GDPR)
- 开源许可证主张(MIT/Apache 2.0/AGPL——曾在竞品SDK上出现错误)
- 已发布的正常运行时间SLA(状态页面≠SLA)
-
跨竞品,仅核查影响胜负摘要的单元格:
- 对于每个"优势"主张,验证用户公司具备该功能且竞品不具备。
- 对于每个"劣势"主张,验证提及的竞品具备该功能。
- 所有竞品的合规+许可证+SLA(高信任度,经常出错)。
-
无需核查:
- 普遍存在的基础功能(REST API、JSON响应、Python SDK、API密钥认证等)——每个搜索API都具备这些功能。
- 未提出主张的单元格(无得失的护城河)。
false - 集成单元格,除非出现在胜负摘要中。
你是矩阵抽查subagent。预算:所有单元格总计25次browse cloud调用。
达到预算后停止并返回已有结果——部分核查比阻塞整个流程更好。
工具规则:仅使用Bash。browse cloud search + browse cloud fetch。记录调用次数;达到25次即停止。
优先级顺序(高风险优先——按顺序处理直至预算耗尽):
1. 出现在userCompany.winningSummary或losingSummary中的每个单元格
2. 用户公司+所有竞品的合规单元格(SOC 2、HIPAA、ISO 27001)
3. 所有竞品的开源/可自托管+许可证单元格
4. 用户公司+摘要中提及的竞品的定价层级($X/月、/小时)
5. 融资/员工估算字段(仅当摘要中引用时)
跳过:
- 普遍存在的单元格(REST API、JSON响应、Python SDK、API密钥认证等)
- 未提出主张的`false`单元格
- 摘要中未提及的集成矩阵单元格
每个被核查的单元格:
- 若为`true`——找到一个来源URL(文档、信任门户、GitHub LICENSE等)。
- 若为`false`——执行一次针对性的browse cloud搜索。仅根据第一方证据修改标记。
输出:在`matrix.json`中为已核查的单元格添加`sources: { "Feature": "https://..." }`(其他单元格保持不变)。将修改记录写入`{OUTPUT_DIR}/matrix_fact_check.md`,包含每个修改+URL+引用证据。返回报告:"spot-check: 已核查N个单元格,修改M个,已使用B/25预算"。全面核查模式(可选,较慢):若用户明确要求"全面事实核查"或用于高风险交付物(董事会演示文稿、新闻稿),将预算设置为80次调用并核查所有非普遍存在的单元格。默认模式为抽查。
subagent完成后,重新读取matrix.json,重新编译,并向用户展示的差异。经过抽查的摘要比未核查的更可信——且仅需3-5分钟即可完成,不会阻塞流程。
matrix_fact_check.mdStep 5d: Battle Card synthesis (deep/deeper only, after Step 5c)
步骤5d:战斗卡片合成(仅深度/超深度模式,步骤5c之后)
Depends on fact-checked matrix.json from Step 5c. This is a sales-enablement lane. For each competitor, launch a Bash-only synthesis subagent (no new calls) that reads all 5 existing partials + the user's merged + fact-checked , and produces per-competitor Landmines / Objection Handlers / Talk Tracks grounded in cited evidence.
browse cloud.mdmatrix.jsonPrompt template: (substitute / / / per competitor). Format spec: .
references/battle-card-subagent.md{COMPETITOR_SLUG}{COMPETITOR_NAME}{USER_COMPANY_NAME}{USER_WINNING_SUMMARY}references/battle-card.mdOutput: with a section.
{OUTPUT_DIR}/partials/{slug}.battle.md## Battle CardRe-run the merge after this lane completes. The Step 5 merge ran before the battle partials existed, so the consolidated files don't contain them yet. Re-run:
{slug}.mdbash
node {SKILL_DIR}/scripts/merge_partials.mjs {OUTPUT_DIR}This unions each into its consolidated (the lane is already handled by ). reads the section from and renders it as a brand-accented card on the per-competitor HTML page. Skip this re-merge and the battle cards never appear in the report.
{slug}.battle.md{slug}.mdbattlemerge_partials.mjscompile_report.mjs## Battle Card{slug}.mdWhy this lane is synthesis-only — battle cards must be grounded in facts that already survived Step 5c. Letting the subagent do fresh searches would reintroduce the hallucinated-moat problem the fact-check step exists to prevent. The subagent's adversarial self-check explicitly rejects claims not traceable to an input partial bullet or a -backed matrix cell.
browse cloudsourcesParallelism: 1 subagent per competitor, all in one Agent-tool message (synthesis is fast, ~3-5 Bash calls per subagent). Skip this step in mode — there isn't enough research depth to ground the cards credibly.
quick依赖步骤5c中经过事实核查的matrix.json。这是销售赋能维度。针对每个竞品,启动一个仅使用Bash的合成subagent(不进行新的调用),读取所有5个现有部分内容+用户合并后的文件+经过事实核查的,生成基于引用证据的单竞品雷区/异议处理话术/沟通脚本。
browse cloud.mdmatrix.json提示词模板:(针对每个竞品替换///)。格式规范:。
references/battle-card-subagent.md{COMPETITOR_SLUG}{COMPETITOR_NAME}{USER_COMPANY_NAME}{USER_WINNING_SUMMARY}references/battle-card.md输出:,包含章节。
{OUTPUT_DIR}/partials/{slug}.battle.md## Battle Card完成此维度后需重新运行合并操作。步骤5的合并操作在战斗部分内容生成之前执行,因此合并后的文件不包含这些内容。重新运行:
{slug}.mdbash
node {SKILL_DIR}/scripts/merge_partials.mjs {OUTPUT_DIR}将每个合并到对应的文件中(已支持维度)。会从中读取章节,并在单竞品HTML页面上渲染为带有品牌风格的卡片。跳过此重新合并步骤,战斗卡片将不会出现在报告中。
{slug}.battle.md{slug}.mdmerge_partials.mjsbattlecompile_report.mjs{slug}.md## Battle Card此维度仅进行合成的原因——战斗卡片必须基于步骤5c已验证的事实。允许subagent进行新的搜索会重新引入事实核查步骤旨在解决的虚假护城河问题。subagent的对抗性自我检查会明确拒绝无法追溯到输入部分要点或支持的矩阵单元格的主张。
browse cloudsources并行性:每个竞品对应一个subagent,全部在单次Agent工具消息中发起(合成速度快,每个subagent约3-5次Bash调用)。快速模式下跳过此步骤——调研深度不足以支撑可信的战斗卡片。
Step 6: Screenshots
步骤6:截图
Capture a homepage hero screenshot per competitor:
bash
node {SKILL_DIR}/scripts/capture_screenshots.mjs {OUTPUT_DIR} --mode remoteUses the CLI (). The flag selects the browser session: (default) drives a Browserbase session — best for protected/bot-detecting homepages and the only option without local Chrome; uses Chrome on your machine. The script passes the corresponding / flag on each command, so there is no separate environment-config step to run. Writes one PNG per competitor to . The compile step in Step 7 auto-embeds the hero on each per-competitor HTML page.
browsenpm install -g browse--moderemotelocal--remote--localbrowse{OUTPUT_DIR}/screenshots/{slug}-hero.pngCost: ~10-20s per competitor. ~60s for 5 competitors.
为每个竞品截取首页核心区域截图:
bash
node {SKILL_DIR}/scripts/capture_screenshots.mjs {OUTPUT_DIR} --mode remote使用 CLI(需执行)。参数选择浏览器会话:(默认)使用Browserbase会话——最适合受保护/反爬虫的首页,也是无本地Chrome时的唯一选项;使用本地机器上的Chrome。脚本会在每个命令中传递对应的/参数,无需单独进行环境配置步骤。每个竞品的PNG截图保存至。步骤7的编译操作会自动将首页截图嵌入每个单竞品HTML页面。
browsenpm install -g browse--moderemotelocalbrowse--remote--local{OUTPUT_DIR}/screenshots/{slug}-hero.png耗时:每个竞品约10-20秒。5个竞品约60秒。
Step 7: HTML Report
步骤7:HTML报告
-
Generate all views + CSV (opens overview in browser):bash
node {SKILL_DIR}/scripts/compile_report.mjs {OUTPUT_DIR} --user-company "{user_company}" --openProduces:- — overview: competitor table with tagline, pricing summary, key features, strategic diff
{OUTPUT_DIR}/index.html - — per-competitor deep dive (all sections)
{OUTPUT_DIR}/competitors/{slug}.html - — side-by-side feature/pricing matrix
{OUTPUT_DIR}/matrix.html - — chronological feed with source-type pills + client-side filter
{OUTPUT_DIR}/mentions.html - — flat spreadsheet
{OUTPUT_DIR}/results.csv
-
Present a chat summary:
undefined-
生成所有视图+CSV(自动在浏览器中打开概览页面):bash
node {SKILL_DIR}/scripts/compile_report.mjs {OUTPUT_DIR} --user-company "{user_company}" --open生成以下内容:- ——概览:包含标语、定价摘要、核心功能、战略差异的竞品表格
{OUTPUT_DIR}/index.html - ——单竞品深度剖析(所有章节)
{OUTPUT_DIR}/competitors/{slug}.html - ——功能/价格对比矩阵
{OUTPUT_DIR}/matrix.html - ——按时间排序的动态流,包含来源类型标签+客户端筛选功能
{OUTPUT_DIR}/mentions.html - ——扁平化电子表格
{OUTPUT_DIR}/results.csv
-
在聊天中展示总结:
undefinedCompetitor Analysis Complete
竞品分析完成
- Competitors researched: {count}
- Depth mode: {mode}
- Mentions collected: {total mentions} across {source types count} source types
- Public benchmarks found: {count}
- Opened in browser: ~/Desktop/{company_slug}competitors{date}/index.html
3. Show the **overview table** in chat:
| Competitor | Positioning | Pricing | Key Features | Strategic Diff |
|---|---|---|---|---|
| Rival Co | AI-native web search API | $99/mo entry | semantic search, reranking, crawler | Similar retrieval; cheaper entry |
4. Call out the top 3-5 most interesting findings — e.g., "3 competitors have public benchmarks; Rival Co is cheapest; Foo Inc launched a dedicated news-search endpoint 2 weeks ago." Offer to dig deeper into any specific competitor or re-run with different depth.- 已调研竞品数量:{count}
- 深度模式:{mode}
- 收集到的提及内容:{total mentions}条,涵盖{source types count}种来源类型
- 发现的公开基准数据:{count}条
- 已在浏览器中打开:~/Desktop/{company_slug}competitors{date}/index.html
3. 在聊天中展示**概览表格**:
| 竞品 | 定位 | 定价 | 核心功能 | 战略差异 |
|---|---|---|---|---|
| Rival Co | AI原生网页搜索API | 入门版$99/月 | 语义搜索、重排序、爬虫 | 检索功能类似;入门价格更低 |
4. 突出3-5个最有趣的发现——例如"3个竞品拥有公开基准数据;Rival Co价格最低;Foo Inc在2周前推出了专属新闻搜索端点"。主动提出可为用户深入分析特定竞品,或调整深度重新运行。