Preface

When developing with DSH (DeepSeek Harness), there are two common types of tasks. One is tool orchestration: writing a run_code program using the Code Mode SDK to combine multiple tool calls in a single execution. The other is creative work around the runtime: inspecting the live runtime, defining and testing dynamic plugin packages, and even creating new agent presets.

These two capabilities currently belong to two built-in presets in DSH: the built-in PTC preset (id is code, renamed to ptc since dsh 0.1.2) provides Code Mode orchestration; the built-in creative preset (cordis) provides self-referential Cordis tools and preset creation guidance. They each handle their own side, and there was no ready-made choice to use both in the same session before.

dsh-ptc-cordis-preset fills this gap. It is maintained by KannaKuron, the repository code is MIT licensed, and the current version is 0.8.1. Below is an introduction to its positioning, working mechanism, and usage.

What is it

One-sentence positioning: A creative mode based on PTC mode—combining Code Mode tool orchestration, self-referential Cordis tools, and preset creation guidance into a ptc-cordis user preset. The philosophy of DSH is “everything is a plugin,” and this plugin delivers not a tool patch, but a complete agent preset.

The workflow is: when the DSH process starts, the plugin materializes the synthesized preset to the first user trust root, with a default path of ~/.dsh/.agent-presets/ptc-cordis/; afterwards, create a new session and select “PTC Creative Mode” in the mode selector to use it. The directory structure after materialization is roughly as follows:

~/.dsh/.agent-presets/ptc-cordis/
├── agent.cordis.yml      # Synthesized composition: full built-in code/ptc preset + creative preset increment
├── skills/               # Two creative skills, copied on the fly from locally installed built-in cordis presets
└── .plugin-managed.json  # Plugin management marker: file shasums, composition era, etc.

Among them, agent.cordis.yml is the key to the synthesis: the combined text of the built-in code/ptc preset is kept as-is, and then the increment of the cordis preset is layered on top (persona, Cordis tools, skills directory).

Version requirements: node >= 18, dsh >= 0.1.0 (engines field in package.json); the workflow switch mentioned below requires dsh >= 0.1.2.

Core Capabilities

Self-referential Cordis Tools

The preset adds five Cordis tools on top of the full PTC capabilities:

  • cordis_inspect: read the runtime;
  • cordis_define / cordis_run / cordis_stop: define, run, stop dynamic plugin packages;
  • cordis_undefine: delete dynamic plugin packages.

Under Code Mode, these tools are located in the SDK like any other tool: they can be called by writing them into a run_code program as SDK functions. In other words, the same segment of code can orchestrate ordinary tools, check the runtime, and test dynamic plugins—this is precisely the meaning of the “PTC × Creative” combination.

Creative Guidance and Onboard Skills

The synthesized persona includes dual-plane creative guidance: trade-off rules between the host combination and the Agent preset, and combination methods under Code Mode (writing cordis tools into run_code programs as SDK functions).

Two creative skills follow the preset: editing-cordis-compositions and cordis-plugin-development. The skill content is not packed inside the plugin, but copied on the fly from locally installed built-in cordis presets. When asked to create a preset or test dynamic plugins in the session, these two skills will be automatically loaded.

Working Mechanism

User Priority Protection

When materializing, the plugin records the sha256 of each file into .plugin-managed.json, resulting in three rules:

  1. Unchanged files: the plugin refreshes them in place during upgrades;
  2. Files you changed: the plugin will no longer touch them—startup won’t overwrite, uninstall won’t delete;
  3. A self-created ptc-cordis directory without marked files: the plugin completely takes over nothing.

The second point is worth noting: after you have modified the preset yourself, plugin upgrades or uninstalls will not touch these files, and the handling rights are completely yours.

Quiet Start

Since v0.2.1, when the directory has not changed and the plugin version has not changed, startup does not rewrite any files and does not print logs.

Dual Adaptation for dsh Versions

dsh 0.1.2 renamed the built-in code preset to ptc, and the combined text of the two eras is not the same. Since v0.7.0, the plugin carries the complete combined text of both code (dsh <= 0.1.1) and ptc (dsh >= 0.1.2) eras. Upon startup, it detects the local dsh and automatically selects, recording the result in the base field of .plugin-managed.json. After upgrading dsh, the next startup will automatically rematerialize according to the detection result without manual handling.

