dsh-chat-import: Instructions file for Codex

AGENTS.md

dsh-chat-import AGENTS.md is an instructions file for Codex, OpenCode from Nwflower/dsh-chat-import. It costs 3,190 tokens per session, scanned A, original, MIT.

Repository instructions for coding agents working on a DeepSeek Harness plugin that imports and synchronizes chat sessions from other agent tools.

In plain words
What is it for?
Use them when modifying, testing, linting, packaging, or manually checking the dsh-chat-import plugin.
Why use it?
They give agents the project background, required checks, publishing rules, and files to read before changing code.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is Nwflower/dsh-chat-import's own configuration. It tells Codex and OpenCode how to work on dsh-chat-import 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 dsh-chat-import configures →

Reuse

Borrowing it

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

Made for: 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 dsh-chat-import AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/nwflower/dsh-chat-import/agents-md/github.svg)](https://agentmods.dev/instructions/nwflower/dsh-chat-import/agents-md)
Your own site
<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/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 dsh-chat-import AGENTS.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,190 This file is loaded in full into every session.
When invoked 3,190 The same file — it is already loaded in full.
Security scan A 0 findings. 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.03190 $0.03190
Opus 5.5 $0.01276 $0.01276
Sonnet 5.5 $0.00638 $0.00638
Haiku 4.5 $0.00319 $0.00319

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

Security

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 3d 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.

AGENTS.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 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)插件:把 32 种来源格式(含 DSH 自身的会话日志)的聊天记录导入为可继续的 DSH 会话,支持反向导出。

原则

  • 本仓库只做插件,不修改 DSH 引擎、apiproxy 或官方 UI 包。
  • 宿主侧零构建,纯 ESM,lib/ 就是发布产物。唯一的例外是浏览器侧的 bundle lib/client.js:它由 src/client/ 的分片组装而成,外加白名单内联的 lib/ 纯模块,组装器是 scripts/build-client.mjs。之所以要组装,是因为 DSH 客户端加载器没有相对 require,产物必须是一个单文件(见 docs/architecture.md D7)。
  • 同口径逻辑只留一份,来源清单由一张表派生(docs/architecture.md D21):写新代码之前先找共用件,不要复制相邻来源的实现。
  • 根目录只放发布到 GitHub / npm 的文件;本地工程文件收进 dev/,不提交。
  • 公开文档(README 双语、docs、CHANGELOG、ROADMAP)不出现 REQ、issue 号一类内部编号。
  • 结构性改动之前先读 docs/architecture.md(架构决策与权衡),不要违背已记录的决策。确实需要推翻某条决策时,先在该文档里说明旧决策为什么不再成立。
  • 冲突时按这个顺序取舍:用户当次的指令 > 仓库代码现状 > 本文件 > docs/。被当次指令推翻的约定要不要回填进文档,由用户决定,AI 不现场猜。

