Token导航 LogoToken导航TokenDH.com
效率需要联网clawhub未标认证来源可访问clear审计提醒

discord-ai-dispatcherDiscord AI dispatcher 控制

Agent Skill

用于处理 Discord 服务器、频道、消息、成员和机器人交互。它适合让 Agent 辅助查询社区对话、整理频道内容、发布通知或管理基础协作流程。使用时需要确认 bot 权限、频道可见范围和服务器规则;涉及删除消息、管理成员、批量通知或读取私密频道时,应先获得明确授权并控制操作范围。

总安装

4,247

周安装

192

GitHub Stars

公开资料未说明

下载量

1,521
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:discord-ai-dispatcher(Discord AI dispatcher 控制)
来源仓库:https://github.com/bhupendrafire-ai/discord-ai-dispatcher
安装命令:
openclaw skills install discord-ai-dispatcher
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install discord-ai-dispatcher

简介

使用硬编码规则和本地 AI 通过两层系统路由 Discord 通知,支持消息更新以减少混乱,并优化资源使用。

SKILL.md

Generic Webhook Notifier: Advanced Skill Guide

The Webhook Notifier skill provides a robust architecture that combines hard heuristics with local AI reasoning tools to ensure 100% routing accuracy and high-density visual formatting.


🚀 The High-Consistency Architecture: Deterministic Routing

Instead of relying solely on AI categorization, this dispatcher implements a Deterministic Prefix Engine to ensure 100% routing accuracy:

  1. Prefix Identification: An updateId (e.g., systemevent00100) directly dictates the target channel.

- systemevent -> Infrastructure Events - appalert -> Application Monitoring - userupdate -> User Activity

  1. Zero-Guessing: This removes "Classification Drift" where an AI might misinterpret an update, ensuring data always reaches the correct stakeholders.

🔢 Deterministic Sequential Deduplication

To handle out-of-order API deliveries or network retries, the dispatcher uses a Sequential State Tracker:

  • Logic: It extracts a numeric suffix from the ID (the XXXXX in prefixXXXXX).
  • State: The highest seen ID for each category is stored locally.
  • Rule: Use Numeric Comparison (100 > 99) instead of Alphabetical (100 < 99). Regex-extract digits [^\d] and cast to [long] to ensure the sequence advances even as ID lengths change.
  • Result: You never see a stale update overwrite new data, and duplicate notifications are prevented.

🔒 Global Pipeline Locking (Self-Protection)

To prevent race conditions and file corruption when the AI takes longer than the polling interval:

  1. Lock File: Create a dispatcher.lock at the start of the orchestrator.
  2. Abort Logic: If a lock exists and is "fresh" (< 30 mins), the next pulse must exit immediately.
  3. Atomic Recovery: Always use try/finally blocks to ensure the lock is released even if the script crashes.

🏗️ Self-Healing JSON Recovery

State files can be corrupted by power loss or interrupted writes.

  1. Integrity Checks: Wrap every ConvertFrom-Json call in a try/catch.
  2. Auto-Reset: If parsing fails, log the corruption, delete the broken file, and re-initialize the state from the API source.
  • Benefit: The system self-recovers from disk errors without manual developer intervention.

🩹 The "Healing Cleaner" Pattern

Instead of a "Negative Filter" (which deletes bad formatting), this skill uses a Positive Healing logic to repair inconsistent AI output:

  1. Label Extraction: It scans for colons and automatically wraps the text before them in **Bold Labels**.
  2. Normalization: It forcefully standardizes fluctuating terms to established vocabulary.
  3. Noise Blacklist: It aggressively strips AI conversational filler.
  4. Artifact Stripping: It cleans up redundant formatting artifacts (** **), escaped characters, and unwanted markdown blocks.
  • Result: You get a professional, uniform feed even if the AI model gets "creative".

📊 Dashboard Mode (Clean Chat Strategy)

Prevent chat clutter by updating existing messages instead of posting new ones.

  1. Logic: Use PATCH (or corresponding update paradigm) instead of POST for webhooks.
  2. State: Store the created message ID in a local state file.
  • Advantage: Provides a single "Living" source of truth for your system status without generating unnecessary notification spam.

🪙 Token & Cost Optimization

...

  • Payload Pruning: Strip all non-essential JSON keys before the AI sees them.
  • Compressed Instructions: Use strict list-based prompts instead of paragraphs.
  • Low Effort Fallback: If the AI is offline, use a hardcoded template for high availability.

🧠 The AI Improvement Layer: Learning From Gaps

The Webhook Notifier is built to be a self-improving system. When a gap is found, the agent must shift from Monitor to Diagnostician:

1. The RCA Feed (Log Diagnostics)

Instead of guessing, the agent must scan the dispatcher.log for the "Missing IDs":

  • Skipped (duplicate) but not Delivered: Indicates the deduplication logic was too aggressive (Historical Logic Flaw).
  • Timeout: Indicates the Local LLM needs a higher timeout or more GPU resources.
  • No Log Record: Indicates a failure at the Poller or API fetch stage.

2. Strategic Improvement Loop

When the user feeds you an RCA report, you should automatically suggest (or implement) one of the following:

  1. State Realignment: Resetting last-seen-ids.json or polling-state.json to the actual last-delivered marker to ensure the "Gaps" are re-sent.
  2. Logic Tuning: If sequential IDs are conflicting with timestamp IDs, adjust the Test-IsSequentialDuplicate helper to be more specific.
  3. High-Precision Recovery: Creating a one-time "Healing Queue" to force-inject missed notifications into Discord.

🛡️ Recovery Best Practices:

  • Bypass Deduplication: When in "Heal Mode", always bypass the Test-IsSequentialDuplicate filter to ensure recovery happens.
  • Audit History: Perform a "Log Audit" before making changes. Never assume a file is missing just because it's not in the DB—always check the logs to confirm if the Dispatcher ever saw it.

🎨 Best Practices for Professional Formatting

To maintain aesthetics and readability:

  • Mandatory Bolding: Always wrap labels in visual emphasis (e.g., Key: Value).
  • Horizontal Dividers: Every notification should logically separate from the next.
  • Tool-Calling First: Calculate your metrics in code; use the AI *only* for the final beautification.

⚙️ Automation & Version Compatibility

  • Scheduling Reliability: Use Headless Discrete Execution (Windows Task Scheduler / Cron). Avoid infinite while($true) loops to prevent memory leaks and handle system reboots gracefully.
  • PowerShell 5.1 Compatibility:

- Hashtables: Modern PS 7.0 -AsHashtable fails in 5.1. Use manual property-looping to convert PSCustomObjects into Hashtables for reliable $state[$key] access. - Encoding: Always specify -Encoding UTF8 on Set-Content to prevent character corruption in mixed-version environments.

  • Webhook First: Always provide users the option to setup webhooks immediately after configuring the skill for instant "out-of-box" operation.

*Designed for extensible and robust notification pipelines.*

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

85.88%
按下载量换算1,306

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills