Introduction

When building agent extensions in DeepSeek Harness (DSH), common needs go beyond just connecting a single model or tool; they involve incorporating role settings, role card management, image generation, and other capabilities into the same web profile. DSH’s philosophy is “Everything is a Plugin,” and the community directory acts as an independent site hosting some plugins, with no official affiliation to DeepSeek or Fangfang.

dsh-roleplay is a DSH plugin maintained by chinosk6, designed for DeepSeek Harness, providing role-playing, role card creation/import, and image generation capabilities.

About

dsh-roleplay is a DSH plugin primarily used for:

  • Role-playing conversations
  • Role card creation and import
  • Calling image generation interfaces

The license is MIT.

Requirements

Before use, the following conditions must be met:

  • dsh 0.1.0-rc.6+
  • Node 22.19+
  • pnpm 9+

Core Features

Below are the verified capabilities.

Role-play

The plugin supports Role-play conversations, which means conducting role-playing style dialogues within DSH.

Role Card Creation and Import

The plugin supports role card creation and Tavern-compatible role card generation/import.

Specifically includes:

  • Supports interactive role card creation
  • Supports Tavern-compatible role card generation/import
  • Supports RP-Hub role card import

The README mentions that some prompts reference the RP-Hub project.

Image Generation

The plugin supports image generation and can connect to the following interfaces:

  • NAI Official Interface
  • ai.erp.sex Third-party interface
  • Stable Diffusion WebUI Local Interface

Installation and Usage

First, confirm that the environment meets the version requirements above, then choose the installation source.

Install from npm

If the plugin has been published to npm, you can use the following command to install it to the web profile:

dsh plugin --profile web add -w dsh-roleplay

This command will add dsh-roleplay to the plugin list of the current web profile.

Install from GitHub

You can also install directly from the GitHub repository:

dsh plugin --profile web add -w github:chinosk6/dsh-roleplay

If you need to specify a branch or tag during installation, you can use the version reference after #:

dsh plugin --profile web add -w github:chinosk6/dsh-roleplay#v0.1.0

Git Installation Build Script Configuration

When installing from GitHub, the plugin runs prepare to build lib/.

If pnpm prompts that the build script is ignored, you can configure the allowance to build in the following file:

~/.dsh/profiles/web/pnpm-workspace.yaml

The configuration content is as follows:

allowBuilds:
  dsh-roleplay: true

After configuration, re-run the installation or startup process.

Update Plugin

Use the following command to update the plugin:

dsh plugin --profile web update dsh-roleplay

After updating, you need to restart dsh.

Uninstall Plugin

Use the following command to uninstall the plugin:

dsh plugin --profile web remove dsh-roleplay

Note: After uninstallation, role cards and generated image caches may still remain in:

$DSH_HOME/roleplay/

If a thorough cleanup is needed, manually delete the relevant files in that directory.

Local Build and Add

If you want to use it from a local repository, you can build it first, then add the local directory.

Build Plugin

Execute the following in the project directory:

pnpm install
pnpm run build

This step installs dependencies and runs the build script.

Add Local Repository to dsh

After building, add the current local repository directory to DSH:

dsh plugin --profile web add -w .

After that, you need to restart dsh web.

Use Cases and Notes

This plugin is suitable for the following use cases:

  • Using role-playing conversations in DSH’s web profile
  • Needing to import or create role cards
  • Needing to call image generation interfaces like NAI, ai.erp.sex, or Stable Diffusion WebUI
  • Wanting to uniformly manage DSH plugins, updates, and uninstallation

Notes before use:

  • The plugin runs with the permissions of the current dsh process; check the source code and license before installing
  • The license for this project is MIT
  • Installing from GitHub may trigger the prepare build process
  • Uninstalling the plugin does not automatically clean up cache files in $DSH_HOME/roleplay/

Related Links

The value of dsh-roleplay lies in incorporating role-playing, role card management, and image generation capabilities into the DSH plugin ecosystem, reducing the cost of setting up processes separately.

Directory page:

  • https://www.skillhub.cn/plugins/chinosk6/dsh-roleplay

GitHub:

  • https://github.com/chinosk6/dsh-roleplay