SuperAPI AI Directory

pm-search

Data & analytics

View repository

Updated 10-16 06:22

About this skill

Preamble (run first)

# 自动发现 AnySearch CLI 安装位置
# 支持 Claude Code / OpenCode / OpenClaw / Cursor / pip install / 手动克隆等多种安装方式
ANYSEARCH_CLI=""
for candidate in \
  "$HOME/.claude/skills/anysearch/scripts/anysearch_cli.py" \
  "$HOME/.opencode/skills/anysearch/scripts/anysearch_cli.py" \
  "$HOME/.openclaw/skills/anysearch/scripts/anysearch_cli.py" \
  "$HOME/.cursor/skills/anysearch/scripts/anysearch_cli.py" \
  "$HOME/skills/anysearch/scripts/anysearch_cli.py" \
  "$HOME/.anysearch/scripts/anysearch_cli.py" \
  "/usr/local/bin/anysearch_cli.py" \
  "$HOME/bin/anysearch_cli.py"; do
  if [ -f "$candidate" ]; then
    ANYSEARCH_CLI="$candidate"
    break
  fi
done

# pip install 方式
if [ -z "$ANYSEARCH_CLI" ]; then
  PIP_LOCATION=$(python3 -c "import importlib.util; spec=importlib.util.find_spec('anysearch'); print(spec.submodule_search_locations[0] if spec and spec.submodule_search_locations else '')" 2>/dev/null)
  if [ -n "$PIP_LOCATION" ] && [ -f "$PIP_LOCATION/scripts/anysearch_cli.py" ]; then
    ANYSEARCH_CLI="$PIP_LOCATION/scripts/anysearch_cli.py"
  fi
fi

# which 方式
if [ -z "$ANYSEARCH_CLI" ]; then
  WHICH_CLI=$(which anysearch_cli.py 2>/dev/null)
  if [ -n "$WHICH_CLI" ] && [ -f "$WHICH_CLI" ]; then
    ANYSEARCH_CLI="$WHICH_CLI"
  fi
fi

echo "🔍 PM-Search V2.1 - 联网搜索整合工具"
echo "搜索优先级:AnySearch → Exa MCP → WebSearch"
echo "支持并发搜索:市场调研 | 竞品分析 | 行业数据 | 舆情监控 | 合规检查"

if [ -n "$ANYSEARCH_CLI" ]; then
  echo "✅ AnySearch: $ANYSEARCH_CLI"
else
  echo "⚠️  AnySearch 未安装,将自动降级到 Exa MCP / WebSearch"
  echo "   安装: git clone https://github.com/konglong87/anysearch.git ~/.claude/skills/anysearch"
fi
echo ""

Boundaries when writing

When only discussing, do not write files; startup checks do not create directories. When the user requests saving artifacts, first confirm the current product, the exact output path, and the overwrite/append choice for existing files; after confirmation,only immediately before the actual Writecreate the parent directory of that output file. For complete installation, see skills/_shared/artifact-policy.md, installing this skill alone is also executed according to this paragraph.


Search tool priority (core rule)

All searches must select tools according to the following priority, and skipping levels is not allowed:

Priority Tool Applicable scenario Invocation method
1 (preferred) AnySearch Chinese search, vertical domains, batch search, full-text extraction Bash invocation anysearch_cli.py(path is automatically discovered by the Preamble, see output above)
2 (alternative) Exa MCP English/code/company search, semantic search mcp__exa__web_search_exa tool
3 (fallback) WebSearch only when both AnySearch and Exa are unavailable WebSearch tool

AnySearch invocation specification:

  • Search:python3 <anysearch_cli路径> search "查询词" --max_results 5
  • Vertical domain search:python3 <anysearch_cli路径> search "查询词" --domain finance --sub_domain finance.cn_stock
  • Full-text extraction:python3 <anysearch_cli路径> extract "URL"
  • Batch search:python3 <anysearch_cli路径> batch_search --query "q1" --query "q2"
  • List subdomains:python3 <anysearch_cli路径> list_domains --domain finance

AnySearch vertical domain configuration

Vertical domain usage priority:

  1. First check the complete domain mapping — Read skills/_shared/anysearch-pm-domains.md, and find the recommended vertical domain combination according to the current PM scenario
  2. List available subdomains — python3 <anysearch_cli路径> list_domains --domain {domain} to view the latest subdomains and parameter schema of the domain
  3. Execute vertical search — python3 <anysearch_cli路径> search "查询词" --max_results 5 --domain {domain} --sub_domain {sub_domain}

