Token导航 LogoToken导航TokenDH.com
AI 工具只读github未标认证来源可访问clear审计通过

buhibuhi 命令行

Agent Skill

buhi 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

699

周安装

28

GitHub Stars

3

下载量

226
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:buhi(buhi 命令行)
来源仓库:https://github.com/guchey/buhi
仓库路径:skills/buhi
安装命令:
npx skills add https://github.com/guchey/buhi --skill buhi
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/guchey/buhi --skill buhi

简介

buhi 提供任务完成与用户确认时的声音提醒功能,增强交互感知体验。

  • 适用于长时间运行任务结束后及时通知用户,避免等待焦虑或错过关键提示。
  • 支持手动触发测试音与自动 hook 集成两种模式,灵活适配不同使用习惯。
  • 声音文件本地化存储,不涉及网络请求或隐私数据传输,安全性较高。
  • buhi 属于AI 工具类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Buhi - Audible Notifications

Play audible notifications when Claude Code tasks complete and when user confirmation is requested.

Overview

This skill provides two key capabilities:

  1. Manual sound playback - The /buhi command plays a "Buhi" sound effect (cute pig sound) to test notifications or trigger manually
  2. Automatic notifications - Integration with Claude Code's hook system to play sounds when:

- Tasks complete (Stop hook) - User confirmation is requested (PreToolUse hook with AskUserQuestion matcher) - such as Yes/No prompts, multiple choice selections, etc.

The /buhi Command

When invoked, this command:

  1. Detects whether the skill is installed globally (~/.claude/skills/buhi/) or locally (.claude/skills/buhi/)
  2. Automatically configures hooks in the appropriate settings.json with the correct absolute path:

- Stop hook: Plays sound when tasks complete - PreToolUse hook (matcher: AskUserQuestion): Plays sound when user confirmation is requested

  1. Detects the operating system (macOS, Linux, or Windows)
  2. Plays the buhi.m4a sound file from the skill directory using the appropriate OS command

This means you only need to run /buhi once to set up automatic notifications for both task completions and user confirmations.

Installation Locations

The skill automatically adapts to where it's installed:

  • Global installation (~/.claude/skills/buhi/): Configures ~/.claude/settings.json - notifications work for all projects
  • Local installation (.claude/skills/buhi/): Configures .claude/settings.json in your project - notifications work only for this project

Path Detection Logic

When /buhi is invoked, it:

  1. Detects installation location by examining the skill's base directory path:

- If the base directory is ~/.claude/skills/buhi/ → Global installation - If the base directory is <project>/.claude/skills/buhi/ → Local installation

  1. Determines settings.json path:

- Global: ~/.claude/settings.json - Local: <project>/.claude/settings.json (two directories up from skill base)

  1. Constructs absolute audio file path:

- Uses the skill's base directory path + /buhi.m4a - This ensures the hook works regardless of the current working directory

  1. Selects audio player based on OS:

- macOS: afplay - Linux: paplay - Windows: PowerShell Media.SoundPlayer

Implementation

macOS:

afplay <absolute-path-to>/buhi.m4a

Linux:

paplay <absolute-path-to>/buhi.m4a

Windows:

powershell -c "(New-Object Media.SoundPlayer '<absolute-path-to>/buhi.m4a').PlaySync()"

Usage

Simply run /buhi to:

  • Test that audio playback is working
  • Hear the notification sound
  • Verify the skill is installed correctly

Automatic Notifications

The /buhi command automatically configures hooks in the appropriate settings.json file. These hooks trigger the notification sound in the following scenarios:

  • Task completion (Stop hook): When Claude Code finishes executing a task
  • User confirmation (PreToolUse hook with AskUserQuestion matcher): When Claude asks for your input, such as Yes/No prompts, multiple choice selections, or other confirmations

Automatic Configuration

Running /buhi will:

  1. Detect the skill installation location (global or local)
  2. Determine the correct settings.json path
  3. Use the absolute path to the audio file for reliability
  4. Create or update both hook configurations with your OS-appropriate audio player

This ensures the notification works regardless of your current working directory.

Manual Configuration (Optional)

If you need to manually configure or customize the hook, here's what /buhi sets up. Note that it uses absolute paths to ensure reliability:

macOS (Global installation):

{
  "hooks": {
    "Stop": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "afplay ~/.claude/skills/buhi/buhi.m4a"
          }
        ]
      }
    ],
    "PreToolUse": [
      {
        "matcher": "AskUserQuestion",
        "hooks": [
          {
            "type": "command",
            "command": "afplay ~/.claude/skills/buhi/buhi.m4a"
          }
        ]
      }
    ]
  }
}

macOS (Local installation):

{
  "hooks": {
    "Stop": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "afplay /absolute/path/to/project/.claude/skills/buhi/buhi.m4a"
          }
        ]
      }
    ],
    "PreToolUse": [
      {
        "matcher": "AskUserQuestion",
        "hooks": [
          {
            "type": "command",
            "command": "afplay /absolute/path/to/project/.claude/skills/buhi/buhi.m4a"
          }
        ]
      }
    ]
  }
}

Linux (Global installation):

{
  "hooks": {
    "Stop": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "paplay ~/.claude/skills/buhi/buhi.m4a"
          }
        ]
      }
    ],
    "PreToolUse": [
      {
        "matcher": "AskUserQuestion",
        "hooks": [
          {
            "type": "command",
            "command": "paplay ~/.claude/skills/buhi/buhi.m4a"
          }
        ]
      }
    ]
  }
}

Windows (Global installation):

{
  "hooks": {
    "Stop": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "powershell -c \"(New-Object Media.SoundPlayer '~/.claude/skills/buhi/buhi.m4a').PlaySync()\""
          }
        ]
      }
    ],
    "PreToolUse": [
      {
        "matcher": "AskUserQuestion",
        "hooks": [
          {
            "type": "command",
            "command": "powershell -c \"(New-Object Media.SoundPlayer '~/.claude/skills/buhi/buhi.m4a').PlaySync()\""
          }
        ]
      }
    ]
  }
}

The /buhi command automatically determines your installation type and OS, then configures the appropriate absolute path.

Important Notes:

  • Global installation: Configures ~/.claude/settings.json - notifications work for all projects
  • Local installation: Configures .claude/settings.json in your project - notifications work only for this project
  • If you already have hooks configured, /buhi will preserve your existing hooks
  • The sound will play in two scenarios (globally or per-project depending on installation):

- After EVERY task completion (Stop hook) - Before EVERY user confirmation request (PreToolUse hook with AskUserQuestion matcher)

  • Uses absolute paths to ensure the hook works regardless of your current working directory
  • No need to restart Claude Code - hooks are loaded automatically

Customization

Adjust Volume

Edit your settings.json file and add volume parameters to the hook command:

macOS example:

"command": "afplay -v 0.5 /absolute/path/to/buhi.m4a"

Volume range: 0.0 (mute) to 1.0 (full volume)

Use Custom Sound

Replace buhi.m4a with your own audio file:

# For local installation
cp your-sound.m4a .claude/skills/buhi/buhi.m4a

# For global installation
cp your-sound.m4a ~/.claude/skills/buhi/buhi.m4a

Or update your settings.json to reference a different sound file:

"command": "afplay /path/to/your/custom-sound.m4a"

Supported formats: .m4a, .mp3, .wav (varies by OS and audio player)

Disable Notifications

Remove or comment out the hooks from your settings.json:

For local installation (.claude/settings.json):

{
  "hooks": {
    // "Stop": [...]  // Commented out - disables task completion notifications
    // "PreToolUse": [...]  // Commented out - disables user confirmation notifications
  }
}

For global installation (~/.claude/settings.json):

{
  "hooks": {
    // "Stop": [...]  // Commented out - disables task completion notifications
    // "PreToolUse": [...]  // Commented out - disables user confirmation notifications
  }
}

