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/nwflower/dsh-chat-import/agents-mdgit clone --depth 1 https://github.com/Nwflower/dsh-chat-importWrote 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/nwflower/dsh-chat-import/agents-md)<a href="https://agentmods.dev/instructions/nwflower/dsh-chat-import/agents-md"><img src="https://agentmods.dev/badge/instructions/nwflower/dsh-chat-import/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.01557 | $0.01557 |
| Opus 5 | $0.00779 | $0.00779 |
| Sonnet 5 | $0.00311 | $0.00311 |
| Haiku 4.5 | $0.00156 | $0.00156 |
Grade A, and why
dsh-chat-import 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
dsh-chat-import 是 DeepSeek Harness(DSH)插件:把 18 种外部 Agent 工具的聊天记录
全保真导入为可继续的 DSH 会话,支持反向导出(Claude / Codex / Kimi)与双向增量同步。
背景
- DeepSeek Harness:开源 agent harness(GitHub
deepseek-ai/deepseek-harness,npm@deepseek-ai/dsh)。 插件参考文档:https://deepseek-harness.github.io/deepseek-harness/en/reference/ ;示例插件见 GitHub topicdsh-plugin。 - DSH 哲学是 everything is a plugin——本仓库只做插件,不碰引擎。
- 改代码前先读
README.md(对外契约)与test/(现有行为)。
命令
npm test # node --test 跑 test/*.test.mjs
npm run lint # eslint(CI 同款)
npm run coverage # 覆盖率护栏:line ≥ 75%(CI 同款)
npm run check:linux # 跨平台路径纪律静态检查(CI 同款)
npm run check:leaks # 敏感信息泄漏扫描
npm run build # 发布面自检:files 完整性 + 语法 + lockfile(prepack 自动跑)
零构建:纯 ESM,index.mjs / lib/ 即发布产物;lib/client.js 是手写 CJS Browser bundle,也无构建。
手工验证:dsh plugin --profile web add -w link:<本仓库路径> 重启 dsh 后——会话内调
import_chat / scan_discover / export_chat / sync_to_claude / restore_bundle 等工具;
dsh web 侧边栏「导入会话」面板与设置页「会话导入」分区。
仓库布局
- 根目录只放发布到 GitHub / npm 的文件;本地工程文件一律收进
dev/(gitignore,永不提交)。 package.json的files白名单即 npm 发布面;lib/*.mjs通配自动覆盖 lib/ 新模块,新增文件无需改files。- 分层:
lib/convert/*与lib/export/*(含根 shimconvert.mjs/export.mjs)是零依赖纯函数层,可独立单测; 其余lib/*.mjs消费 ctx(host 面);index.mjs为入口,lib/tools.mjs注册全部工具,lib/client.js为 Browser 侧面板与设置分区,bin/dsh-chat-import.mjs为 CLI。 - 永不提交:
dev/、node_modules/、.prev-session*.jsonl、.dsh-file-claim/、真实用户 transcript、任何凭据/密钥。
编码
- 最小变更;复用现有工具函数与生命周期。
- 只消费 host 公开服务(
sessionPersistence/fs/tools/webServer/workspaceRegistry;agentDefaultModel/llm可选,经ctx.get读取、缺失或抛错即回退);新行为走公开扩展点, 绝不修改 DSH 引擎 / apiproxy / 官方 UI 包。 - 会话日志 append-only、deep-frozen:只
create+append,绝不改写历史;seq从 0 连续, surface 事件带surfaceOp: 'append',tool/result用sourceEventSeqs关联其tool/call。 - 幂等:目标会话已存在即跳过(
sessionPersistence.list()判重);归组经workspaceRegistry.resolveByPath(cwd)→workspace.attachSession(id)。 - 失败要大声:畸形 JSONL 行计数上报(
skipped),绝不静默吞掉。 - 文件以恰好一个换行结尾;注释写契约与上下文,不叙述控制流;空
catch必须说明吞掉什么且try只包一条语句。 - 测试描述行为而非背书正确性;fixtures 用合成数据,永不掺真实 transcript。
- 跨平台路径纪律(CI 在 Linux 跑测试):mock 树查找必须做分隔符归一;断言比较
node:path运算结果时期望值用同口径函数计算,不写死'X:\…'字面量;新增导入测试优先用真实临时目录(mkdtemp)。
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.
- 5d ago First seen · 79 lines · 1,557 tokens per session scan A f49f1fbb4926
dsh-chat-import AGENTS.md is an instructions file published in the GitHub repository Nwflower/dsh-chat-import (125 stars, last pushed 6d ago), licensed MIT. It adds 1,557 tokens to every session, about $0.0078 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-30.
Other instructions, from other repositories
awesome-ChatGPT-repositories CLAUDE.md
Claude Code instructions for taishi-i/awesome-ChatGPT-repositories, covering awesome-chatgpt-repositories — claude code guide, repository structure, plugin skill (when installed via /plugin), local standalone command (when repo is cloned) and compact data format (plugins/awesome-chatgpt-search/data/).
dsh-worktable AGENTS.md
Instructions for Aisland-SJL/dsh-worktable, covering dsh-worktable 项目规则, 协作方式(用户定案,最高优先级), 边界, 构建与验证 and 领域约定(会话中必须遵守).
dshcode copilot-instructions.md
Copilot instructions for whitelonng/dshcode, a project described as: Community desktop companion for DeepSeek Harness — one-click Electron app for macOS and Windows.
webcodex AGENTS.md
Instructions for yyjeqhc/webcodex, covering agents.md — webcodex repository guide, v1 active development, 1. verify and preserve, 2. build the simplest useful product and 3. follow intent and make focused changes.
Proma AGENTS.md
AGENTS.md instructions for proma-ai/Proma, covering proma 工程约定, 必须遵守, 常用命令, 开发 and 构建 / 类型检查 / 测试.
OpenHands AGENTS.md
AGENTS.md instructions for OpenHands/OpenHands, covering repository notes, general, repository map — what belongs where, cross-repository boundaries and pr description human check.