Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Control iTerm from an agent: inspect windows/tabs/sessions, focus targets, create tabs/windows/splits/2x2 grids, close scoped targets safely, set iTerm badges, send commands to panes, run health checks, and take screenshots. Use when the user asks to manage iTerm panes, tabs, windows, badges, layouts, or agent sessions inside iTerm.
.claude/skills/antonio-mello-ai-iterm-control/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 8% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -9% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -2% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -25% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -21% | 0% |
Use this skill to control iTerm topology and pane state through the bundled CLI. Prefer the CLI over hand-written AppleScript.
bashskills/iterm-control/scripts/iterm-control identify skills/iterm-control/scripts/iterm-control health skills/iterm-control/scripts/iterm-control list skills/iterm-control/scripts/iterm-control focus --target session:<id> skills/iterm-control/scripts/iterm-control badge --target caller --text "Regi" skills/iterm-control/scripts/iterm-control tab --target caller --command "zsh -lc 'cd \"$PWD\" && exec codex'" skills/iterm-control/scripts/iterm-control window --target caller --command "zsh -lc 'cd \"$PWD\" && exec codex'" skills/iterm-control/scripts/iterm-control split --target caller --direction right --command "zsh -lc 'cd \"$PWD\" && exec codex'" skills/iterm-control/scripts/iterm-control grid --target caller --rows 2 --cols 2 --command "zsh -lc 'cd \"$PWD\" && exec codex'" skills/iterm-control/scripts/iterm-control screenshot --output /tmp/iterm-check.png
When installed locally, the same script is usually available at:
bash~/.agents/skills/iterm-control/scripts/iterm-control ~/.claude/skills/iterm-control/scripts/iterm-control ~/.codex/skills/iterm-control/scripts/iterm-control
Use explicit targets for mutating actions:
caller: the terminal that invoked the agent, matched by TTY when possible.current: iTerm's current session in the current window.session:<id>: exact iTerm session id from list or identify.tty:<path>: exact TTY path, for example tty:/dev/ttys003.If caller cannot be matched because the agent runtime is not attached to a TTY, the CLI falls back to iTerm's current session and reports caller-fallback-current in JSON. Treat that as user-visible focus and verify before destructive actions.
Create a right split and start a command:
bashiterm-control split --target caller --direction right --command "zsh -lc 'cd /path/to/repo && exec codex'"
Create a new tab in the caller/current window and start a command:
bashiterm-control tab --target caller --command "zsh -lc 'cd /path/to/repo && exec codex'"
Create a 2x2 grid while preserving the caller pane:
bashiterm-control grid --target caller --rows 2 --cols 2 --command "zsh -lc 'cd /path/to/repo && exec codex'"
Set a badge without typing into the shell:
bashiterm-control badge --target session:<id> --text "worker-1"
Send a command to a pane:
bashiterm-control send --target tty:/dev/ttys005 --text "git status"
Validate layout visually:
bashiterm-control screenshot --output /tmp/iterm-layout.png
Focus an existing pane or tab:
bashiterm-control focus --target session:<id>
Open a new window for a separate worker:
bashiterm-control window --target caller --command "zsh -lc 'cd /path/to/repo && exec codex'"
Close a known temporary tab or window after validation:
bashiterm-control close --target session:<id> --scope tab --force iterm-control close --target session:<id> --scope window --force
identify or list before mutating layout.health when diagnosing targeting, fallback, or session readiness.session:<id> or tty:<path> after the first lookup.tab; it creates the new tab in the same iTerm window as the target session.window; it creates a new iTerm window with the target profile by default.focus; it selects the target window, tab, and session.session:<id> or tty:<path> target. Pass --force only when the target scope is intentionally current or not at a shell prompt.send for a pane running a full-screen TUI unless the user asked.badge; it writes the OSC 1337 sequence directly to the target TTY.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 6,379 | 5,116 | -20% | 1 | 1 | 0% | 1,185 | 1,483 | +25% | 0 | 0 | — |
case-02 | fail→fail | 7,613 | 6,048 | -21% | 1 | 1 | 0% | 1,722 | 1,504 | -13% | 0 | 0 | — |
case-03 | fail→fail | 4,698 | 6,376 | +36% | 1 | 1 | 0% | 229 | 1,720 | +651% | 0 | 0 | — |
case-04 | fail→pass | 9,357 | 2,066 | -78% | 1 | 1 | 0% | 1,409 | 1,522 | +8% | 0 | 0 | — |
case-05 | fail→pass | 13,608 | 5,698 | -58% | 1 | 1 | 0% | 2,619 | 2,374 | -9% | 0 | 0 | — |
case-06 | fail→pass | 7,587 | 1,915 | -75% | 1 | 1 | 0% | 1,558 | 1,527 | -2% | 0 | 0 | — |
case-07 | fail→pass | 10,950 | 1,959 | -82% | 1 | 1 | 0% | 2,065 | 1,559 | -25% | 0 | 0 | — |
case-08 | fail→pass | 13,253 | 2,536 | -81% | 1 | 1 | 0% | 2,145 | 1,690 | -21% | 0 | 0 | — |
case-09 | fail→pass | 14,275 | 2,175 | -85% | 1 | 1 | 0% | 1,513 | 1,606 | +6% | 0 | 0 | — |
case-10 | fail→pass | 10,694 | 2,087 | -80% | 1 | 1 | 0% | 2,171 | 1,587 | -27% | 0 | 0 | — |
case-11 | fail→pass | 11,838 | 2,950 | -75% | 1 | 1 | 0% | 1,862 | 1,693 | -9% | 0 | 0 | — |
case-12 | pass→pass | 8,037 | 1,783 | -78% | 1 | 1 | 0% | 1,555 | 1,507 | -3% | 0 | 0 | — |
case-13 | fail→pass | 18,808 | 2,133 | -89% | 1 | 1 | 0% | 3,211 | 1,545 | -52% | 0 | 0 | — |
case-14 | pass→pass | 13,972 | 3,725 | -73% | 1 | 1 | 0% | 1,955 | 1,699 | -13% | 0 | 0 | — |
case-15 | pass→pass | 7,789 | 2,347 | -70% | 1 | 1 | 0% | 1,332 | 1,507 | +13% | 0 | 0 | — |
case-16 | fail→pass | 18,120 | 2,310 | -87% | 1 | 1 | 0% | 3,533 | 1,560 | -56% | 0 | 0 | — |
case-17 | fail→pass | 10,128 | 2,466 | -76% | 1 | 1 | 0% | 1,962 | 1,613 | -18% | 0 | 0 | — |
case-18 | fail→fail | 5,182 | 2,485 | -52% | 1 | 1 | 0% | 927 | 1,583 | +71% | 0 | 0 | — |
case-19 | fail→pass | 11,783 | 4,293 | -64% | 1 | 1 | 0% | 2,325 | 2,198 | -5% | 0 | 0 | — |
case-20 | pass→pass | 7,274 | 4,206 | -42% | 1 | 1 | 0% | 1,302 | 2,037 | +56% | 0 | 0 | — |
case-21 | pass→pass | 6,360 | 2,594 | -59% | 1 | 1 | 0% | 1,274 | 1,678 | +32% | 0 | 0 | — |
case-22 | pass→pass | 8,945 | 2,659 | -70% | 1 | 1 | 0% | 1,632 | 1,648 | +1% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +55 percentage points is the difference between those two pass rates over the 19 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.