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/sirilee/dsh-rewind/agents-mdgit clone --depth 1 https://github.com/SiriLee/dsh-rewindWrote 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/sirilee/dsh-rewind/agents-md)<a href="https://agentmods.dev/instructions/sirilee/dsh-rewind/agents-md"><img src="https://agentmods.dev/badge/instructions/sirilee/dsh-rewind/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.00734 | $0.00734 |
| Opus 5 | $0.00367 | $0.00367 |
| Sonnet 5 | $0.00147 | $0.00147 |
| Haiku 4.5 | $0.00073 | $0.00073 |
Grade A, and why
dsh-rewind 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 — 50 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
dsh-rewind — a DeepSeek Harness (DSH) plugin that rewinds a conversation in place to any earlier user message, optionally restoring workspace files along with it. This is the shared spec for every developer and agent working on this repo; it is intentionally minimal. Machine-specific local details live in
AGENTS.override.md(git-ignored — do not commit).
Positioning & principles
- Focused on purpose: it does exactly one thing — rewind to any earlier user message in the same window, never forking a session or switching windows.
- Security first: session logs are append-only and conversations are never deleted; file restores are confined to the plugin's own backup directory.
- Minimal: avoid over-abstraction; keep the plugin light and maintainable.
Common commands
| Command | Purpose |
|---|---|
npm run check |
one-shot full gate: typecheck + test + build + verify:host + npm pack --dry-run |
npm run build |
esbuild → lib/ (index.js host ESM, client.js client closure, types/ declarations) |
npm run typecheck |
tsc --noEmit (host / client / client-test configs) |
npm test |
vitest |
npm run verify:host |
end-to-end host verification (full check suite) |
@deepseek-ai/* dependencies stay external at build time — the DSH host resolves
them at runtime, so the published tarball does not carry them.
Layout at a glance
src/index.ts— host plugin:/rewindcommand + checkpoint pipeline (tools/execute|post-execute)src/rewind.ts— pure planning: target resolution, surface range, candidate listingsrc/snapshot.ts— checkpoint store (on-disk before-backups, restore/preview, bounded prune)src/session-cwd.ts— session working-directory resolution (fs-tools rule)src/client/— client plugin: per-message ↶ button, mode popover, hidden-span computationscripts/—build.mjs(artifacts),verify-host.mjs(host verification)docs/— organized:contract/(client contract),compat/(audit + troubleshooting),release/, plusharness-reference.md,format.md,architecture.md; repo root holdsSECURITY.mdandCONTRIBUTING.mdtests/— vitest suites (rewind / snapshot / hidden / session-cwd / integration)
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 · 50 lines · 734 tokens per session scan A 48cf2355c8d1
dsh-rewind AGENTS.md is an instructions file published in the GitHub repository SiriLee/dsh-rewind (35 stars, last pushed yesterday), licensed MIT. It adds 734 tokens to every session, about $0.0037 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
dsh-checkpoint-rewind AGENTS.md
AGENTS.md instructions for PerryLink/dsh-checkpoint-rewind, covering agents.md, 仓库布局:发布面 / 本地工程面, 命令, 提交纪律 and dsh 插件约束(红线).
DSH-better-sidebar AGENTS.md
AGENTS.md instructions for omdsh-dev/DSH-better-sidebar, covering dsh-better-sidebar 仓库规则(agents), 1. 仓库硬约束(必须遵守), 2. ci 挂载冒烟(plugin-mount job / pnpm test:mount), 3. dsh 0.1.2 适配要点(0.1.2-rc.1+ 基线) and 4. npm 发版(github release → npm publish).
awesome-dsh-plugin AGENTS.md
Instructions for beancookie/awesome-dsh-plugin, covering agents.md, 内容来源(source of truth), 目录结构(每个文件夹的作用), 添加插件 and 整理流程(分类与数量).
dsh-config-manager AGENTS.md
Instructions for xiajiajun516/dsh-config-manager, covering agents.md — dsh config manager 仓库协作指南, 🗣️ 语言与交流, 📦 项目概览, 🗂️ 仓库结构与职责 and ui 分层(改动前必读,避免放错层).
causal-memory CLAUDE.md
Claude Code instructions for JingxuanC/causal-memory, covering causal memory mcp integration, causal memory integration, after acting on a decision and observing the result, when something fails unexpectedly and when a recorded lesson turns out to be wrong.
dsh-industry-research AGENTS.md
AGENTS.md instructions for PerryLink/dsh-industry-research, covering agents.md, layout, hard rules applied here, checks and release.