← 返回 Skills 市场
bucleliu

cc-sticky-notify

作者 BucleLiu · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ 安全检测通过
156
总下载
1
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install cc-sticky-notify
功能描述
Install, configure, or fix cc-sticky-notify — a notification system that displays a pinned yellow sticky note in the Mac top-right corner for key Claude Code...
使用说明 (SKILL.md)

cc-sticky-notify

A pinned sticky note notification system for Mac. Key Claude Code events appear as a yellow floating sticky note in the top-right corner, persisting until manually closed.

File Structure (fully self-contained)

~/.claude/skills/cc-sticky-notify/
├── SKILL.md
├── install.sh                   ← one-time setup: chmod + settings.json guidance
└── scripts/
    ├── notify.sh                ← main notification script (called directly by hooks)
    ├── sticky-window.swift      ← Swift source (compiled by install.sh on first install)
    └── sticky-notify.app/       ← .app bundle (built automatically on first use)
        └── Contents/
            ├── Info.plist
            └── MacOS/
                └── sticky-notify-app

Two-layer notification mechanism:

  1. display notification — no permissions required, appears instantly in top-right corner
  2. Swift NSWindow (.floating level) — pinned sticky note, close manually with ✕

Hook coverage (consistent with popo-notify):

Hook Trigger Sticky note content
Stop Task completed ✅ Task completed + time/project/session
Notification/permission_prompt Permission approval needed 🔐 Permission approval required
Notification/idle_prompt Waiting for user selection 💬 Awaiting your input
PostToolUse/Bash (on failure) Command execution failed ❌ Command failed, exit code

Requirements

  • macOS 12 Monterey or later

  • Xcode Command Line Tools — required for compiling the Swift floating window, code signing, and JSON parsing

    xcode-select --install
    

    All dependencies (swiftc, codesign) come from Xcode CLT. install.sh will check and exit early if CLT is missing.


Installation

When the user requests installation, follow these steps:

Step 1 — Run install.sh

bash ~/.claude/skills/cc-sticky-notify/install.sh

What this script does:

  1. Check Xcode CLT — exits early with instructions if xcode-select -p fails.
  2. chmod +x notify.sh — ensures the script is executable (git clone may strip the +x bit).
  3. Build .app bundle — compiles sticky-window.swift, writes Info.plist + entitlements, signs with codesign. Skipped if the bundle already exists.
  4. Check hook configuration — inspects ~/.claude/settings.json for existing cc-sticky-notify entries and prints the required hook commands if none are found.
  5. Smoke test — fires a test notification via notify.sh.

Step 2 — Configure settings.json hooks

Read ~/.claude/settings.json and append one sticky-notify entry to each of the following four locations in the hooks field (skip if already present).

Stop — append to Stop[0].hooks:

{
  "type": "command",
  "command": "$HOME/.claude/skills/cc-sticky-notify/scripts/notify.sh"
}

Notification/permission_prompt — append:

{
  "type": "command",
  "command": "$HOME/.claude/skills/cc-sticky-notify/scripts/notify.sh '🔐 Claude Code Permission approval required, check terminal'"
}

Notification/idle_prompt — append:

{
  "type": "command",
  "command": "$HOME/.claude/skills/cc-sticky-notify/scripts/notify.sh '💬 Claude Code Awaiting your input, check terminal'"
}

PostToolUse/Bash — append (triggers only on failure):

{
  "type": "command",
  "command": "bash -c 'INPUT=$(cat); STATUS=$(echo \"$INPUT\" | jq -r \".tool_response.exitCode // 0\"); [ \"$STATUS\" != \"0\" ] && $HOME/.claude/skills/cc-sticky-notify/scripts/notify.sh \"❌ Claude Code Command failed, exit code: $STATUS\" || true'"
}

Step 3 — Verify

# Test arg mode (simulates Notification hook)
$HOME/.claude/skills/cc-sticky-notify/scripts/notify.sh '✅ Installation verified'

