Skip to content
Productivity
Hook

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.

Install
$ npx -y skills add wakatime/claude-code-wakatime --agent claude-code

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

What fires, and when

SessionEnd

  • Runs run.

PreToolUse

  • Runs run.

PostToolUse

  • Runs 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.

  • Runs run.

PreCompact

  • Runs run.

SubagentStop

  • Runs run.
Read hooks/hooks.json
Ships withclaude-code-wakatime

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.

Get the whole plugin, auto-invoked
Stats
88
Stars
0
Views
16
Forks
Active
Maintenance
TypeScript
Language
BSD-3-Clause
License
25d ago
Last commit
0y ago
Created

Repo: wakatime/claude-code-wakatime