# Pm Market

> |

- **Type:** Skill
- **Install:** `agentstack add skill-konglong87-superpm-pm-market`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [konglong87](https://agentstack.voostack.com/s/konglong87)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [konglong87](https://github.com/konglong87)
- **Source:** https://github.com/konglong87/superPM/tree/main/skills/01-demand-insight/pm-market
- **Website:** https://konglong87.github.io/anything-ai/

## Install

```sh
agentstack add skill-konglong87-superpm-pm-market
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## Preamble (run first)

```bash
bash "$(dirname "${BASH_SOURCE[0]}")"/check-update.sh 2>/dev/null || true
# 读取技能包版本号
SKILL_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)" || true
if [ -f "$SKILL_ROOT/VERSION" ]; then echo "📦 super-pm $(cat "$SKILL_ROOT/VERSION")"; fi
# 创建需求调研目录
mkdir -p docs/01-需求调研

# 检查是否有需求调研报告
if [ ! -f "docs/01-需求调研/需求调研报告.md" ]; then
  echo "⚠️  未找到需求调研报告"
  echo ""
  echo "建议先执行 /pm-demand 完成需求调研"
fi
```

---

## 执行流程

### 步骤 1: 读取前置数据（主 agent）

**如果有需求调研报告**：

使用 Read 工具读取 `docs/01-需求调研/需求调研报告.md`

提取：
- 产品名称
- 行业赛道
- 目标用户
- 核心痛点

**如果没有需求调研报告**：

进入快速模式，使用 AskUserQuestion 收集基础信息。

---

### 步骤 2: 确定搜索方向（主 agent - 用户交互）

使用 AskUserQuestion 询问：

> 🎯 我要重点分析哪些方面？
>
> A) 市场规模与增长趋势
> B) 竞品分析
> C) 用户需求与行为
> D) 行业政策与风险
> E) 全部分析（推荐但耗时较长）

用户选择后，记录到变量 `MARKET_FOCUS`

---

### 步骤 3: 派发 subagent 执行市场调研（核心优化）

**优化说明**：
- 主 agent 只负责派发任务和接收结果
- Subagent 执行所有搜索和分析工作
- 搜索细节不占用主 agent 上下文

---

#### 3.1 构建搜索任务清单

根据用户选择，构建任务清单：

**如果选择"市场规模"**：
```json
[
  {
    "task_id": "market_size",
    "keywords": ["{行业赛道} 市场规模 2025", "{行业赛道} 增长趋势"],
    "domains": ["iresearch.cn", "analysys.cn", "iimedia.cn"]
  }
]
```

**如果选择"竞品分析"**：
```json
[
  {
    "task_id": "competitor_analysis",
    "keywords": ["{行业赛道} 竞品分析", "{行业赛道} 主要玩家"],
    "domains": ["36kr.com", "huxiu.com", "qimai.cn"]
  }
]
```

**如果选择"全部"**：
```json
[
  {
    "task_id": "market_size",
    "keywords": ["{行业赛道} 市场规模"],
    "domains": ["iresearch.cn", "analysys.cn"]
  },
  {
    "task_id": "competitor_analysis",
    "keywords": ["{行业赛道} 竞品"],
    "domains": ["36kr.com", "huxiu.com"]
  },
  {
    "task_id": "user_behavior",
    "keywords": ["{目标用户} 消费行为"],
    "domains": ["questmobile.com.cn"]
  }
]
```

---

#### 3.2 使用 Agent 工具派发 subagent

**单个任务**：

使用 Agent 工具：

```
Tool: Agent
Parameters:
  subagent_type: "general-purpose"
  description: "市场调研-{task_id}"
  prompt: |
    你是一个市场调研专家。请执行以下任务：

    **任务 ID**: {task_id}
    **产品名称**: {产品名称}
    **行业赛道**: {行业赛道}
    **搜索关键词**: {keywords}
    **目标数据源**: {domains}

    **要求**：
    1. 搜索工具优先级：首选 AnySearch（Bash 调用 `anysearch_cli.py（先定位：检查 ~/.claude/skills/anysearch/scripts/ ~/.opencode/skills/anysearch/scripts/ ~/.openclaw/skills/anysearch/scripts/ ~/.cursor/skills/anysearch/scripts/ ~/.anysearch/scripts/ 或 which anysearch_cli.py，找到后 python3 ）`search "查询词" --max_results 5 --domain finance --sub_domain finance.cn_stock），失败降级到 Exa MCP（mcp__exa__web_search_exa），最后才用 WebSearch。使用 WebSearch 时标注「⚠️ 降级模式」
    2. 搜索每个关键词
    3. 优先搜索目标数据源
    4. 提取关键数据（市场规模、增长率、主要玩家等）
    5. 返回结构化的 JSON 结果

    **输出格式**：
    ```json
    {
      "task_id": "{task_id}",
      "findings": [
        {
          "title": "数据标题",
          "source": "数据来源",
          "value": "数据值",
          "date": "数据日期"
        }
      ],
      "summary": "关键发现总结"
    }
    ```
