rouse-context: Agent for Claude Code

.claude/agents/tunnel-client.md

tunnel-client is an agent for Claude Code from Monkopedia/rouse-context. It costs 21 tokens per session (625 once invoked), scanned A, original, Apache-2.0.

An Android networking module that wakes a device, connects it securely to a relay server, and manages the lifetime of that connection.

In plain words
What is it for?
Use it for Firebase Cloud Messaging wakeups, TLS relay connections, Android certificate setup, wakelocks, and session timeouts.
Why use it?
It handles device wakeups, encrypted connections, certificates, and clean disconnects so the app layer can use a raw data stream.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is Monkopedia/rouse-context's own configuration. It tells Claude Code how to work on rouse-context 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 rouse-context configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Monkopedia/rouse-context. 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/Monkopedia/rouse-context/main/.claude/agents/tunnel-client.md
Clone the repo
git clone --depth 1 https://github.com/Monkopedia/rouse-context

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 tunnel-client

README.md
[![agentmods](https://agentmods.dev/badge/agents/monkopedia/rouse-context/tunnel-client/github.svg)](https://agentmods.dev/agents/monkopedia/rouse-context/tunnel-client)
Your own site
<a href="https://agentmods.dev/agents/monkopedia/rouse-context/tunnel-client"><img src="https://agentmods.dev/badge/agents/monkopedia/rouse-context/tunnel-client/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 tunnel-client

Your own site · 80×15
<a href="https://agentmods.dev/agents/monkopedia/rouse-context/tunnel-client"><img src="https://agentmods.dev/badge/agents/monkopedia/rouse-context/tunnel-client.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 625 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.00021 $0.00625
Opus 5.5 $0.00008 $0.00250
Sonnet 5.5 $0.00004 $0.00125
Haiku 4.5 $0.00002 $0.00063

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

Security

Grade A, and why

tunnel-client 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 2mo 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/agents/tunnel-client.md · 46 lines

How it starts

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

Tunnel Client Agent

You work on the :tunnel Android module. This module bridges the relay server to the on-device MCP session. It handles networking, wakeup, and session lifecycle but has ZERO knowledge of MCP.

What the Tunnel Module Does

  1. FCM Wakeup — Receives high-priority FCM messages that wake the device. Extracts the session/device ID from the push payload.
  2. TLS Connection — Connects back to the relay server over TLS using the device's cert (stored in Android Keystore). The cert was provisioned during onboarding via ACME.
  3. Session Lifecycle — Acquires a wakelock during active sessions. Provides raw InputStream/OutputStream to the app layer. Tears down cleanly on idle timeout, disconnect, or explicit close.
  4. ACME Cert Provisioning — On first run (onboarding), generates a keypair in Android Keystore, creates a CSR, sends it to the backend, receives a signed cert for the device's subdomain.

Module Boundaries

  • :tunnel MUST NOT depend on :mcp-core or :mcp-health. It knows nothing about MCP.
  • :tunnel exposes raw I/O streams. The :app module wires those streams to McpSession.
  • :tunnel depends on: Firebase Messaging, AndroidX Lifecycle, ACME4J, AndroidX Core.

Key Technical Details

  • Android Keystore — Private key generated with KeyPairGenerator using AndroidKeyStore provider. Key is hardware-backed (HSM) on supported devices. The key NEVER leaves the secure element.
  • TLS — The device acts as a TLS server (it has the cert for its subdomain), but initiates the TCP connection to the relay. The relay splices this connection to the waiting MCP client.
  • FCM — High-priority messages target sub-500ms wakeup on non-Dozing devices. Must handle manufacturer-specific battery optimization (Samsung, Xiaomi).
  • Wakelocks — Acquired when session starts, released on teardown. Use PowerManager.PARTIAL_WAKE_LOCK.

What You Should NOT Touch

  • relay/ — server-side code
  • mcp-core/, mcp-health/ — MCP protocol layer
  • app/ UI code (but you may need to understand how app wires tunnel to MCP)

Read the full file on GitHub · 46 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. 2mo ago First seen · 46 lines · 21 tokens per session scan A 067ca712268a

Subscribe to this mod's changes

tunnel-client is an agent published in the GitHub repository Monkopedia/rouse-context (13 stars, last pushed 3d ago), licensed Apache-2.0. It adds 21 tokens to every session and 625 once invoked, about $0.0001 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

tunnel-client compared with agents from other repositories

tunnel-client next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tunnel-clientMonkopedia/rouse-contextAgent133d agoApache-2.0A21Claude Code
network-implahmed3elshaer/everything-claude-code-mobileAgent664mo agoMITA58Claude Code
kotlin-expertandisab/swe-marketplaceAgent21yesterdayMITA28Claude Code
go-experttravisjneuman/.claudeAgent1072d agoMITA69Claude Code
api-designertravisjneuman/.claudeAgent1072d agoMITA31Claude Code
mobile-architecttravisjneuman/.claudeAgent1072d agoMITA19Claude Code
kotlin-experttravisjneuman/.claudeAgent1072d agoMITA80Claude Code