MCPInstall

agentbay-monitor-skills

舆情监控技能,最终产出舆情报告。当用户问「某事件/话题舆情如何」「舆论怎么样」「做舆情分析」「运行舆情分析」或按关键词/平台爬取并生成舆情报告时,使用本技能。约定:凡舆情相关意图即执行全流程(爬取→情感分析→生成报告)。爬取由本技能完成;情感分析由主 Agent 按提示词自主判断;报告由 generatereport 生成。

Installs
71
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/agentbay-ai/agentbay-skills --skill agentbay-monitor-skills
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads agentbay-monitor-skills automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

AgentBay 舆情监控 Skill

⚠️ 舆情分析 = 全流程(必读)

用户说「运行舆情分析」「做舆情分析」「舆情分析 主题是 XXX」时,必须执行完整三步,不能只跑爬取就结束。

步骤动作说明
1. 爬取crawl.py 或 crawl_for_sentiment(...)得到 raw_output_path(爬取结果 JSON)
2. 情感分析读 scripts/sentiment/sentiment_instruction.md → 对爬取 JSON 逐条判定 → 写情感结果小 JSON → 运行 write_processed.py得到 processed JSON(如 output/processed.json)
3. 生成报告report.py --input <processed 路径> 或 generate_report(...)得到 Markdown/JSON(及可选 PDF)

禁止行为:只运行 crawl.py 后就说「爬取完成,情感分析由主 Agent 完成」并结束。这是错误用法——主 Agent 就是你自己,你必须继续完成步骤 2 和 3,直到产出最终报告文件。

何时使用

用户出现以下任一意图时,必须使用本技能并执行全流程(爬取→情感分析→生成报告):

  • 问「某事件/话题舆情如何」「XX 舆论怎么样」「想了解 XX 的舆情」
  • 「运行舆情分析」「做舆情分析」「舆情分析 主题是 XXX」
  • 舆情监控、情感分析、舆情报告、按关键词/平台爬取并生成报告(中英文场景均可)

意图为舆情相关即默认使用本技能,不可仅用联网搜索代替。

重要约定:凡提到「舆情分析」(或「运行舆情分析」「做舆情分析」等等价表述),即视为执行全流程——爬取 → 情感分析 → 生成报告。必须按该完整流程执行,不可只做爬取;最终产出须包含 Markdown/JSON(及可选 PDF)报告。

前置条件

工作目录为技能目录(本 SKILL 所在目录);已安装依赖;已配置 AGENTBAY_API_KEY。

依赖

pip install wuying-agentbay-sdk pandas numpy pyyaml markdown

可选(PDF 报告):brew install cairo pango gdk-pixbuf 后 pip install weasyprint。不装则仅无 PDF,.md/.json 正常。

API Key

仅需配置 AGENTBAY_API_KEY。环境变量:export AGENTBAY_API_KEY=你的key(Windows PowerShell:$env:AGENTBAY_API_KEY="你的key")。或直接写文件:mkdir -p ~/.config/agentbay && echo -n '你的key' > ~/.config/agentbay/api_key。获取:https://agentbay.console.aliyun.com/service-management 。未配置时运行脚本会报错。其余参数由主 Agent 传参/命令行传入。

整体流程

舆情分析 = 全流程:爬取 → 情感分析 → 生成报告(见上文「⚠️ 舆情分析 = 全流程」)。用户要求「舆情分析」时,三步都必须执行,不能只做第 1 步。

  1. 爬取:crawl.py 或 crawl_for_sentiment(...) → 得到 raw_output_path(爬取结果 JSON)。
  2. 情感分析:主 Agent 读提示词 scripts/sentiment/sentiment_instruction.md,对爬取 JSON 逐条判定情感,产出情感结果小 JSON;再运行 write_processed.py 合并得到 processed JSON(如 output/processed.json)。提示词可定制。
  3. 生成报告:report.py --input <processed 路径> 或 generate_report(processed_results, ...) → Markdown/JSON(及可选 PDF)。