Default vertical domains for the five pm-search search types:

Search type Recommended vertical domain Subdomain Reason for applicability
Market research finance finance.us_stock, finance.cn_stock, finance.news Data of listed benchmark companies, industry news
Competitor analysis business + finance business.company, finance.cn_stock Company registration information, financial data
Industry data finance finance.news, finance.cn_stock Industry news, market size
Public opinion monitoring General search No vertical domain Broad coverage of social media and user reviews
Compliance check legal legal.statute, legal.case Laws and regulations, judicial cases

💡 For the complete vertical domain mapping of 17 domains × 37 skills × 11 industry PM scenarios, see skills/_shared/anysearch-pm-domains.md。

Fallback decision rules

  1. AnySearch unavailable: script not installed, API key missing, network timeout → fall back to Exa MCP
  2. Exa MCP unavailable: tool call returns an error → fall back to WebSearch
  3. When using WebSearch: mark in the report "⚠️ Data source: WebSearch (fallback mode), it is recommended to configure AnySearch to improve Chinese search quality"

Full-text extraction priority

Priority Tool Invocation method
1 AnySearch extract python3 <anysearch_cli路径> extract "URL"
2 Exa MCP fetch mcp__exa__web_fetch_exa tool
3 WebFetch WebFetch tool

Cross-Agent interaction rules

When the process requires interaction with the user:

  1. If the current environment supports AskUserQuestion, use AskUserQuestion (best experience).
  2. If the current environment does not support AskUserQuestion, you must ask the same question via a regular chat message.
  3. Ask only one question at a time.
  4. After asking, you must stop the current turn and wait for the user's answer (STOP and WAIT).
  5. You must not generate documents or write to docs before the user answers.
  6. Existing docs files cannot substitute for the user's answer in this turn.

Execution Flow

Step 0: Parameter Parsing (Automatic Routing)

If the call carries the --type=xxx parameter (e.g., /pm-search --type=competitor), map it directly to the corresponding search type,skip the interactive selection in Step 1:

Parameter Search Type Execution Path
--type=market Market Research Step 2A - Market Research
--type=competitor Competitive Analysis Step 2A - Competitive Analysis
--type=data Industry Data Step 2A - Industry Data
--type=opinion Public Sentiment Monitoring Step 2A - Public Sentiment Monitoring
--type=legal Compliance Check Step 2A - Compliance Check
--type=all Comprehensive Search Step 2B - Comprehensive Concurrent Search

After parsing to a type, jump directly to the corresponding execution path without asking the user. If the --type value is not in the above mapping, treat it as an unknown parameter and fall back to the interactive selection in Step 1. Note: If the user has not explicitly mentioned the product/industry domain in the current conversation, you should first ask for confirmation before executing the search.

Ifnot carrying the --type parameter (the user directly inputs /pm-search or triggers via natural language), continue with the interactive selection in Step 1.


Step 1: Determine Search Type (main agent - user interaction)

Use AskUserQuestion to ask:

🔍 Web Search Integration Tool - Select Search Type

Please select the type(s) of research you need (multiple selections allowed):

A) Market Research - Market size, trends, user personas B) Competitive Analysis - Competitor features, pricing, strategy C) Industry Data - Industry reports, statistical data D) Public Sentiment Monitoring - User reviews, media coverage E) Compliance Check - Policies and regulations, industry standards F) Comprehensive Search - All of the above (concurrent execution) G) Other (please enter manually)

After the user selects, execute different flows based on the selection.


Subagent Concurrent Search Architecture


Step 2A: Single-Type Search (main agent executes directly)

If the user selects a single search type, execute directly:

⚠️ All searches must follow the "Search Tool Priority" rule: prefer AnySearch, fall back to Exa MCP, and only use WebSearch as a last resort.

Market Research

按搜索优先级执行:

搜索关键词:"{产品领域} 市场规模 2026"
搜索关键词:"{产品领域} 市场趋势"
搜索关键词:"{产品领域} 用户画像"

首选 AnySearch(带垂直域 --domain finance --sub_domain finance.cn_stock),
调用方式参考「搜索工具优先级」章节。失败则降级到 Exa MCP,最后才用 WebSearch。

