AI Agent Hub
Back to plugins
🤖

dsh-directive-compact

Model Inference Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install ya8D/dsh-directive-compact

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

Run dsh plugin install ya8D/dsh-directive-compact in your DeepSeek Harness workspace to install the plugin; the full source is available at https://github.com/ya8D/dsh-directive-compact

About this plugin

When a conversation stretches to hundreds of thousands or even a million tokens, the built-in compaction logic often falls short: it either retains too much stale context or inadvertently deletes information you still need. dsh-directive-compact hands the compaction decision back to you—describe in plain language what to keep, what to drop, and how to compress, and the agent reshapes the context accordingly.\n\nThe plugin ships two complementary commands. /compact-directive protects the session head (system prompt, skill catalog, first user message) and the most recent turns, compressing only the middle. /trim-directive leaves no region protected: any node, including the injected skeleton, can be removed by natural-language instruction. Both accept requirements in any language, with no templates or rigid formatting required.\n\nThis plugin is designed for anyone running 1M-token-window models such as deepseek-v4-flash on very long sessions who wants compaction that is both controllable and observable. Results are written as checkpoints into the model context; the original transcript remains in the append-only session log, so every operation is traceable and auditable.

Use Cases

  • Precisely compress redundant middle context in very long sessions
  • Delete injected skeletons or system prompts with full-surface trimming
  • Manage agent working memory under 1M-token windows

Best For

  • Developers running long sessions on 1M-token window models
  • AI application builders who need fine-grained context compaction control
  • Agent operators who prefer natural-language directives over rigid templates