thaitype/skills · Archived

claude-tui

Send slash commands (like /context, /compact, /cost) to a Claude Code TUI session via tmux and capture the output. Use when the user wants to run TUI-only commands on a session programmatically.

First seen Aug 20, 2026

Installation

$ npx skills add thaitype/skills --skill claude-tui

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from thaitype/skills · top by installs.

npx skills add thaitype/skills

Browse all from thaitype/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 13
Default branch main
Open issues 0
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,607 B
  • docs SUMMARY.md 212 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 2 installs

SKILL.md

Claude TUI

Send slash commands to a Claude Code TUI session via tmux and capture the output. Resumes the target session in a detached tmux pane, sends the command, waits for output to stabilize, captures it, and tears down.

Prerequisites

  • tmux must be installed (brew install tmux on macOS)

Commands

# Send /context to a specific session
python3 .claude/skills/claude-tui/scripts/tui_cmd.py <session-id> /context

# Send /compact to the most recent session
python3 .claude/skills/claude-tui/scripts/tui_cmd.py --latest /compact

# Send /cost to a session
python3 .claude/skills/claude-tui/scripts/tui_cmd.py <session-id> /cost

# Custom timeout (default: 30s)
python3 .claude/skills/claude-tui/scripts/tui_cmd.py --latest --timeout 60 /compact

# Use custom projects directory
python3 .claude/skills/claude-tui/scripts/tui_cmd.py --latest --dir /path/to/projects /context

Output

Session: 82c946c8-1eb8-4c70-9414-813fc0a278e4
Command: /context

Context Usage
...

How it works

  1. Launches claude --resume <session-id> in a detached tmux session
  2. Waits for the TUI to initialize (polls until pane output stabilizes)
  3. Sends the slash command via tmux send-keys
  4. Polls every 0.5s until output stabilizes (two identical captures), max 30s
  5. Captures the final pane content
  6. Kills the tmux session and Claude process