DSH Plugin Scaffold
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md and install @user_62a0c738/dsh-plugin-scaffold.
About this skill
Problem
DSH plugin development often gets stuck between shape selection, build validation, and release rollback. A team may start writing src/ before deciding whether the plugin should be pure, bundle, or bundle-client. It may work locally, but after publishing it fails with plugin tree failed to load or slot entry crashed. These issues are usually not just unfamiliar APIs; they come from missing a consistent constraint across goals, capability surface, build validation, and final installation checks.
How It Works
The skill structures DSH plugin development into 7 stages, each with a clear output and decision gate:
- Stage 0: Define goals and capability surface. Determine the normalized plugin name, one-sentence goal, capability surface (tools, services, HTTP routes, browser UI, root layout,
skill,MCP, static assets, etc.), and targetprofile, defaulting toweb. - Stage 1: Choose the plugin shape. Map the capability surface to
--kind pure,bundle, orbundle-client, and decide distribution and package manager. If replacing the default web shell root layout, registerctx.slots.register({ name: 'root' })during implementation. - Stage 2: Generate the scaffold. Run the scaffold, enter the generated directory, verify the skeleton works, and record the Stage 0/1 decisions in
docs/plugin-plan.md. - Stage 3: Implement the business logic. Generate only the files required by the chosen shape, such as
src/index.tsorsrc/client/index.ts. Usectx.effect()for tools, routes, services, or events and return acleanupdisposer. Do not hand-editlib/; after changingsrc/, runpnpm run bundle. - Stage 4: Local validation. Run build, gates, package-content checks, install smoke tests, and browser validation in order. Business bugs return to implementation; shape or contract errors return to shape selection.
- Stages 5/6: Release preparation and final validation. Initialize a real
git remote, replace README placeholder refs, commitlib/artifacts, add UI screenshots, then publish viagit pushornpm publishbased on the chosen distribution. The final acceptance must reinstall from the final distribution source and restart web, confirming no load failures, no slot crashes, and behavior matching the original goal.
Boundaries
- Best for engineering work that follows the DSH contract, Cordis build model, and web shell distribution model.
- If diagnosing a narrow issue such as “why did mount fail,” do not rerun the full process; consult the relevant section in
references/for contracts, gotchas, or validation. - The process enforces decision gates: do not advance before the capability surface is complete, the shape is fixed, the scaffold is verified, or local smoke validation passes.
Use Cases
- Before adding a DSH web plugin, classify its capability surface, choose pure, bundle, or bundle-client, and scaffold it.
- After changing src tools, routes, or services, run bundle, gates, and package-content checks to verify the contract.
- When a published plugin fails to load, reinstall and restart web, then separate business, shape, or contract errors.
- Before npm or git release, initialize the remote, commit lib artifacts, add UI screenshots, and validate the final source.
Best For
- Node engineers maintaining DSH plugins who need to implement tools, routes, and services under the Cordis contract.
- Platform engineers shipping plugins who need to verify bundle, gates, npm pack, and final installation.
- Frontend engineers building DSH browser UI who need to choose bundle-client and register slots or root.
- Integration engineers debugging DSH mount or slot crashes who need contract, gotcha, and smoke-test references.
Related Skills
A systematic code error fixing skill that follows a five-step workflow: Reproduce, Isolate, Understand, Fix, Verify, to help developers resolve code errors.
Supports inline SVG/HTML rendering and Mermaid code output, covering common technical diagram creation like architecture and flow diagrams.
A comprehensive browser automation guide covering navigation, interaction, multi-tab management, and data collection, tailored for domestic web ecosystems and tools like Playwright/Selenium.
Control Windows WeChat through GUI automation to search contacts and send text, images, or files without official APIs.