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.
curl -O https://raw.githubusercontent.com/dreamlonglll/mini-term/main/AGENTS.mdgit clone --depth 1 https://github.com/dreamlonglll/mini-termWrote 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/dreamlonglll/mini-term/agents-md)<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.
<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>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.08732 | $0.08732 |
| Opus 5.5 | $0.03493 | $0.03493 |
| Sonnet 5.5 | $0.01746 | $0.01746 |
| Haiku 4.5 | $0.00873 | $0.00873 |
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`,读改 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)。
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.
- today Changed · +11 lines · +309 tokens per session 3ba95fee41fb
- 5d ago Changed · +1 lines · +151 tokens per session 48332191d665
- 6d ago Changed · +4 lines · +656 tokens per session 9ee5eeb53858
- 18d ago Changed · +45 tokens per session 0860a1b81d44
- 19d ago Changed · +157 tokens per session c090939b7d7d
- 1mo ago Changed · +4 lines · +60 tokens per session 8386cd2622f5
- 1mo ago Changed · +2 lines · +122 tokens per session f47f32979348
- 1mo ago Changed · +6 lines · +360 tokens per session e983499ae11e
- 1mo ago Changed · +9 lines · +1,449 tokens per session c23caa72917b
- 1mo ago First seen · 169 lines · 5,423 tokens per session scan B 0b56bef4b7fc
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.
mini-term AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mini-term AGENTS.mddreamlonglll/mini-term | Instructions file | 235 | yesterday | MIT | B | 8,732 | Claude Code, Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |