mini-term: Instructions file for Claude Code

AGENTS.md

mini-term AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from dreamlonglll/mini-term. It costs 8,732 tokens per session, scanned B, original, MIT.

Repository instructions for mini-term, a desktop terminal manager written in Rust. They describe its project layout, development commands, sidecar programs, builds, tests, and isolated data directory for development.

In plain words
What is it for?
Use them when working on mini-term to stage helper programs, start the development app, run the workspace tests, build release targets, and inspect frame-performance measurements.
Why use it?
They give coding agents the repository-specific rules needed to build and run the right components without mixing a development instance with an installed one.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: SessionEnd hook event, but also the file is AGENTS.md. Also seen: reads .claude/ paths; mentions Claude Code; mentions AGENTS.md.

This is dreamlonglll/mini-term's own configuration. It tells Claude Code, Codex and OpenCode how to work on mini-term 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 mini-term configures →

Reuse

Borrowing it

Nothing to install: this file belongs to dreamlonglll/mini-term. 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/dreamlonglll/mini-term/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/dreamlonglll/mini-term

Made for: Claude Code, Codex, OpenCode.

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 mini-term AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/dreamlonglll/mini-term/agents-md"><img src="https://agentmods.dev/badge/instructions/dreamlonglll/mini-term/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8,732 This file is loaded in full into every session.
When invoked 8,732 The same file — it is already loaded in full.
Security scan B 1 finding. 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.08732 $0.08732
Opus 5.5 $0.03493 $0.03493
Sonnet 5.5 $0.01746 $0.01746
Haiku 4.5 $0.00873 $0.00873

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

Security

Grade B, and why

mini-term AGENTS.md scanned grade B 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 today.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

| `mt-ai` | AI 感知:hook server(权威)、hook 注册(`hook_registry.rs`)、输入检测降级(`detect.rs`)、状态判定(`monitor.rs`/`perception.rs`)、会话记录读取(`sessions.rs`)、SSH 工具 skill 按项目启停(`ssh_registry.rs`)。两个 registry 共动 `~/.claude/settings.json`,读改
AGENTS.md · 206 lines

How it starts

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

AGENTS.md

This file provides guidance to AI coding agents (Claude Code, Codex, etc.) when working with code in this repository.

Project Overview

mini-term — GPUI 原生桌面终端管理器,支持多项目、多标签、分屏布局,并能感知 AI 进程(Claude/Codex/Grok 等)状态;带移动端中转镜像与 SSH 远程项目能力。

  • UI/渲染: gpui-pre 0.3.5(Zed 快照,crates.io 版;根 Cargo.toml 里以 gpui 为别名引用,窗口/文字后端在 gpui-pre-platform)+ gpui-component 0.6.2(Resizable/Modal/Input/Tree 等)
  • 终端: alacritty_terminal(VT 状态机,进程内直喂,无 IPC)+ portable-pty
  • 发布形态: Windows x64 NSIS 安装包(scripts/windows-installer.nsi,包内平铺 exe + 三个 sidecar + portable-conpty,全部「与 exe 同目录」;调试符号 mini_term.pdb 另作单独的 zip 资产,不进安装包;卸载时摘掉四家 AI 工具里的 hook 注册,升级不摘)+ macOS dmg + Linux deb/tar.gz
  • 历史: 项目最初是 Tauri v2 + React 实现,v1.0.0-beta 后整体删除切换到 GPUI 原生版;找旧实现看 git 历史(合并点 236d5c1)

开发命令

# 首次/换版本后:构建三个 sidecar 并连同便携 ConPTY 就位到 target/debug/
node scripts/stage-sidecars.mjs

# 启动开发实例(⚠️ 与装机版并跑时必须隔离数据目录)
MT_APP_DATA_DIR="$LOCALAPPDATA/mini-term-gpui-dev" cargo run -p mt-app

# 全工作区测试(2026-09 实数:33 个目标 / 2076 例 —— 目标数 = Running + Doc-tests 行数,
# 例数 = 各 `test result:` 行 passed 之和;数字只是快照,随代码增长)
cargo test --workspace

# 量化每帧 CPU / 帧时间 p50·p99 / 一帧合并了几次 invalidation(dev-only 度量工具,
# 默认不编译;档位与读数解释见 crates/mt-app/src/frame_profiler.rs 的模块注释)
cargo build -p mt-app --features frame-profiler
MT_FRAME_OVERLAY=1 MT_APP_DATA_DIR="$LOCALAPPDATA/mini-term-gpui-dev" ./target/debug/mini-term

