wsl-mcp: Instructions file for Claude Code

CLAUDE.md

wsl-mcp CLAUDE.md is an instructions file for Claude Code from cacaview/wsl-mcp. It costs 1,842 tokens per session, scanned A, original, MIT.

Project-specific instructions for working on WSL-MCP, a server that lets AI clients manage terminals in Windows Subsystem for Linux (WSL). They describe its goals, structure, and modules.

In plain words
What is it for?
Understanding the WSL and Docker execution backends, persistent terminal sessions, background-process output, file transfer, and the MCP tool layout.
Why use it?
They give an agent the project context it needs before changing code, reducing guesswork about the architecture and release entry points.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

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

Reuse

Borrowing it

Nothing to install: this file belongs to cacaview/wsl-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/cacaview/wsl-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/cacaview/wsl-mcp

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 wsl-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/cacaview/wsl-mcp/claude-md.svg)](https://agentmods.dev/instructions/cacaview/wsl-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/cacaview/wsl-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/cacaview/wsl-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,842 This file is loaded in full into every session.
When invoked 1,842 The same file — it is already loaded in full.
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.01842 $0.01842
Opus 5 $0.00921 $0.00921
Sonnet 5 $0.00368 $0.00368
Haiku 4.5 $0.00184 $0.00184

Measured 7d ago against content hash 22224ddf5600, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

wsl-mcp 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 7d 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 · 121 lines

How it starts

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

WSL-MCP

项目愿景

WSL-MCP 是一个面向 Windows + WSL 场景的 MCP 终端管理服务器,目标是为 AI 客户端提供稳定的终端执行、持久会话、后台进程轮询、日志跟踪与文件传输能力。项目同时保留 Docker 后端扩展能力,用于在没有 WSL 或需要隔离环境时提供替代执行面。

架构总览

运行入口位于 src/index.ts,负责读取环境变量并启动 WslMcpServersrc/server.ts 负责组装五类核心能力:

  • backends/:抽象执行后端,当前实现 WSL 与 Docker。
  • session/:管理持久终端会话、命令执行状态与虚拟工作目录。
  • polling/:提供后台进程轮询与日志增量读取。
  • transfer/:通过会话执行命令实现 Base64 文件传输与目录列举。
  • tools/:声明 MCP 工具 schema,并把工具调用分派到对应模块。
  • utils/:输出清理、错误模型等基础工具。

当前仓库是单包 TypeScript/Node.js 项目,主发布入口由 package.jsonbin.wsl-mcp -> dist/index.js 暴露。

模块结构图(Mermaid)

graph TD
    A["(根) wsl-mcp"] --> B["src"];
    B --> C["backends"];
    B --> D["session"];
    B --> E["polling"];
    B --> F["tools"];
    B --> G["transfer"];
    B --> H["utils"];

    click A "./CLAUDE.md" "查看根级文档"
    click B "./src/CLAUDE.md" "查看 src 聚合文档"
    click C "./src/backends/CLAUDE.md" "查看 backends 模块文档"
    click D "./src/session/CLAUDE.md" "查看 session 模块文档"
    click E "./src/polling/CLAUDE.md" "查看 polling 模块文档"
    click F "./src/tools/CLAUDE.md" "查看 tools 模块文档"
    click G "./src/transfer/CLAUDE.md" "查看 transfer 模块文档"
    click H "./src/utils/CLAUDE.md" "查看 utils 模块文档"

模块索引

模块 语言 一句话职责 入口/关键文件 测试情况 配置情况
src TypeScript 聚合源码目录与服务器装配层 src/index.ts, src/server.ts 未发现自动化测试文件 package.json, tsconfig.json 控制
src/backends TypeScript 抽象并实现 WSL / Docker 执行后端 src/backends/index.ts, src/backends/wsl.ts 未发现自动化测试文件 后端由环境变量和工厂函数选择
src/session TypeScript 管理持久会话、命令执行与输入透传 src/session/manager.ts 未发现自动化测试文件 会话上限与默认超时可配置
src/polling TypeScript 管理后台进程输出轮询与日志跟踪 src/polling/output-poller.ts, src/polling/log-tailer.ts 未发现自动化测试文件 轮询/跟踪超时在代码内置默认值
src/tools TypeScript 定义 17 个 MCP 工具并分派调用 src/tools/definitions.ts, src/tools/handlers.ts 未发现自动化测试文件 依赖 MCP SDK 协议类型
src/transfer TypeScript 通过会话实现 Base64 文件上传、下载与列目录 src/transfer/manager.ts 未发现自动化测试文件 默认最大文件大小 10MB
src/utils TypeScript 提供错误模型与终端输出清理 src/utils/errors.ts, src/utils/output.ts 未发现自动化测试文件 无独立配置文件

Read the full file on GitHub · 121 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. 7d ago First seen · 121 lines · 1,842 tokens per session scan A 22224ddf5600

Subscribe to this mod's changes

wsl-mcp CLAUDE.md is an instructions file published in the GitHub repository cacaview/wsl-mcp (1 stars, last pushed 4mo ago), licensed MIT. It adds 1,842 tokens to every session, about $0.0092 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.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens