AI Agent Hub
Back to plugins
🧠

dsh-context-mode

Memory Updated 2026.08.26

Run the following command in DeepSeek Harness:

dsh plugin install pharaohnie/dsh-context-mode

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install pharaohnie/dsh-context-mode in your terminal and restart DSH to activate the plugin; source code is at https://github.com/pharaohnie/dsh-context-mode.

About this plugin

When you feed large files, scrape web pages, or run data analysis through DeepSeek Harness, the real pain is not the task itself but the raw data flooding straight into your context window—tokens burn fast and the window overflows just as fast. dsh-context-mode takes a simple stance: keep as little raw data in context as possible. It does not compress what is already inside; it intercepts at the gateway and reroutes the flood.

It does three concrete things. First, it chunks files or entire directories into a local SQLite knowledge base (FTS5 with Chinese fuzzy matching and English stemming), and retrieval returns only the matched fragments rather than full documents; web pages are converted to markdown and indexed the same way, so the original bytes never touch your context. Second, a routing gate sits before tool execution: commands like curl and wget that are guaranteed to pull large payloads are outright rejected, full-file reads over 50 KB are nudged toward indexed search, while harmless commands like pwd and ls pass through with zero friction. Third, a sandboxed execution environment lets you write code for analysis, aggregation, or filtering and brings back only the console.log conclusions while the raw data stays inside the sandbox. You can also batch multiple analyses in parallel with automatic knowledge-base indexing and same-round retrieval.

If your daily DSH workflow involves reading long documents, scraping web pages for research, or running statistics over CSV and log files—and you keep fighting over a limited context budget—this plugin is built for that exact scenario. It does not promise absolute isolation, nor does it claim a 98 percent saving; it does one thing well: only conclusions enter the context, everything else stays out.

Use Cases

  • Large file reads and web scraping overflow the context window
  • Running statistics over CSV or log files without consuming context budget
  • Repeatedly searching through long documents for research in DSH

Best For

  • Developers who regularly process large files and web pages in DSH
  • Heavy users with limited context budget but large data volumes
  • Power users who need sandboxed execution for data analysis scripts