数据源优先级:
1. 艾瑞咨询、易观分析、QuestMobile(权威报告)
2. 36氪、虎嗅(行业媒体)
3. 工信部、网信办(政策法规)

整合结果 → 生成:docs/01-需求调研/市场调研报告.md

Competitive Analysis

按搜索优先级执行:

搜索关键词:"{产品领域} 主要竞品"
搜索关键词:"{竞品名称} 产品功能"
搜索关键词:"{竞品名称} 定价策略"

首选 AnySearch(带垂直域 --domain finance --sub_domain finance.cn_stock),
失败则降级到 Exa MCP,最后才用 WebSearch。

数据源:
- 七麦数据、蝉妈妈(应用数据)
- 官网、App Store、产品评测

整合结果 → 生成:docs/01-需求调研/竞品分析报告.md

Industry Data

按搜索优先级执行:

搜索关键词:"{行业} 行业报告 2026"
搜索关键词:"{行业} 统计数据"
搜索关键词:"{行业} 发展趋势"

首选 AnySearch(带垂直域 --domain finance --sub_domain finance.cn_stock),
失败则降级到 Exa MCP,最后才用 WebSearch。

数据源:
- 国家统计局
- 行业协会官网
- 咨询公司报告

整合结果 → 生成:docs/01-需求调研/行业数据报告.md

Public Sentiment Monitoring

按搜索优先级执行:

搜索关键词:"{产品/品牌} 用户评价"
搜索关键词:"{产品/品牌} 媒体报道"
搜索关键词:"{产品/品牌} 微博热搜"

首选 AnySearch(通用搜索,无垂直域),
失败则降级到 Exa MCP,最后才用 WebSearch。

数据源:
- 微博、知乎、小红书(用户评价)
- 新闻媒体(报道)
- 黑猫投诉(投诉信息)

整合结果 → 生成:docs/01-需求调研/舆情监控报告.md

Compliance Check

按搜索优先级执行:

搜索关键词:"{行业} 政策法规 2026"
搜索关键词:"{行业} 监管要求"
搜索关键词:"{行业} 合规标准"

首选 AnySearch(通用搜索,无垂直域),
失败则降级到 Exa MCP,最后才用 WebSearch。

数据源:
- 政府官网(工信部、网信办、市场监管总局)
- 法律法规数据库
- 行业协会合规指南

整合结果 → 生成:docs/01-需求调研/合规检查报告.md

Step 2B: Comprehensive Concurrent Search (Subagents execute in parallel)

If the user selects "Comprehensive Search" or selects multiple types, use the Agent tool to execute concurrently:

