Back to Agents & Commands
Hook

session · end

Cleans up on exit: logs the session and clears temp files and stale logs.

session · end is a Claude Code hook you can drop into a project. It plugs into the Claude Code workflow directly, so it is useful when a task keeps recurring and you want it handled the same way each time.

Everything on this page — the summary, the category and the how-to — is written by VintuxAI; the link below goes to the original project.

TypeHook
/hook add session-end

How to use it

  1. Add the file to `.claude/agents/` (subagent) or `.claude/commands/` in your project.
  2. Restart Claude Code so it registers the new entry.
  3. Invoke it by name, or let the main session delegate to it.
Compiled and written by VintuxAI from public sources.
← Back to Agents & Commands