dsh-slipway: Publish DSH Plugins to GitHub and Submit Marketplace Inclusion PR with a Single Command

Preface

After building a plugin in DSH, publishing often involves a series of manual steps: creating a GitHub repository, uploading files one by one according to a whitelist and verifying bytes, tagging the repository with topics, forking the marketplace registry repository, writing data/plugins/<owner>__<repo>.yml, opening a PR, and finally pulling online files back one by one to compare them with local versions. Doing this repeatedly makes it easy to trip over the same pitfalls.

Below is an introduction to the workflow plugin dsh-slipway (Slipway) by maintainer 7gzgn. A single call completes self-checks, repository management, uploading, marketplace PRs, and verification, leaving verifiable evidence at every stage. The scope is clearly defined—GitHub only; GitLab, Gitee, and npm are not supported.

What is this?

dsh-slipway chains the local DSH plugin project workflow—“publish to GitHub + submit a PR to the plugin marketplace registry + pull back online files for per-file verification”—into a single pipeline. The name is a metaphor for a ship sliding down a slipway: since previous releases relied entirely on hand-written scripts, this kind of repetitive labor is best handed over to code.

The DSH ecosystem philosophy is “everything is a plugin”; the community plugin directory (such as SkillHub) is an independent site with no official affiliation with DeepSeek or Hyperbolic. Before installing any plugin, it is recommended to review the source code and license yourself—plugins run with the permissions of the current DSH process.

Publishing Stages

The README breaks the process into five stages (the table lists “④ Marketplace PR” and “⑤ Verification” alongside the earlier self-check, repository, and upload steps), with evidence output for each:

Stage Action Evidence
① Self-Check Read package.json, collect files per files whitelist, check main/exports/dsh.bundle.patch, scan for secrets File count, total bytes, error/warning list
② Repository Reuse if exists, create if not (auto_init:false) Repository URL, default branch
③ Upload Per-file PUT (update-style write with sha), then set topics Byte count and short blob SHA for each file
④ Marketplace PR Fork (if missing) → Create branch from upstream head → Write registry yml → Open PR PR number and status (reports existing PR number instead of duplicating)
⑤ Verification Pull every online file, compare sha256 and length with local “N files match local bytes exactly”

Security Boundaries and Default Behavior

These boundaries are written into the code, not just verbal promises:

  1. Default dry-run: If dryRun: false (CLI uses --go) is not explicitly passed, it only simulates and reports, without modifying the remote.
  2. Target must be explicit: projectDir (absolute path), repo, category, descriptionEn, and descriptionZh are mandatory; parsing failures result in immediate errors rather than guessing from the current directory or package name.
  3. Owner and token must match: If the token does not belong to the target owner, it stops without sending a request.
  4. No tokens in output: Logs mask tokens as ghp_****(40); request evidence records only the method and path, not the body.
  5. Secret scanning in self-check: Hits on sk-…, ghp_…, private key blocks, etc., will block publishing, reporting only the file, line number, and masked string.
  6. Idempotency: Repositories, branches, and PRs are checked before creation; repeated executions will not create duplicates.
  7. Live code tree: If the project is mounted on a profile’s junction (“live code”), the report will include a live-tree warning—you can publish, but do not run tests on a live code tree (copy to a sandbox for testing).

Installation and Activation

Once listed in the marketplace, simply search for dsh-slipway in DSH to install. If not yet listed or for local integration testing, the README provides a manual method using junction + profile dependency + bundle (PowerShell example):

# 1) Create directory link (junction does not require admin)
New-Item -ItemType Junction -Path "$env:USERPROFILE\.dsh\profiles\desktop\node_modules\dsh-slipway" -Target "D:\dsh\projects\dsh-slipway"
# 2) In profile's package.json: add "dsh-slipway": "link:D:/dsh/projects/dsh-slipway" to dependencies
#    **Also** add it to dsh.profile.bundles (it won't load if missing)
# 3) Restart DSH

Change the Target and link: paths to the actual absolute path of your local plugin project. peerDependencies requires Cordis and DSH related packages to be in the range >=0.2.0-rc.2 <0.3.0-0; the README states it has been tested on DSH 0.2.0-rc.2, Node >= 18.

Typical Usage

As an Agent Tool

Can be invoked by an Agent in a session:

slipway_publish   projectDir=… repo=… category=tools descriptionEn=… descriptionZh=… [dryRun]
slipway_verify    projectDir=… repo=… owner=…

It is recommended to run with dryRun (or the default dry-run) first, have a human review the report, and then pass dryRun: false to actually publish.

As a CLI (Session Independent)

# Self-check only (read-only)
dsh-slipway plan    --project D:\dsh\projects\dsh-slipway --repo dsh-slipway --category tools --desc-en "…" --desc-zh "…"

# Dry-run (default)
dsh-slipway publish --project … --repo … --category tools --desc-en "…" --desc-zh "…"

# Execute for real
dsh-slipway publish --project … --repo … --category tools --desc-en "…" --desc-zh "…" --go

# Verify only
dsh-slipway verify  --project … --repo … --owner 7gzgn

Exit codes: 0 means success or dry-run passed; 1 indicates blocking issues; 2 indicates usage errors.

GitHub PAT

Search order: --token-file → Environment Variable DSH_SLIPWAY_TOKEN_FILE → ~/.dsh/.gh-token → D:\dsh\.gh-token. Requires repo scope (create repo, push files, open PR).

Marketplace Category Whitelist

category must be one of the following (excerpt from README):

agi ui usage theme model identity session memory tools wsl browser vision voice docs skill workflow git notify dev security remote market fun

Marketplace descriptions in both Chinese and English must be provided by the caller; the plugin will not automatically generate “looks-like” copy for you.

Use Cases and Known Limitations

Who it is for: Developers or Agent orchestrators who already maintain DSH plugin repositories on GitHub and want to solidify “Upload + SkillHub Registry PR + Byte-level Verification” into a repeatable workflow.

Things to note:

  • Single file ≤ 25MB (GitHub Contents API limit; files > 1MB will trigger a warning).
  • No npm publishing; the marketplace installation chain relies primarily on github:owner/repo.
  • Does not run project tests for you; whether to run tests before publishing and where to run them is decided by the caller.
  • To publish to GitLab / Gitee or other platforms, platform-specific APIs and tokens are required; the current version is not adapted for them.

If the plugin cannot access defineTool from @deepseek-ai/dsh-tools, it degrades to an identity function (CLI and tests remain usable); if ctx.systemPrompt does not exist, it skips the announcement section to avoid crashing the host.

Self-test entry point (fake GitHub, no network access):

node test/smoke.mjs

If you run tests inside a live code tree under profiles/*/node_modules, the script will directly exit 2.

Conclusion

dsh-slipway condenses the repetitive and error-prone GitHub and marketplace PR steps of DSH plugin publishing into a single command, featuring default dry-runs, explicit parameters, and verification reports. It is suitable as a fixed step in your workflow. For further information, see the directory page skillhub.cn/plugins/7gzgn/dsh-slipway and the source code github.com/7gzgn/dsh-slipway.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye