Preface¶
Handling text and image layout in DSH presents a common pain point: the Xiumi editor relies solely on UI clicks, and batch operations (multi-select, inserting horizontal scroll galleries, changing images page by page, changing page counts) lack a one-click entry. System-level mouse injection often fails completely on Chromium-based browsers, while the Xiumi canvas is an AngularJS component tree combined with a virtual list, making conventional “point-and-click” scripts easily misjudge the number of img elements. The dsh-xiumi introduced below is designed for this purpose: it is packaged as a skill into DSH, reuses your logged-in browser, and solidifies the above layout workflow into a set of CLI commands.
What is this¶
dsh-xiumi is a plugin for DeepSeek Harness (category: workflow), maintained by oobitoooo, with currently about 1 star on GitHub. It uses Playwright + CDP to operate the Xiumi (XIUMI) text/image editor in your logged-in browser, turning batch multi-select, inserting horizontal scroll galleries, changing images page by page, changing page counts, deleting components, saving, and verifying share page audit status into scripts.
It is necessary to clarify the boundaries first: this plugin only includes Xiumi layout capabilities and contains no API routes or model proxies; the scripts only connect to the local CDP port and do not send data externally.
Core Features¶
The following capabilities are all from the README, grouped by use case.
-
Horizontal Gallery Conversion: Select a group of photos, insert a “Slide Image” component, change it to N pages, change images back to originals page by page, and then delete the old vertical photos.
-
Arbitrary Page Count Change: Bypass the “Set Slide Sequence” panel that cannot be clicked, directly modify the Angular model
cellGroupItems, and persist after saving. -
Batch Image Replacement: Precisely match thumbnails in the image library based on the
-sz_<byte count>fingerprint in the image URL. -
Canvas Snapshot/Validation: Provide the component count, page count for each slide component, and image fingerprints to determine if operations actually took effect.
-
Save + Audit: Save the draft, guide the user to click “Apply for Audit”, and then verify if the share page has been updated using the share page.
-
Native Component Paste (v0.3.0): Compile a draft into Xiumi
paper.compnative components, paste the whole thing into Chromium’s native clipboard once, and it remains editable after pasting; inspired by gih10012/xiumi-native-clipboard (MIT). -
Layout Quality Check (v0.2.0): Open the rendered share page/edit page, read
computedStyle, check font size/line height of body text, subheadings, caption consistency (font size and color), image aspect ratios, and output a Markdown + JSON report (borrowing rules from xiumi-editor-checker, but not parsing private JSON). -
Lightweight Login State Migration (v0.2.0): Export cookies + localStorage to
session.json, inject into any debugging browser, avoiding the need to copy the entire profile (sid is valid for about 3 days). -
Multi-Harness Installation (v0.2.0): One-click installation into locally installed AI assistants like Claude Code / Cursor / Codex / Gemini.
Installation and Enablement¶
Install as a DSH plugin (recommended). The official command is as follows; the installation command is from the original README:
dsh plugin add https://github.com/oobitoooo/dsh-xiumi
# Local directory also works:
dsh plugin add /path/to/dsh-xiumi
After installation, restart (or open a new session), and you will see xiumi-editor-automation in the skill list. If you don’t want to use it as a plugin, you can copy the skill/ directory to ~/.dsh/skills/xiumi-editor-automation/ (or .dsh/skills/ inside the project), or use the multi-harness installer:
node skill/scripts/install-harnesses.mjs --list # Detect which are installed locally
node skill/scripts/install-harnesses.mjs # Install to all detected directories
Dependencies are only two: Node.js ≥ 18, and playwright-core (does not download browsers, reuses your installed Edge/Chrome).
cd skill/scripts && npm i playwright-core
Typical Usage¶
Below is the complete workflow given in the README. First, start a browser with a debugging port (9222) and copy the login state, then operate in order.
cd skill/scripts
# 1) Start Edge/Chrome with a debugging port (9222) and copy the login state from your daily profile over
node launch-browser.mjs
# 2) Open the draft editing page in the popped-up browser
# https://xiumi.us/studio/v5#/paper/for/<draft_id>/cube/0
# 3) Check the current canvas status
node xiumi-gallery.mjs status
# 4) Upload photos to "My Gallery" and get the -sz_ fingerprint for each image
node xiumi-gallery.mjs upload --files ./photos/a.jpg,./photos/b.jpg
# 5) Convert a group (dry-run prints PLAN first, confirm then add --yes to execute)
node xiumi-gallery.mjs convert --art <original_fingerprint_list> --gal <gallery_fingerprint_list>
# 6) Save (after saving, go to "Preview → Share" and click "Apply for Audit" for the share page to update)
node xiumi-gallery.mjs save
# 7) Verify the share page
node xiumi-gallery.mjs verify --share https://v.xiumius.cn/board/v5/<x>/<id>
# 8) Layout quality check (font size/line height/caption consistency/image ratio → Markdown report)
node xiumi-audit.mjs --share https://v.xiumius.cn/board/v5/<x>/<id> --md report.md
# 9) Paste the entire article as native components at once (compile spec → copy → paste → auto verify)
node xiumi-clip.mjs build --spec spec.json --out doc.xiumi.json
node xiumi-clip.mjs push --spec spec.json --draft <draft_id>
# 10) Lightweight login state migration (avoid copying the entire profile)
node xiumi-session.mjs export
node xiumi-session.mjs apply --open "https://xiumi.us/studio/v5#/paper/for/<draft_id>/cube/0"
Where --art in convert is the -sz_ fingerprint of vertical photos on the canvas (top to bottom), and --gal is the -sz_ fingerprint of the corresponding photos in the gallery (equal to the local file byte count, consistent order). The number of both must be equal, which is the page count. Step 5 defaults to dry-run; after printing PLAN and confirming it is correct, add --yes to execute.
You can run a smoke test like this:
node test/smoke.mjs
Applicable Scenarios and Notes¶
Suitable for those already using DSH and doing batch Xiumi layout daily: let the script handle the repetitive “select image - insert gallery - change image - change page count - save - verify” tasks, reducing manual clicks and misjudgments.
Note a few points before use:
- The plugin runs with the permissions of the current DSH process. It is recommended to check the source code and license before installing (this project is MIT).
- Xiumi is a closed-source SaaS, and the page structure may change at any time; selectors are concentrated in
xiumi-lib.mjsandreferences/dom-playbook.md, update according to the manual after changes. - Only supports the CDP debugging port of Chromium-based browsers (Edge/Chrome).
- Browsers ≥136 do not allow opening the debugging port with the default profile; you must use a copied profile (the script handles this); when copying, if the source browser is running,
Cookiesmay be locked, so you need to exit the source browser or log in once directly in the debugging window. - Xiumi “My Gallery” has a capacity limit (commonly 100 images).
- This project does not bypass any platform restrictions; it only automates operations that you could already complete via the interface. Use in accordance with the Xiumi Terms of Service.
Conclusion¶
The value of dsh-xiumi lies in solidifying the layout workflow in Xiumi that lacks a one-click entry into CLI, along with two incremental capabilities: native component paste and layout quality check. It does not include a model proxy and does not send data externally. The directory page is at https://www.skillhub.cn/plugins/oobitoooo/dsh-xiumi, and the source code is at https://github.com/oobitoooo/dsh-xiumi .