libtmux-mcp: Skill for Claude Code

.agents/skills/testing-mcp-with-cli-agents/SKILL.md

testing-mcp-with-cli-agents is a skill for Claude Code, Codex from tmux-python/libtmux-mcp. It costs 181 tokens per session (3,999 once invoked), scanned A, original, MIT.

A testing workflow that drives real command-line coding agents to check an MCP server end to end. An MCP server provides tools that an agent can call.

In plain words
What is it for?
Use it to test MCP behavior with agents such as Claude, Codex, Cursor, Gemini, Grok, agy, or opencode in isolated tmux sessions.
Why use it?
It catches problems that unit tests may miss, such as tool discovery, approval prompts, cancellation, and unsafe test-session setup.

Skill for Claude CodeCodex

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

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is $ git worktree add ../mcp-trunk origin/main.

Reuse

Borrowing it

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

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-mcp-with-cli-agents

README.md
[![agentmods](https://agentmods.dev/badge/skills/tmux-python/libtmux-mcp/testing-mcp-with-cli-agents/github.svg)](https://agentmods.dev/skills/tmux-python/libtmux-mcp/testing-mcp-with-cli-agents)
Your own site
<a href="https://agentmods.dev/skills/tmux-python/libtmux-mcp/testing-mcp-with-cli-agents"><img src="https://agentmods.dev/badge/skills/tmux-python/libtmux-mcp/testing-mcp-with-cli-agents/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-mcp-with-cli-agents

Your own site · 80×15
<a href="https://agentmods.dev/skills/tmux-python/libtmux-mcp/testing-mcp-with-cli-agents"><img src="https://agentmods.dev/badge/skills/tmux-python/libtmux-mcp/testing-mcp-with-cli-agents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 181 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,999 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 5 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Memory Poisoning · line 230
    Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
    Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
  • high Memory Poisoning · line 240
    Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
    Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
  • high Memory Poisoning · line 247
    Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
    Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
  • high Memory Poisoning · line 266
    Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
    Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
  • medium Rogue Agent · line 233
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.00181 $0.03999
Opus 5.5 $0.00072 $0.01600
Sonnet 5.5 $0.00036 $0.00800
Haiku 4.5 $0.00018 $0.00400

Measured 1mo ago against content hash faa9a702a3c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

testing-mcp-with-cli-agents 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 1mo 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.

.agents/skills/testing-mcp-with-cli-agents/SKILL.md · 287 lines

How it starts

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

Testing an MCP server through real CLI agents

Unit tests prove the server's internals; they don't prove a real agent can discover a tool, get past its approval gate, call it, and survive cancelling it mid-flight. This skill exercises that whole path by pointing installed CLI agents at a checkout and driving them — with the tmux tool surface (libtmux-mcp) as the running example, though the shape generalizes to any MCP server.

The core idea: three tmux servers, never one

The single biggest mistake is running everything on one tmux socket. Keep three distinct servers, each on its own socket, and the whole thing becomes safe and observable:

Role Socket Who touches it Why separate
Your real session default you, interactively must never be mutated by a test
Harness tmux -L cli-harness the driver: send-keys prompts in, capture-pane render out isolates the CLI TUI you're driving
MCP-target tmux -L mcp-target, exported as LIBTMUX_SOCKET=mcp-target to the server the MCP server, when the agent calls tmux tools independent ground-truth; a destructive tool here can't kill the agent you're driving

The server resolves its socket from LIBTMUX_SOCKET and runs tmux -L <name> (src/libtmux_mcp/_utils.py builds argv with -L server.socket_name, defaulted from that env var). Exporting LIBTMUX_SOCKET=mcp-target into the server's config env fully sandboxes every tmux tool call onto a scratch server. Pre-create it so the agent has something to see:

$ tmux -L mcp-target new-session -d -s scratch

Keeping harness separate from MCP-target is the load-bearing part: if the agent's own TUI pane lived on the socket its MCP server mutates, one kill-server / kill-session tool call would tear down the agent mid-test, and your captures would be polluted by the agent's own UI redraws.

Climb only as high as the question needs — three fidelity layers

Layer 0 — Direct MCP smoke, no CLI at all

Read the full file on GitHub · 287 lines

Files

What ships with it

1 file 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. 1mo ago First seen · 287 lines · 181 tokens per session scan A faa9a702a3c2

Subscribe to this mod's changes

testing-mcp-with-cli-agents is a skill published in the GitHub repository tmux-python/libtmux-mcp (14 stars, last pushed 3d ago), licensed MIT. It adds 181 tokens to every session and 3,999 once invoked, about $0.0007 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-30.

Related

Other skills, from other repositories

visual-verification

Use for any UI/web project — make the verify gate cover more than unit tests by composing a pipeline (types → unit → design-scan → flow-smoke) and running the built-in yoke flow-smoke gate (landmark + zero console errors + screenshot proof to .yoke/proof/ /, video kept on failure). Catches the unwired-page /…

HECer/yoke · 92 tokens

running-livekit-simulations

Runs LiveKit agent simulations and acts on the results. Use when the user says "run my simulations", "regression test my agent before deploying", "run the scenarios", "use lk agent simulate", "did my agent pass", "why did this scenario fail", "run simulations in CI", "test the audio pipeline", "check turn-taking and…

fcakyon/claude-codex-settings · 183 tokens

ui-regression

This skill should be used when the user asks to "verify UI changes", "audit UI quality", "test every screen and action", "run regression QA", "check a deployed UI", or "validate an extension release". Test known web and browser-extension workflows on localhost, staging, or production with action coverage, recovery…

fcakyon/claude-codex-settings · 87 tokens

run-qa

This skill should be used when user asks to "run QA", "verify real playback", "test provider connections", or "check website, extension or Android flows" with tracked journeys.

fcakyon/claude-codex-settings · 41 tokens

atf-testing

Build ServiceNow Automated Test Framework tests and suites — impersonation, form steps, assertions, server-side script steps, test parameters, and execution via snowcreateatftest / snowexecuteatftest.

serac-labs/serac · 45 tokens

visual-regression-baseline

Use when a known-good render and candidate captures must be compared reproducibly: lock viewport, scale, theme, locale, and time; mask declared dynamic regions; produce tolerance-bounded pixel/perceptual deltas; and classify each delta before replacing the reference set.

mtarcure/claude-vibe-squad · 59 tokens