iterm-conditional-applescript-generation

Generate targeted AppleScript for iTerm2 window and tab operations.

Updated Nov 9, 2025
One-click install
npx skills add https://github.com/manifoldlogic/claude-code-plugins --skill iterm-conditional-applescript-generation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterm-conditional-applescript-generation
Source: https://github.com/manifoldlogic/claude-code-plugins/tree/main/plugins/iterm/skills/iterm-conditional-applescript-generation
Command: npx skills add https://github.com/manifoldlogic/claude-code-plugins --skill iterm-conditional-applescript-generation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires it2, and includes scripts (resource) components.

What problem does it solve?

iTerm operations often require filtering windows and tabs for efficiency. This Skill streamlines this process by generating specific AppleScript variants tailored to the filtering needs, optimizing performance.

Core Features & Use Cases

  • Targeted AppleScript Generation: Automatically generates four distinct AppleScript structures based on window and tab filter inputs.
  • Filtered Operation: Supports operations like closing, listing, or modifying iTerm panes based on filtered window or tab selections.
  • Use Case: Close only sessions that match a specific pattern in a targeted window and tab, optimizing the close operation.

Quick Start

Generate AppleScript for closing sessions in tab 2 of window 1 where session names match the pattern "agent" using:

build_close_panes_applescript "agent" 1 2

Frequently Asked Questions about iterm-conditional-applescript-generation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate AppleScript to close specific iTerm2 panes by name?

You can generate targeted AppleScript by passing a pattern and window/tab indices to the build_close_panes_applescript command. This creates optimized code to close only iTerm2 sessions matching the pattern in the specified window and tab.

How do I filter iTerm2 windows and tabs in an AppleScript?

You filter iTerm2 windows and tabs by providing specific filter criteria to generate one of four distinct AppleScript structures. This targets only the specified windows and tabs, optimizing the script iteration performance.

Do I need the it2 dependency to use this iTerm AppleScript generator?

Yes, the it2 dependency is required to run the generated AppleScript for iTerm2. You also need familiarity with the system's scripting environment to execute operations like closing, listing, or modifying panes.

What is the best way to automate repetitive iTerm window management tasks?

The best way to automate repetitive iTerm window management tasks is generating targeted AppleScript variants based on window and tab filter inputs. This streamlines operations by applying specific filter criteria directly to the script structure.

Can I list or modify iTerm2 sessions based on a specific pattern?

Yes, you can list or modify iTerm2 sessions based on a specific pattern. The generator supports filtered operations, allowing you to target specific panes for listing or modifying based on your window and tab selections.

Why does my generated AppleScript iterate over all iTerm windows instead of the targeted one?

If your generated AppleScript iterates over all iTerm windows, the correct filter criteria was not applied. This generator creates four distinct script structures to ensure operations only target the filtered windows and tabs you specify.