agentleFS
asoisoasoiso/trend-radar/trend-alert/SKILL.md

trend-alert

Skill2 starsChanged 7 months agoApache-2.0View on GitHub

Watch a topic list for anomalous heat spikes and push channel-formatted alerts (飞书/钉钉/企业微信/Telegram/Slack/Bark/ntfy/Email/Webhook) via trendradar MCP. Use when the user wants 异动告警/突发热点推送/监控 XX 话题/订阅热点/breakout alert/ping me when X spikes.

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 6 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do NOT activate for routine "show me trends" or recap requests — those belong to trend-monitor or trend-report.

    line 19
  2. Distinctive:

    Run these calls in parallel where possible.

    line 34
  3. Very specific:

    Filter to real spikes: Keep only topics whose response indicates a genuine spike (e.g.

    line 36
  4. Very specific:

    Use the returned channels[] to know which ids have configured: true.

    line 42
  5. Very specific:

    Use the guide.supported / guide.unsupported / guide.prompt fields to format the message body.

    line 48
  6. Very specific:

    De-dupe: do not push the same (topic, channel) more than once per 60 minutes unless the user explicitly overrides ("force", "立刻推送").

    line 132
  7. Very specific:

    Aggregation: if multiple spikes for the same channel fire within a 10-minute window, combine them into a single multi-topic message with …

    line 133
  8. Distinctive:

    Empty watchlist: Ask the user for topics; do not invent any.

    line 141
  9. Very specific:

    Don't push without a confirmed spike from analyze_topic_trend.

    line 148
  10. Distinctive:

    Don't include speculative predictions ("将上涨", "可能爆款") in alerts — alerts state observed facts only.

    line 149
  11. Distinctive:

    Don't dump raw JSON or tool output into the message body.

    line 150
  12. Distinctive:

    Don't push to channels the user did not ask for, even if configured.

    line 151
  13. Very specific:

    Don't reuse stale find_related_news results across different spikes.

    line 152
  14. Distinctive:

    Don't bypass the 60-minute de-dupe window unless the user explicitly forces it.

    line 153

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

trend-alert

Anomaly detection on a watchlist of topics, with channel-correct push delivery via the trendradar MCP. Each spike is verified, formatted per channel, and rate-limited before being sent.

When to activate

Trigger when the user expresses any of:

  • 异动告警 / 突发热点推送 / breakout alert
  • 监控 XX 话题 / 订阅热点 / 盯盘 / 关注列表
  • 推送到飞书 / 钉钉 / Telegram / Slack / Bark / 邮件 / ntfy / 企业微信 / webhook
  • "ping me when X spikes" / "alert me if X breaks out" / "通知我 X 暴涨"

Do NOT activate for routine "show me trends" or recap requests — those belong to trend-monitor or trend-report.

Workflow

  1. Resolve watchlist. Take topics from the user message. If they reference a stored list ("我的关注列表"), look in shared memory; otherwise ask once for the explicit topics. Normalize to a deduped list of strings.
  2. Detect anomalies per topic. For each topic in the watchlist call:
    mcp__trendradar__analyze_topic_trend(
      topic="<topic>",
      analysis_type="viral",
      spike_threshold=3.0,
      time_window=24
    )
    Run these calls in parallel where possible.
  3. Filter to real spikes. Keep only topics whose response indicates a genuine spike (e.g. is_spike=true, viral_score above threshold, or explicit spike_detected). Discard noise. If nothing spikes, tell the user "无异动" and stop — do NOT push an empty alert.
  4. Discover configured channels.
    mcp__trendradar__get_notification_channels()
    Use the returned channels[] to know which ids have configured: true. If the user named a channel that is not configured, surface the missing env var keys (see Edge cases) and skip that channel.
  5. Per channel: fetch format rules, format, send. For each target channel <id>:
    mcp__trendradar__get_channel_format_guide(channel="<id>")
    Use the guide.supported / guide.unsupported / guide.prompt fields to format the message body. Then:
    mcp__trendradar__send_notification(
      channel="<id>",
      title="【异动】<topic>",
      content="<formatted body>"
    )
  6. Enrich with cause. For the body's "可能原因" line, call mcp__trendradar__find_related_news(topic=...) once per spike and use the top-1 headline. Skip if no related news returned — do not fabricate.

Per-channel format cheatsheet

ChannelidBoldHeadingsColorLinkQuote >Divider ---Notes
飞书feishu**b**no<font color='red|orange|grey|green|blue'>...</font>[t](u)noyes~29KB; cards
钉钉dingtalk**b**### / #### onlyno[t](u)yesyes~20KB; lists ok
企业微信wework**b**nono[t](u)first line onlyno4KB; no lists/strike
Telegramtelegram**b**→<b>no (# stripped)no (<font> stripped)[t](u)→<a>yes→<blockquote>stripped4096 chars; HTML
Slackslack**b**→*b*no (# stripped)no[t](u)→<u|t>yesunstable4KB; mrkdwn
Barkbark**b**nono[t](u)nono3.6KB; iOS push, very short
ntfyntfy**b** / *i*client-dependentno[t](u)yesclient-dependent3.8KB; lists ok
Emailemail**b** / *i* / ~~s~~# / ## / ###no[t](u)—yesno hard limit; full HTML
Generic Webhookgeneric_webhookstandard mddepends on receiverdependsstandard mddependsdepends~4KB; honors custom template

Authoritative source: always re-read get_channel_format_guide(channel=...) before formatting — this table is a quick reference, not a replacement.

Message templates

Common shape for every channel:

  • Title: 【异动】<topic>
  • Body lines:
    • 当前位次 / 热度值
    • 24h 热度变化(百分比)
    • Spike 倍数(vs baseline)
    • 可能原因(来自 find_related_news 的 top-1 头条 + 链接)
  • Footer: 时间戳(YYYY-MM-DD HH:mm 本地时区)+ 数据来源 trendradar

飞书 example

**【异动】GPT-5**

<font color='red'>**热度暴涨 4.2×**</font>(基线 1.1k → 当前 4.6k)
当前位次:**#3**(↑ 12 位)
24h 变化:<font color='red'>+312%</font>

**可能原因**
[OpenAI 开放 GPT-5 公测,附带新工具调用 API](https://example.com/news/123)

---
<font color='grey'>2026-04-29 15:42 · 来源 trendradar</font>

Telegram example

**【异动】GPT-5**

**热度暴涨 4.2×** (基线 `1.1k` → 当前 `4.6k`)
当前位次:**#3** (↑ 12)
24h 变化:**+312%**

> 可能原因:[OpenAI 开放 GPT-5 公测](https://example.com/news/123)

*2026-04-29 15:42 · trendradar*

Bark example

**GPT-5 热度暴涨 4.2×**

当前 #3(↑12 位),+312% / 24h
[查看新闻](https://example.com/news/123)

For 钉钉 use ### 【异动】<topic> + > 引用 + ---. For 企业微信 keep it terse with bold-only, no divider. For Slack use *bold* and <url|text> (the MCP converts from ** / [t](u) automatically). For Email you may use full # / ## heading hierarchy. For Webhook default to standard markdown unless the receiver has a custom template.

Rate limiting (safe defaults)

Maintain an in-session map of (topic, channel) → last_sent_ts:

  • De-dupe: do not push the same (topic, channel) more than once per 60 minutes unless the user explicitly overrides ("force", "立刻推送").
  • Aggregation: if multiple spikes for the same channel fire within a 10-minute window, combine them into a single multi-topic message with 【异动 ×N】<topic1>, <topic2>, ... as the title and one section per topic in the body.
  • Channel-specific caution: Bark and 企业微信 enforce strict server-side rate limits — never exceed 1 push per 30 seconds per channel; back off and aggregate if more spikes queue up.
  • Persist the map in shared memory if the user wants alerts across sessions; otherwise reset per session.

Edge cases

  • Channel not configured. When get_notification_channels shows configured: false for a target channel, tell the user which env var keys to set (consult the source field and the channel's docs — typical keys: FEISHU_WEBHOOK_URL, DINGTALK_WEBHOOK_URL, WEWORK_WEBHOOK_URL, TELEGRAM_BOT_TOKEN + TELEGRAM_CHAT_ID, SLACK_WEBHOOK_URL, BARK_DEVICE_KEY, NTFY_TOPIC, EMAIL_SMTP_*, GENERIC_WEBHOOK_URL). Skip the unconfigured channel and continue with the rest.
  • send_notification failure. Retry once after a 2s delay. If the second attempt also fails, report the failure (channel + error message) to the user and continue with remaining channels — do not abort the whole batch.
  • Empty watchlist. Ask the user for topics; do not invent any.
  • No spikes. Report "无异动" with the watchlist that was checked. Do not push.
  • Length overflow. Truncate body to channel max minus 200 bytes; append …(已截断) and a link to the full topic page if available.
  • Title chars: strip control chars and newlines from <topic> before interpolating into the title.

Don'ts

  • Don't push without a confirmed spike from analyze_topic_trend. Heuristic guesses are not allowed.
  • Don't include speculative predictions ("将上涨", "可能爆款") in alerts — alerts state observed facts only.
  • Don't dump raw JSON or tool output into the message body.
  • Don't push to channels the user did not ask for, even if configured.
  • Don't reuse stale find_related_news results across different spikes.
  • Don't bypass the 60-minute de-dupe window unless the user explicitly forces it.

See also

  • ../docs/mcp-tools.md — full MCP tool reference (analyze_topic_trend, send_notification, channel guides).
  • ../trend-monitor/SKILL.md — for routine watchlist scans without push.
  • ../trend-deep-dive/SKILL.md — when an alert needs a follow-up causal investigation.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.