Skip to content

feat: add claude-yap fun notification hook#506

Open
zehnlyai-main wants to merge 1 commit intodavila7:mainfrom
zehnlyai-main:add-claude-yap-hook
Open

feat: add claude-yap fun notification hook#506
zehnlyai-main wants to merge 1 commit intodavila7:mainfrom
zehnlyai-main:add-claude-yap-hook

Conversation

@zehnlyai-main
Copy link
Copy Markdown

@zehnlyai-main zehnlyai-main commented Apr 5, 2026

Summary

Adds claude-yap — fun, customizable desktop notifications for Claude Code.

  • Random cheerful messages from 5 message packs (default, casual, formal, anime, pirate)
  • Auto-detects 11+ editors/terminals (VS Code, Cursor, Antigravity, Windsurf, Zed, iTerm2, Ghostty, Warp, etc.)
  • Customizable name prefix, sounds, and messages via ~/.claude-yap/config.json
  • macOS (terminal-notifier) and Linux (notify-send) support
  • Two hook events: Stop (task done) and Notification (needs approval)

Install

npx claude-code-templates@latest --hook automation/claude-yap

How it works

  • On first run, auto-clones zehnlyai-main/claude-yap to ~/.claude-yap/
  • Subsequent runs use the cached install
  • Users customize via ~/.claude-yap/config.json (name prefix, message pack, sounds, editor)

Example notifications

  • Stop: "Cooked Master 🍳", "Mic drop Master 🎙️", "Crushed it Master 💪"
  • Notification: "Master, pretty please? 🥹", "Master, I'm stuck without you 🥺"

Repo: https://github.com/zehnlyai-main/claude-yap


Summary by cubic

Adds a new claude-yap notification hook component to send fun desktop alerts on Stop and Notification events. Improves developer feedback with auto-install and macOS/Linux support.

  • New Features
    • Area: components (cli-tool/components/); added hooks/automation/claude-yap.json for desktop notifications.
    • Auto-installs zehnlyai-main/claude-yap to ~/.claude-yap on first run and invokes claude-yap.sh for Stop/Notification.
    • Supports macOS (terminal-notifier) and Linux (notify-send); auto-detects common editors/terminals; configurable via ~/.claude-yap/config.json.
    • New component added — regenerate docs/components.json; no new environment variables or secrets.

Written for commit b5a227e. Summary will update on new commits.

Fun, customizable desktop notifications for Claude Code with:
- Random cheerful messages from 5 message packs (default, casual, formal, anime, pirate)
- Auto-detection of 11+ editors/terminals (VS Code, Cursor, Antigravity, Windsurf, etc.)
- Customizable name prefix, sounds, and messages via config
- macOS (terminal-notifier) and Linux (notify-send) support
- Two hook events: Stop (task done) and Notification (needs approval)

Install: npx claude-code-templates@latest --hook automation/claude-yap
Repo: https://github.com/zehnlyai-main/claude-yap

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 5, 2026

@shoxurhmirzo is attempting to deploy a commit to the Daniel Avila's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="cli-tool/components/hooks/automation/claude-yap.json">

<violation number="1" location="cli-tool/components/hooks/automation/claude-yap.json:10">
P0: Supply-chain risk: this hook auto-clones and executes an unpinned external repository. Unlike every other hook in this directory (which use self-contained inline commands), this downloads and runs arbitrary code from a third-party GitHub repo at `HEAD`. The repo owner can change `claude-yap.sh` at any time and all users will silently execute it.

At minimum, pin to a specific commit SHA (`git clone` then `git -C checkout <sha>`) and add a note about the external dependency. Ideally, inline the notification logic like the other hooks do, or vendor the script into this repo so it goes through code review.</violation>

<violation number="2" location="cli-tool/components/hooks/automation/claude-yap.json:10">
P2: Hook auto-install logic checks only directory existence, so partial/corrupt installs are not recovered and failures are silently masked.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@@ -0,0 +1,27 @@
{
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0: Supply-chain risk: this hook auto-clones and executes an unpinned external repository. Unlike every other hook in this directory (which use self-contained inline commands), this downloads and runs arbitrary code from a third-party GitHub repo at HEAD. The repo owner can change claude-yap.sh at any time and all users will silently execute it.

At minimum, pin to a specific commit SHA (git clone then git -C checkout <sha>) and add a note about the external dependency. Ideally, inline the notification logic like the other hooks do, or vendor the script into this repo so it goes through code review.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At cli-tool/components/hooks/automation/claude-yap.json, line 10:

<comment>Supply-chain risk: this hook auto-clones and executes an unpinned external repository. Unlike every other hook in this directory (which use self-contained inline commands), this downloads and runs arbitrary code from a third-party GitHub repo at `HEAD`. The repo owner can change `claude-yap.sh` at any time and all users will silently execute it.

At minimum, pin to a specific commit SHA (`git clone` then `git -C checkout <sha>`) and add a note about the external dependency. Ideally, inline the notification logic like the other hooks do, or vendor the script into this repo so it goes through code review.</comment>

<file context>
@@ -0,0 +1,27 @@
+        "hooks": [
+          {
+            "type": "command",
+            "command": "if [ ! -d \"$HOME/.claude-yap\" ]; then echo 'Installing claude-yap...' && git clone --depth 1 https://github.com/zehnlyai-main/claude-yap.git \"$HOME/.claude-yap\" 2>/dev/null && chmod +x \"$HOME/.claude-yap/claude-yap.sh\"; fi; \"$HOME/.claude-yap/claude-yap.sh\" stop 2>/dev/null; true"
+          }
+        ]
</file context>
Fix with Cubic

"hooks": [
{
"type": "command",
"command": "if [ ! -d \"$HOME/.claude-yap\" ]; then echo 'Installing claude-yap...' && git clone --depth 1 https://github.com/zehnlyai-main/claude-yap.git \"$HOME/.claude-yap\" 2>/dev/null && chmod +x \"$HOME/.claude-yap/claude-yap.sh\"; fi; \"$HOME/.claude-yap/claude-yap.sh\" stop 2>/dev/null; true"
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Hook auto-install logic checks only directory existence, so partial/corrupt installs are not recovered and failures are silently masked.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At cli-tool/components/hooks/automation/claude-yap.json, line 10:

<comment>Hook auto-install logic checks only directory existence, so partial/corrupt installs are not recovered and failures are silently masked.</comment>

<file context>
@@ -0,0 +1,27 @@
+        "hooks": [
+          {
+            "type": "command",
+            "command": "if [ ! -d \"$HOME/.claude-yap\" ]; then echo 'Installing claude-yap...' && git clone --depth 1 https://github.com/zehnlyai-main/claude-yap.git \"$HOME/.claude-yap\" 2>/dev/null && chmod +x \"$HOME/.claude-yap/claude-yap.sh\"; fi; \"$HOME/.claude-yap/claude-yap.sh\" stop 2>/dev/null; true"
+          }
+        ]
</file context>
Fix with Cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants