babok_analyst — Claude Code hook: what it does, how to install
babok_analyst is a Claude Code hook bundle that manages the BABOK v3 business analysis agent’s session lifecycle and controls MCP tool execution through approval gates.
MIT ★ 1,596 updated 2026-10-29
.claude/settings.jsonWhat babok_analyst does
This hook bundle wires Claude Code session events into the babok_analyst workflow. It executes babok-activate.cjs on startup, resume, compact, clear, or when a subagent starts. When a session finishes, it runs babok-deactivate.cjs.
The bundle intercepts tool calls matching mcp__.*babok.*. It routes pre-tool calls through the Two-Key Journal gate in babok-gate.cjs, while babok-quality-gate.cjs scores deliverables after execution. Running these hook scripts requires node in your system environment.
What it helps with
- initialize the BABOK analyst agent on session start, resume, or compaction
- gate MCP tool calls before execution via the Two-Key Journal check
- score analysis deliverables automatically during PostToolUse
- clean up analyst state upon session completion
Example prompts for the agent
- Create a business requirements document following BABOK v3 standards
- Analyze stakeholder requirements for the checkout service refactoring
- Run a gap analysis on the current inventory management workflow
How to install babok_analyst
Manually: put the files in place
.claude/settings.jsonThe hooks block: event (PreToolUse, PostToolUse, Stop…) → command. Personal ones go to ~/.claude/settings.json
Step by step, with commands for each platform: Claude Code hooks: what they are, where to configure them, how to block a risky command
Questions about babok_analyst
How to install babok_analyst in Claude Code?
Add the hook configuration block directly into your .claude/settings.json file.
What does babok_analyst do?
It manages session startup and teardown for the BABOK analyst agent, gating and scoring its MCP tools at runtime.
What runtimes does babok_analyst require?
All hook scripts run via node. Make sure Node.js is available in your PATH on Linux, macOS, or Windows.
Source text
claude-codex-hooks.json · MIT
Hooks bundle shipped with the babok_analyst plugin for Claude Code.
BABOK v3 business analysis agent with 16 MCP tools, a 9-stage pipeline, and human-in-the-loop approval gates.
Triggers on: PreToolUse, PostToolUse, SessionStart, SessionEnd.
```json
{
"hooks": {
"SessionStart": [
{
"matcher": "startup|resume|clear|compact",
"hooks": [
{
"type": "command",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/babok-activate.cjs\"; exit 0",
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { node \"$env:CLAUDE_PLUGIN_ROOT\\hooks\\babok-activate.cjs\" }",
"timeout": 120,
"statusMessage": "Loading BABOK Analyst..."
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/babok-deactivate.cjs\"; exit 0",
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { node \"$env:CLAUDE_PLUGIN_ROOT\\hooks\\babok-deactivate.cjs\" }",
"timeout": 10
}
]
}
],
"SubagentStart": [
{
"hooks": [
{
"type": "command",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/babok-activate.cjs\"; exit 0",
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { node \"$env:CLAUDE_PLUGIN_ROOT\\hooks\\babok-activate.cjs\" }",
"timeout": 120,
"statusMessage": "Loading BABOK Analyst..."
}
]
}
],
"PreToolUse": [
{
"matcher": "mcp__.*babok.*",
"hooks": [
{
"type": "command",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/babok-gate.cjs\"",
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { node \"$env:CLAUDE_PLUGIN_ROOT\\hooks\\babok-gate.cjs\" }",
"timeout": 30,
"statusMessage": "Two-Key Journal gate..."
}
]
}
],
"PostToolUse": [
{
"matcher": "mcp__.*babok.*",
"hooks": [
{
"type": "command",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/babok-quality-gate.cjs\"",
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { node \"$env:CLAUDE_PLUGIN_ROOT\\hooks\\babok-quality-gate.cjs\" }",
"timeout": 30,
"statusMessage": "Scoring deliverable..."
}
]
}
]
}
}
```
© Grzegorz Skuza · MIT · hashgraph-online/awesome-codex-plugins