Claude Code Plugins

Community-maintained marketplace

Feedback
0
0

|

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name terminal
description Interactive terminal session management using tmux. Use when TTY or stdin is required for interactive commands (vim, top, less, ssh, etc.). Provides persistent sessions that maintain state across multiple interactions. Use the Bash tool for simple non-interactive commands; use this skill only when interactivity is needed.

Terminal

Provides interactive terminal sessions for executing commands that require TTY or stdin.

Key Features

  • Send keystrokes to a tmux session and capture output
  • Persistent sessions maintain state (environment variables, working directory)
  • Multiple sessions can be managed independently
  • Special key support (Enter, Escape, Up, Down, C-c, etc.)

Usage

Run scripts/terminal.sh with the following commands:

Execute: Send keys and capture output

scripts/terminal.sh execute [options] [keys...]

Options:

  • --session NAME - Session name (auto-generated if omitted, reuses last session)
  • --read-wait MS - Wait time before capturing output (default: 1000)
  • --key-delay MS - Delay between keystrokes (default: 0)
  • --literal - Send keys literally without parsing special keys
  • --raw-output - Preserve escape sequences (ANSI colors, formatting) in output
  • --width N - Terminal width for new sessions
  • --height N - Terminal height for new sessions

Keys: Pass keys as separate arguments. Special keys are automatically recognized:

  • Control keys: C-c, C-d, C-z, C-u, etc.
  • Function keys: F1-F12
  • Navigation: Up, Down, Left, Right, Home, End, PageUp, PageDown
  • Other: Enter, Escape, Tab, BSpace (backspace), DC (delete)

Close: Terminate a session

scripts/terminal.sh close --session NAME

Cleanup: Terminate all sessions

scripts/terminal.sh cleanup

Examples

Run a command:

scripts/terminal.sh execute 'echo hello world' Enter

Start an interactive program:

scripts/terminal.sh execute 'top' Enter --read-wait 2000

Send keys to exit (press q):

scripts/terminal.sh execute q

Edit a file with vim:

scripts/terminal.sh execute 'vim file.txt' Enter --read-wait 1000

Navigate vim and save:

scripts/terminal.sh execute ':wq' Enter

Cancel a running command:

scripts/terminal.sh execute C-c

Use a named session:

scripts/terminal.sh execute --session dev 'cd /project && npm start' Enter
scripts/terminal.sh execute --session dev  # Check output later
scripts/terminal.sh close --session dev

Capture colored output:

scripts/terminal.sh execute --raw-output 'ls --color=always' Enter
scripts/terminal.sh execute --raw-output 'grep --color=always pattern file.txt' Enter

Best Practices

  • Use empty keys to check current terminal state: scripts/terminal.sh execute
  • End commands with Enter to execute them
  • Use --literal for text containing special key names
  • Use --read-wait with longer values for slow commands
  • Use C-c to interrupt running processes