Skip to content
Documentation
Hook

Hooks

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

From plugin
trigger-tree
161 skill4 hooks

Claude Code

> /plugin marketplace add Hedde/trigger_tree
> /plugin install trigger-tree@trigger-tree

What fires, and when

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.

  • H="${CLAUDE_PLUGIN_ROOT}/scripts/tt-codex-hook.py"; [ -f "$H" ] || exit 0; if command -v python3 >/dev/null 2>&1; then exec python3 "$H" --client codex; else exec python "$H" --client codex; fi

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.

  • H="${CLAUDE_PLUGIN_ROOT}/scripts/tt-codex-hook.py"; [ -f "$H" ] || exit 0; if command -v python3 >/dev/null 2>&1; then exec python3 "$H" --client codex; else exec python "$H" --client codex; fi

PostToolUse

  • MatchesBash|Read|Glob|Grep|Skill|apply_patch|Edit|Write|mcp__.*H="${CLAUDE_PLUGIN_ROOT}/scripts/tt-codex-hook.py"; [ -f "$H" ] || exit 0; if command -v python3 >/dev/null 2>&1; then exec python3 "$H" --client codex; else exec python "$H" --client codex; fi

Stop

  • H="${CLAUDE_PLUGIN_ROOT}/scripts/tt-codex-hook.py"; [ -f "$H" ] || exit 0; if command -v python3 >/dev/null 2>&1; then exec python3 "$H" --client codex; else exec python "$H" --client codex; fi
Read hooks/hooks.json

In the plugin's words

How trigger-tree describes its own hook set.

Collect local documentation-discovery telemetry without affecting Codex commands.
@hedde
Ships withtrigger-tree

Gate documentation discovery in CI. Measure whether your project instructions change what agents do. Two concrete offers: CI gate — immediate. A deterministic, telemetry-free structural check fails a PR with the affected file and a suggested fix.

Stars on GitHub

Momentum

stars in total
16
Star history of Hedde/trigger_tree on GitHub, a chart by star-history.com

More plugins that ship hooks.

claude-code-mastery

claude-code-mastery

Gives you a guide to setting up Claude Code, covering global instructions, MCP servers, custom commands, hooks and skills, plus tools for generating commit messages and auditing code for security issues. This version is marked obsolete, with a newer starter kit recommended instead.

2 skills+2560
@thedecipherist@thedecipherist
Install Plugin
okf

okf

Gives your coding agent skills to author, maintain, validate and visualize Open Knowledge Format bundles, portable markdown knowledge that both your team and your agents can read. Includes a backfill skill for building a bundle from an existing repository's git history and session transcripts.

4 skills+3452
@scaccogatto@scaccogatto
Install Plugin
claudeforge

claudeforge

Automatically creates, enhances and maintains CLAUDE.md files for Claude Code projects, so you don't have to write and update them by hand.

3 hooks+1434
@alirezarezvani@alirezarezvani
Install Plugin
reviewable-html-workbench

reviewable-html-workbe…

Turns design docs and plan drafts into HTML pages you can comment on inline. Fires when you ask to review a design, preview a plan, or render visual output.

3 skills1 hook303
@u-ichi@u-ichi
Install Plugin
filetree

filetree

A Claude Code plugin that maintains FILETREE.md, a one-line description per file with content hashes for staleness detection. Lets the LLM grasp repo layout in a few hundred tokens before touching code.

1 skill+2164
@nekocode@nekocode
Install Plugin
fluencyloop

fluencyloop

Keeps you fluent in code that AI writes: each feature is designed, built with the reasoning behind each decision explained, and recorded as docs, decisions and review summaries, so the understanding stays with the code.

6 skills1 hook47
@baokhang83@baokhang83
Install Plugin
d2

d2

A Claude Code plugin that reads your codebase and draws its infrastructure and architecture with D2, then keeps those diagrams in step with the code as it changes. Command: /d2:diagram.

1 skill+218
@heathdutton@heathdutton
Install Plugin

Questions about the hooks in trigger-tree.

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