MenuBar Context Monitor

「macOS」常驻菜单栏的上下文显示器 · Menu bar context monitor for OpenClaw agents.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
1 · 34 · 0 current installs · 0 all-time installs
byArock@hjklasdfg
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The skill claims to show OpenClaw agent context in the macOS menu bar and the included scripts only touch OpenClaw files (~/.openclaw), optionally use SSH to a remote OpenClaw host, and install a SwiftBar plugin. Required accesses (reading sessions.json, openclaw.json, IDENTITY.md) are coherent with a monitoring tool.
Instruction Scope
The SKILL.md and scripts instruct the agent/user to run the bundled installer which copies openclaw-status.py into ~/.openclaw and places a SwiftBar plugin into the user's SwiftBar Plugins directory. The collector reads sessions.json and openclaw.json and optionally reads IDENT I TY.md for emoji. This is expected; note the installer and plugin run SSH commands to the configured host (default localhost) to fetch status when in remote mode. The installer uses non-interactive auto-confirm mode (--yes) and the SSH options accept-new host keys (StrictHostKeyChecking=accept-new) which will automatically add new hosts to known_hosts when run non-interactively — this is functional but security-sensitive.
Install Mechanism
No external binary payloads are downloaded by the skill bundle itself. The installer suggests installing SwiftBar via Homebrew (normal) and directs users to upstream SwiftBar releases if needed. The skill contains all scripts locally; there are no obscure remote download URLs or shorteners in the install flow.
Credentials
The skill does not request credentials or environment variables beyond an optional OPENCLAW_SSH_TARGET and OPENCLAW_STATUS_SCRIPT to point at the OpenClaw host/script. Access to ~/.openclaw and agent workspaces is required for its monitoring purpose and is proportionate. The remote mode requires SSH key auth to the OpenClaw host — appropriate for the stated functionality.
Persistence & Privilege
always is false and the skill doesn't require elevated platform privileges. It will write a status collector to ~/.openclaw and a SwiftBar plugin into the user's SwiftBar Plugins directory — expected for a local menu-bar plugin. It does not modify other skills or system-wide agent settings.
Assessment
This skill appears to do what it says: read OpenClaw session files and show agent status in the macOS menu bar via SwiftBar. Before installing, consider: 1) The installer will write a Python status script to ~/.openclaw and place an executable SwiftBar plugin into your user Library — review those files (openclaw-status.py and swiftbar-plugin.sh) if you want to be sure. 2) Remote mode copies the status script to the remote host (scp) and runs SSH commands; only use remote mode with hosts you trust and with key-based SSH that you control. 3) When run non-interactively the installer/plugin use StrictHostKeyChecking=accept-new which will automatically add new SSH host keys to your known_hosts — be aware this can hide host-key verification prompts. 4) The plugin reads IDENTITY.md files in agent workspaces to extract emoji; if you don't want that data exposed, remove or sanitize those files. If those behaviors are acceptable for your environment, the skill is coherent and reasonable to install.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.1.0
Download zip
latestvk975jwc223ehz0hd6j7bmrmj2n83qzx1macosvk975jwc223ehz0hd6j7bmrmj2n83qzx1menu-barvk975jwc223ehz0hd6j7bmrmj2n83qzx1monitoringvk975jwc223ehz0hd6j7bmrmj2n83qzx1observabilityvk975jwc223ehz0hd6j7bmrmj2n83qzx1swiftbarvk975jwc223ehz0hd6j7bmrmj2n83qzx1

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

MenuBar Context Monitor

macOS 菜单栏实时显示 OpenClaw agent 的上下文用量、模型和运行状态。基于 SwiftBar

Real-time OpenClaw agent observability in your macOS menu bar, powered by SwiftBar.

Version: 1.1.0 Platform: macOS only Author: @hjklasdfg Source: GitHub

Features

  • 🔧 Menu bar shows the most recently active agent's emoji + context usage (e.g. 🔧 140k)
  • 📊 Dropdown lists all agents with context tokens, model alias, and last active time
  • 🫠 Warning indicator when context exceeds 100k tokens
  • ▶ / — / ✖ Running, idle, and failed state indicators
  • 🏠 Works locally or over SSH to a remote OpenClaw host

Screenshots

🔧 98k                          ← menu bar
───────────────────────────────
🦞 OpenClaw Agents (6)
───────────────────────────────
▶ 🔧 tech    98k/1000k (9%)  │ opus   │ 26s ago
— 🎮 main    50k/1000k (5%)  │ opus   │ 2m ago
— 🎯 career  52k/1000k (5%)  │ opus   │ 1m ago
— ✍️ content 40k/1000k (4%)  │ opus   │ 20h ago
— 💰 finance 52k/200k (26%)  │ haiku  │ 1h ago
✖ 🧠 phil    26k/1000k (2%)  │ opus   │ 3d ago
───────────────────────────────
Refresh

Install

Option 1: CLI (recommended)

# Install the skill
openclaw skills install menubar-context-monitor

# Local — OpenClaw runs on this Mac
bash ~/.openclaw/skills/context-monitor/scripts/install.sh

# Remote — OpenClaw runs on another machine (SSH key auth required)
bash ~/.openclaw/skills/context-monitor/scripts/install.sh --remote user@host

Option 2: Ask your agent

"Help me set up agent menu bar monitoring"

The agent will walk you through it.

Option 3: From source

git clone https://github.com/hjklasdfg/context-monitor.git
cd context-monitor
bash scripts/install.sh

Requirements

  • macOS (SwiftBar is macOS-only)
  • Python 3
  • SwiftBar — installer will offer to install via Homebrew
  • SSH key auth (remote mode only)

How it works

SwiftBar plugin (your Mac)  →  SSH  →  status collector (OpenClaw host)  →  sessions.json
                            or locally ↗

Two components:

  1. openclaw-status.py — Reads agent session data on the OpenClaw host
  2. swiftbar-plugin.sh — Renders the menu bar on your Mac

Customization

SettingHow to change
Refresh intervalRename plugin: 30s10s, 1m, 5m
Warning thresholdEdit WARN = 100000 in the plugin
SSH targetEdit MINI= in plugin or set OPENCLAW_SSH_TARGET env var

Agent emoji

Reads from each agent's IDENTITY.md:

- **Emoji:** 🔧

Falls back to agent name if not set.

Model display

Shows short aliases: opus, sonnet, haiku, flash, pro. User-configured modelAliases in openclaw.json take priority.

Troubleshooting

Menu barMeaningFix
🦞 ❌Connection failedCheck SSH / network
🦞 ⚠️Data parse errorRun python3 ~/.openclaw/openclaw-status.py on host
Agent missingNo session data yetUse the agent once to generate a session

License

MIT


<!-- Agent instructions below — not displayed on ClawHub -->

Agent Setup Guide

When a user asks to set up context monitoring, follow this flow:

Before starting: This skill requires running commands on a Mac. If the user might be on a mobile device:

"This needs to run on a Mac. Are you at your Mac now? If you're on another device, I'll send you the commands to run later."

Step 1: Ask the user:

"Does OpenClaw run on this Mac, or on a remote machine? If remote, what's the SSH address? (e.g. user@hostname)"

Step 2 (local mode): Run the installer directly:

bash scripts/install.sh --yes

Step 2 (remote mode): The agent cannot install SwiftBar on the user's Mac remotely. Instead:

  1. Deploy the status collector to the OpenClaw host:
    scp scripts/openclaw-status.py <user>@<host>:~/.openclaw/openclaw-status.py
    
  2. Generate copy-paste instructions for the user with the full install command, including the correct SSH target baked in.

SwiftBar installation: If SwiftBar needs to be installed, ask the user for permission first:

"This requires installing SwiftBar (a macOS menu bar tool). OK to install?"

After confirmation, pass --yes to skip the script's interactive prompt.

Triggers

menu bar, SwiftBar, agent status, agent monitor, observability, dashboard mac, agent context, context monitor, 菜单栏, 上下文显示, agent 监控

Files

4 total
Select a file
Select a file to preview.

Comments

Loading comments…