GitHub Trending์ถ์ฒ: GitHub Trending Weekly All์กฐํ์ 14
disler/claude-code-hooks-mastery
By GitHub Trending Weekly All2026๋
2์ 9์ผ
**disler/claude-code-hooks-mastery**
Master Claude Code HooksClaude Code Hooks Mastery Claude Code Hooks - Quickly master how to use Claude Code hooks to add deterministic (or non-deterministic) control over Claude Code's behavior. Plus learn about Claude Code Sub-Agents, the powerful Meta-Agent, and Team-Based Validation with agent orchestration. Table of Contents Prerequisites Hook Lifecycle & Payloads What This Shows UV Single-File Scripts Architecture Key Files Features Demonstrated Hook Error Codes & Flow Control UserPromptSubmit Hook Deep Dive Claude Code Sub-Agents Team-Based Validation System Output Styles Collection Custom Status Lines Prerequisites This requires: Astral UV - Fast Python package installer and resolver Claude Code - Anthropic's CLI for Claude AI Optional Setup: Optional: ElevenLabs - Text-to-speech provider (with MCP server integration) ElevenLabs MCP Server - MCP server for ElevenLabs Firecrawl MCP Server - Web scraping and crawling MCP server (my favorite scraper) OpenAI - Language model provider + Text-to-speech provider Anthropic - Language model provider Ollama - Local language model provider Hook Lifecycle & Payloads This demo captures all 13 Claude Code hook lifecycle events with their JSON payloads: Hook Lifecycle Overview flowchart TB subgraph SESSION["๐ข Session Lifecycle"] direction TB SETUP[["๐ง Setup<br/>(init/maintenance)"]] START[["โถ๏ธ SessionStart<br/>(startup/resume/clear)"]] END[["โน๏ธ SessionEnd<br/>(exit/sigint/error)"]] end subgraph MAIN["๐ Main Conversation Loop"] direction TB PROMPT[["๐ UserPromptSubmit"]] CLAUDE["Claude Processes"] subgraph TOOLS["๐ ๏ธ Tool Execution"] direction TB PRE[["๐ PreToolUse"]] PERM[["โ PermissionRequest"]] EXEC["Tool Executes"] POST[["โ PostToolUse"]] FAIL[["โ PostToolUseFailure"]] end subgraph SUBAGENT["๐ค Subagent Lifecycle"] direction TB SSTART[["๐ SubagentStart"]] SWORK["Subagent Works"] SSTOP[["๐ SubagentStop"]] end NOTIFY[["๐ Notification<br/>(Async)"]] STOP[["๐ Stop"]] end subgraph COMPACT["๐๏ธ Maintenance"] PRECOMPACT[["๐ฆ PreCompact"]] end SETUP --> START START --> PROMPT PROMPT --> CLAUDE CLAUDE --> PRE PRE --> PERM PERM --> EXEC EXEC --> POST EXEC -.-> FAIL CLAUDE -.-> SSTART SSTART --> SWORK SWORK --> SSTOP POST --> CLAUDE CLAUDE --> STOP CLAUDE -.-> NOTIFY STOP --> PROMPT STOP -.-> END PROMPT -.-> PRECOMPACT PRECOMPACT -.-> PROMPT 1. UserPromptSubmit Hook Fires: Immediately when user submits a prompt (before Claude processes it) Payload: prompt text, session_id, timestamp Enhanced: Prompt validation, logging, context injection, security filtering 2. PreToolUse Hook Fires: Before any tool execution Payload: tool_name, tool_input parameters Enhanced: Blocks dangerous commands (rm -rf, .env access) 3...
---
**[devsupporter ํด์ค]**
์ด ๊ธฐ์ฌ๋ GitHub Trending Weekly All์์ ์ ๊ณตํ๋ ์ต์ ๊ฐ๋ฐ ๋ํฅ์ ๋๋ค. ๊ด๋ จ ๋๊ตฌ๋ ๊ธฐ์ ์ ๋ํด ๋ ์์๋ณด์๋ ค๋ฉด ์๋ณธ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ์ธ์.
Master Claude Code HooksClaude Code Hooks Mastery Claude Code Hooks - Quickly master how to use Claude Code hooks to add deterministic (or non-deterministic) control over Claude Code's behavior. Plus learn about Claude Code Sub-Agents, the powerful Meta-Agent, and Team-Based Validation with agent orchestration. Table of Contents Prerequisites Hook Lifecycle & Payloads What This Shows UV Single-File Scripts Architecture Key Files Features Demonstrated Hook Error Codes & Flow Control UserPromptSubmit Hook Deep Dive Claude Code Sub-Agents Team-Based Validation System Output Styles Collection Custom Status Lines Prerequisites This requires: Astral UV - Fast Python package installer and resolver Claude Code - Anthropic's CLI for Claude AI Optional Setup: Optional: ElevenLabs - Text-to-speech provider (with MCP server integration) ElevenLabs MCP Server - MCP server for ElevenLabs Firecrawl MCP Server - Web scraping and crawling MCP server (my favorite scraper) OpenAI - Language model provider + Text-to-speech provider Anthropic - Language model provider Ollama - Local language model provider Hook Lifecycle & Payloads This demo captures all 13 Claude Code hook lifecycle events with their JSON payloads: Hook Lifecycle Overview flowchart TB subgraph SESSION["๐ข Session Lifecycle"] direction TB SETUP[["๐ง Setup<br/>(init/maintenance)"]] START[["โถ๏ธ SessionStart<br/>(startup/resume/clear)"]] END[["โน๏ธ SessionEnd<br/>(exit/sigint/error)"]] end subgraph MAIN["๐ Main Conversation Loop"] direction TB PROMPT[["๐ UserPromptSubmit"]] CLAUDE["Claude Processes"] subgraph TOOLS["๐ ๏ธ Tool Execution"] direction TB PRE[["๐ PreToolUse"]] PERM[["โ PermissionRequest"]] EXEC["Tool Executes"] POST[["โ PostToolUse"]] FAIL[["โ PostToolUseFailure"]] end subgraph SUBAGENT["๐ค Subagent Lifecycle"] direction TB SSTART[["๐ SubagentStart"]] SWORK["Subagent Works"] SSTOP[["๐ SubagentStop"]] end NOTIFY[["๐ Notification<br/>(Async)"]] STOP[["๐ Stop"]] end subgraph COMPACT["๐๏ธ Maintenance"] PRECOMPACT[["๐ฆ PreCompact"]] end SETUP --> START START --> PROMPT PROMPT --> CLAUDE CLAUDE --> PRE PRE --> PERM PERM --> EXEC EXEC --> POST EXEC -.-> FAIL CLAUDE -.-> SSTART SSTART --> SWORK SWORK --> SSTOP POST --> CLAUDE CLAUDE --> STOP CLAUDE -.-> NOTIFY STOP --> PROMPT STOP -.-> END PROMPT -.-> PRECOMPACT PRECOMPACT -.-> PROMPT 1. UserPromptSubmit Hook Fires: Immediately when user submits a prompt (before Claude processes it) Payload: prompt text, session_id, timestamp Enhanced: Prompt validation, logging, context injection, security filtering 2. PreToolUse Hook Fires: Before any tool execution Payload: tool_name, tool_input parameters Enhanced: Blocks dangerous commands (rm -rf, .env access) 3...
---
**[devsupporter ํด์ค]**
์ด ๊ธฐ์ฌ๋ GitHub Trending Weekly All์์ ์ ๊ณตํ๋ ์ต์ ๊ฐ๋ฐ ๋ํฅ์ ๋๋ค. ๊ด๋ จ ๋๊ตฌ๋ ๊ธฐ์ ์ ๋ํด ๋ ์์๋ณด์๋ ค๋ฉด ์๋ณธ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ์ธ์.
