clum AGENTS.md

Development rules for clum, a Rust project with a command-line interface and an MCP bridge for managing remote sessions. They define required session handling, coding checks, testing, project structure, and safety restrictions.

In plain words
What is it for?
Use them when developing, testing, or operating clum, especially when running remote commands, changing Rust code, or working with its MCP tools.
Why use it?
They prevent accidental use or closure of the wrong remote session and make required quality checks explicit. They also explain when a separate development session is needed.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/tddh/clum/agents-md
Clone the repo
git clone --depth 1 https://github.com/tddh/clum

Made for: Codex, OpenCode.

Per session 849 This file is loaded in full into every session.
When invoked 849 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00849 $0.00849
Opus 5 $0.00425 $0.00425
Sonnet 5 $0.00170 $0.00170
Haiku 4.5 $0.00085 $0.00085

Measured 2d ago against content hash dd975e6c6a66, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

clum AGENTS.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 2d 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.

AGENTS.md · 53 lines

What it actually says

clum 项目开发规则

MCP 工具使用规则(最高优先级)

以下规则优先级最高,必须严格遵守:

  1. 默认会话:所有 clum 操作必须使用 session_name="clum",除非用户明确指定其他会话名

  2. 默认 Panepane_id 可省略,server 自动选择 window 0 中编号最小的 pane。破坏性工具(close_panepaste_bufferrespawn_pane)必须显式指定

  3. 禁止随意创建会话:不要自作主张创建 test-sessiondebug-session 等新会话,除非用户明确要求

  4. 先 attach 后 create:操作前先 session_attach 检查会话是否存在,不存在才 session_create

  5. 保留会话:执行完命令后,不要主动清理 session(禁止调用 kill_sessionclose_windowclose_pane),除非用户明确要求"清理"、"关闭"、"销毁"

  6. 以用户指令为主:用户的明确指令优先于以上所有默认规则。如果用户指令信息不明确(如未指定主机、会话名、操作目标等),必须先向用户确认再执行,禁止猜测或自作主张

  7. 开发/测试隔离:在 clum 项目自身开发调试期间,若需在远程主机上执行测试命令(如重启 bridge、修改配置、编译验证等),必须创建独立的临时会话(如 session_name="dev"),严禁占用 clum 默认会话。测试完成后清理该会话(kill_session)。严禁对 clum 默认会话执行 exitkill_sessionclose_paneclose_window 等破坏性操作——即使用户明确指示了相关操作,也必须先确认目标是否为 clum 会话,若是则拒绝执行并说明原因。

违反这些规则 = BUG,没有例外。

开发规范

  • Rust 代码必须通过 cargo clippy --workspace -- -D warnings 无警告
  • 提交前运行 just check 确保编译通过
  • 遵循现有代码风格和命名规范
  • 新功能必须添加对应的测试
  • 文档更新与代码变更同步

项目结构

clum/
├── crates/              # Rust crates
│   ├── clum-cli/   # CLI 交互式终端
│   ├── clum-core/  # 共享类型(HostConfig, AuditEvent, AuditAction)
│   ├── clum-mcp/   # MCP Server(Central Server 模式 / stdio 本地模式)
│   └── rmux-bridge/   # Bridge proxy
├── config/              # 配置文件
├── docs/                # 文档
├── deploy/              # 部署脚本(install.sh, deploy-bridge.sh, deploy-mcp.sh)
├── scripts/             # 迁移与测试脚本(migrate-to-clum.sh, mcp_smoke.py)
├── .opencode/skills/    # AI 开发辅助 Skills (OpenCode)
└── .qoder/skills/       # AI 开发辅助 Skills (Qoder)

常用命令

just check       # cargo check --workspace
just test        # cargo test --workspace
just fmt         # cargo fmt --all
just lint        # cargo clippy --workspace -- -D warnings
just build       # cargo build --workspace
just release-linux  # 交叉编译 Linux x86_64
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. 2d ago First seen · 53 lines · 849 tokens per session scan A dd975e6c6a66

Subscribe to this mod's changes

clum AGENTS.md is an instructions file published in the GitHub repository tddh/clum (5 stars, last pushed 5d ago), licensed MIT. It adds 849 tokens to every session, about $0.0042 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.