⚠️ Each subagent prompt must include the "Search Tool Priority" self-discovery instruction (subagents cannot see the main agent's Preamble).

Search tool priority block (embedded in each subagent prompt)

The following block must be embedded verbatim at the beginning of each subagent's prompt:

【搜索工具优先级 - 必须遵守】
1. 首选 AnySearch:先定位 anysearch_cli.py。
   常见安装路径(按顺序尝试):
   ~/.claude/skills/anysearch/scripts/anysearch_cli.py
   ~/.opencode/skills/anysearch/scripts/anysearch_cli.py
   ~/.openclaw/skills/anysearch/scripts/anysearch_cli.py
   ~/.cursor/skills/anysearch/scripts/anysearch_cli.py
   ~/.anysearch/scripts/anysearch_cli.py
   $(which anysearch_cli.py 2>/dev/null)
   或 pip show anysearch 查找安装位置。
   找到后 Bash 调用 python3 <路径> search "查询词" --max_results 5。
   市场/竞品/行业类搜索加 --domain finance --sub_domain finance.cn_stock。
2. AnySearch 不可用(脚本不存在/API报错/超时)→ 降级到 mcp__exa__web_search_exa
3. Exa 不可用 → 降级到 WebSearch,并在输出中标注「⚠️ 降级模式」

Execute command

使用 Agent tool 并发派发 5 个 subagent:

**Subagent 1: Market Research**
- type: "general-purpose"
- prompt: "【搜索工具优先级块】+ 执行市场调研搜索,产品领域:{产品领域},搜索市场规模/趋势/用户画像,输出到 docs/01-需求调研/market-research.md"

**Subagent 2: Competitor Analysis**
- type: "general-purpose"
- prompt: "【搜索工具优先级块】+ 执行竞品分析搜索,产品领域:{产品领域},搜索主要竞品/功能/定价,输出到 docs/01-需求调研/competitor-analysis.md"

**Subagent 3: Industry Data**
- type: "general-purpose"
- prompt: "【搜索工具优先级块】+ 执行行业数据搜索,行业:{行业},搜索行业报告/统计数据/趋势,输出到 docs/01-需求调研/industry-data.md"

**Subagent 4: Public Opinion**
- type: "general-purpose"
- prompt: "【搜索工具优先级块】+ 执行舆情监控搜索,关键词:{产品/品牌},搜索用户评价/媒体报道/社交媒体,输出到 docs/01-需求调研/public-opinion.md"

**Subagent 5: Compliance Check**
- type: "general-purpose"
- prompt: "【搜索工具优先级块】+ 执行合规检查搜索,行业:{行业},搜索政策法规/监管要求/合规标准,输出到 docs/01-需求调研/compliance-check.md"

**并发执行:在单个消息中调用 5 次 Agent tool**

Agent invocation example

**在一条消息中并发调用:**

[Agent tool call 1 - Market Research]
[Agent tool call 2 - Competitor Analysis]
[Agent tool call 3 - Industry Data]
[Agent tool call 4 - Public Opinion]
[Agent tool call 5 - Compliance Check]

**等待所有 subagent 完成**

Step 3: Main Agent integrates results

Read the reports generated by all subagents:

# 读取各个报告
read docs/01-需求调研/market-research.md
read docs/01-需求调研/competitor-analysis.md
read docs/01-需求调研/industry-data.md
read docs/01-需求调研/public-opinion.md
read docs/01-需求调研/compliance-check.md

Integrate into a comprehensive report:

Use Write to generate:docs/01-需求调研/市场调研报告.md

Report structure:

# 综合市场调研报告

## 一、市场规模与趋势
[来自 market-research.md]

## 二、竞品分析
[来自 competitor-analysis.md]

## 三、行业数据
[来自 industry-data.md]

## 四、舆情监控
[来自 public-opinion.md]

## 五、合规检查
[来自 compliance-check.md]

## 六、综合结论与建议

### 市场机会
- [综合分析]

### 风险提示
- [综合分析]

### 下一步建议
1. 执行 /pm-priority - 需求优先级排序
2. 执行 /pm-mvp - MVP 方案规划
3. 执行 /pm-docs - 文档生成

---

**生成时间**: 2026-XX-XX
**数据来源**: [标注实际使用的搜索工具:AnySearch / Exa MCP / WebSearch]

Performance comparison

V1 vs V2.1 performance

Metric V1 (sequential execution) V2.1 (concurrent + priority search) Improvement
Execution time ~10 minutes ~2.5 minutes 4x
Main Agent context ~50,000 tokens ~10,000 tokens 80% savings
Search type 1-5 sequential 5 concurrent -
Chinese search quality WebSearch (poor) AnySearch (excellent) ✅
Report quality Single perspective Multi-dimensional integration ✅

Usage examples

Example 1: Single search

用户: 我需要了解生鲜电商的市场规模

AI: 🎯 执行市场调研搜索
    [AnySearch 搜索中... → 成功]
    ✅ 生成报告: docs/01-需求调研/市场调研报告.md

Example 2: AnySearch fallback scenario

用户: 我需要了解生鲜电商的市场规模

AI: 🎯 执行市场调研搜索
    [AnySearch 搜索中... → 未安装,降级]
    [Exa MCP 搜索中... → 成功]
    ✅ 生成报告: docs/01-需求调研/市场调研报告.md
    ⚠️ 数据来源:Exa MCP(降级模式)

Example 3: Comprehensive concurrent search

用户: 我想全面了解在线教育市场

AI: 🎯 执行综合并发搜索
    [并发派发 5 个 subagent...]
    ⏳ Subagent 1: Market Research - 完成 ✅
    ⏳ Subagent 2: Competitor Analysis - 完成 ✅
    ⏳ Subagent 3: Industry Data - 完成 ✅
    ⏳ Subagent 4: Public Opinion - 完成 ✅
    ⏳ Subagent 5: Compliance Check - 完成 ✅

    🔧 整合分析结果...
    ✅ 生成综合报告: docs/01-需求调研/市场调研报告.md

    💡 建议下一步:
    1. /pm-priority - 需求优先级排序
    2. /pm-mvp - MVP 方案规划

Subagent Prompt template

Market Research Subagent Prompt

你是市场调研专家。执行以下任务:

【搜索工具优先级 - 必须遵守】
1. 首选 AnySearch:先定位 anysearch_cli.py。
   常见安装路径(按顺序尝试):
   ~/.claude/skills/anysearch/scripts/anysearch_cli.py
   ~/.opencode/skills/anysearch/scripts/anysearch_cli.py
   ~/.openclaw/skills/anysearch/scripts/anysearch_cli.py
   ~/.cursor/skills/anysearch/scripts/anysearch_cli.py
   ~/.anysearch/scripts/anysearch_cli.py
   $(which anysearch_cli.py 2>/dev/null)
   或 pip show anysearch 查找安装位置。
   找到后 Bash 调用 python3 <路径> search "查询词" --max_results 5。
   市场调研类搜索加 --domain finance --sub_domain finance.cn_stock。
2. AnySearch 不可用 → 降级到 mcp__exa__web_search_exa
3. Exa 不可用 → 降级到 WebSearch,并在输出中标注「⚠️ 降级模式」

**目标**: 调研 {产品领域} 的市场规模、趋势、用户画像

**搜索策略**:
1. 市场规模:搜索 "{产品领域} 市场规模 2026"
2. 市场趋势:搜索 "{产品领域} 市场趋势"
3. 用户画像:搜索 "{产品领域} 用户画像"

**数据源优先级**:
- 艾瑞咨询、易观分析、QuestMobile(权威报告)
- 36氪、虎嗅(行业媒体)
- 工信部、网信办(政策法规)

**输出要求**:
生成结构化报告到:docs/01-需求调研/market-research.md

包含章节:
1. 市场规模(总量、增长率)
2. 市场趋势(发展动向)
3. 用户画像(目标用户特征)
4. 市场机会点

完成后立即返回结果。

Notes

Data source credibility assessment

High credibility:

  • Official government data
  • Reports from authoritative consulting firms (iResearch, Analysys, McKinsey)
  • Industry association statistics

Medium credibility:

  • Tech media reports (36Kr, Huxiu)
  • App data platforms (Qimai Data, Chanmama)

Low credibility:

  • User reviews (require cross-validation)
  • Social media information (requires verification)

Search result integration principles

  1. Cross-validation - Each data point confirmed by at least 2 sources
  2. Timeliness - Prioritize 2026 data
  3. Authority - Government data > consulting firms > media reports
  4. Completeness - Multi-dimensional coverage, avoid a single perspective

Next-step recommendations

After completing market research, it is recommended to proceed with:

  1. /pm-priority - Requirement prioritization
  2. /pm-mvp - MVP solution planning
  3. /pm-docs - Generate PRD document

Super-PM - Make market research more efficient and comprehensive 🔍


Output quality comparison

✅ Good example:

- 有数据引用:「根据 Q4 数据,留存率从 35% 降至 28%」
- 有验证来源:「数据来源:Google Analytics, 2025-12-01」
- 有明确建议:「建议将新手引导步骤从 5 步减少至 3 步」

❌ Bad example:

- 模糊结论:「数据表明留存率有所下降」
- 无来源:「根据经验,这个功能很重要」
- 没有行动建议:「留存是个问题」

Common pitfalls / Red Flags — STOP

Stop immediately and backtrack if any of the following occur:

Pitfall Correct approach
Drawing conclusions using "should", "probably", "seems" Must be based on actual data and verification
Claiming completion without running checks Verify first, then state
Skipping key steps due to time pressure No exceptions; the tighter the time, the stricter you must be
The thought "this time it should be fine" Re-verify every time
Use WebSearch directly without first trying AnySearch Must degrade by priority; skipping levels is not allowed
Hardcode the path to anysearch_cli.py Preamble is auto-discovered; the subagent locates it itself using a list of common paths

Output Quality Check / Verification Checklist

  • Prerequisite dependencies are satisfied (input documents/data have been collected)
  • All core steps have been executed
  • The output document has been generated to the docs/ directory
  • Every judgment is supported by data/evidence
  • Search tools are used by priority (AnySearch → Exa MCP → WebSearch)
  • 2-3 follow-up skills have been recommended

⚠️ If any item fails → complete it before marking as done.