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.
npx agentmods add instructions/yyzybb537/remote_claude/claude-mdgit clone --depth 1 https://github.com/yyzybb537/remote_claudeWrote 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.
[](https://agentmods.dev/instructions/yyzybb537/remote_claude/claude-md)<a href="https://agentmods.dev/instructions/yyzybb537/remote_claude/claude-md"><img src="https://agentmods.dev/badge/instructions/yyzybb537/remote_claude/claude-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.12732 | $0.12732 |
| Opus 5 | $0.06366 | $0.06366 |
| Sonnet 5 | $0.02546 | $0.02546 |
| Haiku 4.5 | $0.01273 | $0.01273 |
Grade C, and why
remote_claude CLAUDE.md scanned grade C with 1 finding 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 6d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
"content": "rm -rf /tmp/test", How it starts
The opening of the file, as written. The whole thing — 769 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md/AGENTS.md
This file provides guidance to Claude-Code/Codex when working with code in this repository.
关键语言要求
你必须完全使用 简体中文 进行交互、思考和汇报。
项目概述
Remote Claude 是一个双端共享 Claude/Codex CLI 工具。通过 PTY + Unix Socket 架构,支持多个终端客户端和飞书客户端并发连接同一个 Claude 或 Codex 会话,实现协作式 AI 对话。
架构
Claude/Codex CLI (PTY)
│
server.py ← PTY 代理,管理进程/控制权/历史缓存
│
Unix Socket (/tmp/remote-claude/<name>.sock)
│
┌───┴────┐
│ │
client.py SessionBridge (lark_client/)
(终端) (飞书机器人)
核心模块:
remote_claude.py— CLI 入口,子命令:start / attach / list / kill / larkserver/server.py— PTY 代理服务器,pty.fork()启动 Claude/Codex,asyncio Unix Socket 广播输出server/parsers/claude_parser.py— Claude CLI 终端输出解析(区域切分、Block 分类、执行状态判断)server/parsers/codex_parser.py— Codex CLI 终端输出解析(无分割线、›提示符、背景色区域检测)server/component_parser.py— 向后兼容 shim(实际实现在server/parsers/)server/shared_state.py— 共享内存写入(.mq文件)client/client.py— 终端客户端,raw mode 输入转发utils/protocol.py— 消息协议(JSON +\n分隔,二进制数据 base64 编码)。7 种消息类型:INPUT / OUTPUT / CONTROL / STATUS / HISTORY / ERROR / RESIZEutils/session.py— socket 路径管理、会话生命周期utils/components.py— 控制权状态机,SHARED(默认,所有人可输入)和 EXCLUSIVE(独占)两种模式
飞书客户端 (lark_client/):
main.py— WebSocket 入口,事件分发lark_handler.py— 命令路由,以chat_id为 key 统一管理群聊/私聊的 bridge 和绑定session_bridge.py— 连接 Unix Socket,仅负责输入发送(send_input/send_key)和连接管理shared_memory_poller.py— 流式滚动卡片轮询器:每秒轮询.mq共享内存,通过 hash diff 驱动CardSlice/StreamTracker就地更新或冻结+开新卡card_builder.py—build_stream_card(blocks, status_line, bottom_bar, is_frozen, agent_panel, option_block, session_name, disconnected):四层结构卡片构建(内容区/状态区/交互区/菜单)+ 辅助卡片(session_list/menu/help/dir 等)card_service.py— 飞书卡片 API 服务(create/update/send)rich_text_renderer.py— 持久化 pyte Screen 封装(server 端实时喂入)
Server 端数据流(全量快照架构):
PTY data → self._renderer.feed(data) → HistoryScreen(220×100, history=5000) 持久化实时更新
↓ SU/SD 正确执行(ESC[nS/ESC[nT)
↓ 滚出行 → history.top(最多 5000 行)
↓(flush 触发)
(开启 --debug-screen)_write_screen_debug(原始 screen) → _screen.log
↓
VirtualScreen(history.top + screen.buffer)
↓
ScreenParser.parse(vscreen)
↓
raw components 列表
↓
分拣:visible_blocks / status_line / bottom_bar
↓
┌── 时序窗口平滑 ──┐
│ _FrameObs 记录原始值 │
│ 平滑 status_line │
│ 平滑 block blink │
└────────┬──────────┘
↓
all_blocks = visible_blocks
↓
ClaudeWindow 快照
↓
├→ _messages.log (debug)
└→ .mq 共享内存 (全量覆写)
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.
- 6d ago First seen · 769 lines · 12,732 tokens per session scan C 94d76ea5607b
remote_claude CLAUDE.md is an instructions file published in the GitHub repository yyzybb537/remote_claude (104 stars, last pushed 3mo ago), licensed MIT. It adds 12,732 tokens to every session, about $0.0637 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
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).
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.
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.
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.
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.
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).