Preface

In DSH community plugins, long-term memory can be accessed as an independent capability. deepseek-harness-memory stores cross-session memory in markdown files and automatically injects them when a session starts. Below is an introduction to its capabilities, installation methods, typical usage, and precautions.

What is this

deepseek-harness-memory is a Claude Code-style long-term memory plugin (DSH version). It is maintained by 2303572348, licensed under MIT, and its core goal is to provide cross-session persistent memory and automatically inject it when a session starts.

The plugin stores memory in plain markdown files using a MEMORY.md index and YAML frontmatter, ensuring 1:1 compatibility with Claude Code memory format.

Core Capabilities

Persistent Storage and Automatic Injection

The plugin supports user-level memory and workspace-level memory:

  • User-level: ~/.dsh/memory
  • Workspace-level: ~/.dsh/memory/projects/<key>/

Every time the prompt is assembled, the plugin injects the user-level and current workspace-level memory indices into the system prompt. This allows the model to continue referencing previously saved memories in subsequent sessions.

memory Tool

The plugin provides a memory tool supporting the following operations:

  • add
  • update
  • delete
  • list
  • read
  • import-claude

These operations cover the daily CRUD (Create, Read, Update, Delete) of memories and importing from Claude Code memory.

Claude Code Memory Compatibility

The plugin is compatible with Claude Code memory format and supports two migration methods:

  • Automatic Fallback: Reads from ~/.claude/projects/<same key>/memory/ and ~/.claude/memory/. This read operation is read-only and does not modify the original files.
  • Formal Import: Imports Claude Code memory into the DSH side via import-claude.

Normalization of Multi-Checkout Memory

If the same project has multiple checkouts, the path keys may differ. projectAliases can map multiple path keys to a unified key, allowing multiple checkouts to use the same memory.

Configuration Override

The plugin can override the config under the memory line in cordis.patch.yml. Overridable keys include:

  • memoryRoot
  • scope
  • maxIndexLines
  • maxIndexBytes
  • maxList
  • includeInPrompt
  • importClaudeMemory
  • projectAliases

Installation and Enablement

Standard Installation

First, install pnpm because dsh plugin depends on it:

npm install -g pnpm

Execute the official installation command in the plugin directory:

dsh plugin --profile web add .

After completion, restart dsh web and the plugin will take effect.

Fallback Method Without pnpm

If you do not install pnpm for the time being, you can copy the deepseek-harness-memory directory to:

~/.dsh/profiles/node_modules/deepseek-harness-memory/

Then append the following to ~/.dsh/profiles/web/cordis.patch.yml:

- insert:
    - id: memory
      name: 'deepseek-harness-memory'

Upgrading and Rolling Back

Upgrade the plugin:

dsh plugin --profile web update deepseek-harness-memory

Roll back the plugin:

dsh plugin --profile web remove deepseek-harness-memory

After rolling back, the memory files are retained and not deleted.

Typical Usage

Maintaining Memory

In a session, requesting the model to use the memory tool allows you to execute:

  • add: Add new memory
  • update: Update memory
  • delete: Delete memory
  • list: List memory
  • read: Read memory

Importing Claude Code Memory

When automatically falling back to read-only Claude Code memory, you need to rely on importClaudeMemory related configuration.

For formal import, you can say to the model:

Use the memory tool import-claude to import memory

Or you can call:

memory action=import-claude

Configuring projectAliases

If two checkouts need to share the same project memory, you can add the following to the configuration:

projectAliases:
  C--work-my-project-a: my-project
  C--work-my-project-b: my-project

With the configuration above, both path keys will map to the same my-project.

Applicable Scenarios and Precautions

This plugin is suitable for:

  • Users who need to retain memory across sessions in DSH.
  • Users who already have Claude Code memory and want to reuse its format or import it into DSH.
  • Users with multiple checkouts of the same project who want to share one set of memory.

Note before use:

  • The plugin runs with the current dsh process permissions; check the source code and license before installing.
  • Memory is stored in plaintext; do not save keys/PII; the README explicitly states that API keys/passwords are never saved.
  • No automatic memory extraction; no /memory or /toggle-memory commands.
  • lib/index.js depends on @deepseek-ai/dsh-tools and @deepseek-ai/schemastery, resolving from the profile’s node_modules.

Conclusion

deepseek-harness-memory provides cross-session memory capabilities on the DSH side and organizes memory into a Claude Code-compatible markdown structure. With the installation and configuration above, it can automatically inject memory indices when a session starts, as well as fall back to or formally import from existing Claude Code memory.

Directory Page: https://www.skillhub.cn/plugins/2303572348/deepseek-harness-memory

GitHub: https://github.com/2303572348/deepseek-harness-memory