运行方式

步骤 0:登录(仅非搜索引擎) xhs/weibo/douyin/zhihu 须先登录;百度、Bing 不需要。python scripts/login.py --platform xhs [--context-name sentiment-analysis] → 浏览器中登录后终端按 Enter,状态持久化。非搜索引擎爬取时 --context-name 须与登录一致。

步骤 1:爬取

python scripts/crawl.py --keywords "关键词1,关键词2" [--platform baidu] [--max-results N] [--output-dir output]

参数:-k 必需;-p 默认 baidu(可选 xhs/weibo/douyin/zhihu/bing);--max-results、-o、--report-title、--context-name、--crawl-timeout。百度/Bing 仅抓资讯列表页(不点进链接),百度用资讯 URL(tn=news)。

爬取超时(必读):执行环境(如 run_terminal_cmd)的超时须 ≥ 10 分钟(600 秒或 600000 毫秒),否则会中断。约 1 条/分钟,10 条约 10 分钟;建议超时略大于估算(如 15 分钟)。脚本内 --crawl-timeout 不传时会自动按条数计算,一般无需手传。

步骤 2:情感分析 主 Agent 读 scripts/sentiment/sentiment_instruction.md,对爬取 JSON 逐条判定情感并按规定格式写 processed JSON(无需在技能中配置 LLM)。

步骤 3:生成报告

python scripts/report.py --input <processed JSON 路径> [--output-dir output] [--title "报告标题"]

输出

爬取 → raw_output_path、crawl_results。情感分析 → processed JSON(含 sentiment_statistics、每条 sentiment,格式见提示词)。报告 → markdown_path、json_path、可选 pdf_path。

Agent 调用要点

舆情分析必跑全流程:用户说「舆情分析」「运行舆情分析」或类似意图时,必须完成「爬取 → 情感分析 → 合并(write_processed.py)→ 生成报告」,产出最终报告文件。不可只运行爬取后就说「情感分析由主 Agent 完成」并结束——主 Agent 即当前 Agent,必须由你继续完成情感分析与报告。

  • 登录:非搜索引擎前先 login.py --platform <平台>;百度/Bing 免登录。
  • 爬取:crawl.py 或 crawl_for_sentiment(...),默认平台 baidu;执行超时 ≥ 10 分钟(见上文「爬取超时」);非搜索引擎时 context_name 与登录一致。
  • 情感分析:读 scripts/sentiment/sentiment_instruction.md;对爬取 JSON(raw_output_path)逐条判定情感;写情感结果小 JSON(如 output/sentiment_only.json);运行 python scripts/sentiment/write_processed.py --raw <爬取JSON> --sentiment <情感结果JSON> --output output/processed.json。
  • 报告:report.py --input output/processed.json 或 generate_report(...)。
  • 失败:未配置 Key、未登录或执行失败 → success: False、error。

代码示例

import asyncio, sys, json
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent / "scripts"))
from crawl import crawl_for_sentiment, generate_report

async def main():
    result = await crawl_for_sentiment(platform="baidu", keywords=["产品名"], max_results_per_keyword=10, output_dir="output")
    if not result.get("success"): return
    raw_path = result.get("raw_output_path")
    # 主 Agent:读 sentiment_instruction.md → 对 raw_path 做情感分析 → 写 output/processed.json(或先用 write_processed.py 合并)
    processed_path = Path("output") / "processed.json"
    with open(processed_path, "r", encoding="utf-8") as f:
        report = generate_report(json.load(f), output_dir="output", title="舆情报告")
    print("报告:", report.get("markdown_path"))
asyncio.run(main())

