dsh-pixel-studio: Create Pixel Art and Animation in DSH Conversations

Introduction

When having an agent “draw pixel art” in DeepSeek Harness (DSH), the common approach is to generate a static image or an external preview page: the conversation only shows a thumbnail, while zooming, frame stepping, color palettes, and exporting usually require opening separate tools. If the goal is reusable game assets (transparent PNG, GIF, spritesheet + JSON, oy-pixel’s .oypx), you also need to manually organize the file structure.

Below is an introduction to dsh-pixel-studio by maintainer Fantety (community category: fun/customization). It is a native in-chat pixel art and pixel animation studio for DSH: the agent generates content via programmatic shaders, palette-indexed grids, or template/motion recipes, with results rendered as interactive Canvas views in the conversation tool panel, while simultaneously writing out production-ready export files. The repository is licensed under MIT, and the current package version is 1.3.1 (as specified in the repository’s package.json).

What Is This

dsh-pixel-studio is a DSH plugin (also packaged as a bundle): the host entry is lib/index.js, the Web client entry is lib/client.js, and it is mounted via declarations in cordis.patch.yml and dsh.client. Key design points include:

  • Native Canvas first: playback, frame stepping, zooming, pixel grid, onion skinning, palette, and craft scores are all handled within the chat tool view, rather than via separate delivery cards or standalone preview sites.
  • Agent-oriented: the one-char-per-cell grid is compact, diffable, and validated before being written to files; mounting the plugin injects a pixel-art system prompt snippet adapted from oy-pixel, and every result comes with a deterministic craft report.
  • Zero extra runtime dependencies: the host side uses only Node built-in modules; the client uses the React runtime already provided by DSH.
  • Security boundary: pixel_shader runs in a sandboxed tree-walking interpreter with no host access; inline canvas data has size limits and is decoded locally; the plugin does not make network requests.

Core Features

In-Chat Canvas

  • Automatic animation playback, plus play/pause and previous/next frame controls
  • Nearest-neighbor scaling (1–24×), pixel grid, onion skinning
  • Checkerboard/dark/light backgrounds
  • Palette swatches, frame count, FPS, and craft score
  • Directly open PNG, GIF, spritesheet, or OYPX from the card, or an optional standalone HTML viewer
  • Compact fallback panel when exceeding the inline budget

Pixel Tools and Assets

Capability Description
pixel_shader Programmatic generation with a Lua-subset Canvas API (pal, mix, hsv, alpha, rand, noise, phase/time, shapes, fill, stroke, stamp, etc.), following oy-pixel’s pixel_run_shader contract
pixel_art Still images, icons, sprites, scenes, portraits
pixel_animation Explicit multi-frame, or base sprite + motion recipe

7 built-in palettes: PICO-8, Game Boy, Sweetie 16, DawnBringer 16/32, Studio Warm, Ink & Paper; custom palettes and single-character legend mappings are supported. Source-over alpha-based layered drawing is supported.

12 built-in 16×16 templates: slime, cat, robot, potion, sword, heart, ghost, star, coin, tree, mushroom, crystal. Motion presets include bob, float, breathe, sway, shake, pulse, spin, orbit. Configurable outline, shadow, background, GIF loop count, and per-frame duration.

Exports include transparent PNG, animated GIF89a, spritesheet + JSON atlas, an optional standalone HTML viewer, and oy-pixel-compatible OYPX v2 (#RRGGBBAA row RLE, compatible with the current oy-pixel parser).

Environment & Dependencies

  • DeepSeek Harness: 0.2.1-rc.2 or higher, still within 0.2.x (engines.dsh: >=0.2.1-rc.2 <0.3.0)
  • Node.js: 20 or higher (development and testing)
  • A DSH configuration with the Web GUI is required (client platform: "web")

Installation & Activation

This package is both a plugin and a bundle; when installing via the Plugin Manager, do not manually copy the pixel-studio loader line from the bundle patch into your personal profile’s cordis.patch.yml.

In Settings → Plugins → Install, paste one of the following addresses:

https://github.com/Fantety/dsh-pixel-studio

If GitHub SSH is configured:

git+ssh://git@github.com/Fantety/dsh-pixel-studio.git

The manager will install the package, write dsh-pixel-studio into the profile’s dsh.profile.bundles, and apply the bundled patches.

CLI Profile Management

Replace my-profile with the actual profile name (e.g., web, headless, or a custom name):

dsh plugin --profile my-profile add \
  "git+ssh://git@github.com/Fantety/dsh-pixel-studio.git"

Confirm that dsh-pixel-studio appears in dsh.profile.bundles in ~/.dsh/profiles/my-profile/package.json. The desktop profile is managed by the Electron app—please use the Plugin Manager to install it instead of modifying it manually.

After reloading the profile, refresh the Web GUI once to load the client bundle; if the tool card still shows a generic form, restart DSH.

Prebuilt Release Archive

Each v* tag publishes a versionless tarball:

dsh plugin --profile my-profile add \
  "https://github.com/Fantety/dsh-pixel-studio/releases/latest/download/dsh-pixel-studio.tgz"

Typical Usage

Natural Language

Describe the requirements directly in the conversation, e.g., the example from the README:

Draw a 32×32 moss slime with top-left lighting and make an 8-frame floating animation. Export it as PNG, GIF and OYPX.

Tool Call (Template + Palette)

{
  "name": "moss-slime",
  "template": "slime",
  "palette": "sweetie16",
  "effects": { "outline": true, "shadow": true },
  "outputDir": "pixel-art"
}

Hand-Drawn Grid + Legend

{
  "name": "tiny-heart",
  "legend": { "O": "#3B0D1A", "R": "#EF4B6B", "L": "#FF9FB2" },
  "grid": [
    ".OO..OO.",
    "ORROORRO",
    "ORLRRRRO",
    "ORRRRRRO",
    ".ORRRRO.",
    "..ORRO..",
    "...OO...",
    "........"
  ],
  "scale": 12
}

Without a legend, the characters 0-9a-z represent palette indices (up to 36 colors), and . is transparent; the default palette is sweetie16.

Animation (Template + Motion)

{
  "name": "native-ghost",
  "template": "ghost",
  "palette": "sweetie16",
  "effects": { "shadow": true, "shadowColor": "#00000055" },
  "motion": { "preset": "float", "frames": 8, "amplitude": 1 },
  "fps": 12,
  "loop": 0,
  "scale": 10
}

Use Cases & Caveats

Who It’s For

  • Developers or agent workflow authors who want to quickly iterate on pixel sprites, small icons, and looping animations in DSH conversations, and need standard game export formats.
  • Scenarios where you want the agent to generate images via compact grids or pixel_shader programmatically, while inspecting frame by frame, zooming, and viewing craft reports directly in chat.

Things to Know Before Using

  • DSH plugins run with the permissions of the current DSH process; review the source code and MIT license before installing, and ensure compatibility with your local DSH and Node version requirements.
  • Community catalog sites (such as skillhub.cn) have no official affiliation with DeepSeek / High-Flyer; plugin information is based on the GitHub repository README and package.json.
  • Inline canvas has a size limit; oversized works will fall back to the compact panel, and full files remain accessible via the export path.

Conclusion

dsh-pixel-studio consolidates oy-pixel-style programmatic shaders, templates, and grid editing into the DSH chat tool view, and writes out PNG, GIF, spritesheet, OYPX, and other exports along with a manifest, making it suitable for completing both “in-conversation drafting” and “on-disk assets” in a single step.

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

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

Xiaoye