Enterprise Public Opinion Monitoring Skill: End-to-End Workflow with Agents for Chinese Public Opinion Data Collection, Sentiment Classification, and Email Alerts and Reports

Introduction

Online discussions about brands or companies are scattered across news, social media, and forums. Manually searching through them to determine sentiment makes daily updates difficult, let alone receiving alerts before negative content spreads. Common solutions include subscribing to commercial sentiment SaaS services or building custom crawlers with rule-based alerts. The former is costly with slow keyword customization, while the latter requires maintaining the entire pipeline of collection, deduplication, and classification.

Here, we introduce the SkillHub community skill Enterprise Sentiment Monitor SKILL (located at @user_f4500486/sentiment-monitor). It encapsulates the workflow—“Keyword Configuration → Global Search → Local Sentiment Initial Screening → LLM Precise Judgment for Uncertain Items → Four-Level Color Alerts → HTML/Text Reports and Email”—into an executable SKILL.md workflow for Agents. It utilizes Python scripts to handle configuration, deduplication, SnowNLP classification, and report generation. SkillHub marks it as requires_api_key=false, meaning no API Key is strictly required for the skill itself (email sending depends on the AgentMail SDK, while search relies on the Agent’s web browsing capabilities).

What is This

Enterprise Sentiment Monitor SKILL is a general-purpose sentiment monitoring skill designed for Chinese-language scenarios. Version: 1.0.0, Category: data-analysis, Source: community, Publisher: user_f4500486. In one sentence: It uses JSON to configure monitoring targets and keywords, instructs the Agent to perform multi-platform searches and sentiment analysis according to the documentation, outputs graded alert reports, and supports scheduled email delivery.

Compared to “just giving the Agent a generic sentiment prompt,” this Skill provides templates like monitor_config.json, scripts like sentiment_engine.py, and complete phase descriptions ranging from search to updating history.json / trends.json, reducing the cost of assembling the workflow from scratch every time.

Core Features

The following capabilities are derived from the SkillHub summary and the SKILL.md / references/architecture.md files:

  1. Custom Monitoring Targets & Keywords: Upon first use, it collects target names, aliases, and five categories of keywords (Core / Product / Tech / People / Variants); data is written to the workspace’s monitor_config.json.
  2. Global Network Monitoring: Retrieves data based on configured keywords across web pages, news, social media, etc. Results are structured into fields such as title, summary, source, link, and time (specific retrieval is executed by the Agent).
  3. Intelligent Sentiment Analysis (Token Efficient): Uses SnowNLP for local initial screening of Chinese text (score > 0.70 positive, score < 0.30 negative, middle range marked as uncertain); only uncertain items proceed to LLM precise judgment.
  4. Four-Level Color Alert Classification: Evaluates negative items using local keyword rules for Red / Orange / Yellow / Blue alerts (e.g., Red includes terms like trending search, shutdown, criminal detention; Orange includes penalty, investigation; Yellow includes clustering of similar negatives or heat conditions; Blue is the default low-heat negative).
  5. Deduplication, Heat & Trends: deduplicate_items() for semantic deduplication, calc_heat_score() for heat scoring, incremental comparison with historical history.json, and writing to trends.json.
  6. Automatic Email Report Delivery: report_generator.py generates HTML and plain text; report_sender.py sends them to the configured email_to via AgentMail.
  7. Trigger Intents: When users mention sentiment monitoring, brand monitoring, sentiment reports, negative alerts, sentiment analysis, or English terms like sentiment monitoring, brand monitoring, the Agent should prioritize enabling this Skill (see SKILL.md metadata).

SkillHub Page Statistics (fetched 2026-10-21): Rating 100000, Downloads 1709, Installs 29.

Installation & Activation

1. Install SkillHub CLI (if not installed)

command -v skillhub && skillhub --version

If not installed, follow the SkillHub Installation Documentation:

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

2. Install the skill to the current Agent’s skills directory

When installing, you must use --dir; otherwise, defaulting to ./skills/ may result in the Agent failing to load it. Common path examples:

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ in the project
skillhub install @user_f4500486/sentiment-monitor --dir ~/.cursor/skills/

The SkillHub product page also supports sending the prompt below to an AI to complete the installation based on the documentation:

