llm-public-opinion-analytics-assistant — Claude Code skill: topic
A skill that pulls trending topics from 15 platforms and runs them through an LLM for clustering, sentiment scoring and push alerts.
npx skills add reason-machines/data-skills --skill llm-public-opinion-analytics-assistant -a claude-codeWhat llm-public-opinion-analytics-assistant 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.
What it helps with
- 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 for the agent
- 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
How to install llm-public-opinion-analytics-assistant
1Skills CLI (Vercel)
npx skills add reason-machines/data-skills --skill llm-public-opinion-analytics-assistant -a claude-code2Manually: put the files in place
~/.claude/skills/llm-public-opinion-analytics-assistant/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/llm-public-opinion-analytics-assistant/
1Skills CLI (Vercel)
npx skills add reason-machines/data-skills --skill llm-public-opinion-analytics-assistant -a codex2Manually: put the files in place
.agents/skills/llm-public-opinion-analytics-assistant/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/data-skills --skill llm-public-opinion-analytics-assistant -a cursor2Manually: put the files in place
.cursor/skills/llm-public-opinion-analytics-assistant/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/data-skills llm-public-opinion-analytics-assistant2Manually: put the files in place
.github/skills/llm-public-opinion-analytics-assistant/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/data-skills --skill llm-public-opinion-analytics-assistant -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/data-skills --path skills/llm-public-opinion-analytics-assistantManually: put the files in place
.devin/skills/llm-public-opinion-analytics-assistant/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/data-skills --skill llm-public-opinion-analytics-assistant -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about llm-public-opinion-analytics-assistant
How do I install llm-public-opinion-analytics-assistant in Claude?
Run npx skills add reason-machines/data-skills --skill llm-public-opinion-analytics-assistant -a claude-code. The skill lands in ~/.claude/skills/llm-public-opinion-analytics-assistant/SKILL.md.
What does llm-public-opinion-analytics-assistant do?
It crawls trending topics from 15 platforms and analyzes them with an LLM: clustering, sentiment, trend detection. You query the results in natural language and route alerts to email, WeChat and Telegram.
What do I need before running it?
MySQL 8.0+, a Python environment with the dependencies from requirements.txt, an LLM API key, and a browser driver matching your Edge or Chrome version. Some platforms also need cookies in hotsearchcrawler/settings.py.