run-in-terminallisted
Install: claude install-skill the-cloud-clockwork/agentihooks
# Run In Terminal — Run Any Command in Any Directory
Run it when the operator asks for it; no typed phrase and no guard gate it.
Opens a new terminal tab/window targeting any directory and runs an
arbitrary command there. On WSL2, opens a Windows Terminal tab via the
`wt.exe → powershell.exe → wsl.exe → bash` chain (same pattern as agentihooks
session_registry.py) to avoid wt.exe semicolon parsing bugs. On macOS, opens
a Terminal.app window via `osascript`.
The command is passed **raw** into `bash -lc`, so anything you can type at a
shell works: a single binary (`claude`), a chained command (`git pull && make`),
pipes, quotes, env assignments. With no command, the tab drops into an
interactive shell. With no directory, it lands in `$HOME`.
## Script Resolution
```bash
SKILL_DIR="$(dirname "$(readlink -f ~/.claude/skills/run-in-terminal/SKILL.md)" 2>/dev/null || echo "$HOME/.claude/skills/run-in-terminal")"
```
---
## Step 1: Parse Arguments
The **command** is the primary input; the directory is optional.
- **command** — the thing to run after `cd`'ing into the directory. Raw shell
string. Default: none → drop into an interactive `bash`.
- **directory** (`--dir`, or "in <path>" / "at <path>") — where to run.
Default: `$HOME`.
- **title** (`--title`) — tab title. Default: basename of the directory.
Natural-language → invocation mapping:
| Operator says | directory | command |
|---|---|---|
| "run terminal" / "open a shell" | `$HOME` | (interactive bash) |
| "run