@ryan_nookpi/pi-extension-claude-hooks-bridge
Bridge Claude Code hooks (.claude/settings.json) into pi extension lifecycle events.
Package details
Install @ryan_nookpi/pi-extension-claude-hooks-bridge from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@ryan_nookpi/pi-extension-claude-hooks-bridge- Package
@ryan_nookpi/pi-extension-claude-hooks-bridge- Version
0.1.0- Published
- Apr 16, 2026
- Downloads
- 138/mo · 11/wk
- Author
- ryan_nookpi
- License
- MIT
- Types
- extension
- Size
- 23.3 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
claude-hooks-bridge
Bridge Claude Code hooks (.claude/settings.json) into pi extension lifecycle events.
What it does
- Reads
.claude/settings.jsonhooks configuration from the project root - Executes hooks at matching lifecycle events:
- SessionStart →
session_start - UserPromptSubmit →
before_agent_start - PreToolUse →
tool_call(can block / ask for confirmation) - PostToolUse →
tool_result - Stop →
agent_end(can queue follow-up messages)
- SessionStart →
- Supports matcher patterns (regex or pipe-separated tool names)
- Maps pi tool names to Claude Code equivalents (
bash→Bash, etc.) - Handles hook JSON output with
permissionDecision/ exit code 2 for blocking - Provides transcript files for Stop hooks
Requirements
- bash is required — hooks are executed via
bash -lc. Works on macOS and Linux. Not natively supported on Windows.
Install
pi install npm:@ryan_nookpi/pi-extension-claude-hooks-bridge