```

**多个任务（并行优化）**：

同时派发多个 subagent：

```
# 并行派发 3 个 subagent
Agent 1: 市场规模调研
Agent 2: 竞品分析
Agent 3: 用户行为分析
```

**主 agent 等待所有 subagent 完成**，然后收集结果。

---

### 步骤 4: 整合结果并生成报告（主 agent）

**主 agent 接收所有 subagent 的返回结果**：

1. 读取 subagent 返回的 JSON 数据
2. 整合所有发现
3. 生成结构化的市场调研报告

**使用 Write 工具生成报告**：

```markdown
# 市场调研报告

## 一、市场规模与增长趋势

（从 subagent 结果中提取）

## 二、竞品分析

（从 subagent 结果中提取）

## 三、用户需求与行为

（从 subagent 结果中提取）

## 四、关键发现与建议

（主 agent 综合分析）

---

**生成时间**: {时间}
**调研范围**: {MARKET_FOCUS}
```

---

### 步骤 5: 推荐下一步（主 agent）

> ✅ 市场调研报告已生成：`docs/01-需求调研/市场调研报告.md`
>
> 建议执行：
> 1. /pm-priority - 基于市场调研确定优先级
> 2. /pm-position - 基于竞品分析确定产品定位
> 3. /pm-mvp - 规划 MVP 方案

---

## 对比：优化前 vs 优化后

### 优化前（pm-market v1）

```
主 agent 执行流程：
1. 询问用户（10 tokens）
2. 执行搜索1（500 tokens 结果）
3. 执行搜索2（500 tokens 结果）
4. 执行搜索3（500 tokens 结果）
5. 整理结果（200 tokens）
6. 生成报告（100 tokens）

总计：1810 tokens
耗时：串行执行，约 3-5 分钟
```

### 优化后（pm-market-v2）

```
主 agent 执行流程：
1. 询问用户（10 tokens）
2. 派发 subagent（20 tokens）
   └─ Subagent 执行搜索（不占用主 agent 上下文）
3. 接收结果（100 tokens 结构化数据）
4. 整合报告（100 tokens）

总计：230 tokens
耗时：并行执行，约 1-2 分钟
效率提升：87% token 节省，2.5x 速度提升
```

---

## 关键优化点

### 1. 上下文节省
- ✅ 搜索结果不占用主 agent 上下文
- ✅ 主 agent 只处理结构化结果
- ✅ Token 使用减少 70-90%

### 2. 执行效率
- ✅ 多个搜索任务并行执行
- ✅ 总耗时减少 50-70%
- ✅ 用户体验显著提升

### 3. 可维护性
- ✅ 主 agent 逻辑清晰，聚焦决策
- ✅ Subagent 职责单一，易于测试
- ✅ 代码结构更清晰

---

## 注意事项

### 何时使用 subagent

✅ **适合**：
- 联网搜索（结果占用大量 token）
- 文档生成（可并行）
- 数据分析（计算密集）
- 竞品分析（多次搜索）

❌ **不适合**：
- 用户交互（AskUserQuestion）
- 简单决策（if-else 判断）
- 快速任务（ ⚠️ 任何一项未通过 → 补全后再标记完成。

---
- 串行执行搜索

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [konglong87](https://github.com/konglong87)
- **Source:** [konglong87/superPM](https://github.com/konglong87/superPM)
- **License:** MIT
- **Homepage:** https://konglong87.github.io/anything-ai/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-konglong87-superpm-pm-market
- Seller: https://agentstack.voostack.com/s/konglong87
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