# 中转服务端协议边界测试 / sidecar 工作区
cd relay-server && cargo test
cargo build --manifest-path sidecars/Cargo.toml

# 移动端 PWA
cd mobile && npm run build

# 改文案后重新生成 i18n 字典
node crates/mt-i18n/tools/gen_from_ts.mjs

# 改 oh-my-pi / pi 扩展模板后离线验证(Bun 运行时,omp / pi 本身不必安装)
bun run tools/omp-ext-check.ts
bun run tools/pi-ext-check.ts
# pi 模板再在本机装的真 pi 运行时里跑一遍(SDK + faux 假模型,不联网不花 token)
node tools/pi-ext-realrun.mjs

# 重做 README 顶部宣传片(Linux + Xvfb + lavapipe 实拍真实应用 → 逐帧合成,产物写到 docs/promo/;
# 依赖与参数见 tools/promo/README.md)
tools/promo/build.sh
  • 便携 ConPTY(Windows):main() 在建 gpui 平台层之前调 mt_pty::conpty::initialize_default(),从 exe 同目录的 portable-conpty\ 预载 Windows Terminal 1.24 的 conpty.dll,PTY 宿主于是是 portable-conpty\x64\OpenConsole.exe 而不是系统 conhost.exe。dev 实例的这个目录由上面的 stage-sidecars.mjs 就位到 target/debug/;没就位就回落系统 ConPTY——看日志里的 [conpty-bootstrap] backend=portable|system 一行。⚠️ 该脚本不认 CARGO_TARGET_DIR:给构建另设了 target 目录时,要把 target/debug/portable-conpty/(连同三个 sidecar)复制到那个目录的 debug/ 下,否则 dev 实例跑的是系统 conhost。MT_DISABLE_PORTABLE_CONPTY=1 跳过预载,用于开 / 关对比与排障
  • 工具链由根目录 rust-toolchain.toml 钉死(channel + clippy/rustfmt),CI 按同一文件安装,本地 clippy 与 CI 同版本。新机器 / 新 checkout 先跑一次无参 rustup toolchain install(新版 rustup 已弃用「缺工具链时自动安装」);升级工具链只改该文件的 channel 一处。
  • ⚠️ 禁跑 cargo fmt:本仓 HEAD 非 rustfmt-clean,全仓 fmt 会重排几十个文件淹没 diff。
  • ⚠️ GPUI dev 实例运行中时,cargo build -p mt-app / cargo run -p mt-app 会卡在「无法替换 target/debug/mini-term.exe」——先关实例,或给这次构建另设 CARGO_TARGET_DIR。cargo test(含 -p mt-app 与 --workspace)不受影响:mt-app 没有集成测试,只编单测 harness(target/debug/deps/mini_term-<hash>.exe),不产出也不替换 mini-term.exe。
  • ⚠️ 别给 mt-app 加 tests/ 目录:包里只要有集成测试,cargo test 就会先把该包的 bin 编出来(给测试提供 CARGO_BIN_EXE_*),上面那条文件锁就又回来了。不需要 GPUI 的端到端测试放进对应的下层 crate(PTY → VT → grid 冒烟在 crates/mt-terminal/tests/terminal_smoke.rs)。

Read the full file on GitHub · 206 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. today Changed · +11 lines · +309 tokens per session 3ba95fee41fb
  2. 5d ago Changed · +1 lines · +151 tokens per session 48332191d665
  3. 6d ago Changed · +4 lines · +656 tokens per session 9ee5eeb53858
  4. 18d ago Changed · +45 tokens per session 0860a1b81d44
  5. 19d ago Changed · +157 tokens per session c090939b7d7d
  6. 1mo ago Changed · +4 lines · +60 tokens per session 8386cd2622f5
  7. 1mo ago Changed · +2 lines · +122 tokens per session f47f32979348
  8. 1mo ago Changed · +6 lines · +360 tokens per session e983499ae11e
  9. 1mo ago Changed · +9 lines · +1,449 tokens per session c23caa72917b
  10. 1mo ago First seen · 169 lines · 5,423 tokens per session scan B 0b56bef4b7fc

Subscribe to this mod's changes

mini-term AGENTS.md is an instructions file published in the GitHub repository dreamlonglll/mini-term (235 stars, last pushed yesterday), licensed MIT. It adds 8,732 tokens to every session, about $0.0349 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-21.

Related

mini-term AGENTS.md compared with instructions from other repositories

mini-term AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mini-term AGENTS.mddreamlonglll/mini-termInstructions file235yesterdayMITB8,732Claude Code, Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode