‹ 首页

add-macos-statusbar

@nanocoai · 收录于 3 周前 · 上游提交 2 天前

Add a macOS menu bar status indicator for NanoClaw. Shows a bolt icon with a green/red dot indicating whether NanoClaw is running, with Start, Stop, and Restart controls. macOS only.

适合你,如果需要在 macOS 菜单栏快速查看和切换 NanoClaw 运行状态

/ 下载安装
add-macos-statusbar.skill双击,或拖进 Claude 桌面版 / Cowork,即完成安装↓ .skill↓ .zip
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code~/.claude/skills/(项目级 .claude/skills/)
Codex CLI~/.codex/skills/
Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add nanocoai/nanoclaw/add-macos-statusbar
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- nanocoai/nanoclaw/add-macos-statusbar
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify nanocoai/nanoclaw/add-macos-statusbar
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
30380GitHub stars
~717最小装载
~840含声明引用
~840文本包总量
镜像托管

怎么用

商店整理自技能原文 · 版本 879835b · 表述以原文为准
它做什么

装好后,macOS菜单栏会出现一个闪电图标,显示NanoClaw运行状态(绿点运行中,红点已停止),点击图标可启动、停止或重启服务,并查看日志。

什么时候触发

当你说“/add-macos-statusbar”或要求为NanoClaw添加菜单栏状态指示时触发。需要macOS系统且已安装Xcode Command Line Tools。

装好后可以这样说
Claude会告诉你查看菜单栏图标颜色
Claude会建议你点击菜单栏的Restart按钮
技能原文 SKILL.md作者撰写 · MIT · 879835b

Add macOS Menu Bar Status Indicator

Adds a persistent menu bar icon that shows NanoClaw's running status and lets the user start, stop, or restart the service — similar to how Docker Desktop appears in the menu bar.

macOS only. Requires Xcode Command Line Tools (swiftc).

Phase 1: Pre-flight
Check platform

If not on macOS, stop and tell the user:

This skill is macOS only. The menu bar status indicator uses AppKit and requires swiftc (Xcode Command Line Tools).
Check for swiftc
which swiftc

If not found, tell the user:

Xcode Command Line Tools are required. Install them by running: ``bash xcode-select --install ` Then re-run /add-macos-statusbar`.
Check if already installed
launchctl list | grep com.nanoclaw.statusbar

If it returns a PID (not -), tell the user it's already installed and skip to Phase 3 (Verify).

Phase 2: Compile and Install
Compile the Swift binary

The source lives in the skill directory. Compile it into dist/:

mkdir -p dist
swiftc -O -o dist/statusbar "${CLAUDE_SKILL_DIR}/add/src/statusbar.swift"

This produces a small native binary at dist/statusbar.

On macOS Sequoia or later, clear the quarantine attribute so the binary can run:

xattr -cr dist/statusbar
Create the launchd plist

Determine the absolute project root and home directory:

pwd
echo $HOME

Create ~/Library/LaunchAgents/com.nanoclaw.statusbar.plist, substituting the actual values for {PROJECT_ROOT} and {HOME}:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.nanoclaw.statusbar</string>
    <key>ProgramArguments</key>
    <array>
        <string>{PROJECT_ROOT}/dist/statusbar</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
    <key>EnvironmentVariables</key>
    <dict>
        <key>HOME</key>
        <string>{HOME}</string>
    </dict>
    <key>StandardOutPath</key>
    <string>{PROJECT_ROOT}/logs/statusbar.log</string>
    <key>StandardErrorPath</key>
    <string>{PROJECT_ROOT}/logs/statusbar.error.log</string>
</dict>
</plist>
Load the service
launchctl load ~/Library/LaunchAgents/com.nanoclaw.statusbar.plist
Phase 3: Verify
launchctl list | grep com.nanoclaw.statusbar

The first column should show a PID (not -).

Tell the user:

The bolt icon should now appear in your macOS menu bar. Click it to see NanoClaw's status and control the service. - Green dot — NanoClaw is running - Red dot — NanoClaw is stopped Use Restart after making code changes, and View Logs to open the log file directly.

To uninstall, follow [REMOVE.md](REMOVE.md).

按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。