hlongc

Claude Code Sentinel — AI skill for Claude Code

AI community

原生 macOS AI 编程助手审批浮窗,支持 Claude Code 和 OpenCode 的权限确认、问题回答与任务通知.

How to install Claude Code Sentinel

This entry records only its repository, not the path inside it, so there is no exact command to give. Open hlongc/claude-code-sentinel and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Code Sentinel does

原生 macOS AI 编程助手审批浮窗,支持 Claude Code 和 OpenCode 的权限确认、问题回答与任务通知。

Alternatives in AI

  • Osaurus — Own your AI. The native macOS harness for AI agents -- any model, persistent memory, autonomous execution, cry 5.1k ★
  • Vibeproxy — Native macOS menu bar app to use your Claude Code & ChatGPT subscriptions with AI coding tools - no API keys n 3.3k ★
  • Peekaboo — Peekaboo is a macOS CLI & optional MCP server that enables AI agents to capture screenshots of applications, o 3.2k ★

README

Claude Code Sentinel

中文 | [English](README.en.md)

[![Release](https://img.shields.io/github/v/release/hlongc/claude-code-sentinel)](https://github.com/hlongc/claude-code-sentinel/releases) [![License](https://img.shields.io/github/license/hlongc/claude-code-sentinel)](LICENSE) [![macOS](https://img.shields.io/badge/macOS-native-black)](#系统要求) [![Homebrew](https://img.shields.io/badge/Homebrew-hlongc%2Ftap-blue)](#homebrew)

别再守着 Claude Code 终端等确认了。Claude Code Sentinel 会在需要你批准权限、回答多选问题或任务完成时,用原生 macOS 浮窗把你叫回来。

它是 Swift 编译出的命令行二进制,日常使用不依赖 Node.js,也不受当前 `nvm` 版本影响。

brew tap hlongc/tap
brew install claude-code-sentinel
claude-code-sentinel install-managed

Demo

这里适合放一个 10-20 秒 GIF:Claude Code 请求权限,Sentinel 在右上角弹出审批浮窗,点击 `Yes` 后 Claude Code 继续执行。

建议文件路径:`assets/demo.gif`,之后可以用 `![Demo](assets/demo.gif)` 嵌入。

目录

为什么需要它

Claude Code 很适合长时间执行任务,但它经常会停在权限确认、工具调用确认或多选问题上。如果你切去写文档、看网页或处理其他工作,任务可能已经卡住很久,而你完全不知道。

Sentinel 做的事情很简单:它替你盯着 Claude Code。需要你决策时,它弹一个轻量浮窗;你做出选择后,结果会通过 Claude Code hooks 直接返回给当前会话。

功能特性

  • 原生 macOS 浮动审批窗口,支持 PermissionRequest
  • 在浮窗中直接选择 Yes、Yes, don't ask again 或 No,并把决策返回给 Claude Code
  • 支持 AskUserQuestion,按问题逐个展示选项,并可为“补充信息/讨论/其他”等选项追加文字说明
  • 支持 OpenCode 权限审批、问题回答和任务通知
  • 任务完成和失败通知
  • 标题包含项目和 session 信息,方便同时运行多个 Claude Code 任务
  • 浮窗可拖拽移动,固定宽度,长内容自动换行
  • 终端活跃时不打扰:如果你正在操作 Claude 终端,Sentinel 会保持安静
  • 支持安装到 Claude Code managed settings,避免 cc switch 等工具重写 ~/.claude/settings.json 后丢失 hooks

关键词

`claude-code` · `claude-code-hooks` · `opencode` · `macos` · `homebrew` · `developer-tools` · `ai-coding` · `notifications`

系统要求

  • macOS
  • Xcode Command Line Tools,需包含 swiftc(仅源码编译时需要)
  • 支持 hooks 的 Claude Code

快速开始

使用 Homebrew:

brew tap hlongc/tap
brew instal