botmux: Instructions file for Claude Code

CLAUDE.md

botmux CLAUDE.md is an instructions file for Claude Code from deepcoldy/botmux. It costs 5,742 tokens per session, scanned A, original, MIT.

Development instructions for botmux, a service that connects Feishu topic groups to AI coding command-line tools. Each new topic can start its own tool process.

In plain words
What is it for?
Use it when building or restarting botmux, installing dependencies, working on its daemon or dashboard, or changing native terminal and Electron-related dependencies.
Why use it?
It documents the Bun-based build and restart workflow and important dependency settings, reducing the risk of broken terminal processes or compiled binaries.

Instructions file for Claude Code

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

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

About the project

botmux connects Feishu/Lark messaging with AI coding command-line tools, creating a separate live-streaming coding session for each conversation. Developers use it to monitor, question, interrupt, and operate coding agents running on their own computers from Feishu chats or a web terminal.

deepcoldy/botmux · 1,749 stars · on GitHub · deepcoldy.github.io

Reuse

Borrowing it

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

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 botmux CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/deepcoldy/botmux/claude-md/github.svg)](https://agentmods.dev/instructions/deepcoldy/botmux/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/deepcoldy/botmux/claude-md"><img src="https://agentmods.dev/badge/instructions/deepcoldy/botmux/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.

agentmods 80×15 button for botmux CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/deepcoldy/botmux/claude-md"><img src="https://agentmods.dev/badge/instructions/deepcoldy/botmux/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,742 This file is loaded in full into every session.
When invoked 5,742 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.05742 $0.05742
Opus 5.5 $0.02297 $0.02297
Sonnet 5.5 $0.01148 $0.01148
Haiku 4.5 $0.00574 $0.00574

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

Security

Grade A, and why

botmux 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 3d 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 · 168 lines

How it starts

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

botmux

飞书话题群 ↔ AI 编程 CLI 桥接。Daemon 监听飞书消息,每个新话题自动 spawn 一个独立 CLI 进程(Claude Code / Codex / Gemini 等 20+ 种,完整列表见 README)。

构建 & 运行

bun run build                # tsc 编译
bun run daemon:restart       # 重启 daemon(自动恢复 active sessions)
bun run daemon:logs          # 查看日志
  • 每次修改后需要 bun run build 然后 bun run daemon:restart

⚠️ 别用裸 node 起 daemon —— 用 bun run daemon:*。 会话存储硬依赖 SQLite 引擎 (node:sqlite 需 Node ≥ 22.13,或任意 bun 的 bun:sqlite),而裸 node 由 exec 时的 PATH 解析,那不是写它的环境:2026-09-08 某次 restart 的 PATH 把 /usr/bin 排在 fnm shim 之前 ⟹ 解析成 v18.20.4 ⟹ 55 个 bot daemon 全部启动即崩,飞书里所有话题看似全丢(57 个 SQLite 库其实完好)。supervisor 自身不需要 SQLite,所以它照常打印「✅ daemon 已重启」 —— 这个失败形状是记在这里的唯一理由:报成功、孩子全灭,看日志前无从分辨。 现在 preflight 会在拆掉现有 fleet 之前按引擎能力拒绝(逃生阀 BOTMUX_INTERPRETER=<abs>)。

包管理器是 bun(packageManager: [email protected],锁文件 bun.lock)。装依赖用 bun install --frozen-lockfile。

⚠️ trustedDependencies: ["electron","node-pty"] 不能删:bun 默认不跑依赖的生命周期脚本,而 node-pty 要靠它 node-gyp 编出 build/Release/pty.node —— 少了这个,PTY 全废、编译版二进制也打不出来(pty.node 是被嵌进去的)。electron 的 postinstall 负责下载对应平台的二进制。

这个名单刻意只有两项(与 pnpm 时代的 onlyBuiltDependencies 逐字一致),别照着"顺手补全"往里加 esbuild —— 实测 esbuild 虽然有 postinstall,但它的二进制由 @esbuild/<platform> 平台包直接提供:空白目录里 bun install esbuild 不跑任何脚本,esbuild --version 照样输出 0.28.2。加进白名单只会让 bun 比 pnpm 多跑脚本、扩大两者的行为差异,与迁移目标相反。

注意与「用户怎么装 botmux」区分开:install-diagnostics.ts 的 InstallKind(含 'pnpm-global')与 maintenance.ts 的自动更新说的是终端用户的安装方式,线上确实有人 pnpm i -g botmux。那些不是本仓库的构建工具链,不要跟着一起改。

Bun 开发链路

daemon / supervisor / dashboard 都能直接跑 TypeScript,不必先 bun run build:

bun run daemon:bun           # bun src/index-daemon.ts
bun run supervisor:bun       # bun src/index-supervisor.ts
bun run dashboard:bun        # bun src/index-dashboard.ts
bun run build:bun            # 打自包含单文件二进制(scripts/build-bun-binary.mjs)

发版编译用的 Bun 版本钉在 1.4.3,唯一来源是 package.json 的 packageManager(.github/workflows/ 各处与它一致,test/release-darwin-codesign-gate.test.ts 守着)。本地 bun 与它不一致时,编译产物、bun.lock 重写、bun test 的行为可能和 CI 不一致:bun run build 与 scripts/build-bun-binary.mjs 开头会比对并告警(不拦截),见 scripts/check-bun-version.mjs。对齐用告警给出的官方安装命令装指定版本——它解压到同目录再 mv 换 inode,fleet 正跑着的 bun 进程不受影响。

Read the full file on GitHub · 168 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. 3d ago Changed · +10 lines · +759 tokens per session 658441679708
  2. 4d ago Changed · +116 tokens per session fcf4125f6c75
  3. 10d ago Changed d00d755adfb0
  4. 23d ago Changed · +12 lines · +616 tokens per session 113a7a5a95a9
  5. 1mo ago Changed · +10 tokens per session 541c6e9f9dc0
  6. 1mo ago Changed · +8 lines · +241 tokens per session 881ec3680d2a
  7. 1mo ago Changed e9e521709c5b
  8. 1mo ago Changed db141612d86c
  9. 1mo ago First seen · 138 lines · 4,000 tokens per session scan A e96e2572ac38

Subscribe to this mod's changes

botmux CLAUDE.md is an instructions file published in the GitHub repository deepcoldy/botmux (1,749 stars, last pushed today), licensed MIT. It adds 5,742 tokens to every session, about $0.0230 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-30.

Related

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).

microsoft/vscode · 9,715 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,581 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens