libtmux-go: Skill for Claude Code

.agents/skills/testing-the-mcp-server/SKILL.md

testing-the-mcp-server is a skill for Claude Code, Codex from libtmux/libtmux-go. It costs 145 tokens per session (1,909 once invoked), scanned A, original, MIT.

A testing guide for the libtmux-go MCP server, which controls tmux terminal sessions through a standard agent connection. It tests the real program over JSON-RPC, the message format used between the agent and server.

In plain words
What is it for?
Running end-to-end server checks, validating advertised tools and inputs, and connecting local builds to agent clients such as Claude, Codex, Cursor, Gemini, grok, agy, and opencode.
Why use it?
Regular Go tests can miss problems that appear when an actual agent discovers, calls, cancels, or configures the server.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions Codex; mentions OpenCode.

This is libtmux/libtmux-go's own configuration. It tells Claude Code and Codex how to work on libtmux-go 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 libtmux-go configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is $ go run ./internal/tools/mcp-swap status.

Reuse

Borrowing it

Nothing to install: this file belongs to libtmux/libtmux-go. 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/libtmux/libtmux-go/master/.agents/skills/testing-the-mcp-server/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/libtmux/libtmux-go

Made for: Claude Code, Codex.

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 testing-the-mcp-server

README.md
[![agentmods](https://agentmods.dev/badge/skills/libtmux/libtmux-go/testing-the-mcp-server/github.svg)](https://agentmods.dev/skills/libtmux/libtmux-go/testing-the-mcp-server)
Your own site
<a href="https://agentmods.dev/skills/libtmux/libtmux-go/testing-the-mcp-server"><img src="https://agentmods.dev/badge/skills/libtmux/libtmux-go/testing-the-mcp-server/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for testing-the-mcp-server

Your own site · 80×15
<a href="https://agentmods.dev/skills/libtmux/libtmux-go/testing-the-mcp-server"><img src="https://agentmods.dev/badge/skills/libtmux/libtmux-go/testing-the-mcp-server.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 145 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,909 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.00145 $0.01909
Opus 5.5 $0.00058 $0.00764
Sonnet 5.5 $0.00029 $0.00382
Haiku 4.5 $0.00015 $0.00191

Measured 11d ago against content hash 4b9a0509160f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

testing-the-mcp-server 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 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (references/compare.py, references/drive.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.agents/skills/testing-the-mcp-server/SKILL.md · 192 lines

How it starts

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

Testing the MCP server

go test ./... proves the handlers. It does not prove that a client can discover a tool, get past an approval gate, call it with arguments a model would actually send, and survive cancelling it mid-flight. Those failures live in the gap between the in-memory transport the Go tests use and a real process speaking JSON-RPC over a pipe.

One socket, chosen once

The Python server takes socket_name on every targeted tool, so a client picks the tmux per call. This one does not: an operator picks the socket at launch and a client reaches only that socket.

$ libtmux-mcp -socket-name mcp-target

LIBTMUX_SOCKET names it when no flag does, matching the Python server, so one configuration serves both. A flag wins over the variable. Ask the server which it took rather than assuming — -doctor names the origin:

$ libtmux-mcp -doctor

Three tmux servers, never one

Role Socket Who touches it
The real session default a person, interactively — never a test
Harness tmux -L cli-harness the driver, sending keys to a CLI's TUI
Target tmux -L mcp-target the server under test, via -socket-name

Keeping the target apart from the harness is the load-bearing part: a destructive tool call on the socket hosting the agent's own TUI tears down the agent mid-test, and its redraws pollute every capture.

Give the whole run its own root so a sibling checkout's suite cannot end a server this one is using:

$ export TMUX_TMPDIR=/tmp/libtmux-go-probe && mkdir -p "$TMUX_TMPDIR" && unset TMUX TMUX_PANE

Climb only as high as the question needs

Layer 0 — the real binary over raw JSON-RPC

Fastest and most deterministic, it covers process boundaries the Go tests do not: framing, protocol negotiation, and the environment a client actually supplies. references/drive.py is that driver: it spawns the binary with an environment it builds rather than inherits, holds stdin open, matches replies by id, declines any question the server asks, and reads a plan of JSON-RPC calls from stdin.

Read the full file on GitHub · 192 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago Changed 4b9a0509160f
  2. 1mo ago Changed · +3 lines 91c6ad968600
  3. 2mo ago First seen · 189 lines · 145 tokens per session scan A 1a06e02ee6e3

Subscribe to this mod's changes

testing-the-mcp-server is a skill published in the GitHub repository libtmux/libtmux-go (0 stars, last pushed today), licensed MIT. It adds 145 tokens to every session and 1,909 once invoked, about $0.0006 per session on Opus 5.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-31.

Related

Other skills, from other repositories

verify-ui-change-in-cloud

Verifies user-facing Warp client changes by spawning a cloud agent with computer use to test Warp. Use only when the user explicitly requested computer-use verification or accepted an offer to run it, and ONLY in non-sandboxed environments and local environments. Triggers a cloud agent that runs the test-warp-ui skill.

warpdotdev/warp · 69 tokens

test-warp-ui

Guides testing Warp UI features and changes using the computer use tool. Use this skill only when computer-use testing was requested (explicit request or accepted offer) and the computeruse tool is available to the agent. Covers launching Warp and verifying UI behavior.

warpdotdev/warp · 55 tokens

tui-test

Control, inspect, test, and record real terminal apps with the tui-test CLI or its Rust, Python, and JavaScript APIs. Use for shells, TUI apps, text and style locators, keyboard or mouse input, terminal state, clipboard waits, screenshots, recordings, snapshots, and live terminal sessions.

microsoft/tui-test · 67 tokens

code-guidelines-go

Go 1.24–1.27 coding guidelines for the dimetron/pi-go AI agent runtime. Use this skill whenever writing, reviewing, or refactoring ANY Go code in pi-go. This covers idiomatic style, error handling, concurrency, project layout, testing (table-driven, fuzz, benchmarks, synctest), new stdlib usage, golangci-lint v2…

dimetron/pi-go · 124 tokens

go-127

What changed in Go 1.27 (released August 2026) and how it changes the way Go is written in pi-go. Use this skill when writing or reviewing Go that could use a 1.27 feature, when bumping the go directive in go.mod, when a build or test behaves differently after a toolchain upgrade, or when code-guidelines-go points…

dimetron/pi-go · 177 tokens

bubbletea-testing

Use this skill whenever writing tests for Bubble Tea (charmbracelet/bubbletea) TUI applications in Go. Triggers include any mention of testing Bubble Tea models, teatest, golden file testing for TUIs, testing tea.Cmd or tea.Msg, snapshot testing terminal output, or writing tests for any Go CLI/TUI that uses the Elm…

dimetron/pi-go · 139 tokens