Skip to main content
hook CX Codex

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/settings.json
Open on GitHub

What 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.json

The 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

Similar hooks

All hooks for Agent setup: memory, context, orchestration →
bmad-agent-analyst bmad-code-org bmad-agent-analyst is a Claude Code skill that takes on Mary’s business analyst role for market research, competitor analysis, and requirements. It activates when asked to speak with Mary or call the business analyst. CX Codex +1 17,700installs startup-business-analyst Seth Hobson startup-business-analyst is a Claude Code plugin for startup market, finance, and team analysis. Its skills respond to business questions, while commands generate projections and business cases. CX Codex ★ 42,780repo stars business_requirements_analyst AgenticOrgLab The business_requirements_analyst Claude Code subagent turns unclear stakeholder requests into testable business requirements. It connects goals to acceptance criteria and flags gaps or conflicting statements. CX Codex ★ 776repo stars business-analyst VoltAgent Community The business-analyst subagent examines business processes, gathers requirements, and turns findings into solution recommendations. Use it when work needs a clear business and technical link. CX Codex 3,855installs legacy-analyst official Anthropic legacy-analyst is a Claude Code subagent that maps how older codebases are structured and behave. Ask it to trace dependencies, spot dead code, or explain a system’s logic. CX Codex ★ 47,914repo stars voltagent-biz VoltAgent Community voltagent-biz — a pack of subagents for product, legal and management work: strategy, licensing, backlog, UX research. Installs from the VoltAgent marketplace. ★ 26,718repo stars

From the same set391

The whole set →
devin Session lifecycle hooks for Claude Code: track start and end, gate stops with a review, and hand tasks off to Devin's cloud. CX Codex ★ 1,596repo stars deepseek-minimal-anchor deepseek-minimal-anchor adjusts DeepSeek default reasoning behavior in Claude Code and Codex. It injects working anchors at session start, guides prompts per turn, and logs trajectory reports. CX Codex ★ 1,596repo stars debt-ops The debt-ops hook records deferred tech-debt items in a repository registry, while a review skill ranks them by file churn. Use it to keep postponed cleanup visible during coding. CX Codex ★ 1,596repo stars cc cc — a hook bridge between Claude Code and Codex. It runs reviews, rescue tasks and tracked background jobs from Claude Code inside a Codex session. CX Codex ★ 1,596repo stars archcore archcore is a Claude Code hook that brings Git project context into spec-driven development. It runs at session start, before file edits, and after Archcore document operations. CX Codex ★ 1,596repo stars aiboarding aiboarding is a Claude Code and Codex hook that generates, maintains, compresses, and audits AI-agent onboarding files, keeping AGENTS.md and CLAUDE.md current as the codebase changes. CX Codex ★ 1,596repo stars ai-sdlc ai-sdlc — a hook bundle for a six-stage Markdown SDLC in Claude Code. It checks tool calls to block unauthorized file edits and safeguard sensitive project paths. CX Codex ★ 1,596repo stars agent-guard This hook checks tool activity for exposed secrets in Claude Code and Codex. It suits projects that need local checks plus Git and CI safeguards. CX Codex ★ 1,596repo stars

Project sponsors

Companies that keep this analytics open