# llm-public-opinion-analytics-assistant

A skill that pulls trending topics from 15 platforms and runs them through an LLM for clustering, sentiment scoring and push alerts.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2400 installs · ★ 5
- Author: reason-machines
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/data-skills/tree/HEAD/skills/llm-public-opinion-analytics-assistant/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/llm-public-opinion-analytics-assistant

## What it does

This skill sets up a public opinion monitoring system. A crawler walks 26 trending lists across 15 platforms, stores titles, links and heat values in MySQL, and an LLM then works through that stream: grouping articles by theme, scoring sentiment, spotting trends. There is a conversational layer too, so you can ask in plain language what people are discussing and get an analysis instead of a link dump.

Under the hood are Scrapy spiders per platform, a web app started with `python app.py`, and an `OpinionAnalysisAgent` that talks to an OpenAI-compatible API. Alerts go out over four channels: SMTP email, WeChat, WeChat Work and a Telegram bot. Crawlers run manually through `run_spiders.py` or one spider at a time, for example `scrapy crawl weibo_spider`.

Expect a fair amount of setup. You need MySQL 8.0+, a Python virtual environment, an LLM API key, and a browser driver matched to your Edge or Chrome version for news detail extraction. If the driver version does not match, that extraction breaks, so check your browser version first. Some platforms only return data with cookies, which go into `hotsearchcrawler/settings.py`.

Configuration lives in `.env` and `hotsearchcrawler/settings.py`: MySQL host and credentials, LLM settings, webhooks and tokens for notifications. For Chinese content the config also lists Huawei Pangu as an alternative to the OpenAI-compatible endpoint.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/data-skills --skill llm-public-opinion-analytics-assistant -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/llm-public-opinion-analytics-assistant/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/llm-public-opinion-analytics-assistant/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/data-skills --skill llm-public-opinion-analytics-assistant -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/llm-public-opinion-analytics-assistant/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/data-skills --skill llm-public-opinion-analytics-assistant -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/llm-public-opinion-analytics-assistant/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/data-skills llm-public-opinion-analytics-assistant
```

2. **Manually: put the files in place**
- File: `.github/skills/llm-public-opinion-analytics-assistant/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/data-skills --skill llm-public-opinion-analytics-assistant -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/data-skills --path skills/llm-public-opinion-analytics-assistant
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/llm-public-opinion-analytics-assistant/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/data-skills --skill llm-public-opinion-analytics-assistant -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/data-skills/tree/HEAD/skills/llm-public-opinion-analytics-assistant/SKILL.md

## When to use it
- collect trending topics from 15 platforms into one database
- group a week of news articles by theme
- measure the share of positive and negative mentions
- push an alert to Telegram when a topic spikes
- extract text from video-based news

## Example prompts
- set up public opinion monitoring for the topic "artificial intelligence"
- pull trending topics from several platforms over the last 7 days
- analyze sentiment for mentions on weibo and send the report to Telegram

## Similar
- [scrapy-web-scraping](https://affpapa.org/en/nevibecode/skills/scrapy-web-scraping.md) — skill · 2000 installs
- [exploring-llm-clusters](https://affpapa.org/en/nevibecode/skills/exploring-llm-clusters.md) — skill · 407 installs
- [web-scraping](https://affpapa.org/en/nevibecode/skills/mindrally-web-scraping.md) — skill · 4500 installs
- [llm-evaluation](https://affpapa.org/en/nevibecode/skills/llm-evaluation.md) — skill · 12755 installs
- [cost-aware-llm-pipeline](https://affpapa.org/en/nevibecode/skills/cost-aware-llm-pipeline.md) — skill · 4600 installs

From the same set: [reason-machines/data-skills](https://affpapa.org/en/nevibecode/by/reason-machines/data-skills.md) — 22 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