# Test stdin mode (simulates Stop hook)
echo '{"session_id":"test12345678"}' | $HOME/.claude/skills/cc-sticky-notify/scripts/notify.sh

A yellow sticky note and system notification appearing in the top-right corner confirms successful installation.


Configuration

CC_STICKY_NOTIFY_CLOSE_TIMEOUT — Auto-close timeout

Sticky notes automatically close after 1 hour (3600 seconds) by default. Override with this environment variable:

export CC_STICKY_NOTIFY_CLOSE_TIMEOUT=300   # auto-close after 5 minutes
  • Unit: seconds (decimals supported, e.g. 30.5)
  • Must be greater than 0; otherwise falls back to the default 3600 seconds
  • Set a large value (e.g. 86400) to keep the note visible for nearly a full day

To persist the setting, add it to your shell config (~/.zshrc or ~/.bashrc):

echo 'export CC_STICKY_NOTIFY_CLOSE_TIMEOUT=300' >> ~/.zshrc

Troubleshooting

No system notification either

  • Verify the hooks configuration is correctly written in ~/.claude/settings.json
  • Path should be $HOME/.claude/skills/cc-sticky-notify/scripts/notify.sh

xcrun: error: invalid active developer path during compilation

  • Xcode Command Line Tools path is broken (common after macOS upgrade or Xcode reinstall)
  • Fix: sudo xcode-select --reset
  • If that doesn't work, reinstall: xcode-select --install
  • The floating sticky window will be disabled if swiftc can't compile, but system notifications still work

Permission denied on notify.sh

  • The script is missing execute permission — happens when files are cloned/copied without preserving permissions
  • Fix: chmod +x ~/.claude/skills/cc-sticky-notify/scripts/notify.sh
  • Re-run install.sh after fixing (the latest version auto-runs chmod +x on startup)
