Hooks
What claude-code-wakatime runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.
> /plugin marketplace add wakatime/claude-code-wakatime > /plugin install claude-code-wakatime@wakatime
Ships with claude-code-wakatime. Installing the plugin gets these hooks.
What fires, and when
SessionEnd
${CLAUDE_PLUGIN_ROOT}/scripts/run
PreToolUse
${CLAUDE_PLUGIN_ROOT}/scripts/run
PostToolUse
${CLAUDE_PLUGIN_ROOT}/scripts/run
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.
${CLAUDE_PLUGIN_ROOT}/scripts/run
PreCompact
${CLAUDE_PLUGIN_ROOT}/scripts/run
SubagentStop
${CLAUDE_PLUGIN_ROOT}/scripts/run
Track your AI usage, lines of code generated, time spent prompting AI, etc. using the WakaTime plugin for Claude Code. WakaTime is an open source plugin for metrics, insights, and time tracking automatically generated from your programming activity.
Repo: wakatime/claude-code-wakatime

