264 results in Identity, Evals, Infrastructure, Hooks · page 7 of 11
HooksPreview
discord-detailed-notifications
Send detailed Discord notifications with session information when Claude Code finishes. Includes working directory, session duration, and system info with rich embeds. Requires DISCORD_WEBHOOK_URL environment variable.
Send Discord notifications when Claude Code encounters long-running operations or when tools take significant time. Helps monitor productivity and catch potential issues with rich embeds. Requires DISCORD_WEBHOOK_URL environment variable.
Send Discord notifications when Claude Code finishes working. Requires DISCORD_WEBHOOK_URL environment variable. Get webhook URL from Discord Server Settings -> Integrations -> Webhooks.
Log all file edits to a project-local audit file with timestamps. Records every Edit tool usage to .claude/edit-log.txt for tracking changes across sessions. Requires jq.
Prevent writing to .env files using the if condition for lightweight filtering. Blocks any Write tool call targeting .env* files, protecting secrets from accidental overwrites. Uses the if field to avoid spawning a process unless the file pattern matches.
Block git force push commands using the if condition for efficient filtering. Prevents accidental force pushes that can overwrite remote history. Covers --force, --force-with-lease, and the -f shorthand.
Automatically format JavaScript/TypeScript files after any Edit operation using prettier. This hook runs 'npx prettier --write' on any .js, .ts, .jsx, or .tsx file that Claude modifies, ensuring consistent code formatting. Uses npx so prettier doesn't need to be globally installed. Includes error suppression so it won't fail if prettier is not available.
Automatically format Python files after any Edit operation using black formatter. This hook runs 'black' on any .py file that Claude modifies, ensuring consistent Python code formatting. Requires black to be installed ('pip install black'). The command includes error suppression (2>/dev/null || true) so it won't fail if black is not installed.
Automatically stage changes in git after file modifications for easier commit workflow. This hook runs 'git add' on any file that Claude edits or writes, automatically staging changes for the next commit. Includes error suppression so it won't fail in non-git repositories. Helps streamline the development workflow by preparing files for commit.
Automatically send Claude Code conversation traces to LangSmith for monitoring and analysis. Prerequisites: jq (brew install jq on macOS or sudo apt-get install jq on Linux), curl and uuidgen (usually pre-installed), LangSmith account and API key. Configuration: Install langsmith-tracing setting (npx claude-code-templates@latest --setting telemetry/langsmith-tracing) or manually add to .claude/settings.local.json the following environment variables: TRACE_TO_LANGSMITH=true, CC_LANGSMITH_API_KEY=lsv2_pt_..., CC_LANGSMITH_PROJECT=project-name, CC_LANGSMITH_DEBUG=true (optional). How it works: Runs in background on Stop event after each Claude response, reads conversation transcript, converts to LangSmith format, sends to LangSmith API, groups by thread_id for session continuity. Debugging: Check logs at ~/.claude/state/hook.log. Privacy note: System prompts not included in traces.
Ultra-fast headless browser written in Zig specifically for AI and automation workloads. It runs JavaScript natively, uses 9x less memory than Chrome headless, and targets sub-100ms page execution.