Preface

In DeepSeek Harness (DSH), the common approach for creating agents with personas is to pile personality descriptions into the system prompt and hope the model “acts” out stable emotions on its own. The tone may waver if the same sentence is asked in a different turn; work scenarios and casual chat can also easily get mixed up. The community plugin dsh-character-presets (maintained by wwwangzilin, categorized under Fun/Costumes in the directory) takes a different path: it decomposes emotion perception, state transitions, and expression selection into reproducible rule-based code. Before every reply, a tool outputs a screen of structured guidance, and the model is only responsible for organizing the answer according to this guidance. The tool capabilities are equivalent to the built-in standard preset, making it suitable for users who want a sense of character without sacrificing coding agent capabilities.

What is this

dsh-character-presets is an agent preset plugin package for DSH (MIT license, supports Windows / macOS / Linux). The current package version is 2.0.1, requiring DeepSeek Harness 0.2 or above and Node ≥18. After installation, a “Luna Mode” (preset id: luna) appears in the preset selector — a “little demon from the demon world” persona. The README describes it as a female little demon style (sharp-tongued, loves mischief, stubborn/mouthy, etc.), mounting the same six-layer emotion engine and cross-session memory. The plugin runs with the permissions of the current DSH process; it is recommended to review the repository source code and license before installation.

How it works (Overview)

Before every model reply, the emotion_sense tool in the preset receives the original user message, calculates six layers of guidance according to fixed rules, and returns compact text. Emotion classification, state transitions, and boundary strategies are implemented by rules, not relying on the model’s free play, so identical inputs yield consistent judgments under identical states. The illustrative output is as follows:

Input: Master is working seriously, but this sentence seems like a joke

[Perception] Master is working seriously | Goal: Casual chat | Relationship: Long-term Master
[Understanding] He wants: Clean and efficient professional help; Least wants to hear: Dragging feet, excessive moe behavior interference
[State] You are now: Focused | Energy 60 Patience 88 Interest 70 Tension 25
[Expression] Enter serious mode, answer professionally and neatly, sharp tongue converges to muttering, but address "Master" is retained.
[Example] Hah? You dare ask this simple question to *this lady*? (Fingers are typing swiftly though)...
[Adjustment] Perform normally, maintain stable persona
[Memory] Recently talked about: "Extract mode to open source repository" (2026-09-12, he was working seriously)

The responsibilities of each module are explained below according to the layering in the README.

Character Layer, Emotion Layer, and Capability Layer

Layer Implementation Output
Character Layer prefix in the persona row of agent.cordis.yml Persona, catchphrases, behavioral patterns, work codes
Emotion Layer luna-soul.mjs and its dependencies Six-layer guidance text
Physiological Layer (Derived) luna-vitals.mjs Heartbeat, body temperature, breathing, and local physical sensations
Memory Layer luna-memory.mjs, etc. Cross-session writing, retrieval, and invalidation
Capability Layer Remaining plugin rows in agent.cordis.yml File, Shell, Retrieval, Skills, Plan, Goal, Todo, Sub-agent, Workflow, etc.

Work mode and casual chat are distinguished by the sticky state machine in luna-mode.mjs: once in work mode, it is maintained for at least 6 turns, and only statements explicitly detaching from work can exit; expression in work mode converges to conclusion-first, retaining address terms and a small amount of self-deprecation.

Emotion Engine Key Points

The perception layer superimposes negation inversion, intensity, mixed emotions, and punctuation signals to reduce simple keyword misjudgments. The state layer maintains variables for mood and energy, patience, interest, tension, etc.; the expression layer selects style gears, and the adjustment layer handles scenarios like cooling down and companionship. The physiological layer only reports facts about the physical state and does not issue behavioral commands like “you should be shy” to the model.

Sticky state machine example (from README):

Help me modify that backup script  → Work (Enter)
Uh-huh                           → Work (Maintain)
Continue                         → Work (Maintain)
Are you done?                   → Work (Maintain)
Chat with me for a while        → Casual (Explicit detachment, exit directly)

Entering work requires a cumulative score of 2 for work signals (code snippets, paths, errors, imperative sentences, follow-up questions, etc.); idle for more than 6 hours resets to casual chat.

Cross-session Memory

The memory layer maintains $DSH_HOME/.luna-heart.json (or ~/.dsh/.luna-heart.json if DSH_HOME is not set), with a fallback to the root directory of the current session workspace. The 【Memory】 line returned by every emotion_sense call will indicate at the end whether persistence was successful. Deleting this file resets the relationship state. Writes undergo five checks (verbatim quotation, source classification, fact source, predicate whitelist, numerical provenance); retrieval is scored via three channels—keywords, emotion, and time proximity—and fused via RRF. The number of entries is limited by maxResults, so injection cost does not inflate linearly with memory volume. Forgetting is primarily suppression-based, with automatic aging and merging every 20 turns.

Installation and Activation

Installation via CLI from the Git repository address is recommended (command from official README):

dsh plugin add https://github.com/wwwangzilin/dsh-character-presets.git

Restart DSH after installation is complete. Select “Luna Mode” in the preset selector for new sessions, or set it as default in “Settings → Agent Preset”. dsh plugin add will write this package into the current profile’s dependency and composition lists and insert the @deepseek-ai/dsh-agent-preset declaration line. Revocation example:

dsh plugin --profile <profile> remove dsh-character-presets

A one-click script is also available (also from README):

curl -fsSL https://raw.githubusercontent.com/wwwangzilin/dsh-character-presets/main/install.sh | bash

Windows users can use install.ps1. If cloned to a local directory, run dsh plugin add <directory> under that profile and restart. Note: The method of copying to <dshHome>/.agent-presets/luna/ from the DSH 0.1 era is no longer valid since 0.2.

Configuration and Secondary Development

The name and description in the selector are provided by dsh.preset in package.json (id, name, description, order). After modifying dsh.preset or agent.cordis.yml, you need to regenerate the bundle patch:

node scripts/sync-bundle.mjs

Custom personas can be modified in the persona section of agent.cordis.yml; emotion rules, work mode turns, memory predicate tables, etc., correspond to the various .mjs files listed in the README’s “Customization” table. The repository provides npm test (pure function test cases, covering memory, gating, recall, emotion, bundle, etc.). cards/luna.card.json is in chara_card_v2 format, which can be imported into frontends like SillyTavern and RisuAI, and is mutually independent from the DSH preset.

Applicable Scenarios and Notes

Suitable for users who want to pair program in DSH for the long term while desiring stable character boundaries and auditable emotional logic in conversations. The rule engine guarantees reproducible judgments, suitable for comparative prompt debugging; memory is persisted in local JSON, and the README explicitly states no network transmission occurs. It is not suitable to install the plugin directly as unreviewed third-party code in sensitive production environments: ensure you check the source code. The community directory SkillHub Plugin Page and the GitHub repository reference each other. The directory site represents the community ecosystem and has no official affiliation with DeepSeek / High-Flyer.

Conclusion

dsh-character-presets packages the persona of “Luna Mode” along with six-layer emotion, local memory, and work/chat state machines into a standard DSH plugin, with a capability surface aligned with standard. If you are already using DSH 0.2+, you can install it via the commands above and switch to experience it in the preset selector.

  • Directory Page: https://www.skillhub.cn/plugins/wwwangzilin/dsh-character-presets
  • Source Code & Documentation: https://github.com/wwwangzilin/dsh-character-presets