plugin-creator
/plugin-creator
Use when adding a dsh Cordis plugin or bundle to this overlay project, wiring it into the product profile, or debugging why a new plugin row does not activate.
- Author
- liyunxuanyu ↗
- Repository
- dsh-zcode-port ↗
- Licence
- MIT
- Last repository change
- 03.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 1
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 03.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- SKILL.md zawiera komentarze HTML (1). Nie widać ich w podglądzie Markdown, a model je czyta.
What it does and when to use it
Use when adding a dsh Cordis plugin or bundle to this overlay project, wiring it into the product profile, or debugging why a new plugin row does not activate.
Original author description
Use when adding a dsh Cordis plugin or bundle to this overlay project, wiring it into the product profile, or debugging why a new plugin row does not activate.
How it works
- 1. Pick the package shape
- 2. Package skeleton
- 3. Register tools
- 4. Compose it
- 5. Verify
- Failure guide
SKILL.md preview
---
name: plugin-creator
description: Use when adding a dsh Cordis plugin or bundle to this overlay project, wiring it into the product profile, or debugging why a new plugin row does not activate.
---
<!-- Rewritten for dsh from the ZCode plugin-creator skill (Apache-2.0).
dsh plugins are Cordis packages composed by profile/bundle patches, not
ZCode marketplace plugins. -->
# Creating a dsh plugin
dsh composes a product from a profile: ordered bundles, then the profile patch,
then launcher overlays. A plugin is a package with an `apply(ctx, config)`
function or a `Service` subclass. Upstream `packages/**` is read-only here;
product differences live in our own bundles and packages.
## 1. Pick the package shape
| Need | Shape |
|---|---|
| Model-facing tools | `export function apply(ctx)` + `inject = ['tools', 'deferredTools']` |
| A long-lived service (`ctx.foo`) | `export class Foo extends Service` + `export default Foo` |
| A host route | Plugin that injects `webServer` and calls `ctx.webServer.register` |
| A client page/card | Separate `client.js` lazy-CJS bundle, served by dsh's module loader |
A `Service` module **must have a default export**; the loader will otherwise
report `failed to import` with no detail. Tool plugins export named `apply`.
## 2. Package skeleton
```json
{
"name": "@zcd/my-plugin",
"type": "module",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"exports": { ".": { "types": "./lib/index.d.ts", "default": "./lib/index.js" } },
"dependencies": {
"@deepseek-ai/dsh-tools": "0.2.2-alpha.2",
"@zcd/deferred-tools": "workspace:*"
},
"peerDependencies": { "@deepseek-ai/cordis": "~4.0.6-alpha.1" },
"devDependencies": { "@deepseek-ai/cordis": "4.0.6-alpha.1" }
}
```
Use `tsconfig` extending `../../tsconfig.base.json`, `outDir: lib`. Declare any
service you add with module augmentation so consumers type-check:
```ts
declare module '@deepseek-ai/cordis' {
interface Context { foo: FooService }
}
```
Consumers must build the owning package first; workspace `exports` point at
`lib/*.d.ts`.
## 3. Register tools
- `defineTool` output schemas reject a root-level `required` array. Mark each
property `required: true` instead.
- `execute` must be `async`.
- Read arguments from `exec.arguments`, not `exec.args`.
- For rare tools, use `ctx.deferredTools.register(definition, { group, keywords })`
so they enter the step only after `tool_search` finds them.
- Paths from model input must be contained in `exec.agent.session.header.cwd`.
## 4. Compose it
1. Add the row to `packages/bundle-base/cordis.patch.yml` (or
`bundle-web-app` for browser-side/host UI rows). A bundle patch is one
top-level `insert` array; each row has `id`, `name`, optional `config`,
optional `disabled`.
2. Add the dependency to the bundle package and to
`profiles/product/package.json`.
3. Add a `link-profile.mjs` mapping under `directories` for `@zcd/*` packages.
4. `pnpm build && node scripts/link-profile.mjs`.
5. `DSH_HOME=... dsh --profile product --dump-config` shows the row.
6. `npx -y node@24 scripts/smoke-profile.mjs` boots the profile and fails if
any plugin reports `did not activate`.
External third-party plugins follow the same path without a mapping: add the
published package to the profile and insert its row. `pnpm doctor` checks
dependencies, `engines.dsh`, duplicate versions, and bundle manifests.
## 5. Verify
- Unit test the service/tool in isolation with a Cordis `Context`.
- Add a route/SQL fixture to `scripts/smoke-profile.mjs` when the plugin has an
HTTP surface.
- `pnpm typecheck && pnpm test && pnpm verify`.
- Keep `docs/13-implementation-status.md`, README counts, and screenshots in
sync in the same change.
## Failure guide
| Symptom | Check |
|---|---|
| `failed to import` | Service default export; import path; built `lib/`; profile install |
| `pending (waiting for service: x)` | Injectable service missing or its row disabled |
| Row absent from `--dump-config` | Bundle patch path or dependency missing |
| Row present but tools missing | Plugin's `inject` names, `apply` throw, deferred admission |
| Client half not in boot graph | `dsh.client` declaration and lazy-CJS factory id |
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · liyunxuanyu/dsh-zcode-port | 100 | MIT |
| jeremylongshore/tons-of-skills-marketplace | 100 | MIT |
| openjiuwen-ai/jiuwenswarm | 100 | Apache-2.0 |
| fengchen122123-sudo/xingyao-y-code | 100 | MIT |
| krzysztofsurdy/code-virtuoso | 100 | MIT |
| HaizhuAI/Zkali | 100 | Apache-2.0 |
| lttr/claude-marketplace | 100 | MIT |
| jscraik/Agent-Skills | 100 | Apache-2.0 |
| fx/cc | 100 | MIT |
Database snapshot: 13.11.2026 · package version 946822ee6b3d (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100dsh-npm
Package an MCP server or agent plugin as a DeepSeek Harness (DSH) Cordis bundle and publish it to registry.npmjs.org so DSH's Plugins → Add plugin installs it by package name. Use when adapting a plugin to DSH, making a DSH bundle npm-installable, publishing a DSH plugin, or… - 100dsh-plugin-engineering
Build, modify, debug and ship DeepSeek Harness (DSH) plugins: Cordis plugins, tools, services, events, config, LLM adapters, client UI and skins. Use for any task mentioning DSH, DeepSeek Harness, Cordis, cordis.yml, `dsh plugin add`, `ctx.tools`, `defineTool` or a new model… - 98publishing-dsh-plugin
Use when turning a locally working DeepSeek Harness (DSH) plugin into something other people can actually install — packaging the Cordis bundle, pushing it to GitHub, writing its README, getting it listed in the plugin market (awesome-dsh-plugin), and debugging why the install… - 90dsh-plugin-dev
Conventions and pitfalls for building, installing, testing and releasing dsh (DeepSeek Harness) plugins: cordis.patch.yml, the host half and the browser (client) half, package.json dsh fields, dsh.plugin.json, linking into a profile, the pnpm ERR_PNPM_IGNORED_BUILDS trap, and… - 87plugin-fast-adapt
DSH 插件适配与破坏性变更核查,兼造插件脚手架与性能架构审计。run.mjs 一键编排全流程并把每次运行写进本地日志(list 回看、doctor 交叉核对宿主日志、sanitize 脱敏后才能外发);查 DeepSeek 官方最新版本,取该版本的官方升级指南,扫描本机插件代码(package 命中自动到目标宿主 node_modules 实测核查),报出哪些地方踩了破坏性变更并给出官方修法;seams 接缝查询一个包名/API 符号在指南与本机宿主里的双源结论(还在不在、哪个版本移除的);scaffold… - 100cordis-plugin-development
Use when designing, reviewing, adding, enabling, disabling, installing, configuring, or debugging a plugin, bundle, feature, page, panel, tool, or MCP connection in the current Harness profile, including a shipped plugin that is disabled by default, and for any visual object,…