# Read Pane

> Use this skill when the user asks to 'read my pane', 'what's in my terminal', 'see my output', 'look at the other pane', 'check my pane', 'read the terminal', or invokes '/read-pane'. Captures the visible content of a tmux pane — defaults to the user's last-active pane.

- Skill: `collinthefarmer/read-pane` (Agent Skill)
- Install (CLI): `npx skillmds@latest add collinthefarmer/read-pane`
- Raw SKILL.md: https://api.skillmd.com/api/skills/collinthefarmer/read-pane/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: collinthefarmer (https://skillmd.com/u/collinthefarmer)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/collinthefarmer/read-pane

---


# Read Pane — Capture Tmux Pane Content

Read the visible text content of a tmux pane so you can see what the user sees — command output, error messages, logs, code in an editor, etc.

## How to Use

### Step 1: Write the capture request

Read `~/.claude/skills/runtime.json` to get the `runtime_dir` value, then write to `<runtime_dir>/claude-panes/requests/pane-capture.json`.

```json
{
  "target": "{last}",
  "lines": 50,
  "clean": true
}
```

### Step 2: Read the result

After writing the request, read the captured content from:
`<runtime_dir>/claude-panes/results/pane-capture.txt`

## Request Fields

| Field | Default | Description |
|-------|---------|-------------|
| `target` | `"{last}"` | Tmux pane target — see Target Specifiers below |
| `name` | (none) | Alternative: a registered pane name (from the pane skill) |
| `lines` | (all visible) | Limit output to this many lines (from the bottom) |
| `clean` | `true` | Strip ANSI escape codes for clean text |

Use **either** `target` or `name`, not both. When the user says "read my pane" without further context, use `{"target": "{last}", "clean": true}`.

## Target Specifiers

| Target | Meaning |
|--------|---------|
| `{last}` | The pane that was active before the current one (most common — this is the user's pane) |
| `{next}` | Next pane by index |
| `{previous}` | Previous pane by index |
| `{top}` | Topmost pane |
| `{bottom}` | Bottommost pane |
| `{left}` | Leftmost pane |
| `{right}` | Rightmost pane |
| `0`, `1`, `2`... | Pane by index within the window |
| `%42` | Raw tmux pane ID |

## Example Workflow

User says: "read my terminal pane"

1. Write the capture request:
```json
{"target": "{last}", "clean": true}
```

2. Read the result from `results/pane-capture.txt`

3. Report the content to the user or use it to inform your work.

## Notes

- The `{last}` target is almost always correct when the user asks you to "read my pane" — it refers to the pane they were focused on before switching to Claude's pane.
- If the user has only one pane (Claude's), the capture will fail. Let them know they need at least two panes.
- The `clean` option strips terminal color codes and formatting, giving you plain text. Always use `clean: true` unless the user specifically wants raw terminal output.
- If the user asks about a specific pane (e.g., "the pane on the right"), use the corresponding target specifier.

