Stats
Actions
Tags
Help us improve
Share bugs, ideas, or general feedback.
From vibe
Automates code quality enforcement and context capture during Claude Code sessions. Runs Prettier formatting after edits, tsc type checks on .ts/.tsx files, lint/secret scanning, and saves session snapshots before compaction. Reminds to use tmux for long commands and mgrep for search. Executes bash and writes files.
5 events · 14 hooks
npx claudepluginhub anubhavg-icpl/vibe --plugin vibeSafety signals detected in this hook configuration
Where this hook configuration is defined
Defined in hooks/hooks.json
Event handlers and matchers — expand Raw Configuration for the full JSON
*#!/bin/bash
# Final check for console.logs in modified files
input=$(cat)
if git rev-parse --git-dir > /dev/null 2>&1; then
modified_files=$(git diff --name-only HEAD 2>/dev/null | grep -E '\.(ts|tsx|js|jsx)$' || true)
if [ -n "$modified_files" ]; then
has_console=false
while IFS= read -r file; do
if [ -f "$file" ]; then
if grep -q "console\.log" "$file" 2>/dev/null; then
echo "[Hook] WARNING: console.log found in $file" >&2
has_console=true
fi
fi
done <<< "$modified_files"
if [ "$has_console" = true ]; then
echo "[Hook] Remove console.log statements before committing" >&2
fi
fi
fi
echo "$input"*~/.claude/hooks/memory-persistence/session-end.sh*~/.claude/skills/continuous-learning/evaluate-session.sh*~/.claude/hooks/memory-persistence/pre-compact.shtool == "Bash" && tool_input.command matches "(npm run dev|pnpm( run)? dev|yarn dev|bun run dev)"#!/bin/bash
input=$(cat)
cmd=$(echo "$input" | jq -r '.tool_input.command // ""')
# Block dev servers that aren't run in tmux
echo '[Hook] BLOCKED: Dev server must run in tmux for log access' >&2
echo '[Hook] Use this command instead:' >&2
echo "[Hook] tmux new-session -d -s dev 'npm run dev'" >&2
echo '[Hook] Then: tmux attach -t dev' >&2
exit 1tool == "Bash" && tool_input.command matches "(npm (install|test)|pnpm (install|test)|yarn (install|test)|bun (install|test)|cargo build|make|docker|pytest|vitest|playwright)"#!/bin/bash
input=$(cat)
if [ -z "$TMUX" ]; then
echo '[Hook] Consider running in tmux for session persistence' >&2
echo '[Hook] tmux new -s dev | tmux attach -t dev' >&2
fi
echo "$input"tool == "Bash" && tool_input.command matches "git push"#!/bin/bash
# Open editor for review before pushing
echo '[Hook] Review changes before push...' >&2
# Uncomment your preferred editor:
# zed . 2>/dev/null
# code . 2>/dev/null
# cursor . 2>/dev/null
echo '[Hook] Press Enter to continue with push or Ctrl+C to abort...' >&2
read -rtool == "Write" && tool_input.file_path matches "\\.(md|txt)$" && !(tool_input.file_path matches "README\\.md|CLAUDE\\.md|AGENTS\\.md|CONTRIBUTING\\.md")#!/bin/bash
# Block creation of unnecessary documentation files
input=$(cat)
file_path=$(echo "$input" | jq -r '.tool_input.file_path // ""')
if [[ "$file_path" =~ \.(md|txt)$ ]] && [[ ! "$file_path" =~ (README|CLAUDE|AGENTS|CONTRIBUTING)\.md$ ]]; then
echo "[Hook] BLOCKED: Unnecessary documentation file creation" >&2
echo "[Hook] File: $file_path" >&2
echo "[Hook] Use README.md for documentation instead" >&2
exit 1
fi
echo "$input"tool == "Edit" || tool == "Write"~/.claude/hooks/strategic-compact/suggest-compact.shtool == "Bash"#!/bin/bash
# Auto-detect PR creation and log useful info
input=$(cat)
cmd=$(echo "$input" | jq -r '.tool_input.command')
if echo "$cmd" | grep -qE 'gh pr create'; then
output=$(echo "$input" | jq -r '.tool_output.output // ""')
pr_url=$(echo "$output" | grep -oE 'https://github.com/[^/]+/[^/]+/pull/[0-9]+')
if [ -n "$pr_url" ]; then
echo "[Hook] PR created: $pr_url" >&2
echo "[Hook] Checking GitHub Actions status..." >&2
repo=$(echo "$pr_url" | sed -E 's|https://github.com/([^/]+/[^/]+)/pull/[0-9]+|\1|')
pr_num=$(echo "$pr_url" | sed -E 's|.*/pull/([0-9]+)|\1|')
echo "[Hook] To review PR: gh pr review $pr_num --repo $repo" >&2
fi
fi
echo "$input"tool == "Edit" && tool_input.file_path matches "\\.(ts|tsx|js|jsx)$"#!/bin/bash
# Auto-format with Prettier after editing JS/TS files
input=$(cat)
file_path=$(echo "$input" | jq -r '.tool_input.file_path // ""')
if [ -n "$file_path" ] && [ -f "$file_path" ]; then
if command -v prettier >/dev/null 2>&1; then
prettier --write "$file_path" 2>&1 | head -5 >&2
fi
fi
echo "$input"tool == "Edit" && tool_input.file_path matches "\\.(ts|tsx)$"#!/bin/bash
# Run TypeScript check after editing TS files
input=$(cat)
file_path=$(echo "$input" | jq -r '.tool_input.file_path // ""')
if [ -n "$file_path" ] && [ -f "$file_path" ]; then
dir=$(dirname "$file_path")
project_root="$dir"
while [ "$project_root" != "/" ] && [ ! -f "$project_root/package.json" ]; do
project_root=$(dirname "$project_root")
done
if [ -f "$project_root/tsconfig.json" ]; then
cd "$project_root" && npx tsc --noEmit --pretty false 2>&1 | grep "$file_path" | head -10 >&2 || true
fi
fi
echo "$input"tool == "Edit" && tool_input.file_path matches "\\.(ts|tsx|js|jsx)$"#!/bin/bash
# Warn about console.log in edited files
input=$(cat)
file_path=$(echo "$input" | jq -r '.tool_input.file_path // ""')
if [ -n "$file_path" ] && [ -f "$file_path" ]; then
console_logs=$(grep -n "console\\.log" "$file_path" 2>/dev/null || true)
if [ -n "$console_logs" ]; then
echo "[Hook] WARNING: console.log found in $file_path" >&2
echo "$console_logs" | head -5 >&2
echo "[Hook] Remove console.log before committing" >&2
fi
fi
echo "$input"*~/.claude/hooks/memory-persistence/session-start.shShare bugs, ideas, or general feedback.