安全使用建议
This skill appears to do what it says, but review and accept these tradeoffs before installing: - Permissions: the tool uses Apple Events / System Events (osascript) and may trigger macOS automation/accessibility permission prompts; approving those grants the app the ability to inspect other apps/windows. - Privacy: notify.sh captures the front application's name and window title/position and includes your current working directory's basename as 'Project' — this may include sensitive information. - Local files: runtime state (content, pid, slot, sig, wid, etc.) is written to /tmp/cc-sticky-notify with predictable names; other local users could read these on a multi-user system. - Install: the Swift app is compiled locally and ad-hoc signed; no network fetches are performed. Confirm you trust the code before running install.sh. Recommended actions: inspect the scripts (notify.sh and sticky-window.swift) yourself (they are included), run install.sh in a test account or VM if you are unsure, and be prepared to deny Automation/Accessibility permissions if you do not want the app to read window titles or control other apps.
功能分析
Type: OpenClaw Skill Name: cc-sticky-notify Version: 1.0.2 The cc-sticky-notify skill is a legitimate macOS notification utility for Claude Code. It uses a combination of shell scripts (notify.sh, install.sh) and a native Swift application (sticky-window.swift) to display persistent, floating 'sticky note' notifications for task events. The implementation uses standard macOS APIs (AppKit, CoreGraphics, and Accessibility) to manage window focus and display, and it follows the expected pattern for Claude Code skills by configuring hooks in settings.json. No evidence of data exfiltration, malicious persistence, or unauthorized remote execution was found.
能力评估
Purpose & Capability
Name/description match the included files and instructions: a Swift floating window + shell wrapper to display sticky notifications on macOS. Requested tools (swiftc, codesign via Xcode CLT) are appropriate for compiling and signing the provided Swift app. No unrelated credentials, binaries, or cloud services are required.
Instruction Scope
Instructions are focused on installing and hooking the notify script into ~/.claude/settings.json and verifying operation. Runtime behavior goes beyond simply showing a notification: notify.sh inspects the ancestor process tree, queries System Events (osascript) to capture the front application/window title and position, and records session/project info. Capturing window titles and writing these artifacts to /tmp is consistent with the declared feature (showing source app/project) but is privacy-sensitive and worth the user's awareness.
Install Mechanism
No external downloads or network installs; the Swift binary is compiled locally and ad-hoc codesigned. This is low risk compared to fetching remote archives. Minor inconsistency: a comment mentions python3 for JSON parsing but the script doesn't enforce it; codesign uses ad-hoc signing with an entitlements file enabling apple-events—this is expected for macOS automation but may still prompt the user for permissions at runtime.
Credentials
The skill requests no environment variables or credentials. It exposes one optional env var (CC_STICKY_NOTIFY_CLOSE_TIMEOUT) which is justified. No unrelated secrets or config paths are requested.
Persistence & Privilege
The skill is not forced-always, is user-invocable, and does not modify other skills. It asks the user to add hooks to ~/.claude/settings.json (expected for a notification hook) and writes runtime state to /tmp under a skill-specific directory. It does not attempt to alter system-wide agent settings or other skills.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cc-sticky-notify
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cc-sticky-notify 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
cc-sticky-notify 1.0.2 --- New Features Source Display The notification window now shows a Source field displaying the name of the program that triggered the notification, making it easy to identify where a message came from. Cross-Desktop Follow Mode Notifications can now follow you across virtual desktops. Disabled by default — click the gray vertical bar on the left side of the window to activate it. The bar turns amber when active, and the notification window will automatically appear on whichever desktop you switch to. Collapse / Expand The notification window can now be collapsed to show only the title bar, saving screen space. Expand it again with a single click whenever needed. --- Improvements Project Name Highlight The project name is now displayed in bold red, making it instantly recognizable when switching between multiple projects. Stronger Pulse Animation for Same-Session Updates When a new message arrives in the same session, the pulse animation is significantly more prominent, reducing the chance of missing a notification while focused on work. --- Bug Fixes Message Deduplication Consecutive identical messages now trigger only one notification, eliminating repetitive alerts. Multi-Window Focus Fix Fixed a long-standing issue where clicking a notification failed to accurately bring the correct window into focus when multiple windows of the same program were open. Main Screen Only In multi-monitor setups, notification windows now appear exclusively on the primary display, preventing them from popping up on secondary screens and keeping visual focus consistent.
v1.0.1
Features 1. Notification Display Optimization - Replaced pop-up notifications with a sticky note label display for a cleaner interface - Sticky notes for multiple sessions within the same project are displayed independently without interference - Only one sticky note is retained per project to prevent label accumulation 2. Window Interaction Enhancements - Click the sticky note title to quickly jump back to the originating application window - Each sticky note window is positioned independently without overlapping others - Upgraded from a binary executable to a .app bundle to enable window-jumping capability 3. Content Update Indicators - When a sticky note's content is updated within the same session, a scale pulse animation is triggered to visually indicate the change - The sticky note content area is now clickable for navigation, improving usability
v1.0.0
- Initial release of cc-sticky-notify: a self-contained sticky note notification system for Mac. - Displays a persistent yellow sticky note in the top-right corner for key Claude Code events. - Two-layer system: native floating Swift window (sticky note) plus macOS display notification. - No third-party dependencies; all scripts and binaries included within the skill directory. - Easy install, update, and troubleshooting instructions provided, with configurable auto-close timeout.
元数据
Slug cc-sticky-notify
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

cc-sticky-notify 是什么?

Install, configure, or fix cc-sticky-notify — a notification system that displays a pinned yellow sticky note in the Mac top-right corner for key Claude Code... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 156 次。

如何安装 cc-sticky-notify?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cc-sticky-notify」即可一键安装,无需额外配置。

cc-sticky-notify 是免费的吗?

是的,cc-sticky-notify 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

cc-sticky-notify 支持哪些平台?

cc-sticky-notify 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 cc-sticky-notify?

由 BucleLiu(@bucleliu)开发并维护,当前版本 v1.0.2。

💬 留言讨论