Introduction¶
DSH is built on the design philosophy that “everything is a plugin”. In the WeChat Mini Game development workflow, it is usually necessary to open WeChat DevTools for previewing and debugging. The mrtrujay/dsh-weixin-minigame plugin uses the official mini game assistant service to integrate preview, log viewing, and screenshot debugging into the DSH Web GUI, reducing distractions caused by switching between tools.
Core Features¶
- Preview Panel: Provides a floating preview window inside the DSH Web interface. Credentials and preview state are managed by the official mini game assistant service. The plugin itself does not store or upload any content.
- Skill Guidance: Provides the
weixin-minigame-helperskill to guide the use of MCP tools and mini game development workflows. - MCP Bridging: Establishes a connection between DSH and the mini game assistant service.
- MCP Toolset: Supports the following operations:
- Start or hot-reload the preview (
run_game) - Read console output and errors (
get_logs) - Capture rendered frames, either single or burst (
capture_screenshot,capture_screenshot_burst,stop_screenshot_burst) - QR code preview on a real device (
real_device_preview) - Publish a version to the WeChat platform (
publish) - Developer platform onboarding flow (
open_onboarding) and themp_*series of tools.
Installation and Activation¶
This plugin requires a DSH Web environment, Node.js ^22.19.0 or >=24.0.0, and npx.
- Run the installation command:
dsh plugin --profile web add @trujaycc/dsh-weixin-minigame
- Restart
dsh web. Because the client module registry caches package metadata, newly installed plugins do not take effect immediately; the process must be restarted.
Typical Usage¶
The plugin is triggered through natural language. The following are some concrete examples:
- View the running project: Enter “Bring the mini game project in the current workspace up so I can look at it” to start the preview.
- Fix crashes: Enter “Preview the current workspace mini game and keep fixing until the log is clean”. The system will continue fetching logs until there are no errors.
- View rendered output: Enter “Take a screenshot after that change so I can see it” to capture the current frame.
- Run a real-device test: Enter “Run a real-device test on the current workspace mini game”.
- Publish a version: Enter “Publish the current workspace mini game as 1.0.1, note: score fix”.
Notes¶
- WeChat DevTools: This plugin does not require WeChat DevTools to be installed at runtime.
- Third-party dependency: The upstream MCP server is a third-party dependency and is fetched via
npxat startup (currently pinned to0.1.35incordis.patch.yml). - Leftover files: The official mini game assistant service may leave files such as screenshots behind in the game project. It is recommended to manually add the relevant files to
.gitignore. - Preview server: Only one shared preview server exists per machine. The first started process occupies the default port, and later processes automatically look for an available port.
- Restart requirement: Activating the plugin for the first time requires restarting
dsh web. - Permissions and security: The plugin does not register a system prompt injection section. MCP tools are registered only after a successful handshake. Preview state is exposed only on the local loopback interface.
Summary¶
This plugin gives DSH users a complete debugging loop for WeChat Mini Game development in the Web environment. Through the official assistant service, it allows the full workflow from preview to publishing to be completed within DSH, without requiring users to install WeChat DevTools separately.