relay-shell CLAUDE.md

relay-shell CLAUDE.md is an instructions file for coding agents from rmednitzer/relay-shell. It costs 716 tokens per session, scanned A, original, Apache-2.0.

A project guide for Claude Code when working on relay-shell, a tool for running shell and SSH operations through MCP clients. It defines coding expectations, security boundaries, and the required development checks.

In plain words
What is it for?
Use it when changing relay-shell code, especially policy, redaction, auditing, command brokering, or the main execution flow. It also guides tests, type checks, formatting, and security review.
Why use it?
It gives the coding agent a consistent way to make small, compatible changes while keeping privileged operations, errors, audits, and security controls visible.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/rmednitzer/relay-shell/claude-md
Clone the repo
git clone --depth 1 https://github.com/rmednitzer/relay-shell

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 relay-shell CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/rmednitzer/relay-shell/claude-md.svg)](https://agentmods.dev/instructions/rmednitzer/relay-shell/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/rmednitzer/relay-shell/claude-md"><img src="https://agentmods.dev/badge/instructions/rmednitzer/relay-shell/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 716 This file is loaded in full into every session.
When invoked 716 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.00716 $0.00716
Opus 5 $0.00358 $0.00358
Sonnet 5 $0.00143 $0.00143
Haiku 4.5 $0.00072 $0.00072

Measured 5d ago against content hash 09caa1d53804, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

relay-shell CLAUDE.md 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 5d 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.md · 88 lines

How it starts

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

CLAUDE.md

Claude-specific collaboration guide for relay-shell.

Objective

Deliver robust, auditable, high-capability shell/SSH tooling for MCP clients, with support for real-world privileged administration (including root and sudo) when operators intentionally choose that posture.

Core behavior expectations

  1. Prefer surgical changes over broad rewrites.
  2. Maintain compatibility with existing tools and response formats.
  3. Keep security controls explicit, not implicit.
  4. Preserve operational power; add safeguards and visibility instead of disabling features.

Required development loop

  1. Inspect relevant source + tests. For any change touching policy, redaction, audit, patterns, broker, or the Relay.run body, step 1 is docs/runbook.md §2 (Audit) — those modules are the trust boundary.
  2. Run baseline checks (ruff check ., ruff format --check ., mypy, pytest -q).
  3. Implement minimal safe improvements.
  4. Add/adjust tests for changed behavior.
  5. Re-run checks.
  6. Validate with review/security scanners before finalizing.

Coding guidance

Error handling

  • Do not leak raw tracebacks to end users by default.
  • Prefer structured, bounded error strings through existing error helpers.
  • Keep exceptions contained inside tool execution wrappers.

Auditability

  • Audit every tool call through the central runner.
  • Keep redaction applied to audited arguments.
  • Never write command output bodies to audit logs.
  • Include meaningful metadata when safe (request_id, client_id, exit code, tier).

Security posture

  • Keep policy denylist first and global.
  • Keep open, guarded, readonly mode semantics stable.
  • Treat privileged execution cues (sudo, doas, pkexec) as elevated-risk commands.
  • Do not remove SSH host verification controls; only make behavior more explicit.

Capability posture

The project intentionally supports:

  • local shell execution
  • SSH command/session execution
  • file transfer and forwarding
  • privileged admin flows (including root and sudo) when deployment allows

Read the full file on GitHub · 88 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. 5d ago First seen · 88 lines · 716 tokens per session scan A 09caa1d53804

Subscribe to this mod's changes

relay-shell CLAUDE.md is an instructions file published in the GitHub repository rmednitzer/relay-shell (1 stars, last pushed 19d ago), licensed Apache-2.0. It adds 716 tokens to every session, about $0.0036 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-31.