Introduction

When asking an agent to write a report, the results usually end up in one of two places: either scrolling away in the chat window until lost, or sitting as a .html file in the workspace, never to be opened again. The former leaves no trace, while the latter pollutes the repository.

dsh-artifact addresses this problem. Below is an introduction to what this plugin does, how to install it, and how to use it.

What is it

dsh-artifact is a plugin for DeepSeek Harness (DSH), maintained by Jannchie, and licensed under the MIT license. The philosophy of DSH is “everything is a plugin,” and this plugin fills the “artifact” gap: it provides Claude-Code style artifacts for DSH—a artifact tool that writes self-contained HTML, a built-in creative skill, a sidebar navigation button, and an in-app sandbox HTML artifact browser.

Once installed, documents produced by the agent are stored as artifacts outside the workspace, prioritized by recency, persisted across projects, and rendered directly for reading within the app.

Core Features

artifact Tool

The plugin exposes an artifact tool to the agent, consisting of four commands:

Command Parameter Purpose
list (none) Lists all artifacts, newest first
read path Reads the full HTML of a single artifact
write path, content Creates or replaces an artifact
delete path Deletes an artifact

The path is relative to the storage directory; the .html suffix can be omitted. In other words, write path:"q3-report" will generate q3-report.html in the storage directory.

Built-in Creative Skill

The plugin registers a writing-artifacts skill. With it, the HTML generated by the agent is a proper document: a single reading pane, semantic headings, independently scrollable tables, and a color scheme that follows the theme, rather than a generic application shell wrapping three paragraphs of text.

In-App Artifact Browser

A new Artifacts tab and corresponding sidebar navigation button appear in the web interface. Artifacts are rendered in a sandbox iframe; click to read, use to return to the chat.

Artifacts Stored Outside the Workspace

Artifacts are stored in $DSH_HOME/artifacts (defaulting to ~/.dsh/artifacts), sitting on the same level as existing sessions and storage. This is a deliberate design choice: artifacts follow the user, not the project, and repositories shouldn’t be cluttered with generated HTML.

Preview Follows Theme

The preview injects the app’s real-time color tokens, so the artifact follows your theme—even one overridden by other plugins.

Installation and Activation

First, run the installation command:

dsh plugin --profile web add dsh-artifact

This command adds the plugin to the web profile. You must then restart dsh web: plugins are assembled at process startup, so changes take effect only after a restart.

Typical Usage

After restarting, ask the agent for a request worth preserving, for example:

Summarize this week’s benchmark results as a report.

The agent will invoke the artifact tool to write the content as an artifact, and the document will immediately appear in the Artifacts tab. Click to read, use to return to the chat.

Configuration

The plugin’s behaviors can be overridden in the profile’s cordis.patch.yml:

- id: artifact
  config:
    # Artifact directory. Uses $DSH_HOME/artifacts if omitted or null.
    root: /absolute/path/to/artifacts
    # Maximum number of characters accepted in a single write.
    maxArtifactChars: 400000
    # Whether to inject a system prompt paragraph about when to write artifacts.
    promptSection: true
    # Whether to register the built-in writing-artifacts skill.
    skill: true
    # Colors passed to the artifact preview, overlaying the real-time theme.
    # Keys without the -- prefix are read as alias tokens.
    palette:
      state-business-primary: '#e0552b'

Explanation of each item: root defaults to $DSH_HOME/artifacts if omitted or null; maxArtifactChars is the maximum number of characters accepted in a single write (example value: 400000); promptSection controls whether to inject a system prompt paragraph about when to write artifacts; skill controls whether to register the built-in writing-artifacts skill; palette is the color passed to the artifact preview, and keys without the -- prefix are read as alias tokens.

Sandbox Limits and Write Boundaries

On the rendering side, artifacts run in an iframe with only allow-scripts enabled—no network, no same-origin access. External style sheets, CDN scripts, webfonts, fetch, localStorage, and cookies are all unavailable, so artifacts must inline all required content. The built-in skill generates HTML according to this constraint; you will only truly notice this limitation when writing artifacts by hand.

On the write side, write is restricted to the artifact storage directory; out-of-bounds paths are rejected rather than saved to locations the browser cannot list.

Additionally, if you want to write your own plugin for DSH, NOTES.md in the repository provides implementation details: slot contracts, two-envelope wire protocol, and four traps worth knowing about.

Use Cases and Notes

Suitable scenarios:

  • The agent frequently produces reports, cheat sheets, or summaries worth keeping, and you want them to exist as readable documents.
  • You don’t want generated HTML mixed into the repository.
  • You want artifacts to persist across projects and be searchable in reverse chronological order.

Notes before use:

  1. The plugin runs with the permissions of the current dsh process. Before installing any third-party plugin, it is recommended to review its source code and license (this project is MIT).
  2. The plugin will not take effect until dsh web is restarted.
  3. Artifacts cannot depend on any external resources; when writing artifacts by hand, you need to inline all styles and scripts.

Summary

With the steps above, the agent’s output has evolved from “a paragraph scrolling away in the chat” into a document that can be opened anytime and persists across projects. To view the source code or learn more details, you can visit:

  • Community directory page: https://www.skillhub.cn/plugins/Jannchie/dsh-artifact
  • GitHub repository: https://github.com/Jannchie/dsh-artifact