Claude Code Hooks Integration Guide — Development skill for Claude Code
This guide explains how to integrate the bridge app with Claude Code hooks to stream events to the monitoring server.
How to install Claude Code Hooks Integration Guide
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open williamkapke/MadameClaude and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Code Hooks Integration Guide does
This guide explains how to integrate the bridge app with Claude Code hooks to stream events to the monitoring server.
Alternatives in Development
- Claude Integration Guide — FOR CLAUDE CODE: When a user asks you to integrate components from this showcase repository into their project 9.3k ★
- 13 Bridge IDE — Prompt 13: Bridge Layer (VS Code / JetBrains IDE Integration) 2.3k ★
- Claude Gemini Bridge — Intelligent integration between Claude Code and Google Gemini for large-scale code analysis 386 ★
README
Claude Code Hooks Integration Guide
This guide explains how to integrate the bridge app with Claude Code hooks to stream events to the monitoring server.
Prerequisites
Ensure the server is running:
cd server npm startEnsure Node.js is installed and accessible in your PATH
Integration Steps
1. Configure Claude Code Settings
Add hooks configuration to your Claude Code settings file (`~/.claude/settings.json`):
{
"hooks": {
"PreToolUse": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "/absolute/path/to/MadameClaude/server/bridge.js"
}
]
}
]
}
}
2. Hook Event Types
You can configure different hooks for different events:
- PreToolUse: Fires before a tool is executed
- PostToolUse: Fires after a tool completes
- Notification: Fires when Claude sends notifications
- Stop: Fires when the main agent finishes
- SubagentStop: Fires when a subagent finishes
3. Filtering by Tool Type
Use matcher patterns to filter which tools trigger hooks:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "/path/to/MadameClaude/server/bridge.js"
}
]
}
]
}
}
Common matcher patterns:
"Bash"- Only Bash commands"Write"- Only Write operations"Edit|MultiEdit"- Edit operations (regex)""- All tools (empty string matches everything)
4. Hook Input Format
When Claude Code executes a hook, it pipes JSON data to stdin:
{
"event": "PreToolUse",
"tool": "Bash",
"parameters": {
"command": "ls -la",
"description": "List files"
},
"timestamp": "2025-01-03T10:00:00Z"
}
5. Testing the Integration
Start the server:
cd server && npm startIn another terminal, test the bridge directly:
echo '{"test": "message"}' | node server/bridge.jsConfigure Claude Code with the hook and run any command
6. Monitoring Output
The server will log all received messages to the console. Future UI development will display these in a web interface.
Important Notes
- Absolute Paths: Always use absolute paths in hooks configuration
- Permissions: Ensure the hook script has execute permissions
- Error Handling: stdio2http always exits with code 0 to prevent blocking Claude Code
- Performance: Hooks run synchronously, so keep processing minimal
Example Use Cases
Development Monitoring
Track all file changes during a coding session:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit|MultiEdit",
"hooks": [
{
"type": "command",
"command": "/path/to/MadameClaude/server/bridge.js"
}
]
}
]
}
}
Command Auditin
Related Skills
Follow
Stream live bridge events from a running Atomic session (what it's doing right now)
Haptic Bridge
Local daemon that turns Claude Code / Codex lifecycle events (permission prompt, waiting for input, turn done)
Codex Agent SDK Go
Go SDK for the OpenAI Codex CLI app-server transport with JSON-RPC 2.0, typed events, approvals, MCP config, a
Claude Code SDK TS
Configure models, enable tools, stream events, then fetch text, JSON, run details or token stats in one call v
Codex Headless
Programmatically drive the real OpenAI Codex CLI in a PTY — structured events, live rollout-stream token strea
Codex Telegram Bridge
Persistent Codex App Server bridge for Telegram with native drafts and mid-turn steering
Related Agents
Codex Bridge
把指定工作外包給 gpt-5.5(codex)並忠實回傳其輸出。當需要 gpt-5.5 的批量實作或獨立第二審查視角時使用。這是 plugin 內第三種 codex 路徑:一次性 codex exec CLI 呼叫、輸出
Socket Realtime
Wires up the real-time layer of the cart app — a Socket.io server attached to Nuxt's Nitro server that turns c
Guidewire API Archaeologist
Reviews Guidewire Cloud API mapping correctness, LOB/typelist/custom-entity assumptions, App Events / Integrat