Or delete the hook entries entirely if you have no other hooks configured. You can also disable them individually - for example, keep task completion notifications but disable user confirmation notifications.

Troubleshooting

Sound doesn't play when running /buhi

  1. Verify skill installation: # For local installation ls -la.claude/skills/buhi/buhi.m4a # For global installation ls -la ~/.claude/skills/buhi/buhi.m4a
  2. Check system audio player:

- macOS: afplay is pre-installed - Linux: Install PulseAudio (sudo apt-get install pulseaudio-utils) - Windows: PowerShell SoundPlayer requires Windows 10+

  1. Test playback manually: # macOS (use the appropriate path for your installation) afplay ~/.claude/skills/buhi/buhi.m4a # Linux paplay ~/.claude/skills/buhi/buhi.m4a # Windows PowerShell (New-Object Media.SoundPlayer '~/.claude/skills/buhi/buhi.m4a').PlaySync()

Sound doesn't play on task completion

  1. Verify settings.json was created: # For local installation cat.claude/settings.json # For global installation cat ~/.claude/settings.json If the file doesn't exist, run /buhi again to create it.
  2. Verify settings.json syntax: # For local installation cat.claude/settings.json | python -m json.tool # For global installation cat ~/.claude/settings.json | python -m json.tool Or use any JSON validator to ensure the file is valid JSON.
  3. Check hook configuration:

- Ensure the Stop hook is properly configured - Verify the file path is an absolute path pointing to the audio file - Check that the audio file exists at the specified path - Confirm the path matches your installation type (global vs local)

  1. Review hook execution:

- Check Claude Code output for hook errors - Verify the matcher pattern (empty string matches all) - Try running the command manually with the exact path from settings.json to test it works

Multiple OS support

The /buhi command automatically detects your operating system and configures the appropriate audio player command. If you switch between different operating systems on the same project, simply run /buhi again to update the configuration for your current OS.

Technical Details

Audio Players

  • macOS: Uses afplay, Apple's built-in audio file player
  • Linux: Uses paplay, PulseAudio's command-line player (requires pulseaudio-utils package)
  • Windows: Uses PowerShell's Media.SoundPlayer class (built into.NET Framework)

Hook System

The hooks trigger in the following scenarios:

Stop hook triggers when:

  • Claude Code finishes executing a task
  • Background operations complete
  • Agent processes stop

PreToolUse hook (with AskUserQuestion matcher) triggers when:

  • Claude asks for user confirmation (Yes/No prompts)
  • Claude presents multiple choice options
  • Any user input is requested via the AskUserQuestion tool

The matcher field accepts regex patterns to filter which events trigger the hook. An empty string matches all events.

File Format

The included buhi.m4a file is:

  • Format: M4A (MPEG-4 Audio)
  • Codec: AAC
  • Compatible with all three supported platforms
  • Small file size for quick playback

Use Cases

  • Long-running builds: Get notified when compilation finishes without watching the terminal
  • Test suites: Hear when extensive test runs complete
  • Code generation: Know when large file transformations finish
  • Background tasks: Stay focused on other work while waiting for operations
  • User confirmation alerts: Get notified when Claude needs your input for decisions (Yes/No, multiple choice, etc.)
  • Multi-tasking: Switch to other applications while working with Claude, and get alerted when your attention is needed
  • Accessibility: Audio feedback for vision-impaired developers

Best Practices

  1. Test with headphones first - The sound plays at system volume
  2. Be considerate in shared spaces - May not be appropriate for quiet offices
  3. Adjust volume appropriately - Start with lower volumes and increase as needed
  4. Customize for your workflow - Use different sounds for different notification types

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.2%
按下载量换算64

Gemini CLI

24.92%
按下载量换算56

OpenCode

15.96%
按下载量换算36

Cursor

13.04%
按下载量换算29

github-copilot

6.76%
按下载量换算15

Codex

3.63%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills