Skip to content

florianbuetow/terminator

v0.2.5MIT

Run this workflow from Codex. Stop hooks that terminate a Claude Code session when the agent's final message contains a kill phrase. Two scripts: single-kill (ends Claude) and double-kill (ends Claude plus the terminal shell that launched it), each bound to its own phrase. Installs at local (project) or global (user) scope; scripts require LOCAL or GLOBAL arg and exit 1 if missing. Contains-match (robust to model preambles), case-sensitivity configurable, and a kill path that walks the process tree to the owning claude (and, for double-kill, the top-most shell ancestor) and never signals pid <= 2. Install, remove, update, info, and whendone skills via a router; composes safely with existing Stop hooks.

info

Show the configured kill phrases and case sensitivity for both local (project) and global (user) terminator installations. Use when the user asks "what is my kill phrase", "show terminator config", "terminator info", or "what phrase is configured".

install

Install the terminator kill hooks at project (local) or user (global) scope. Installs single-kill.sh and/or double-kill.sh as Stop hooks, each bound to a phrase, merging into the appropriate settings file without clobbering existing hooks. Use when the user asks to "install terminator", "set up the kill hooks", "add single kill", "add double kill", or "enable session termination".

remove

Remove the terminator kill hooks from local or global scope. Strips single-kill.sh and double-kill.sh Stop hook entries from the appropriate settings file (preserving other hooks), and deletes the hook scripts and config. Use when the user asks to "remove terminator", "uninstall the kill hooks", or "disable session termination".

terminator

Router for the terminator plugin β€” Stop hooks that end a Claude Code session (and optionally its terminal) when the agent's final message contains a kill phrase. Routes to install, remove, update, or whendone. Use when the user says "terminator", "install the kill hook", "set up a kill phrase", "single kill", "double kill", "remove the terminator hook", "change the kill phrase", or "terminate when done".

update

Update the terminator kill phrases or case sensitivity at local or global scope. Prints the current phrase before asking for a new one. Rewrites only the changed fields; hooks read config live so changes take effect immediately. Use when the user asks to "update the kill phrase", "change the single/double kill phrase", or "toggle case sensitivity".

whendone

Arm the current Claude Code session to self-terminate by uttering a kill phrase once all work is finished and no questions remain. Use when the user says "terminate when done", "whendone", "end the session when finished", or "self-terminate when complete".