Workflow Switch

Since v0.8.0, the settings page provides a workflow switch card, deciding whether the synthesized preset provides workflow tools. By default, it is on, inheriting the creative mode capabilities; switching it will immediately rematerialize the preset, and it takes effect immediately in new sessions. This switch requires dsh >= 0.1.2.

Coexistence and Interaction

  • Coexistence with the built-in creative mode in the same process: since v0.4.0, this is implemented through a compatible shim; v0.6.3 fixed the shim installation timing issue.
  • Interaction with dsh-gitbash-shell (v0.2.0+): when materializing, it detects the gitBash host capability of that plugin. On Windows, if the two plugins are used together, agent.cordis.gitbash.yml is used instead (tool-bash enabled, tool-pwsh disabled); otherwise, the default agent.cordis.yml is used.

Installation and Enablement

The installation command is as follows, from the npm public package:

dsh plugin --profile web add dsh-ptc-cordis-preset

The plugin is pure JS, zero build, zero dependency. Installation does not trigger pnpm build scripts, nor does it need to be whitelisted in allowBuilds.

After installation, restart DSH (host restart), create a new session, select “PTC Creative Mode” in the mode selector, and the enablement is complete.

Daily Usage

How to use inside a session

  1. Create a new session and select “PTC Creative Mode” in the mode selector;
  2. Use Code Mode normally: use run_code to combine multi-step operations, cordis_inspect and other tools are in the SDK, just call them like other tools;
  3. When you need to create a preset or test dynamic plugins, just ask, and it will automatically load the accompanying editing-cordis-compositions and cordis-plugin-development skills.

Update

Two ways: click the “Update” button on the market page, or run the installation command above again. Afterward, restart DSH, and unchanged presets will be refreshed in place to the new version.

Update detection is done by dshmarket based on the registry version, with a 30-minute TTL cache; if the market page is slow to show updates, you can visit /dsh-market/updates?force=1 to force refresh the cache.

Uninstall Notes

Command line uninstall (dsh plugin --profile web remove dsh-ptc-cordis-preset) runs in a separate process, the disposer does not run, and the ptc-cordis preset will remain. At this point, you need to delete it on the settings page or manually clean up:

rm -rf ~/.dsh/.agent-presets/ptc-cordis

Build and Test from Source

git clone https://github.com/KannaKuron/dsh-ptc-cordis-preset.git
cd dsh-ptc-cordis-preset
npm test

npm test runs node --test, totaling 11 smoke tests, no network required, and no build steps.

Applicable Scenarios and Notes

Suitable scenarios: Developers who want to use Code Mode to orchestrate multi-step tool operations in the same session, while also checking the runtime, testing dynamic plugins, or creating/ modifying agent presets on top of that. If you only need one of these capabilities, use the built-in PTC mode or the built-in creative mode.

Trust boundaries are consistent with the built-in creative mode: cordis_define / cordis_run will execute JavaScript written by the model on the live runtime, so please treat the PTC Creative Mode session as a shell access.

The plugin runs with the permissions of the current dsh process and will write files under ~/.dsh/. It is recommended to review the source code and license before installing: the repository code is MIT; the synthesized combination and skill content are derived from the built-in preset @deepseek-ai/dsh (also MIT), and the runtime is copied from local installation and follows its license.

Ending

Recap: dsh-ptc-cordis-preset combines DSH’s built-in PTC and Creative presets into a ptc-cordis preset. It materializes at startup and is ready to use as soon as a new session is selected; hash marking protects user changes, dual dsh era adaptation is automatic, and there is a clear cleanup path for residual presets from command line uninstallation. For developers who need the coexistence of “Code Mode orchestration + creative capabilities,” it has turned a task that originally had to be manually spliced into an ready-made option.

Project links:

  • GitHub repository (source code and Release): https://github.com/KannaKuron/dsh-ptc-cordis-preset
  • Community directory page: https://www.skillhub.cn/plugins/KannaKuron/dsh-ptc-cordis-preset (Community site, not officially affiliated with DeepSeek / Magic; this URL is from plugin leads, not further verified)