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.
npx agentmods add instructions/itophua/iterminal/agents-mdgit clone --depth 1 https://github.com/iTophua/iterminalWrote 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/itophua/iterminal/agents-md)<a href="https://agentmods.dev/instructions/itophua/iterminal/agents-md"><img src="https://agentmods.dev/badge/instructions/itophua/iterminal/agents-md.svg" alt="Measured on agentmods" 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 | $0.07648 | $0.07648 |
| Opus 5 | $0.03824 | $0.03824 |
| Sonnet 5 | $0.01530 | $0.01530 |
| Haiku 4.5 | $0.00765 | $0.00765 |
Grade C, and why
iterminal AGENTS.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 4d 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.
Reaches for credential fileshighPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
- 密钥路径支持 `~` 展开(如 `~/.ssh/id_rsa`) How it starts
The opening of the file, as written. The whole thing — 587 lines — stays where its author put it; the contents beside it link to each section on GitHub.
iTerminal - SSH Connection Manager
Generated: 2026-03-26 Branch: main
技术栈: Tauri 2.10 + React 19.2 + TypeScript 5.9 + Vite 7.3 + Ant Design 6.3 + xterm.js 6.0 + Rust (russh 0.50 + russh-sftp 2.1)
架构概览
┌─────────────────────────────────────────────────────────────┐
│ 前端 (React) │
├─────────────────────────────────────────────────────────────┤
│ main.tsx (入口) │
│ ├─ 静态预加载器 (index.html) ─────────► 避免 React 加载白屏 │
│ ├─ SplashScreen ─────────────────────► 启动动画 + 初始化 │
│ └─ useAppInitialization ─────────────► 数据库/字体/连接加载 │
├─────────────────────────────────────────────────────────────┤
│ Terminal.tsx (主窗口) │
│ ├─ listen("shell-output-{id}") ──────► 监听 shell 输出事件 │
│ └─ invoke('write_shell') ────────────► 发送用户输入 │
├─────────────────────────────────────────────────────────────┤
│ TerminalWindow.tsx (新窗口) │
│ ├─ listen("terminal-window-init") ───► 监听初始化事件 │
│ ├─ restoreConnection() ──────────────► 恢复连接到 store │
│ └─ 渲染 <Terminal /> ───────────────── 复用主窗口组件 │
├─────────────────────────────────────────────────────────────┤
│ Connections.tsx │
│ └─ 从 terminalStore.allConnections 读取 ─► 全局共享状态 │
├─────────────────────────────────────────────────────────────┤
│ Sidebar.tsx │
│ └─ 从 terminalStore.allConnections 读取 ─► 响应式更新分组 │
├─────────────────────────────────────────────────────────────┤
│ FileManagerPanel.tsx │
│ ├─ listen("transfer-progress-{id}") ──► 监听传输进度 │
│ └─ listen("transfer-complete-{id}") ──► 监听传输完成 │
├─────────────────────────────────────────────────────────────┤
│ terminalStore (Zustand) │
│ ├─ connectedConnections: ConnectedConnection[] │
│ │ └─ rootPane: SplitPane (支持嵌套分屏) │
│ ├─ allConnections: Connection[] ──────► 所有连接(启动预加载)│
│ ├─ availableFonts: string[] ──────────► 字体列表(缓存) │
│ ├─ restoreConnection() ──────────────► 恢复连接(新窗口) │
│ └─ activeConnectionId: string │
└─────────────────────────────────────────────────────────────┘
│
│ Tauri IPC / Events
▼
┌─────────────────────────────────────────────────────────────┐
│ 后端 (Rust + russh) │
├─────────────────────────────────────────────────────────────┤
│ init_database (启动时调用) │
│ ├─ 初始化 SQLite 数据库 │
│ ├─ 清理过期命令历史 (90天) │
│ ├─ 清理孤立命令历史 (连接已删除) │
│ └─ 清理无效命令历史 (含 tab 字符) │
├─────────────────────────────────────────────────────────────┤
│ get_shell(id, AppHandle) │
│ ├─ 创建 SSH channel (async) │
│ └─ tokio::spawn reader task │
│ └─ tokio::select! { resize, write, wait() } │
│ └─ emit("shell-output-{id}", data) ──► 推送到前端 │
├─────────────────────────────────────────────────────────────┤
│ create_terminal_window │
│ ├─ 创建新 WebviewWindow │
│ └─ emit("terminal-window-init", data) ──► 发送初始化数据 │
├─────────────────────────────────────────────────────────────┤
│ upload_file / download_file │
│ ├─ 创建独立 SSH 连接 (不阻塞 Shell) │
│ └─ tokio::spawn 后台传输任务 │
│ └─ 每 200ms emit("transfer-progress-{id}") │
│ └─ emit("transfer-complete-{id}") 完成通知 │
├─────────────────────────────────────────────────────────────┤
│ 全局状态 (once_cell::Lazy + tokio::RwLock) │
│ ├─ SESSIONS: HashMap<id, SshSession> │
│ ├─ SHELLS: HashMap<id, ShellSession> │
│ └─ SFTP_SESSIONS: HashMap<id, SftpSessionState> │
└─────────────────────────────────────────────────────────────┘
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.
- 4d ago First seen · 587 lines · 7,648 tokens per session scan C 9cce593e62aa
iterminal AGENTS.md is an instructions file published in the GitHub repository iTophua/iterminal (4 stars, last pushed 3d ago), licensed MIT. It adds 7,648 tokens to every session, about $0.0382 per session on Opus 5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
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).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
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.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.