Please install `@user_f4500486/sentiment-monitor` based on https://skillhub.cn/install/skillhub.md.

Restart or refresh the Agent after installation to enable the skill directory.

3. Python Dependencies

pip install snownlp agentmail-sdk

snownlp is required for local Chinese sentiment classification; agentmail-sdk is only required if email sending is needed.

Typical Usage

First-time Initialization

  1. In the conversation, specify the company, brand, or person to monitor, provide the five categories of keywords (at least 1 Core), the report recipient email, scheduling time (default 08:00, 12:00, 17:00 daily), and the data directory (default sentiment_data/ under the workspace).
  2. Generate monitor_config.json in the workspace. Example fields:
{
  "target_name": "Target Name",
  "target_aliases": ["Alias 1", "Alias 2"],
  "keywords": {
    "core": ["Core Keyword 1", "Core Keyword 2"],
    "products": [],
    "tech": [],
    "people": [],
    "variants": []
  },
  "email_to": "recipient@example.com",
  "platforms": [],
  "data_dir": "sentiment_data",
  "created_at": "2026-04-18T00:00:00"
}

You can also call generate_config() in scripts/sentiment_engine.py to generate this.

Executing a Single Report Workflow (Overview)

With the configuration above, a single report roughly follows Phases 1–10 in SKILL.md: Add the skill’s scripts/ directory to sys.path, use load_config and load_json to read config and history → Agent performs multi-platform search → deduplicate_items → batch_snow_classify and LLM precise judgment if necessary → assess_alert_level and heat calculation → make_html_report / make_text_report → send_sentiment_report → Update history and trends files.

Local quick test for classification:

python sentiment_engine.py <config.json> classify <text>

List keywords, alert rules, trends, or run benchmarks:

python sentiment_engine.py <config.json> keywords
python sentiment_engine.py <config.json> alerts
python sentiment_engine.py <config.json> trends
python sentiment_engine.py <config.json> benchmark

Scheduled Tasks

SKILL.md suggests using automation_update to create scheduled tasks and embedding its “Automation Prompt Template” in the task prompt (containing steps like importing the engine, loading config, searching, classifying, sending emails, updating data). Whether this is available depends on whether the current Agent provides a tool with the same name or equivalent functionality; in environments like Cursor, you can use system cron / CI to trigger Agent sessions periodically, keeping the prompt based on the template.

Use Cases & Notes

Who is it for: Small teams, PR, or operations staff needing to track Chinese sentiment for a single brand or entity; those who want fixed report structures and sentiment initial screening without consuming model Tokens; those who can accept the scenario where the Agent performs web searches and local SnowNLP handles bulk text processing.

Limitations & Notes:

  • The quality of global network retrieval depends on the Agent’s search tools and permissions. The Skill itself does not replace the site coverage of commercial collectors.
  • SnowNLP has limited differentiation for neutral text. The architecture documentation states that neutral text may be classified as positive/negative, but Layer 3 keyword rules are used to control false alerts; LLM precise judgment is recommended for the uncertain range.
  • Email sending goes through AgentMail; you must ensure the SDK and sending account are available; incorrect email_to will result in reports being sent to the wrong person.
  • monitor_config.json and sentiment_data/ contain business keywords and historical sentiment data. Pay attention to workspace permissions and backups.
  • There is a section of English placeholder text in the SKILL.md YAML unrelated to sentiment (“Track water and sleep…”). Refer to the Overview in the body and the SkillHub Chinese summary for accuracy.

Conclusion

The Enterprise Sentiment Monitor SKILL deconstructs Chinese sentiment monitoring into reusable configurations, scripts, and a phased workflow: keyword-driven retrieval, cost reduction via SnowNLP, fallback alerts via four-color rules, and output of emailable reports. If you want to implement brand monitoring or scheduled sentiment reports in an Agent, you can install @user_f4500486/sentiment-monitor from SkillHub and complete the first-time initialization according to the SKILL.md in the package.

  • SkillHub Page: https://www.skillhub.cn/skills/user_f4500486/sentiment-monitor
  • API Location Page: https://api.skillhub.cn/user_f4500486/sentiment-monitor
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye