Introduction

When writing LVGL code with agents, the most common failure mode is API version mixing. Content seen in v9 during model training far exceeds v8.4, so generated code often straddles both versions: lv_display_create() (v9) and lv_disp_drv_t (v8) appearing in the same snippet, or calling lv_async_call() which doesn’t exist in v8.4. For projects locked to v8.4, such issues can only be resolved by manual line-by-line debugging.

DSH’s philosophy is “everything is a plugin,” and the skill mechanism is perfect for carrying this domain knowledge. Below is an introduction to better-LVGL-for-dsh, maintained by sa998aaron, which pins the agent to LVGL v8.4 in practice.

What is it

better-LVGL-for-dsh is an offline LVGL 8.4 knowledge skill package for DeepSeek Harness (dsh), current version 0.1.0, MIT license. It registers 9 on-demand skills on ctx.skills, enabling the agent to write correct LVGL v8 API code while specifically avoiding the inclusion of v9 APIs. The knowledge is packaged offline within the skill files.

Capability Paths & Directory Structure

First, let’s see how this package integrates into dsh. The capability path is: Cordis plugin -> Runtime registers skills to ctx.skills -> Built-in dsh-tool-skill consumer -> Skills directory and skill loader visible to the model.

The skill format follows the Agent Skills standard (SKILL.md + YAML frontmatter), pure ESM, zero dependencies, no build step. The repository structure is as follows:

better-LVGL-for-dsh/
├── package.json        # dsh.bundle declaration
├── cordis.patch.yml    # Cordis composition patch line
├── index.js            # Entry: scans skills/ and registers to ctx.skills one by one
└── skills/<name>/SKILL.md

Coverage of the Nine Skills

Skill Coverage
lvgl84 Entry & Routing: v8/v9 API confusion anchors, skill map, minimal runnable skeleton
lvgl84-core Object model, screens, create/delete, coordinates/alignment/size, flags, scrolling
lvgl84-widgets All 30+ built-in widgets cheat sheet: create functions and widget-specific APIs
lvgl84-style Style system: shared and local styles, part/state selectors, themes, transitions
lvgl84-event Complete event code table, user_data, event bubbling, keypad/encoder group, lv_msg
lvgl84-layout Full coverage of Flex and Grid layouts, with a CSS-to-LVGL comparison table
lvgl84-porting lv_conf.h, display flush_cb, input drivers, tick, double buffering + DMA, thread safety
lvgl84-pitfalls Symptoms -> Causes -> Fixes table: screen glitches, freezes, OOM, unresponsive clicks, CJK fonts
lvgl84-migration v7 -> v8.4 migration: renamed/removed widgets, rewritten styles/events/drivers

lvgl84 is the entry point, and the rest are split by theme. All skills are loaded on demand; the agent reads the relevant file based on the topic needed.

Installation & Enabling

Install from GitHub:

dsh plugin --profile web add github:sa998aaron/better-LVGL-for-dsh

Or install by cloning locally:

dsh plugin --profile web add <absolute path to local repo>

After installation, the profile needs to be reloaded. After reloading, lvgl84-* skills will appear in the skills directory visible to the model and load on demand; you can also explicitly invoke a specific skill using gestures like /lvgl84-style.

Verification

Ask the agent to write a simple interface:

Write an LVGL 8.4 UI with a title bar and three buttons.

If the generated code uses lv_obj_create / lv_obj_set_flex_flow / lv_obj_add_event_cb instead of v9’s lv_display_create, it indicates the plugin is working.

Custom Skills

This package also supports adding your own skills. Create a file at skills/<kebab-case-name>/SKILL.md, write name and description in the frontmatter, optionally whenToUse, and the body is Markdown:

---
name: my-skill
description: A one-line explanation of what it is and when to use it.
whenToUse: Optional trigger description
---

Body (Markdown)...

After reloading the plugin, it will rescan the directory when applying, and new skills will be registered.

Use Cases & Notes

Suitable for two types of people: agent workflows using dsh for LVGL v8.4 development; and projects migrating from v7 to v8.4, who can directly use lvgl84-migration.

Note two points:

  1. The plugin runs with the permissions of the current dsh process. It is recommended to read the source code and license before installing third-party plugins. The repository structure is simple—one index.js entry, one cordis.patch.yml, and Markdown skill files under skills/, so the cost of reviewing is low, and the license is MIT.

  2. After installation, the profile must be reloaded to take effect; this step is easy to miss.

Summary

This plugin focuses on a specific task: solidifying the experience “LVGL should use v8 APIs, not mix v9” into distributable, on-demand skills, rather than repeatedly reminding the prompt every time.

Directory page: https://www.skillhub.cn/plugins/sa998aaron/better-LVGL-for-dsh (community-maintained independent site, no official affiliation with DeepSeek / Huafan); Source code repository: https://github.com/sa998aaron/better-LVGL-for-dsh.