terminal-killer
Intelligent shell command detector and executor for OpenClaw. Automatically identifies terminal commands (system builtins, $PATH executables, history matches, command patterns) and executes directly without LLM overhead. Cross-platform support (macOS/Linux/Windows). Use when user input appears to be a shell command to skip AI processing and run immediately.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/cosperypf/terminal-killerTerminal Killer
🚀 Smart command router that executes shell commands directly, bypassing LLM for instant terminal operations.
Quick Start
Terminal Killer automatically activates when user input matches command patterns. No special syntax needed — just type commands naturally:
ls -la # → Direct exec
git status # → Direct exec
npm install # → Direct exec
"help me code" # → LLM handles normally
How It Works
Detection Pipeline
User Input → Command Detector → Decision
├── Command → exec (direct)
└── Task → LLM (normal)
Environment Loading
Terminal Killer automatically loads your shell environment before executing commands:
- Detects your shell (zsh, bash, etc.)
- Sources init files (
~/.zshrc,~/.bash_profile,~/.bashrc, etc.) - Inherits full PATH - including custom paths like Android SDK, Homebrew, etc.
- Preserves environment variables - all your
export VAR=valuesettings
This ensures commands like adb, kubectl, docker, etc. work exactly as they do in your terminal!
Detection Rules (in order)
- System Builtins - Check against OS-specific builtin commands
- PATH Executables - Scan
$PATHfor matching executables - History Match - Compare against recent shell history
- Command Pattern - Heuristic analysis (operators, paths, etc.)
- Confidence Score - Combine signals for final decision
Detection Details
1. System Builtins
Checks input against known builtin commands for the current OS:
| macOS/Linux | Windows (PowerShell) | Windows (CMD) |
|---|---|---|
cd, pwd, ls | cd, pwd, ls | cd, dir, cls |
echo, cat | echo, cat | echo, type |
mkdir, rm, cp | mkdir, rm, cp | mkdir, del, copy |
grep, find | grep, find | findstr |
git, npm, node | git, npm, node | git, npm, node |
See references/builtins/ for complete lists.
2. PATH Executable Check
Scans $PATH directories to verify if the first word is an executable:
# Uses `which` (Unix) or `Get-Command` (PowerShell)
which <command> # Returns path if exists
3. History Matching
Compares input against recent shell history (~/.zsh_history, ~/.bash_history, PowerShell history):
- Exact match → High confidence
- Similar prefix → Medium confidence
- No match → Continue checking
4. Command Pattern Analysis
Heuristic scoring based on command characteristics:
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-cosperypf-terminal-killer": {
"enabled": true,
"auto_update": true
}
}
}