常见问题

  • 只跑了爬取怎么办:若已运行 crawl.py 得到 raw_output_path,必须继续做情感分析(读 sentiment_instruction.md、写情感结果 JSON、运行 write_processed.py)再运行 report.py --input <processed路径>,直到产出报告。
  • processed JSON:title/content 常含未转义双引号,手写易导致 report.py JSON 解析失败。主 Agent 只产出「情感结果」小 JSON,再运行 python scripts/sentiment/write_processed.py --raw <爬取JSON> --sentiment <情感结果JSON> --output <processed路径>。详见 sentiment_instruction.md 第 4 节。
  • 登录失效:重跑 python scripts/login.py --platform <平台> [--context-name ...]。
  • 爬取超时:执行环境超时须 ≥ 10 分钟(见上文);需更长时显式传 --crawl-timeout(秒)。

文件结构

SKILL.md · scripts/:crawl.py(爬取/报告入口)、report.py、login.py、crawler/、sentiment/(sentiment_instruction.md、write_processed.py)、reporter/ · output/

FAQ

What does the agentbay-monitor-skills skill do?

舆情监控技能,最终产出舆情报告。当用户问「某事件/话题舆情如何」「舆论怎么样」「做舆情分析」「运行舆情分析」或按关键词/平台爬取并生成舆情报告时,使用本技能。约定:凡舆情相关意图即执行全流程(爬取→情感分析→生成报告)。爬取由本技能完成;情感分析由主 Agent 按提示词自主判断;报告由 generatereport 生成。

How do I install agentbay-monitor-skills?

Run npx skills add https://github.com/agentbay-ai/agentbay-skills --skill agentbay-monitor-skills in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/agentbay-monitor-skills/ (personal) or .claude/skills/agentbay-monitor-skills/ (project).

Which AI agents can use agentbay-monitor-skills?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is agentbay-monitor-skills safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains agentbay-monitor-skills?

It is published by agentbay-ai in agentbay-ai/agentbay-skills. It has 71 recorded installs.

More from agentbay-ai/agentbay-skills

View all →

stock-watcher

agentbay-ai/agentbay-skills

Manage and monitor a personal stock watchlist with support for adding, removing, listing stocks, and summarizing their recent performance using data from 10jqka.com.cn. Use when the user wants to track specific stocks, get performance summaries, or manage their watchlist.

weibo-hot-search

agentbay-ai/agentbay-skills

查询微博热搜信息。当用户想要查询微博热搜榜、文娱热搜、热度排行时使用此skill。

523 installs

boss-job-search

agentbay-ai/agentbay-skills

查询Boss直聘职位信息。当用户想要搜索Boss直聘上的职位、筛选特定公司规模的岗位时使用此skill。

356 installs

web-scraper

agentbay-ai/agentbay-skills

Scrape web pages and save as HTML or Markdown (with text and images). Minimal dependencies - only requests and beautifulsoup4. Use when the user provides a URL and wants to download/archive the content locally.

Frontend & Design227 installs

find-skills

agentbay-ai/agentbay-skills

Helps users discover, search and install agent skills from the marketplace. Use when the user wants to find a skill, discover new capabilities, find specific tools (especially sandboxes) or install a skill. This skill should be used when the user is looking for functionality that might exist as an installable skill. Also supports progressive disclosure to recommend sandbox-related skills when relevant. 用于帮助用户在市场中搜索、发现和安装 Agent 插件(Skills)。 当用户想要查找功能、安装特定工具或寻找沙箱(sandbox)时使用。 Triggers: "查找插件","搜索技能","搜索 X 技能","安装技能","安装 X 技能","如何做 X","沙箱","安全沙箱","find a skill for X", "how do i do X", "search for skill", "install skill", "I need a skill for X", "sandbox", "aio sandbox"

AI & Agents212 installs

douban-movie-review

agentbay-ai/agentbay-skills

查询豆瓣电影热门影评信息。当用户想要查询某部电影的豆瓣影评、用户评价、热门短评时使用此skill。

Popular docs & writing skills

View category →

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs