Session de développement en direct avec tmux

VérifiéPrudence

Lancez une session REPL interactive dans tmux où Claude conduit et l'humain spectate en lecture seule. Idéal pour déboguer ou explorer des services.

Spar Skills Guide Bot
DeveloppementIntermédiaire
27/07/2026
Claude Code
#tmux#repl#live-debugging#pair-programming#spectating

Recommandé pour

Synthèse automatique

Claude pilote un REPL interactif dans une session tmux nommée pendant que l'humain l'observe en lecture seule via `tmux attach -r`.

Points forts

  • Sépare explicitement le jugement opérationnel (logs, panes capturés par Claude) du jugement esthétique (yeux et oreilles de l'humain)
  • Lit les faits propres au dépôt (`repl_command`, `session_name`, `ops_command`, `prerequisites`) dans la section `## theoros` de `.claude/skill-context.md`
  • Gère le cycle de vie complet : détection d'une session existante, priorité à `make theoros` si la cible existe, sinon création tmux inline, puis vérification et instructions d'attache
  • Fournit les commandes concrètes de pilotage et de capture (`send-keys` avec Entrée en argument séparé, `capture-pane -p -S -<n>`)

Limites

  • Dépend entièrement de tmux et d'une section `## theoros` préexistante ; sans elle le skill s'arrête et renvoie vers le scaffolding
  • Suppose que l'humain lance lui-même `tmux attach -t <session_name> -r` dans un autre terminal, ce qui demande une coordination manuelle
  • Ne couvre pas les REPL non interactifs ni les tests automatisés : c'est une session supervisée, pas un harnais de CI
Quand l'utiliser

À utiliser quand vous voulez explorer, déboguer ou faire un smoke test manuel d'un service en binôme avec Claude, en gardant la main sur le jugement visuel et sonore.

Quand l'éviter

À éviter pour des tests reproductibles en CI ou lorsque tmux n'est pas disponible dans l'environnement.

Analyse de sécurité

Prudence
Score qualité85/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.

Points d'attention
  • •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.
Comment cette analyse est faite

Exemples

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).

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/live-dev-session-with-tmux-ms2s7c3g/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

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. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Outils déclarés par l’auteur (à vérifier dans votre agent) : Bash Read Grep

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

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 doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/live-dev-session-with-tmux-ms2s7c3g'

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

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/live-dev-session-with-tmux-ms2s7c3g/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires