Borrowing it
Nothing to install: this file belongs to yyzybb537/remote_claude. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/yyzybb537/remote_claude/main/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/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.
<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="Reviewed on agentmods" width="80" 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.5 | $0.05093 | $0.05093 |
| Sonnet 5.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 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.
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.
- 2mo 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 (108 stars, last pushed 5mo ago), licensed MIT. It adds 12,732 tokens to every session, about $0.0509 per session on Opus 5.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.
remote_claude CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| remote_claude CLAUDE.mdyyzybb537/remote_claude | Instructions file | 108 | 5mo ago | MIT | C | 12,732 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode model-prompts.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 2,022 | GitHub Copilot |