claude-code - ✅(Solved) Fix [Feature Request] Add built-in usage monitoring plugin for Claude API calls [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46832Fetched 2026-04-12 13:31:54
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

PR fix notes

PR #47760: feat(plugins): add usage monitor

Description (problem / solution / changelog)

Summary

  • adds an official usage-monitor plugin under plugins/
  • includes a macOS SwiftBar installer command, cached /usage fetcher, and menu bar renderer instead of requiring users to stitch together external scripts manually
  • keeps the install flow self-contained by copying the runtime scripts into ~/.claude/plugins/usage-monitor and symlinking the SwiftBar entrypoint
  • documents the install/config flow and adds the plugin to plugins/README.md

Related issue

  • Closes #46832

Validation

  • bash -n plugins/usage-monitor/scripts/claude-usage-fetch.sh
  • bash -n plugins/usage-monitor/scripts/claude-usage.1m.sh
  • bash -n plugins/usage-monitor/scripts/install-swiftbar.sh
  • jq empty plugins/usage-monitor/.claude-plugin/plugin.json
  • HOME="$(mktemp -d)" bash plugins/usage-monitor/scripts/install-swiftbar.sh --trusted-dir "$PWD" --refresh-minutes 7
  • rendered a sample cache file through plugins/usage-monitor/scripts/claude-usage.1m.sh and verified the expected menu bar output

Changed files

  • plugins/README.md (modified, +1/-0)
  • plugins/usage-monitor/.claude-plugin/plugin.json (added, +8/-0)
  • plugins/usage-monitor/README.md (added, +88/-0)
  • plugins/usage-monitor/commands/install-swiftbar.md (added, +17/-0)
  • plugins/usage-monitor/scripts/claude-usage-fetch.sh (added, +143/-0)
  • plugins/usage-monitor/scripts/claude-usage.1m.sh (added, +85/-0)
  • plugins/usage-monitor/scripts/install-swiftbar.sh (added, +82/-0)
RAW_BUFFERClick to expand / collapse

[Feature Request] I created this plugin using SwiftBar by myself. Please create it in the future https://github.com/helmiatwork/lean-flow/tree/main/scripts/claude-monitor

I need to monitor the Claude usage when I on every place explanation 27%(9m left) | 21%(5d again will reset) | 14% (3d again will reset)

<img width="244" height="67" alt="Image" src="https://github.com/user-attachments/assets/f9ba1225-23d5-45f7-8f09-8996a3df26dc" />

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.92
  • Feedback ID: adee1aa6-d082-4337-a777-8997d9f9ce90

extent analysis

TL;DR

Create a plugin using the provided SwiftBar script as a reference to monitor Claude usage.

Guidance

  • Review the SwiftBar script in the provided GitHub repository to understand how it works and how it can be adapted for monitoring Claude usage.
  • Consider the environment information provided, such as the platform (darwin) and terminal (vscode), to ensure compatibility with the plugin.
  • Look into the existing code in the claude-monitor directory to identify potential implementation details for the plugin.
  • Determine the specific requirements for monitoring Claude usage, such as the desired output format and update frequency.

Example

No code snippet can be provided without more context about the desired plugin implementation.

Notes

The provided issue lacks specific technical details about the desired plugin implementation, so a detailed solution cannot be provided.

Recommendation

Apply workaround: Use the provided SwiftBar script as a starting point to create a custom plugin for monitoring Claude usage, as there is no clear indication of an existing solution or fixed version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING