/terminator:installfrom terminator
Installs terminator kill hooks that terminate Claude Code sessions when a configured phrase appears in assistant output. Supports single-kill (terminate Claude) and double-kill (also close terminal) at local or global scope.
Ships in terminator. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Install one or both kill hooks at local (this project) or global (all projects) scope. Which behaviour you get is determined by which script is installed, not by a flag:
single-kill.sh — phrase fires → terminate Claude. Terminal stays open.double-kill.sh — phrase fires → terminate Claude and the terminal shell that launched it.Matching is contains (the message need only contain the phrase; robust to model preambles), case-sensitivity configurable. The only hard safety rule in the kill path is: never signal pid ≤ 2.
Ask the user (or read from $ARGUMENTS): local or global.
.claude/. Only fires in this project.~/.claude/. Fires in every Claude Code session on this machine.Set paths accordingly:
| Local | Global | |
|---|---|---|
| Hooks dir | .claude/hooks/ | ~/.claude/hooks/ |
| Config file | .claude/terminator.json | ~/.claude/terminator.json |
| Settings file | .claude/settings.local.json | ~/.claude/settings.json |
| Script arg | LOCAL | GLOBAL |
Ask the user (or read from $ARGUMENTS): single, double, or both.
I'll be back, but not this session).AskUserQuestion).Terminator uses a contains-match against the final assistant message. Any phrase that appears in normal assistant output will cause sessions to terminate apparently at random.
Apply this check before writing config:
⚠️ WARNING — short or common phrase:
If the phrase is a short clause or sentence that could plausibly appear in a typical assistant
response (e.g. all done, I'm finished, goodbye), warn the user:
⚠️ Warning: This phrase is short and may appear in ordinary responses, causing your session to terminate unexpectedly. A longer, more distinctive phrase is strongly recommended. Do you want to use it anyway?
Only proceed if the user confirms.
🚨 STRONG WARNING — single common English word:
If the phrase is a single word or a very common short term (e.g. done, stop, finish,
complete, exit, quit, kill, terminate, goodbye), issue a strong warning:
🚨 Strong Warning: Single common words will appear in normal assistant output and will cause your session to terminate at seemingly random moments. This is almost certainly not what you want. Are you absolutely sure you want to use this as your kill phrase?
Only proceed if the user explicitly confirms they are absolutely sure.
If the phrase passes without concern, or after the user confirms, proceed to install.
Print this summary, then go straight to Step 5. Do not ask for confirmation.
About to install at <LOCAL|GLOBAL> scope:
single-kill.sh phrase="<single phrase>" -> ends Claude
double-kill.sh phrase="<double phrase>" -> ends Claude + terminal
case sensitive : <true|false>
hooks dir : <HOOKS_DIR>
config : <CONFIG_FILE>
settings : <SETTINGS_FILE>
mkdir -p <HOOKS_DIR>
# copy ${CLAUDE_PLUGIN_ROOT}/templates/single-kill.sh -> <HOOKS_DIR>/single-kill.sh (if single/both)
# copy ${CLAUDE_PLUGIN_ROOT}/templates/double-kill.sh -> <HOOKS_DIR>/double-kill.sh (if double/both)
chmod +x <HOOKS_DIR>/*-kill.sh
jq -n --arg s "<single phrase>" --arg d "<double phrase>" --argjson cs <true|false> \
'{single_killphrase:$s, double_killphrase:$d, case_sensitive:$cs}' > <CONFIG_FILE>
(Omit the key for a script you are not installing; each script only reads its own key.)
The hook command must pass LOCAL or GLOBAL as $1; the scripts exit 1 if the arg is missing.
For LOCAL scope:
[ -f .claude/settings.local.json ] || echo '{}' > .claude/settings.local.json
for s in single-kill.sh double-kill.sh; do # restrict to the ones you installed
cmd="\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/$s LOCAL"
tmp="$(mktemp)"
jq --arg cmd "$cmd" --arg s "$s" '
.hooks.Stop = ((.hooks.Stop // [])
| if any(.hooks[]?.command? // "" | contains($s)) then .
else . + [{matcher:"", hooks:[{type:"command", command:$cmd, timeout:10000}]}]
end)
' .claude/settings.local.json > "$tmp" && mv "$tmp" .claude/settings.local.json
done
For GLOBAL scope:
[ -f ~/.claude/settings.json ] || echo '{}' > ~/.claude/settings.json
for s in single-kill.sh double-kill.sh; do # restrict to the ones you installed
cmd="$HOME/.claude/hooks/$s GLOBAL"
tmp="$(mktemp)"
jq --arg cmd "$cmd" --arg s "$s" '
.hooks.Stop = ((.hooks.Stop // [])
| if any(.hooks[]?.command? // "" | contains($s)) then .
else . + [{matcher:"", hooks:[{type:"command", command:$cmd, timeout:10000}]}]
end)
' ~/.claude/settings.json > "$tmp" && mv "$tmp" ~/.claude/settings.json
done
ls -la <HOOKS_DIR>/*-kill.sh
cat <CONFIG_FILE>
jq '.hooks.Stop' <SETTINGS_FILE>
## Terminator installed (<LOCAL|GLOBAL> scope)
single-kill.sh : phrase "<s>" (Claude only) [if installed]
double-kill.sh : phrase "<d>" (Claude + terminal) [if installed]
case sensitive : <true|false>
config : <CONFIG_FILE>
Other Stop hooks: preserved
Takes effect after a session restart (/exit and start a new Claude session).
Change phrases: /terminator:update Uninstall: /terminator:remove
What SKILL.md sets; muted values are Claude Code's defaults
6 skills in this plugin
/infoterminator:infoShow 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"./removeterminator:removeRemove 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"./terminatorRouter 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"./updateterminator:updateUpdate 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"./whendoneterminator:whendoneArm 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".npx claudepluginhub florianbuetow/claude-code --plugin terminatorOther plugins' skills for the same job