fold: Skill for Claude Code

.claude/skills/stdio-bridge/SKILL.md

stdio-bridge is a skill for Claude Code from fold-run/fold. It costs 68 tokens per session (962 once invoked), scanned A, original, Apache-2.0.

A development guide for fold-stdio, a bridge that exposes a command-line MCP server over streamable HTTP. MCP is a standard for connecting agents to tools, while HTTP lets other services reach the bridge.

In plain words
What is it for?
It is for changing the bridge, its internal message forwarding, Docker image, compose profile, or related documentation.
Why use it?
It allows a server that only communicates through standard input and output to be used by a gateway that expects an HTTP service.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

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

Reuse

Borrowing it

Nothing to install: this file belongs to fold-run/fold. 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/fold-run/fold/main/.claude/skills/stdio-bridge/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/fold-run/fold

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 stdio-bridge

README.md
[![agentmods](https://agentmods.dev/badge/skills/fold-run/fold/stdio-bridge/github.svg)](https://agentmods.dev/skills/fold-run/fold/stdio-bridge)
Your own site
<a href="https://agentmods.dev/skills/fold-run/fold/stdio-bridge"><img src="https://agentmods.dev/badge/skills/fold-run/fold/stdio-bridge/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 stdio-bridge

Your own site · 80×15
<a href="https://agentmods.dev/skills/fold-run/fold/stdio-bridge"><img src="https://agentmods.dev/badge/skills/fold-run/fold/stdio-bridge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 962 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.00068 $0.00962
Opus 5.5 $0.00027 $0.00385
Sonnet 5.5 $0.00014 $0.00192
Haiku 4.5 $0.00007 $0.00096

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

Security

Grade A, and why

stdio-bridge 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/skills/stdio-bridge/SKILL.md · 85 lines

How it starts

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

The stdio shim

fold-stdio runs one stdio MCP server and serves it over streamable HTTP, so the gateway can federate a server that has no network endpoint. It ships as its own binary (cmd/fold-stdio), its own image (deploy/docker/stdio.Dockerfile), and a compose profile.

fold-stdio --port 8091 -- npx -y @modelcontextprotocol/server-filesystem /data

The gateway then treats it as an ordinary HTTP upstream. That is the whole point: a shimmed server should be indistinguishable from a native one.

The invariant: the bridge is protocol-blind

internal/stdiobridge pumps JSON-RPC messages between an HTTP session and a child process verbatim. No method table, no typed parameters, no rewriting. Framing stays in the SDK on both sides — mcp.CommandTransport owns stdio, mcp.StreamableServerTransport owns HTTP — and the bridge owns only session bookkeeping and the pump.

This is what lets methods the SDK has not learned yet, and server-initiated traffic like sampling and elicitation, cross without the bridge understanding either. Any change that teaches the bridge what a message means is a regression, even when it makes something work. If a fix seems to need message inspection, the fix is in the wrong layer.

It is the same rule as the gateway's invisibility rule, one level down.

The security invariant: the command comes from argv

The command is fixed at startup from argv and is never taken from a request, a config document, or discovery. docs/design-stdio.md records why. A shim that could be told what to execute is a remote-code-execution endpoint wearing an MCP costume — and discovery-sourced upstreams make that reachable by anyone who can create a Service.

Nothing in a change should widen this. If a feature seems to want per-request command selection, it wants a second shim process instead.

The surrounding defaults follow the same posture, and each is a deliberate narrow default rather than an oversight:

  • --host binds loopback; 0.0.0.0 is "a deliberate act" in its own flag help.
  • --env-passthrough defaults to none — the child inherits nothing.
  • --bearer-env names an env var whose value callers must present. In compose this is SHIM_TOKEN, and both sides must agree on it: the Makefile writes it to .env once rather than generating per invocation, because a fresh value on every up leaves the running shim rejecting the gateway until both restart.
  • --max-sessions bounds concurrency, and each session is one child process — this is a process-count bound, not just a memory one.
  • --dir sets the child's working directory.
  • --probe starts the server once to check it runs, then exits. Use it in a container healthcheck or to debug "the upstream is down".

Read the full file on GitHub · 85 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 · 85 lines · 68 tokens per session scan A ce972ba1107a

Subscribe to this mod's changes

stdio-bridge is a skill published in the GitHub repository fold-run/fold (1 stars, last pushed 12d ago), licensed Apache-2.0. It adds 68 tokens to every session and 962 once invoked, about $0.0003 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

stdio-bridge compared with skills from other repositories

stdio-bridge next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
stdio-bridgefold-run/foldSkill112d agoApache-2.0A68Claude Code
migrate-goldmark-extension-v1-to-v2yuin/goldmarkSkill5.1k4d agoMITA26Claude Code
use-modern-goJetBrains/go-modern-guidelinesSkill3.9k22d agoApache-2.0A32Claude Code
pi-loop-forensicsdimetron/pi-goSkill2223d agoMITA65Claude Code, Codex
nightly-session-watchdimetron/pi-goSkill2223d agoMITA78Claude Code, Codex
tui-render-debugdimetron/pi-goSkill2223d agoMITA33Claude Code, Codex
memory-minedimetron/pi-goSkill2223d agoMITA35Claude Code