TFE: Command for Claude Code

.claude/commands/watch-tmux.md

watch-tmux is a command for Claude Code from GGPrompts/TFE. It costs 12 tokens per session (1,427 once invoked), scanned A, original, MIT.

A command for watching a TFE file browser running inside a tmux terminal session. It captures the screen so you can inspect what the user sees, including files, previews, errors, and display problems.

In plain words
What is it for?
Use it to find a tmux session, identify its window and pane, capture recent TFE output, and inspect the current directory, visible files, preview, errors, or rendering issues.
Why use it?
It helps diagnose a terminal interface without guessing what is currently on screen. You can check the right session and pane and review recent output.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Claude Code.

This is GGPrompts/TFE's own configuration. It tells Claude Code how to work on TFE itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything TFE configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/matt/projects/TFE.

Reuse

Borrowing it

Nothing to install: this file belongs to GGPrompts/TFE. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/GGPrompts/TFE/main/.claude/commands/watch-tmux.md
Clone the repo
git clone --depth 1 https://github.com/GGPrompts/TFE

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for watch-tmux

README.md
[![agentmods](https://agentmods.dev/badge/commands/ggprompts/tfe/watch-tmux.svg)](https://agentmods.dev/commands/ggprompts/tfe/watch-tmux)
Your own site
<a href="https://agentmods.dev/commands/ggprompts/tfe/watch-tmux"><img src="https://agentmods.dev/badge/commands/ggprompts/tfe/watch-tmux.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,427 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00012 $0.01427
Opus 5 $0.00006 $0.00714
Sonnet 5 $0.00002 $0.00285
Haiku 4.5 $0.00001 $0.00143

Measured 8d ago against content hash 204f7ab6b72d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

watch-tmux scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/watch-tmux.md · 217 lines

How it starts

The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Watch TFE in Tmux Session

You are monitoring TFE running in a tmux session, giving you visibility into the exact visual output the user sees.

Your Task

Use Desktop Commander's execute_command tool to monitor a tmux session running TFE.

Step 1: Identify the Session

Ask the user:

  • "What's your tmux session name?" (e.g., "tfe-dev", "0", "main")
  • Or detect automatically with: tmux list-sessions

Step 2: Verify and Identify the Pane

# List all sessions
tmux list-sessions

# List windows in the session
tmux list-windows -t SESSION_NAME

# List panes in a window
tmux list-panes -t SESSION_NAME:0

# Get pane details
tmux display-message -t SESSION_NAME -p '#{session_name}:#{window_index}.#{pane_index}'

Step 3: Capture Initial State

# Capture last 100 lines from the pane
tmux capture-pane -t SESSION_NAME -p -S -100

# For specific window/pane:
tmux capture-pane -t SESSION_NAME:WINDOW.PANE -p -S -100

Parse the output for:

  • Current directory TFE is browsing
  • Files visible in the list
  • Preview content (if in preview mode)
  • Any error messages or panics
  • Bubbletea rendering artifacts
  • Current display mode (list/grid/detail/tree)

Step 4: Continuous Monitoring

Every 15-20 seconds (or when user asks), capture fresh output:

# Get latest 50 lines
tmux capture-pane -t SESSION_NAME -p -S -50

# Compare with previous capture
# Alert on changes:
#   - New errors appeared
#   - TFE crashed (pane shows shell prompt)
#   - Directory changed
#   - Different file selected

Step 5: Parse TFE's TUI Output

Look for:

  • Title bar: Shows current path
  • File list: What files are visible
  • Status bar: Current mode, file count
  • Preview pane: What file content is shown
  • Error indicators:
    • Go panic stack traces
    • "panic: runtime error"
    • "fatal error:"
    • Bubbletea crash messages

Example parsing:

Top line: /home/matt/projects/TFE
File list: Contains "main.go", "types.go", etc.
Preview: Showing README.md content
Status: Detail mode, 15 files

Read the full file on GitHub · 217 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 217 lines · 12 tokens per session scan A 204f7ab6b72d

Subscribe to this mod's changes

watch-tmux is a command published in the GitHub repository GGPrompts/TFE (20 stars, last pushed 2mo ago), licensed MIT. It adds 12 tokens to every session and 1,427 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.