Skip to content
Agentmart
Submit a tool

community-insight-pipeline

针对指定产品或话题,从 Reddit 批量抓取社区讨论,再由 AI 逐批标注相关性、优劣势与情感倾向,最终导出结构化分析报告。适用于产品口碑监控、竞品调研、用户洞察等场景。

Skill by AgenticAIPlan

IndexedMIT★ 12
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/agenticaiplan-community-insight-pipeline

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

针对指定产品或话题,从 Reddit 批量抓取社区讨论,再由 AI 逐批标注相关性、优劣势与情感倾向,最终导出结构化分析报告。适用于产品口碑监控、竞品调研、用户洞察等场景。

Use cases: data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/community-insight-pipeline

What's inside

Skill name
community-insight-pipeline
Description
针对指定产品或话题,从 Reddit 批量抓取社区讨论,再由 AI 逐批标注相关性、优劣势与情感倾向,最终导出结构化分析报告。适用于产品口碑监控、竞品调研、用户洞察等场景。
License
MIT
Instructions
270 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Instructions call the network

Files (4)

  • SKILL.md
  • annotate.py · scripts/
  • export.py · scripts/
  • fetch_batch.py · scripts/

SKILL.md (first lines)

# Community Insight Pipeline:Reddit 社区讨论抓取与 AI 批量标注

## 适用场景

- **产品口碑监控**:追踪 Reddit 上对某个 AI 模型、开源项目或产品的社区评价
- **竞品调研**:批量收集竞争产品的用户反馈,提炼结构化优劣势
- **用户洞察**:从大量社区讨论中提取情感标签和摘要,供产品/运营团队使用

---

## 输入要求

### 脚本文件

脚本已包含在本 Skill 的 `scripts/` 目录中,**无需复制,直接通过路径调用**:

- `scripts/fetch_batch.py` — 抓取脚本(支持 `--tasks-file` 传入任务配置)
- `scripts/annotate.py`   — 标注脚本
- `scripts/export.py`     — 导出脚本

Credentials 通过环境变量传入(见下方说明),无需修改脚本内容。

### Reddit API Credentials

在工作目录创建 `.env` 文件:

```bash
REDDIT_CLIENT_ID=xxx
REDDIT_CLIENT_SECRET=xxx
REDDIT_USER_AGENT=xxx    # 任意字符串,如 "MyBot/1.0"
```

**获取方式**:访问 https://www.reddit.com/prefs/apps,创建 **script** 类型应用,复制 client_id(应用名下方短字符串)和 secret。

### 数据库

脚本使用 SQLite,**首次运行 `scripts/fetch_batch.py` 时自动创建**。路径通过环境变量指定:

```bash
export DISCUSSION_DB_PATH=discussions.db   # 可选,不设置则默认 discussions.db
```

---

## 快速入口

根据当前场景选择起点,**按需执行 Preflight 检查,跳过不适用项**:

| 场景 | 起点 |
|------|------|
| 首次完整运行 | 完成 P1–P4 全部 Preflight,进入 Phase 1 |
| Credentials 已就绪,开始新一轮抓取 | 仅确认 P3 搜索目标,直接进入 Phase 1 |
| 数据已抓取,仅需 AI 标注 | 直接进入 Phase 2 |
| 标注已完成,仅需导出报告 | 直接进入 Phase 3 |

---

## Preflight 检查

### P1. Python 环境(首次运行时确认)

```bash
python3 --version    # 要求 3.9+
pip install praw openpyxl pillow
```

### P2. Reddit API Credentials(首次或 credentials 变更时确认)

检查环境变量是否已设置:

```bash
echo "CLIENT_ID=${REDDIT_CLIENT_ID:+已设置} SECRET=${REDDIT_CLIENT_SECRET:+已设置}"
```

- **均已设置** → 跳过,继续下一项
- **缺失** → 通过 `.env` 文件或 `export` 直接配置:

  ```bash
  # 方式 A:创建 .env 文件(脚本启动时自动加载)
  REDDIT_CLIENT_ID=你的client_id
  REDDIT_CLIENT_SECRET=你的client_secret
  REDDIT_USER_AGENT=MyBot/1.0

  # 方式 B:直接 export(当前 shell 生效)
  export REDDIT_CLIENT_ID=你的client_id
  export REDDIT_CLIENT_SECRET=你的client_secret
  ```

  **获取方式**:访问 https://www.reddit.com/prefs/apps,创建 **script** 类型应用,复制 client_id 和 secret。

### P3. 搜索目标(每次新抓取时必须确认)

向用户提问:
> 你想追踪哪个产品或话题?请提供搜索关键词。
> 搜索范围:全站搜索(global)、指定 AI/ML 子版块(subreddits),或两者都要?
> 是否同时抓取评论?(评论量通常远多于帖子)
> 是否需要精确匹配?例如 `ERNIE-Image` 是宽松匹配,`"ERNIE-Image"` 是精确短语匹配。

根据回答构建 `tasks.json`(见 Phase 1)。

### P4. 数据库路径(可选)

默认存储在当前目录的 `discussions.db`。如需修改:

```bash
export DISCUSSION_DB_PATH=你的路径
```

---

## 执行步骤

### Phase 1:配置并执行抓取

用 Write 工具将以下内容写入 `tasks.json`(根据 P3 确认结果填写,含中文必须写文件):

```json
[
  {"label": "产品A 全站精确搜索", "query": "\"产品A\"", "mode": "global",     "include_comments": true},

From AgenticAIPlan/AgenticAISkills, MIT.

More from AgenticAIPlan/AgenticAISkills

Signals

Stars
12
Forks
55
Open issues
4
Last commit (this folder)
Apr 22, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from AgenticAIPlan

Cite this page

community-insight-pipeline skill. Agent Mart. https://agentmart.dev/skills/agenticaiplan-community-insight-pipeline (last updated 2026-10-24)