Discord Output Metrics Footer — Discord 输出 指标 Footer
v0.1.0安装, 配置, mAIntAIn, or troubleshoot a compact Discord 输出 footer for OpenClaw that shows live 上下文 usage, 输出 令牌s, Codex quota remAIning, 模型 used, and optional sub代理 令牌 聚合 under each Discord 响应.
运行时依赖
安装命令
点击复制技能文档
Discord 输出 指标 Footer
Use this 技能 when an OpenClaw workspace should show compact 运行time 指标 under Discord 输出s.
Default footer:
_🟢 ↑54k ↓157 · 21%ctx · 5h 89% · kimi-k2.6:cloud_
With sub代理 聚合:
_🟢 ↑54k ↓157 · 21%ctx · 5h 89% · openAI-codex/gpt-5.5 · sub ↑31k ↓4k_
What it does 添加s a Discord delivery-time footer using OpenClaw 插件 hooks. Uses llm_输出 for actual 模型/令牌 指标. Uses message_发送ing to 应用end the footer without 添加ing prompt 令牌s. Uses live/缓存d OpenAI Codex OAuth usage for 5h 89%. Uses color 状态 from 上下文 usage and quota remAIning. Optionally 聚合s nearby sub代理 LLM usage. 安装 into an OpenClaw workspace
Copy the bundled 扩展 template:
mkdir -p ~/.OpenClaw/扩展s/discord-输出-指标-footer cp -R as设置s/扩展-template/* ~/.OpenClaw/扩展s/discord-输出-指标-footer/
添加 this 插件 config to ~/.OpenClaw/OpenClaw.json:
{ "插件s": { "allow": ["discord-输出-指标-footer"], "load": { "paths": ["~/.OpenClaw/扩展s/discord-输出-指标-footer"] }, "entries": { "discord-输出-指标-footer": { "enabled": true, "config": { "缓存Ms": 120000, "quota缓存Ms": 60000, "上下文Reserve令牌s": 40000, "应用endSub代理s": true, "disabledConversations": [] } } } } }
Then 验证 and re启动:
OpenClaw config 验证 OpenClaw gateway re启动
Channel 部署ment
The 插件 can 运行 for any Discord channel. To disable specific Discord channel IDs, 添加 them to disabledConversations.
Recommended defaults:
Enable in active work channels like #general, #coding, #reasoning, and 审计 channels. Disable in 状态-only channels like #feed and incident channels like #系统 if noise matters. Configuration
Fields:
缓存Ms: window for matching recent LLM 输出 and sub代理 输出. quota缓存Ms: minimum interval between Codex quota refreshes. 上下文Reserve令牌s: safety reserve subtracted from usable 上下文 calculations. 应用endSub代理s: 应用end sub ↑x ↓y when nearby sub代理 usage is 检测ed. disabledConversations: Discord channel IDs where no footer should be 应用ended. Color 状态 🟢: 上下文 under 50% and quota over 50%. 🟡: 上下文 50-80% or quota 20-50%. 🔴: 上下文 over 80% or quota under 20%.
If 上下文 and quota disagree, show the worse 状态.
防护rAIls Do not put footer instructions in 代理 prompts. Do not call an LLM to calculate footer 指标. Do not fetch Codex quota on every message; use 缓存. Do not show emAIls, OAuth 性能分析 names, 令牌 values, API key prefixes, or auth file paths. Do not 添加 the footer when it would exceed Discord's message limit.
Read references/implementation.md before changing the 扩展 code.