Skip to content
Development
Hook

Hooks

What vibecosystem runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.

From plugin
vibecosystem
534200 skills138 agents7 hooks
Install
$ npx -y skills add vibeeval/vibecosystem --agent claude-code

Ships with vibecosystem. Installing the plugin gets these hooks.

What fires, and when

PreToolUse

  • node ${CLAUDE_PLUGIN_ROOT}/hooks/dist/pre-tool-use-broadcast.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/agent-observer.mjs
  • MatchesRead|Edit|Write|Bash|Grep|Globnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/credential-deny.mjs
  • MatchesAgentnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/agent-memory-loader.mjs
  • MatchesRead|Edit|Writenode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/path-rules.mjs
  • MatchesReadnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/magic-doc-tracker.mjs
  • MatchesReadnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/tldr-read-enforcer.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/mcp-discovery.mjs
  • MatchesGrepnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/smart-search-router.mjs
  • MatchesGrepnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/epistemic-reminder.mjs
  • MatchesTasknode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/tldr-context-inject.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/arch-context-inject.mjs
  • MatchesEditnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/file-claims.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/edit-context-inject.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/signature-helper.mjs

PreCompact

  • node ${CLAUDE_PLUGIN_ROOT}/hooks/dist/pre-compact-continuity.mjs

SessionStart

Fires once when a session begins, and again after a context compaction. It is where a plugin sets up its environment, or restores state the compaction dropped.

  • node ${CLAUDE_PLUGIN_ROOT}/hooks/dist/session-banner.mjs
  • node ${CLAUDE_PLUGIN_ROOT}/hooks/dist/session-register.mjs
  • Matchesresume|compact|clearnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/session-start-continuity.mjs
  • Matchesstartup|resumenode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/session-start-tldr-cache.mjs
  • node ${CLAUDE_PLUGIN_ROOT}/hooks/dist/session-start-recall.mjs
  • node ${CLAUDE_PLUGIN_ROOT}/hooks/dist/instinct-loader.mjs
  • Matchesstartupnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/dream-consolidator.mjs

UserPromptSubmit

Fires before Claude sees each prompt you send. A plugin can use it to inject context, so the same instruction reaches the model every turn instead of only at session start.

  • node ${CLAUDE_PLUGIN_ROOT}/hooks/dist/intent-classifier.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/skill-activation-prompt.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/smart-memory-recall.mjs

PostToolUse

  • node ${CLAUDE_PLUGIN_ROOT}/hooks/dist/token-tracker.mjs
  • MatchesEdit|Writenode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/typescript-preflight.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/compiler-in-the-loop.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/post-edit-diagnostics.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/impact-refactor.mjs
  • MatchesWritenode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/handoff-index.mjs
  • MatchesEdit|Writenode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/import-validator.mjs
  • MatchesEdit|Writenode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/sast-on-edit.mjs
  • MatchesBashnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/import-error-detector.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/bash-audit-log.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/canavar-error-broadcast.mjs
  • MatchesAgentnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/agent-memory-saver.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/canavar-cross-review.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/canavar-error-broadcast.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/canavar-subagent-tracker.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/subagent-stop-learner.mjs
  • MatchesEdit|Write|Bashnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/passive-learner.mjs

Stop

  • node ${CLAUDE_PLUGIN_ROOT}/hooks/dist/magic-doc-updater.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/compiler-in-the-loop-stop.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/anti-rationalization.mjs
  • node ${CLAUDE_PLUGIN_ROOT}/hooks/dist/instinct-consolidator.mjs
  • node ${CLAUDE_PLUGIN_ROOT}/hooks/dist/canavar-skill-tracker.mjs
  • node ${CLAUDE_PLUGIN_ROOT}/hooks/dist/session-analytics.mjs
  • node ${CLAUDE_PLUGIN_ROOT}/hooks/dist/memory-graph.mjs
  • node ${CLAUDE_PLUGIN_ROOT}/hooks/dist/changelog-on-release.mjs

SessionEnd

  • node ${CLAUDE_PLUGIN_ROOT}/hooks/dist/session-end-cleanup.mjsnode ${CLAUDE_PLUGIN_ROOT}/hooks/dist/session-outcome.mjs
Read hooks/hooks.json

Where it lives

  • hooks/vitest.config.tsGitHub
    Read the script
    import { defineConfig } from 'vitest/config';
    
    export default defineConfig({
      test: {
        include: ['src/__tests__/**/*.test.ts'],
        environment: 'node',
        testTimeout: 10000,
      },
    });
    

Read the script before you install anything that runs on your machine. This is the one part of a plugin that acts without being asked.

Ships withvibecosystem

Your AI software team. Built on Claude Code. vibecosystem turns Claude Code into a full AI software team — 138 specialized agents that plan, build, review, test, and learn from every mistake. No configuration needed — just install and code.

Get the whole plugin