Live Dev Session with tmux

VerifiedCaution

Run an interactive REPL session in tmux where Claude drives and the human spectates read-only. Perfect for debugging or exploring services.

Sby Skills Guide Bot
DevelopmentIntermediate
7/27/2026
Claude Code
#tmux#repl#live-debugging#pair-programming#spectating

Recommended for

Automated summary

Claude drives an interactive REPL inside a named tmux session while the human spectates read-only via `tmux attach -r`.

Strengths

  • Cleanly separates operational judgment (logs and pane captures read by Claude) from aesthetic judgment (the human's eyes and ears)
  • Reads per-repo facts (`repl_command`, `session_name`, `ops_command`, `prerequisites`) from the `## theoros` section of `.claude/skill-context.md`
  • Covers the full lifecycle: existing-session detection, preference for `make theoros` when that Makefile target exists, otherwise inline tmux creation, liveness check, and attach instructions
  • Gives exact driving and capture commands (`send-keys` with Enter as a separate argument, `capture-pane -p -S -<n>`)

Limitations

  • Depends entirely on tmux and a pre-existing `## theoros` section ; without it the skill aborts and points to the scaffolding instructions
  • Expects the human to run `tmux attach -t <session_name> -r` themselves in another terminal, so it requires manual coordination
  • Does not target non-interactive REPLs or automated tests: it is a supervised session, not a CI harness
When to use it

Use it when you want to play through, debug, or live-smoke a service together with Claude while keeping human judgment over how it feels and sounds.

When not to use it

Avoid it for reproducible CI testing or when tmux is unavailable in the environment.

Security analysis

Caution
Quality score85/100

The skill drives tmux and shells out to make/docker/kubectl/tail for legitimate interactive-debugging purposes. No curl|sh, no exfiltration of secrets/tokens, no obfuscated payloads, no safety-disabling. The main risk is that it executes commands (repl_command, make targets, log-following) sourced from repo config, which is why it lands at caution rather than safe — a malicious or compromised skill-context file or Makefile could run arbitrary commands under the agent's Bash permissions.

Findings
  • •Executes `repl_command` read from `.claude/skill-context.md` via `tmux new-session` — arbitrary shell command execution sourced from repo-controlled config (trust depends on the context file).
  • •Shells out to a `make theoros` / `make theoros-down` target, executing whatever the Makefile defines.
  • •Runs `docker compose logs`, `kubectl logs`, and `tail -F` against live services — reads operational data but no external exfiltration.
  • •`tmux kill-session -t <session_name>` is destructive but scoped to the named session, not system-wide.
  • •Skill issues `cat .claude/skill-context.md` as a pre-execution injection; read-only but part of the config-loading trust boundary.
How this analysis is made

Examples

Live smoke run
Let's do a live smoke of the ingestion service — start a theoros session, drive the REPL with a few sample requests, and tell me the attach command so I can watch.
Observed debugging
I want to spectate while you drive the CLI. Spin up the theoros session and try to reproduce the timeout I hit earlier, capturing the log pane after each attempt.
Explore with split logs
Start an observed dev run with the ops command in the bottom pane, then walk through three REPL commands and summarize what fired in the logs versus what I should judge by eye.

name: theoros description: Run an observed live dev session — Claude drives an interactive REPL in a named tmux session, the human spectates read-only via tmux attach -r. Use when the user wants to play through, debug, or explore a service's REPL together. Trigger phrases include "let's do a live smoke", "run a theoros session", "I want to spectate while you drive the CLI", "start an observed dev run". Reads per-repo facts from the ## theoros section of .claude/skill-context.md. disable-model-invocation: false allowed-tools: Bash Read Grep

Theoros

θεωρός — the "state-appointed spectator who watches a divine spectacle on behalf of the polis and reports back." Etymological ancestor of theater and theory. In this skill, you (Claude) are the driver; the human is the theoros.

The pattern: a long-running tmux session where you exercise the repo's interactive REPL via tmux send-keys, and the human attaches read-only via tmux attach -r to spectate. The human's eyes/ears judge aesthetic concerns (does it feel right, does it sound right). Your queries against logs and panes judge operational concerns (did the request fire, did the log line emit). Never confuse the two.

Repo context

cat .claude/skill-context.md 2>/dev/null || echo "(no .claude/skill-context.md found — this skill needs one; ask the user to add a \`## theoros\` section with a fenced YAML block containing at minimum \`repl_command\` and \`session_name\`. See the scaffolding section below.)"

If the injected content above does not contain a ## theoros section, abort and direct the user to the Scaffolding theoros into a new repo section below.

Required YAML fields

From the fenced ```yaml block inside ## theoros:

  • repl_command (required) — the shell command that launches the interactive REPL
  • session_name (required) — the tmux session name, conventionally <repo-slug>-theoros
  • ops_command (optional) — bottom-pane command for the split layout (e.g., docker compose logs -f --tail 0 svc1 svc2 svc3)
  • prerequisites (optional) — list of {command, message} pairs to run before up; first failure aborts with the matching message

A markdown table outside the YAML block can specialise the aesthetic vs operational split for the repo.

Lifecycle

When the user asks you to start a theoros session:

  1. Check for an existing session:

    tmux has-session -t <session_name> 2>/dev/null
    

    If a session already exists, tell the user how to attach (tmux attach -t <session_name> -r) or tear it down. Do not clobber it.

  2. Detect tier 2:

    grep -q '^theoros:' Makefile 2>/dev/null
    
    • Exit 0 → tier 2: shell out to make theoros (prefer this).
    • Exit non-zero → tier 1: run tmux commands inline (steps 3–4 below).
  3. (Tier 1 only) Create the session inline:

    tmux new-session -d -s <session_name> "<repl_command>"
    

    If ops_command is set, also:

    tmux split-window -t <session_name>:0 -v -l 40%
    tmux send-keys -t <session_name>:0.1 "<ops_command>" Enter
    
  4. Verify the session is alive:

    tmux has-session -t <session_name>
    
  5. Print attach instructions for the user:

    tmux attach -t <session_name> -r
    
  6. Begin driving per the discipline rules below.

When the session is done: make theoros-down (tier 2) or tmux kill-session -t <session_name> (tier 1).

Driving the REPL

Send keys to the driver pane (always pane index 0.0):

tmux send-keys -t <session_name>:0.0 '<text>' Enter

Enter is a separate argument, never embedded inside the quoted string.

Read driver pane output:

tmux capture-pane -t <session_name>:0.0 -p -S -<n>

-p prints to stdout; -S -<n> reads the last n lines of scrollback (default scrollback is 2000 lines).

Read ops pane output (split layout only):

tmux capture-pane -t <session_name>:0.1 -p -S -<n>

Or query the underlying source directly — for docker compose logs -f, that means docker compose logs <svc> | grep <pattern>. The direct source query is the source of truth; the pane is informational for the human.

Discipline rules

These are load-bearing. Read them before every theoros session you drive.

  1. Drive via send-keys. Never paste-and-go via the human's terminal. Never ask "type this for me."
  2. Capture pane output yourself. Never ask "what does the screen say?" — tmux capture-pane is your job.
  3. Grep logs yourself. Either via capture-pane against the ops pane, or directly against the source (docker compose logs <svc> | grep ..., kubectl logs ..., tail -F ...). Don't ask the human to paste a log excerpt.
  4. Handoff is only for aesthetic judgment. Defined by the table in skill-context.md when present, by the default split below when absent:
    • Aesthetic (human): does it sound right, feel right, look right, hang together coherently
    • Operational (you): did the request fire, did the log line emit, what was the value of X
  5. If the human pastes a transcript, you forgot rules 1–4. Acknowledge the slip explicitly and resume from where you were, this time driving the captures yourself.

The ops pane is informational for the human's confidence. Your source of truth is your own queries, not what is visible on the screen right now.

Scaffolding theoros into a new repo

Tier 1 quick-start (any repo, ~30 seconds)

Add to .claude/skill-context.md:

## theoros

```yaml
repl_command: <shell command that launches your interactive REPL>
session_name: <repo-slug>-theoros
```

That is the full minimum. The skill runs tmux inline when invoked; you spectate with tmux attach -t <repo-slug>-theoros -r.

Optional additions still at tier 1:

  • ops_command: <bottom-pane command> — enables split layout
  • A markdown prose table beneath the YAML block listing aesthetic vs operational concerns specific to the repo

Tier 2 upgrade (for first-class make theoros ergonomics)

When you outgrow tier 1 and want a Makefile target, prerequisite gating, and a persistent state file, add three files. Use kourai-khryseai as the worked reference:

  • scripts/theoros.sh — copy from the worked reference repo's scripts/theoros.sh; the script is repo-agnostic (it reads everything from .claude/skill-context.md).
  • Makefile targets:
    theoros:                   ## Start observed live dev session
    	@bash scripts/theoros.sh up
    
    theoros-down:              ## Stop observed live dev session
    	@bash scripts/theoros.sh down
    
    theoros-status:            ## Show theoros session state (JSON)
    	@bash scripts/theoros.sh status
    
  • Extended ## theoros YAML:
    repl_command: <command>
    session_name: <name>
    ops_command: <multi-service log tail or other ops command>
    prerequisites:
      - command: <pre-check shell command>
        message: "what to tell the user if it fails"
    

The skill auto-detects tier 2 by grepping for ^theoros: in Makefile and prefers make theoros when found.

Teardown

  • Tier 1: tmux kill-session -t <session_name>
  • Tier 2: make theoros-down

/tmp/<session_name>.state is removed on down. Logs (if tmux pipe-pane was opted into) survive down; tmux scrollback does not (it dies with the session).

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/live-dev-session-with-tmux-ms2s7c3g/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/live-dev-session-with-tmux-ms2s7c3g' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/live-dev-session-with-tmux-ms2s7c3g/download' --output '.skill-downloads/live-dev-session-with-tmux-ms2s7c3g/SKILL.md.part' && mv '.skill-downloads/live-dev-session-with-tmux-ms2s7c3g/SKILL.md.part' '.skill-downloads/live-dev-session-with-tmux-ms2s7c3g/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Bash Read Grep

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/live-dev-session-with-tmux-ms2s7c3g/SKILL.md' && test -s '.skill-downloads/live-dev-session-with-tmux-ms2s7c3g/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/theoros' && cp -R '.skill-downloads/live-dev-session-with-tmux-ms2s7c3g' '.claude/skills/theoros'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/live-dev-session-with-tmux-ms2s7c3g'

openskills read 'live-dev-session-with-tmux-ms2s7c3g'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/live-dev-session-with-tmux-ms2s7c3g/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills