DSH Hub

Rianico/dsh-better-edit

dsh-better-edit

BundleWorkflow39 GitHub stars· updated 2026-10-22

Hash-anchored read/edit/undo_last_edit tools for DeepSeek Harness (dsh), fewer token consumption, lower cost.

Install

npx @deepseek-ai/dsh plugin --profile web add github:Rianico/dsh-better-edit

Restart `dsh web` after install. Bundle APIs can change during the developer preview.

README badge

dsh-better-edit DSH Hub badge
[![DSH Hub](https://dshhub.dev/badge/dsh-better-edit.svg)](https://dshhub.dev/plugins/dsh-better-edit)

Paste this into your README. The star count updates with every catalog sync.

From the README

Excerpt from Rianico/dsh-better-edit, cleaned of badges and images.

<h1 align="center">dsh-better-edit</h1> <strong>High-precision, hash-anchored file editing for DeepSeek Harness (dsh).</strong><br> Replaces fragile line numbers and token-wasting code echoes with content-addressed line hashes &mdash; 0 silent miswrites, 0 token re-reads. <strong>English</strong> · <a href="README.zh.md">简体中文</a>

<a href="#why-you-need-it">Why You Need It</a> • <a href="#core-pillars">Core Pillars</a> • <a href="#quick-start">Quick Start</a> • <a href="#tools">Tools</a> • <a href="#benchmark">Benchmark</a> • <a href="#how-anchors-work">How Anchors Work</a> • <a href="#development">Development</a>


What is dsh-better-edit? A high-precision file editing plugin for DeepSeek Harness (dsh) that replaces volatile line numbers and token-wasting code echoes with immutable, content-addressed 3-character line hashes (szJ│code).

Core Philosophy: Local compute is free; the model's context window is the most precious resource. By shifting verification, snapshotting, and alignment to the host, dsh-better-edit slashes output tokens by 40–60%, auto-rebases external file drift (e.g., Prettier, Git), and eliminates silent miswrites without forcing full-file re-reads.


Why You Need It

The 3 Fatal Editing Traps of Autonomous Coding Agents

File editing is the #1 point of failure for autonomous agents. Traditional tools break down in three distinct ways:

Fatal Trap in Traditional ToolsWhy It Breaks AgentsHow dsh-better-edit Solves It
str_replace Token BleedMust re-type 30+ lines of unchanged code just to change 1 line ($O(S+R)$), burning expensive output tokens (billed ~5–6× input).$O(R)$ Payloads: Sends only two 3-char hashes (anchor_from, anchor_to) + replacement. Cuts output tokens by 40–60%.
Line-Number Coordinate RotInserting 1 line shifts all line numbers below it. Agents suffer off-by-one errors or must repeatedly re-read the file.Position-Independent Anchors: Line hashes follow content, not line coordinates. Exterior shifts auto-rebase cleanly.
Silent Miswrites & DriftDuplicate lines match the wrong function; external formatters (Prettier) or git updates cause blind overwrites or fatal errors.Content-Addressed Line Verification: Unique anchors via coprime probing; format-tolerant whitespace hashing; fail-closed reject-and-serve.

Core Pillars

1. 🪙 Token Economics (40–60% Context Savings)

…

Related plugins