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
2k59 skills14 agents35 commands6 hooks

Claude Code

> /plugin marketplace add xu-xiang/everything-claude-code-zh
> /plugin install everything-claude-code@everything-claude-code

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
@xu-xiang
Ships witheverything-claude-code

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

2k59 skills14 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
2.0k
Star history of xu-xiang/everything-claude-code-zh on GitHub, a chart by star-history.com

More plugins that ship hooks.

superpowers

superpowers

A development methodology for coding agents that makes the agent brainstorm before building, follow plans, run parallel work and finish branches in a disciplined way. You get fewer skipped steps and more consistent results from your coding assistant.

15 skills1 hook311k
@obra@obra
Install Plugin
ponytail

ponytail

A Claude Code plugin with skills for auditing a whole repo, reviewing a change, listing deferred shortcut comments, and showing measured savings and a quick command reference.

6 skills10 hooks188k
@dietrichgebert@dietrichgebert
Install Plugin
agent-skills

agent-skills

Walks a software change from a written spec through design, testing, code review, CI/CD, and release, applying the matching engineering skill at each stage. Useful for developers using Claude Code on full development workflows.

25 skills+3112k
@addyosmani@addyosmani
Install Plugin
planning-with-files

planning-with-files

Persistent file-based planning for AI coding agents on long-running, multi-step tasks. It keeps task_plan.md, findings.md and progress.md on disk, so work can resume after /clear or context compaction.

6 skills+228k
@othmanadi@othmanadi
Install Plugin
gsd-core

gsd-core

A spec-driven development workflow for Claude Code that guides a project through planning, phases, milestone audits and fixes. Includes skills to generate tests from UAT criteria and to audit completed work.

72 skills+311k
@open-gsd@open-gsd
Install Plugin
superpowers-zh

superpowers-zh

Chinese-language skill pack for Claude Code that adds workflow guidance for brainstorming, TDD, debugging, and code review, plus Chinese conventions for commits, documentation, and domestic Git platforms like Gitee and Coding.net.

21 skills1 hook8.5k
@jnmetacode@jnmetacode
Install Plugin
socraticode

socraticode

Gives Claude Code semantic search, dependency graph and architecture context over a codebase, so an AI assistant can explore and understand a project's code. Includes skills for indexing a project and managing its file watching.

2 skills+33.4k
@giancarloerra@giancarloerra
Install Plugin
cocoindex-code

cocoindex-code

A lightweight code search engine that uses AST-based semantic search with local embeddings and incremental indexing. It helps Claude Code users find code faster and more efficiently.

1 skill1 MCP+13k
@cocoindex-io@cocoindex-io
Install Plugin

Questions about the hooks in everything-claude-code.

Which coding agents can use the hooks in everything-claude-code?
The hooks in everything-claude-code install in Claude Code and Cursor: each runs Claude Code hooks from .claude/settings.json, so copy the hooks there.