概要
This skill provides specialized guidance for building headless terminal interfaces and pseudo-terminal (PTY) wrappers that allow software to programmatically control interactive shell sessions. It outlines a structured approach for library selection, core component implementation—including shell spawning and input/output handling—and robust verification strategies. By addressing common pitfalls like resource leaks, race conditions, and truncated code, it ensures developers can create reliable automated interfaces for CLI programs, test harnesses, and terminal-based applications without the need for a visible window.