New to Claude Skills? Learn how to install them →

google-gemini on GitHub

TUI Tester

OfficialFree

Automate testing for Gemini CLI behavior and visuals.

Get this skill

Free · Opens the source repo

What TUI Tester does

The TUI Tester skill is designed for developers working with the Gemini CLI, providing a structured approach to testing both behavioral changes and visual output through terminal automation. It allows users to verify that code modifications lead to the expected terminal interactions, ensuring that the text-based user interface (TUI) renders correctly across various terminal sizes and states. This skill is particularly useful for teams involved in continuous integration and deployment, where maintaining the integrity of interactive workflows is crucial.

This skill emphasizes a strict protocol for testing, starting with the activation of the agent-tui skill, which is essential for enabling terminal automation. Users are guided through the setup process, ensuring that the environment is correctly configured before testing begins. The workflow includes clear instructions on session management, command execution, and verification of outputs, making it easier for developers to follow a consistent testing methodology.

The TUI Tester skill also incorporates error recovery procedures to handle common issues that may arise during testing. By providing a systematic approach to regression testing, it helps prevent the introduction of bugs into the codebase, allowing developers to focus on delivering high-quality software without the fear of breaking existing functionality. This skill is ideal for developers who require a reliable way to validate their changes in the Gemini CLI environment.

When to use it

Use this skill when you need to automate the testing of terminal interactions and visual output in the Gemini CLI.

When not to use it

This skill may not be suitable for testing non-terminal based applications or for users unfamiliar with terminal commands.

What you can build with it

Automating Regression Tests

Use TUI Tester to automate regression tests for the Gemini CLI, ensuring that new changes do not break existing features.

Validating Visual Output

Leverage the skill to validate that the TUI renders correctly across different terminal sizes, enhancing user experience.

Behavior Verification During Development

Integrate TUI Tester into your development workflow to verify that code changes produce the expected terminal interactions.

How to install TUI Tester

View source

1. Install with the skills CLI

npx skills add google-gemini/gemini-cli/tui-tester --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by google-gemini

TUI Tester Skill

This skill provides the operational manual for verifying Gemini CLI behavioral changes and visual output using terminal automation.

Core Responsibilities

  • Verify Behavior: Confirm that code changes result in the expected terminal interactions.
  • Visual Validation: Ensure the TUI renders correctly across different terminal sizes and states.
  • Regression Testing: Use automation to prevent breaking existing interactive workflows.

Critical Protocol

When performing TUI testing, you must adhere to these strict rules:

1. Initialization

YOUR ABSOLUTE FIRST ACTION MUST BE: Activate the agent-tui skill. This provides the underlying tools needed for terminal automation.

2. Environment Setup (macOS / Parallel Safe)

Ensure the global daemon is running and the live preview is open:

if ! agent-tui sessions >/dev/null 2>&1; then
  tmux kill-session -t agent-tui 2>/dev/null || true
  agent-tui daemon stop 2>/dev/null || true
  rm -f /tmp/agent-tui*
  tmux new-session -d -s agent-tui 'agent-tui daemon start --foreground > /tmp/agent-tui-daemon.log 2>&1'
  sleep 1
fi
agent-tui live start --open

3. Session Management

  • Session IDs: Always use the session_id returned by agent-tui run for subsequent interactions.
  • Atomic Execution: Execute exactly one command per turn. Do not pipeline actions.
  • The Loop: Action -> Wait -> Screenshot -> Verify -> Next Action.

4. Gemini CLI Specifics

  • Build First: Always run npm run build or npm run build:all before testing local changes.
  • Bypass Trust: Set GEMINI_CLI_TRUST_WORKSPACE=true to avoid focus-stealing modals.
  • Isolate Config: Use GEMINI_CLI_HOME to prevent interference with your personal settings.

Workflow Example

# Start the CLI
env GEMINI_CLI_TRUST_WORKSPACE=true agent-tui run node packages/cli/dist/index.js

# Wait for the prompt
agent-tui wait "│" --assert

# Send a command
agent-tui type "/help"
agent-tui press Enter

# Verify output
agent-tui wait "Available Commands" --assert

Error Recovery

If a wait times out, take a fresh screenshot to diagnose the state. If you see os error 61, restart the daemon using the tmux method.

Frequently asked questions about TUI Tester

Similar skills