/dsh-plugin-upgrade-skill:plugin-runtime-debugfrom dsh-plugin-upgrade-skill
Diagnoses DSH Web plugin runtime failures in the browser by reading host API contracts from source. Covers offset mismatches, silent verb failures, and cross-engine URL parsing differences.
Ships in dsh-plugin-upgrade-skill. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
External Web plugins call host client APIs whose contracts live in the DSH source tree, not in the plugin's own types. When behavior diverges from intent at runtime, the failure is almost always a misread contract — and the diagnosis must come from the host source, never from the API's name.
Before changing any call into a host API, open the implementing package in
the DSH source checkout (~/.dsh/source/current, or the vendored copy) and
read the actual method — its doc comment, its guards, and the types it
compares against. Repeat for every value the plugin passes. Four questions
cover most incidents:
false or no-ops, nothing throws.new URL('dsh-resource://file/…').hostname to be "file", which Node
and current Chromium return, but Chromium before its standards-compliant
non-special URL parsing change returned "", so an older Chromium-based
Edge build returns "", silently. Record the exact browser version when
you see this. Any host or
plugin code that routes by URL.hostname/.pathname on a custom scheme
works in every Node-based test and fails only in affected real browsers.
Before trusting a URL property on a custom scheme, assert it in the
actual browser engine (see
references/browser-forensics.md), or
parse the string by hand.First interaction works, every subsequent one errors — state written by the earlier call changed the mapping between what the plugin computes and what the verb expects. Compare the two representations before and after one insertion; derive the correction from the unit widths in the host source, then apply the same derivation at every call site that passes offsets, not just the crashing one.
A removal button leaves the row behind with a placeholder label — the removal verb declined (see question 3) while bookkeeping was already dropped. Confirm with the verb's return value, and only retire the bookkeeping after the removal actually applied.
Derived UI shows stale or phantom entries — find the authoritative source of the fact and derive the view from it. A plugin-side cache with a subscription that retires entries on any transient snapshot (an empty moment during reconcile/remount) will drop live entries; prefer reading the live published state at decision time and treat the cache as an accelerator only.
Update/version chips report a wrong "latest" — remote tag and raw-file endpoints are CDN-cached and lag minutes behind a real push. Never present a fetched remote value as ground truth when it can be older than the running build; decide "current vs update" against the running version and display the newer of the two.
A built-in surface shows its generic "service unavailable" fallback
in the user's browser while registration, composition, and module
activation all verify clean — stop auditing registration and start
auditing what the failing code reads from its platform. Real case
(0.1.6-alpha.2, 2026-09): the right-sidebar document preview showed
「文件资源服务不可用。」 for every file; the file resource provider
WAS registered, __DSH_BOOT__ was complete, and zero activation
failures existed — the provider router had asked new URL(address) .hostname for the protocol of a dsh-resource:// address and gotten
"" on the user's Edge, so lookup always missed and no request was
ever sent. The placeholder copy names the feature, not the failure
layer; only instrumenting the router produced the decisive line
(parsedHost=""). When a fallback string is all the user can report,
reproduce with instrumented bundles in a driven browser (see
references/browser-forensics.md)
before concluding anything about registration state — an earlier
misdiagnosis of this exact incident blamed "provider silently
unregistered".
A whole slot's UI silently vanishes after a release — a throwing
expression inside a slot component (classically a dangling identifier:
another component's state variable referenced out of scope) is caught by
the framework's slot-level error boundary, which unmounts the entire
entry; the error is console-only, so users just report "the chips/panel
are gone". Two latency mechanisms hide it from the author: an ||
short-circuit keeps the expression unevaluated until the left operand is
false, and components that early-return on the empty state never evaluate
it until real data renders. Do not blame the newest diff by default —
bisect by rollback or a minimal render mount with data present, check
whether the throwing line shipped earlier, and fix by removing the
reference (scope any such state locally). Cheap hardening for slot
components: defensive reads (x?.items ?? []) and optional-chained DOM
access (target.closest?.()) — inside an error boundary any throw costs
the whole slot.
Repo edits never reach the GUI / EBUSY under the profile's node_modules —
first determine the install mode: Get-Item <profile>/node_modules/<pkg> | Select LinkType, Target (or the link:<path> marker in cordis.patch.yml).
A Junction/link install means the repo working tree IS the installed copy —
no copy step exists or is needed, and Copy-Item into node_modules is a
no-op at best. The EBUSY holder is the running dsh host process (closing
the browser does not release it), and the browser can still serve a cached
client bundle after the host restarts. Activation for a link-installed
lib-only plugin: fully stop the host, restart dsh web, hard-refresh,
then verify the loaded version marker. Never rename-aside files under an
unresolved path: through a junction "two" directories are one, and the
rename moves the only copy. A source-launched host (pnpm dsh web in the
harness checkout) adds two constraints: the client bundle combo is
assembled once at boot (no HMR rebuilds it — every plugin edit needs a
full host restart), and on Windows the listener port stays bound by the
dying tree unless you stop the whole process tree
(taskkill /PID <pid> /T /F), or the next boot dies on EADDRINUSE.
One plugin with raw ESM in its client bundle takes every plugin down,
and the error names an innocent entry — the host concatenates all client
bundles into one classic <script> combo; a single top-level import
anywhere makes the whole multi-megabyte combo fail to compile, zero
plugins register, and the browser surfaces failed to import loader entry <first-entry> — the first awaited entry (often
dsh-typert-registry, itself perfectly fine), not the culprit. Do not
chase the named entry: bisect the profile's insert rows (or point the
suspect bundle through node --check) until the combo loads again. The
client half is not a bare ESM module — it must register through
window.__ModuleLoader__.load({ id, factory }), pull react inside the
factory via require("react"), and export inject/apply.
Phantom pixels at the right edges of a terminal sprite (outline, Z symbols, hearts), and ghost pixels surviving frame switches — two half-block ANSI rendering defects, both invisible in the frame data: (a) a half-filled cell (upper-half block with only one half colored) sets the foreground but leaves the SGR background from the PREVIOUS cell set — SGR persists across cells, so the stale background paints a phantom pixel into the empty half; reset it explicitly (ESC[49m on every half-filled cell). (b) rows trimmed at their trailing transparent cells let a NARROWER frame leave the previous frame's pixels to the right of the trim — paint every row across the full sprite width (transparent cells as plain spaces) and close with an erase-to-EOL (ESC[K). And pin the frame data itself: hand-ported sprite frames drift from the source art a few cells at a time (a regression over an excerpt misses it) — digest every frame against the source and assert the digests.
A head/UI process hangs for minutes (or until the CI timeout) after its work is done — a rescheduling timer chain (an animation planner that re-arms setTimeout forever while mounted) keeps the event loop alive on hosts that mount the component without ever unmounting it (probe and test hosts; a GitHub job defaults to a 6h timeout). The interactive TUI stays alive on its TTY/stdin handles regardless — so unref the chain (timer.unref()): the probes drain and exit, real sessions lose nothing. Suspect this whenever enabling a feature flips previously-finishing jobs into timeouts.
package.json, syntax-check the bundle
(node --check), and verify in the browser after a hard refresh — the
served artifact is the file you edited.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub oh-my-dsh/dsh-plugin-upgrade-skill --plugin dsh-plugin-upgrade-skill12 skills in this plugin
/dsh-benchmark-caseUse when the user hands over a dsh plugin repository (or a real migration commit / version corridor) and wants its upgrade experience extracted into one auto-graded Harbor benchmark exam task — produce tasks/<id>/ (fixture + instruction.md + task.toml + judge.mjs + solution) that harbor run can grade 0–1 and that folds into the dsh-plugin-upgrade-skill benchmark suite; also applies to turning existing version cards (references/v*.md) into executable exam tasks. Not for writing upgrade cards; not for running the benchmark./dsh-upgrade-auditAudit external compatibility between two DSH (DeepSeek Harness) versions and detect reverts, producing an upgrade-report directory; compares git tags with a source checkout, or published npm packages without one. Use whenever the user asks to check/compare/audit two DSH versions or whether upgrading is safe — e.g. "more changes or reverts in dsh-vX -> dsh-vY", "compare the breaking changes" — even with only two version numbers and no source location. Read-only outside the report directory; npm mode installs in isolation with --ignore-scripts./generic-migrationFramework-agnostic methodology for migrating a plugin, extension, or integration across a breaking upstream release — inventory coupling points, classify changes, stage the migration, and verify in layers. Use when upgrading any plugin from one host-framework version to another without access to framework-specific migration notes. Not a substitute for vendor release notes; contains no framework-specific facts./plugin-fast-adaptDSH 插件适配与破坏性变更核查,兼造插件脚手架与性能架构审计。run.mjs 一键编排全流程并把每次运行写进本地日志(list 回看、doctor 交叉核对宿主日志、sanitize 脱敏后才能外发);查 DeepSeek 官方最新版本,取该版本的官方升级指南,扫描本机插件代码(package 命中自动到目标宿主 node_modules 实测核查),报出哪些地方踩了破坏性变更并给出官方修法;seams 接缝查询一个包名/API 符号在指南与本机宿主里的双源结论(还在不在、哪个版本移除的);scaffold 一条命令生成五形态可冒烟的插件骨架(package.json 不变量+形态入口+挂载层+命名投影,生成即验证);同时巡检本机 DSH 环境(profiles 覆盖层旧包残留、共享 node_modules 农场悬空软链、两层 patch(各 profile 层+全局 ~/.dsh/cordis.patch.yml)、已装插件、运行中宿主、宿主半与客户端半双面启用就绪度——dsh.client 声明/产物/注入名册死链,web 端与桌面端一视同仁)。修完可秒级冒烟验证,--real-smoke 再补干净 profile 真装真启档(桥接原仓库 verify-runtime),升级时可顺带做插件性能与架构审计。老版本插件(官方指南覆盖不到 v0.1.7-rc.2 之前的走廊)转迁移 SOP,对照原仓库 plugin-upgrade 的人工卡片走廊走七阶段流程。当需要把 DSH 插件适配到新版本或老版本、从零创建 DSH 插件、给新插件生成起步骨架、排查升级后插件报错、核查插件是否用了已移除的包或 API、查某个包/API 在目标宿主还在不在、检查 ~/.dsh 覆盖层有无旧包残留、给插件做性能与架构体检、诊断宿主启动失败日志(端口占用/未声明 inject/客户端入口死链)、把独立仓的技能面同步到下游技能目录时使用。触发词:适配 DSH 插件、升级插件、插件不兼容、dsh 升级后报错、插件用了废弃 API、接缝查询、这个 API 还在不在、检查覆盖层旧包、客户端卡 loading、entry did not activate、web boot 失败、注入死链、老版本 DSH 适配、历史走廊迁移、创建 DSH 插件、写 DSH 插件、插件脚手架、插件冒烟测试、插件性能审计、插件装了没生效、宿主启动失败、StartupError、EADDRINUSE、日志诊断、下游同步、技能漂移。/plugin-fleet-sweepUse when the DSH host itself has been upgraded (or is about to be) and the whole installed fleet of Web/client plugins must be checked against the new host - one or more surfaces broke, vanished, or need their compatibility re-verified and re-released. Also use after a host upgrade to sweep for silent breaks before the user reports them, and to run the per-plugin fix/release loop (branch, bump, changelog, tag, mirrors)./plugin-heavy-depUse when adding a heavyweight browser dependency (diagram/chart renderers like mermaid, code editors, big wasm-adjacent libs) to a lightweight DSH Web plugin that must stay small, when wiring a lazy-loaded chunk through a host route, when the lazy import intermittently fails or falls back, or when rendering untrusted markup (SVG/HTML) produced by such a dependency.Other plugins' skills for the same job