claude

usage-monitor

Claude Code用量监控:各模型token用量与成本、5小时/7天限额窗口利用率与刷新时间、会话排行、工具调用统计、HTML可视化报告、状态栏实时显示

1 on GitHubby 1931840268v1.3.0MITupdated 3 months ago
/

Plugin usage-monitor from marketplace usage-monitor-market in 1931840268/claude-usage-monitor. Commands read from the repo's manifest — 1 month ago.

This plugin runs code on your machine — its hooks fire automatically on events like tool use and it starts local MCP servers. The exact commands are listed below; read them before installing.

What it installs

Slash commands (26)

  • /usage-monitor:advise

    用量优化建议:缓存/上下文/触顶/模型组合/订阅性价比的个性化诊断

  • /usage-monitor:agents

    子代理成本归因:Task/Workflow代理花了多少钱、各类型占比(默认最近7天)

  • /usage-monitor:blocks

    5小时限额窗口列表与当前窗口刷新时间(默认最近3天)

  • /usage-monitor:cache

    缓存效率分析:命中率与缓存为你节省的成本

  • /usage-monitor:card

    生成本月用量分享卡片(SVG,含成本、热力缩略图、订阅倍数)

  • /usage-monitor:context

    上下文规模分析:档位分布、成本占比、最肥会话(默认最近7天)

  • /usage-monitor:daily

    按天用量报表(默认最近7天,可传天数参数)

  • /usage-monitor:doctor

    环境自检:插件版本/配置/数据源/凭据/钩子/同步目录逐项体检

  • /usage-monitor:errors

    API错误诊断:限流/过载/超时/网络分类统计与最近记录(默认最近7天)

  • /usage-monitor:hours

    用量热力:星期×小时高峰分析(默认最近30天)

  • /usage-monitor:last

    会话小票:上一场会话花了多少、买到了什么(成本/时长/编辑/返工率)

  • /usage-monitor:limits

    官方限额利用率:5小时/7天窗口、各模型周配额、刷新时间(需订阅账号)

  • /usage-monitor:models

    全部历史按模型汇总的token用量与成本

  • /usage-monitor:monthly

    按月用量报表(默认最近6个月,含历史快照数据)

  • /usage-monitor:plan

    未来24小时限额规划:刷新时刻与你的历史高峰叠加的时间轴

  • /usage-monitor:projects

    按项目统计用量与成本(默认最近30天)

  • /usage-monitor:report

    生成可视化HTML用量报告并在浏览器中打开(柱状图、模型分布、窗口时间线)

  • /usage-monitor:roi

    效率分析ROI:每个会话的任务、每$动作数、编辑量与返工率(默认最近7天)

  • /usage-monitor:serve

    启动本地实时Web仪表盘(127.0.0.1,自动刷新,含限额倒计时与燃烧率)

  • /usage-monitor:sessions

    会话成本排行(默认Top 10,可传数量参数)

  • /usage-monitor:statusline-setup

    一键配置状态栏:在Claude Code底部实时显示模型、成本、限额窗口与刷新时间

  • /usage-monitor:sync

    立即同步:导出本机用量到sync_dir并合并其他设备的导出文件

  • /usage-monitor:team

    团队视图:本机与已同步设备/成员的成本汇总(默认最近30天)

  • /usage-monitor:tools

    工具调用统计:各工具使用频次、分布与错误率(默认最近7天)

  • /usage-monitor:usage

    整合仪表盘:成本速览、官方限额、当前5小时窗口、趋势、模型分布、项目Top(一屏全览)

  • /usage-monitor:weekly

    按周用量报表(默认最近8周)

MCP servers (1)

  • usage

    runs: node ${CLAUDE_PLUGIN_ROOT}/scripts/mcp-server.mjs

Hooks (4)

  • SessionStart

    node "${CLAUDE_PLUGIN_ROOT}/scripts/usage.mjs" hook-session-start

  • SessionEnd

    node "${CLAUDE_PLUGIN_ROOT}/scripts/usage.mjs" hook-session-end

  • StopFailure

    node "${CLAUDE_PLUGIN_ROOT}/scripts/usage.mjs" hook-stop-failure

  • UserPromptSubmit

    node "${CLAUDE_PLUGIN_ROOT}/scripts/usage.mjs" hook-prompt-guard

View source on GitHub

Similar plugins

Token usage tracking, model cost attribution per agent, budget alerts, and optimization recommendations

24 skills · 1 command · 1 agent · hooks

ruvnet/ruflo 81,589

Skill: add headroom-ai compress() to a Python or TypeScript app to cut LLM input tokens (tool outputs, logs, JSON, chat history). No API key.

1 skill

headroomlabs-ai/headroom 79,508

azure

claude

Transform Claude into an Azure expert. This plugin integrates the Azure MCP server and specialized Azure skills to move beyond generic advice. It enables Claude to perform real-world tasks: listing resources, validating deployments, diagnosing infrastructure issues, and optimizing costs across 50+ Azure services.

44 skills · 1 MCP server

anthropics/claude-plugins-official 47,076

ifixai

claudecodex

Independent auditing for AI agents, open source. Claude discovers your setup, confirms the cost, and audits your agent against the one question other tools skip: is it doing the job it's supposed to do, given your business rules and org structure? Test any model (Anthropic, OpenAI, Gemini, Azure, Bedrock, …) graded by self, one independent judge, or a cross-vendor panel; each provider is billed to its own account via a key in your settings, never the command line. Results render as an interactive artifact (with a static-report fallback).

1 skill · hooks

ifixai-ai/iFixAi 45,158

The official CCXT MCP server plus the ccxt-mcp usage skill — market data, balances and opt-in trading across 100+ crypto exchanges and prediction markets, with keys kept local.

1 MCP server

ccxt/ccxt 44,873

Cloud architecture design for AWS/Azure/GCP/OCI, Kubernetes cluster configuration, Terraform infrastructure-as-code, hybrid cloud networking, and multi-cloud cost optimization

8 skills · 7 agents

wshobson/agents 42,461

Maintain usage-monitor?

This page updates itself from your repo. Add the badge to your README, or get it Featured to pin it above the organic results with a followed link to your site.

claude & codex pluginslisted