Skip to content
Development
Hook

Hooks

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

From plugin
everything-claude-code
1.8k59 skills15 agents35 commands6 hooks
Install
> /plugin marketplace add xu-xiang/everything-claude-code-zh
> /plugin install everything-claude-code@everything-claude-code

Ships with everything-claude-code. Installing the plugin gets these hooks.

What fires, and when

PreToolUse

  • MatchesBashnode -e "let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{try{const i=JSON.parse(d);const cmd=i.tool_input?.command||'';if(process.platform!=='win32'&&/(npm run dev\b|pnpm( run)? dev\b|yarn dev\b|bun run dev\b)/.test(cmd)){console.error('[Hook] BLOCKED: Dev server must run in tm
  • MatchesBashnode -e "let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{try{const i=JSON.parse(d);const cmd=i.tool_input?.command||'';if(process.platform!=='win32'&&!process.env.TMUX&&/(npm (install|test)|pnpm (install|test)|yarn (install|test)?|bun (install|test)|cargo build|make\b|docker\b|
  • MatchesBashnode -e "let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{try{const i=JSON.parse(d);const cmd=i.tool_input?.command||'';if(/git push/.test(cmd)){console.error('[Hook] Review changes before push...');console.error('[Hook] Continuing with push (remove this hook to add interactive
  • MatchesWritenode "${CLAUDE_PLUGIN_ROOT}/scripts/hooks/doc-file-warning.js"
  • MatchesEdit|Writenode "${CLAUDE_PLUGIN_ROOT}/scripts/hooks/suggest-compact.js"
  • Matches*${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/hooks/observe.sh

PreCompact

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/hooks/pre-compact.js"

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.

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/hooks/session-start.js"

PostToolUse

  • MatchesBashnode -e "let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{try{const i=JSON.parse(d);const cmd=i.tool_input?.command||'';if(/gh pr create/.test(cmd)){const out=i.tool_output?.output||'';const m=out.match(/https:\/\/github.com\/[^/]+\/[^/]+\/pull\/\d+/);if(m){console.error('[Hook]
  • MatchesBashnode -e "let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{try{const i=JSON.parse(d);const cmd=i.tool_input?.command||'';if(/(npm run build|pnpm build|yarn build)/.test(cmd)){console.error('[Hook] Build completed - async analysis running in background')}}catch{}console.log(d)})"
  • MatchesEditnode "${CLAUDE_PLUGIN_ROOT}/scripts/hooks/post-edit-format.js"
  • MatchesEditnode "${CLAUDE_PLUGIN_ROOT}/scripts/hooks/post-edit-typecheck.js"
  • MatchesEditnode "${CLAUDE_PLUGIN_ROOT}/scripts/hooks/post-edit-console-warn.js"
  • Matches*${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/hooks/observe.sh

Stop

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/hooks/check-console-log.js"

SessionEnd

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/hooks/session-end.js"
  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/hooks/evaluate-session.js"
Read hooks/hooks.json
Ships witheverything-claude-code

🌐 Language / 语言 / 語言 为 AI 智能体(Agent)框架打造的性能优化系统。源自 Anthropic 黑客松获胜作品。 这不仅仅是配置文件。它是一个完整的系统:包含技能(Skills)、本能(Instincts)、内存优化、持续学习、安全扫描以及研究优先的开发模式。这些生产级的智能体(Agents)、钩子(Hooks)、命令(Commands)、规则(Rules)以及 MCP 配置,是在构建真实产品的 10 个多月高强度日常使用中演化而来的。 适用于 Claude Code, Codex,

Get the whole plugin