Borrowing it
Nothing to install: this file belongs to mr-mihu/dsh-dbhub-live. 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/mr-mihu/dsh-dbhub-live/main/AGENTS.mdgit clone --depth 1 https://github.com/mr-mihu/dsh-dbhub-liveWrote 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/mr-mihu/dsh-dbhub-live/agents-md)<a href="https://agentmods.dev/instructions/mr-mihu/dsh-dbhub-live/agents-md"><img src="https://agentmods.dev/badge/instructions/mr-mihu/dsh-dbhub-live/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/mr-mihu/dsh-dbhub-live/agents-md"><img src="https://agentmods.dev/badge/instructions/mr-mihu/dsh-dbhub-live/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.03602 | $0.03602 |
| Opus 5.5 | $0.01441 | $0.01441 |
| Sonnet 5.5 | $0.00720 | $0.00720 |
| Haiku 4.5 | $0.00360 | $0.00360 |
Grade C, and why
dsh-dbhub-live 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 12d 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.
- 秘密字段「留空 = 保持原值」;`auth==='key'` 且无已存路径时落 `DEFAULT_SSH_KEY_PATH = '~/.ssh/id_ed25519'`;载荷统一走 `connDraftOf` / `withConnDraft`。 How it starts
The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — dsh-dbhub-live
本仓库的 AI/维护者入口:这里只记结论(规则、常量、命令、门禁)。原因与踩坑过程见 doc/ARCHITECTURE.md,操作步骤见 doc/DEVELOPMENT.md(调试)/ doc/CLIENT.md(客户端半)/ doc/RELEASE.md(发布)/ doc/DESENSITIZE.md(脱敏),改动前要核查的联动清单见 doc/IMPACT-MATRIX.md。业务需求 doc/REQUIREMENTS.md,用户文档 README.md。
定位
DSH host 插件(Node ESM)+ Web client 插件:把 dbhub(Bytebase 的数据库 MCP 服务器)接入 DSH。两个性质:零知识(DSN/密码只在宿主侧,模型只见 source 句柄与元数据)+ 一次性进程(每次调用 spawn 一条 dbhub,跑完即杀)。附配置页(设置 → DBHub 数据库工具 / 侧边栏 / 插件页「配置」):连接管理、连接测试、SSH 层独立测试、环境级只读、SSH 隧道、版本与更新检查;5.2 起三套布局(弹窗 / 宽屏 / 小屏)。
仓库结构
lib/ host + 客户端实现(模块地图见 ARCHITECTURE)| test/ 单测 | scripts/ 门禁脚本
release-test/ 版本矩阵实测 | doc/ 文档 | .github/ CI | cordis.patch.yml bundle patch | .env 本地脱敏黑名单
模块一览、各文件职责在 doc/ARCHITECTURE.md。
红线(结论)
零知识
- 工具参数不得有
dsn;dbhub_configure收到args.dsn直接拒绝(result.noDsnViaModel)。 - 模型可见文本(结果/列表/标签/错误/stderr/诊断)一律过
connLabel或scrubSecrets;清洗要折叠任意 URL 连接串的整个 userinfo → 原因。 - 密码与完整 DSN 只经界面:
askUser(configure)/configOp(配置页)。门禁test/zero-knowledge.test.mjs。
一次性进程
resolveSource解 DSN →runAdhoc起一条dbhub --transport stdio,跑完 terminate。无常驻服务(无指纹 / mtime / 空闲回收 / respawn / 孤儿清理 / 配置重启)→ 原因。- 工具恒 4 个:configure / list_sources / execute_sql / search_objects;不为工作区×环境注册工具。
apply()只注册工具 +startBackgroundBootbookkeeping;dbhub 解析发生在每次调用(runtime.json缓存);无数据源照常启动。
执行路径
ro === true || ssh != null→ 临时--config;其余走--dsn。- TOML 里秘密只写
${DSH_DBHUB_SEC_*}占位符,真值走子进程 env;引用集合 == env 键集合(test/toml.test.mjs)。 [[tools]]是白名单:只读必须写两条 → 原因。- 版本门槛:1.4.0 起实测;
< 1.0.0拒绝(result.dbhubTooOld);不生成未实测写法。 - 临时文件在
$DSH_HOME/storages/dsh-dbhub-live/tmp/:finally尽力删 + boot 时sweepTempToml()。
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.
- 12d ago Changed · -137 lines · -15,656 tokens per session 6218decf8645
- 28d ago Changed · +70 lines · +6,049 tokens per session scan A → C 938ce0c5df48
- 29d ago Changed · +46 lines · +5,731 tokens per session 28742aaef619
- 1mo ago Changed · +23 lines · +2,852 tokens per session f4ce2a54261f
- 2mo ago Changed · +17 lines · +992 tokens per session 7a1b08d71c0c
- 2mo ago First seen · 98 lines · 3,634 tokens per session scan A cb6d961ac83b
dsh-dbhub-live AGENTS.md is an instructions file published in the GitHub repository mr-mihu/dsh-dbhub-live (2 stars, last pushed 11d ago), licensed MIT. It adds 3,602 tokens to every session, about $0.0144 per session on Opus 5.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.
dsh-dbhub-live AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| dsh-dbhub-live AGENTS.mdmr-mihu/dsh-dbhub-live | Instructions file | 2 | 11d ago | MIT | C | 3,602 | 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 | yesterday | 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 |