What problem does it solve?
Interactive programs like REPLs, sudo, and ssh detect whether they are attached to a real terminal and refuse to work over plain subprocess pipes, and one-shot commands lose state like working directories and environment variables between calls. This Skill teaches how to use persistent PTY sessions so stateful, interactive terminal workflows behave exactly as they would in a real shell.
Core Features & Use Cases
- Prompt-sentinel execution: Send a command and automatically wait for the shell prompt, returning exactly the output produced between submission and prompt.
- Raw I/O for REPLs: Write raw keystrokes to programs like python -i, mysql, psql, or node, then drain buffered output on demand with read_only mode.
- Custom expect patterns: Match program-specific prompts such as Python's ">>>", mysql's "mysql>", sudo's password prompt, or ssh's host-key confirmation.
- Use Case: Open a session, cd into /var/log, run filtered ls commands that depend on the persisted working directory, then close the session so it does not count against the 8-session cap.
Quick Start
Open a PTY session, run python3 while expecting the ">>>" prompt, send a few expressions with raw input, read the buffered output, and then close the session.