体量停止线(机械触发,不靠判断)

  • lib/ 下任何手工维护的源文件超过 1000 行(convert / export 纯函数层放宽到 800 行):停止往里加新功能,先写一份拆分提案等用户确认;提案批准之前,该文件只修 bug。拆分方向见 docs/architecture.md D6。lib/client.js 是生成产物,不受这条限制,同样的界线作用在 src/client/ 的各个分片上。
  • 同一个来源的解析或发现逻辑出现第 3 处副本时,同样停下来提案,不写第 4 处。
  • test/*.test.mjs 单个文件超过 1200 行:同第一条,先拆再往里加用例。test/_support/ 与 test/fixtures/ 不受这条限制。测试面另有一项机械检查(npm run check:tests):每个来源格式至少有一个测试锚点。
  • 这几条停止线给执行模型用,触发即停,不必先判断「是否值得」。

命令

npm test               # node --test 跑 test/*.test.mjs
npm run lint           # eslint
npm run coverage       # 覆盖率护栏:line >= 75%
npm run check:coverage # 覆盖率结构:逐文件下限 + 逐目录均值下限(只看全局数字会盖住单文件的空洞)
npm run check:linux    # 跨平台路径纪律静态检查
npm run check:leaks    # 敏感信息泄漏扫描
npm run check:links    # 文档相对链接检查
npm run check:tests    # 测试面纪律:每个来源有测试锚点 + 单测文件停止线
npm run release:notes -- --version x.y.z   # 校验并预览该版本的发布说明(release workflow 用的是同一份)
npm run build:client   # 由 src/client/ 的分片组装 lib/client.js(改过面板必须重跑)
npm run build          # 发布面自检:client bundle 是否最新、files 是否完整、入口可达的模块是否都在 files 里、语法、lockfile

仓库布局

  • lib/index.mjs 是插件入口(package.json 的 main),只做组装。
  • lib/convert/* 与 lib/export/* 是纯函数层,不读盘、不 import 宿主模块,有测试守护。共用件在 convert/util.mjs、convert/ir.mjs、convert/core.mjs 与 export/common.mjs。设计同源的来源共用一个转换引擎,各自只留差异描述(pi 与 omp 共用 convert/pi-family.mjs,见 D21)。convert/index.mjs 只转出经它导入的名字;export/index.mjs 是公开子路径 ./export.mjs。
  • lib/sources/* 是按来源命名的 host 面适配器,与 lib/convert/<src>.mjs 一一对应;SQLite 读取统一经 sources/sqlite.mjs。
  • 导入编排分布在几处:lib/import-core.mjs 是单会话源与多会话源共用的状态机,lib/import-state.mjs 管已知记录与「源未变」短路径,lib/import-batch.mjs 管文件收集与批量计数,lib/import-variants.mjs 管 chatgpt / grokbuild / hermes / kimi 等特殊形态;registry 在 lib/imports.mjs。
  • lib/discovery.mjs 是门面,实现放在 lib/discovery/:registry.mjs 是来源描述符表,其余是按来源族划分的扫描器模块。
  • lib/tools.mjs 是门面,负责注册与档位对账,工具定义都在 lib/tools/。import_chat 的分发器与来源表在 lib/toolkit.mjs。工具 schema 只放一次调用需要的东西,长文说明在 docs/IMPORT-GUIDE.md,由运行时 skill dsh-chat-import-usage 按需加载。
  • lib/client.js 是浏览器面板的 bundle,属生成产物,不要手改。源在 src/client/,组装器是 scripts/build-client.mjs。
  • bin/dsh-chat-import.mjs 是独立 CLI。
  • docs/ 放面向最终用户的文档(含 ROADMAP、CONTRIBUTING)。test/ 放测试与合成 fixtures,假宿主这类测试共用件在 test/_support/,不要在测试文件里另写一份。
  • dev/、node_modules/、.dsh-file-claim/ 不入库。

Read the full file on GitHub · 89 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. 3d ago Changed 24f50cccaa5d
  2. 4d ago Changed faa30059196b
  3. 8d ago Changed · +328 tokens per session 2c2795ba8bbf
  4. 10d ago Changed · +1 lines · +161 tokens per session 4a5fc675bcef
  5. 20d ago Changed · +3 lines · +196 tokens per session 5c6eac506ada
  6. 22d ago Changed · +5 lines · +574 tokens per session 021f11212ae2
  7. 24d ago Changed · +32 tokens per session 4b052eceb698
  8. 29d ago Changed · +45 tokens per session 7a66cab1f9b5
  9. 1mo ago Changed · +12 lines · +423 tokens per session 918d5fe0edb2
  10. 1mo ago First seen · 68 lines · 1,431 tokens per session scan A 4e95811327bd

Subscribe to this mod's changes

dsh-chat-import AGENTS.md is an instructions file published in the GitHub repository Nwflower/dsh-chat-import (259 stars, last pushed 3d ago), licensed MIT. It adds 3,190 tokens to every session, about $0.0128 per session on Opus 5.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.

Related

Other instructions, from other repositories