dsh-claw-identity: Embedding the Claw Persona File into the System Prompt

Introduction

When running Claw Agents in DeepSeek Harness (DSH), a common practice is to write personas such as SOUL and AGENTS into repositories or scattered documents. These are then manually pasted for every new session, or the Agent is relied upon to “remember” to read the files itself. Once the persona becomes lengthy, it becomes difficult to maintain uniformly and prone to inconsistencies with the content actually injected into the model.

Below is an introduction to the community plugin dsh-claw-identity (the npm package name in the repository README is dsh-agent-identity). It belongs to the governance suite Phase 1: it reads core Markdown files from ~/.dsh/DSclaw/<agent>/, writes them into the system prompt during qualifying sessions, and does not intercept tool calls. After uninstalling the plugin, the files remain on disk, but they are no longer automatically injected.

What is this

  • Positioning: Claw identity files for DeepSeek Harness—injecting personas like SOUL / AGENTS into the prompt.
  • Maintainer: xingyingyuzhui.
  • Category: Model Inference (SkillHub catalog classification).
  • License: MIT (package.json version 0.1.8, Node.js >= 20).

It depends on the Claw directory structure created by dsh-agent-registry; this plugin is only responsible for the “core persona” layer of prompt injection and not for creating the Agent workspace itself.

Core Functionality

File and Injection Rules

The mechanism defined in the README is as follows:

File Behavior of this Plugin
SOUL.md / IDENTITY.md / AGENTS.md / TOOLS.md Injected into the system prompt in every conversation turn
BOOTSTRAP.md Exists when a new Agent is created; injected along with the others until the initial Q&A (e.g., name, how to address the user) is complete, then deleted by the Agent upon completion
USER.md / MEMORY.md / Diaries Not injected by this layer; injected at the start of the session by dsh-agent-memory (subject to length limits)
HEARTBEAT.md Saved to disk only; editable in the “Core” Tab. Patrol is disabled by default (every: 0), and this layer will not tick when idle

Scope of Effect

  • The above core personas are injected only if the current session’s working directory (cwd) is located under the DSclaw tree.
  • DSH Web: The Settings → Claw Agent → Core Tab allows reading and writing these seven relevant files (including items that are only saved to disk).
  • USER.md, MEMORY.md, and HEARTBEAT.md are not inserted into the prompt at this plugin layer; memory and heartbeat are handled by corresponding plugins or configurations.

Installation and Enablement

Official installation command (from the GitHub README):

dsh plugin --profile web add github:xingyingyuzhui/dsh-agent-identity

After installation, restart dsh web for the new configuration to load.

For local development, you can link a local directory (change the path to your local absolute path):

dsh plugin --profile web add link:/abs/path/to/dsh-agent-identity

Uninstallation:

dsh plugin --profile web remove dsh-agent-identity

Typical Usage

  1. Prepare ~/.dsh/DSclaw/<agent>/ and the persona files within it using dsh-agent-registry.
  2. Install dsh-agent-identity using the command above and restart the Web client.
  3. Edit SOUL.md, IDENTITY.md, AGENTS.md, TOOLS.md, etc., in Settings → Claw Agent → Core; keep BOOTSTRAP.md when creating a new Agent, and delete it according to the process after the first round of identity Q&A is complete.
  4. Converse in a session where the cwd is under that Agent’s DSclaw workspace, and observe whether the system prompt contains the core persona content.
  5. If user profiles and long-term memory need to enter the opening context, dsh-agent-memory must be installed and configured separately (its division of labor differs from this plugin; do not expect this plugin to inject USER.md / MEMORY.md).

The README does not provide additional CLI examples; behavior is subject to the hooks at runtime defined in the Cordis patch (cordis.patch.yml) and host.js.

Use Cases and Notes

Suitable for: Developers already using Claw Agent in DSH Web who want files like SOUL / AGENTS to be versioned and stably enter the system prompt every turn; used in combination with registry and memory plugins to build Phase 1 persona governance.

Notes:

  • The plugin runs with the permissions of the current dsh process. Before installation, please review the GitHub source code and MIT license yourself to ensure it meets your security and compliance requirements.
  • The SkillHub directory page and GitHub repository name may be written as dsh-claw-identity, but the installation and uninstallation commands should follow the dsh-agent-identity package name in the README.
  • The community plugin directory (SkillHub) is an independent site and has no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem follows “everything is a plugin,” and this is just one part of it.

Conclusion

dsh-claw-identity solves the problem of “where to write and when to inject” Claw core personas into the model: files are placed in the DSclaw directory, automatically enter the system prompt when the session cwd matches, and can be directly modified via the Core Tab in the Web client. Further memory and heartbeat functions require coordination with plugins like dsh-agent-memory.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye