dsh-pihuo-plugins: Skill for Claude Code

.agents/skills/dsh-plugin-runtime/SKILL.md

dsh-plugin-runtime is a skill for Claude Code, Codex from xun404/dsh-pihuo-plugins. It costs 82 tokens per session (961 once invoked), scanned A, original, MIT.

A troubleshooting guide for the DeepSeek Harness Cordis runtime, the part that loads plugins, manages their dependencies, and handles their lifetime.

In plain words
What is it for?
Use it to diagnose plugin loading, dependency injection, service and event behavior, cleanup effects, isolated execution, and hot-module replacement.
Why use it?
It helps explain plugins that remain pending, fail to load, lose required services, or behave incorrectly during reload and shutdown.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is xun404/dsh-pihuo-plugins's own configuration. It tells Claude Code and Codex how to work on dsh-pihuo-plugins itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything dsh-pihuo-plugins configures →

Reuse

Borrowing it

Nothing to install: this file belongs to xun404/dsh-pihuo-plugins. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/xun404/dsh-pihuo-plugins/main/.agents/skills/dsh-plugin-runtime/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/xun404/dsh-pihuo-plugins

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dsh-plugin-runtime

README.md
[![agentmods](https://agentmods.dev/badge/skills/xun404/dsh-pihuo-plugins/dsh-plugin-runtime/github.svg)](https://agentmods.dev/skills/xun404/dsh-pihuo-plugins/dsh-plugin-runtime)
Your own site
<a href="https://agentmods.dev/skills/xun404/dsh-pihuo-plugins/dsh-plugin-runtime"><img src="https://agentmods.dev/badge/skills/xun404/dsh-pihuo-plugins/dsh-plugin-runtime/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dsh-plugin-runtime

Your own site · 80×15
<a href="https://agentmods.dev/skills/xun404/dsh-pihuo-plugins/dsh-plugin-runtime"><img src="https://agentmods.dev/badge/skills/xun404/dsh-pihuo-plugins/dsh-plugin-runtime.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 961 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00082 $0.00961
Opus 5.5 $0.00033 $0.00384
Sonnet 5.5 $0.00016 $0.00192
Haiku 4.5 $0.00008 $0.00096

Measured 2mo ago against content hash f93ff8b72a2e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

dsh-plugin-runtime scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/dsh-plugin-runtime/SKILL.md · 71 lines

What it actually says

Cordis 运行时

dsh 没有特权内核:产品每一部分都是插件。本技能只讲进程内运行时。配置树如何叠出来见 dsh-plugin-compose。

对照源码:../deepseek-harness/vendor/cordis、vendor/loader。

细节展开:references/cordis.md。

加载一条插件时发生什么

  1. Loader 按条目 name import 模块(unwrapExports 处理 CJS/ESM/default)。
  2. Registry.plugin 把函数 / { apply } / 类 归一成 callback,按 callback 身份建 Runtime。
  3. 为这次挂载建 Fiber。有 inject 则先 PENDING,服务齐了再跑 callback。
  4. 函数/对象走 apply(ctx, config);类则 new Ctor(ctx, config),再跑 [Service.init]。
  5. 通过 ctx 的注册记在该 Fiber 的 effect 列表上。

YAML 行序不决定启动顺序。启动顺序 = 服务依赖图。

Fiber 状态

PENDING → LOADING → ACTIVE
                 ↘ FAILED
ACTIVE → UNLOADING → DISPOSED
状态 含义 常见原因
PENDING 依赖未齐 inject 写了尚未 provide 的 key;或写错了服务名
LOADING 正在执行 apply 同步 apply 里做了重 I/O 会卡住观感
ACTIVE 在跑 —
FAILED apply / Config 抛错 schema 校验失败、import 失败、apply throw
UNLOADING / DISPOSED 已卸 父组 disable、依赖消失、HMR、fiber.dispose()

依赖服务消失 → 本插件 DISPOSED;服务回来 → 重新加载。这是设计,不要用全局单例绕过。

排障顺序:dsh --profile <name> --dump-config 确认行在树里 → 查 Fiber 是 PENDING 还是 FAILED → PENDING 对 inject 与提供方 id;FAILED 看 loader 日志与 Config schema。

必须遵守的运行时规则

  • apply 开始时,inject 里的服务已就绪。不要在模块顶层读 ctx。
  • 可选依赖:不写 inject,用 ctx.get('name')。
  • 提供服务:Service 子类 super(ctx, 'key'),并 declare module '@deepseek-ai/cordis' { interface Context { key: ... } }。Host 与 Client 不要复用同一个 Context key 表达不兼容的类型。
  • 事件模式必须与声明一致。Waterfall 观察者必须 next();策略监听器可以短路。不要对 waterfall 事件用 emit。
  • ctx.plugin(child) 的子 Fiber 随父卸载。
  • 多个异步 disposer 并发执行。顺序清理必须放进同一个 ctx.effect 返回的函数里串行 await。
  • Web 发行组合默认关掉共享 HMR(dsh-web-app 把 hmr 行 disabled: true)。不要假设改源文件会热替换 Web 进程。

isolate

同一服务名可以有多个实例。条目上:

isolate:
  shell: true          # 本条目私有 realm
  # shell: my-label    # 同 label 共享一个 GlobalRealm

Agent preset 用 isolate 让不同会话看到不同能力集。树外插件不要随便 isolate 核心服务,除非就是要一份私有实例。

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 71 lines · 82 tokens per session scan A f93ff8b72a2e

Subscribe to this mod's changes

dsh-plugin-runtime is a skill published in the GitHub repository xun404/dsh-pihuo-plugins (2 stars, last pushed 2mo ago), licensed MIT. It adds 82 tokens to every session and 961 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

dsh-plugin-runtime compared with skills from other repositories

dsh-plugin-runtime next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dsh-plugin-runtimexun404/dsh-pihuo-pluginsSkill22mo agoMITA82Claude Code, Codex
dsh-plugin-guidePerryLink/dsh-plugin-guideSkill65yesterdayApache-2.0A62Claude Code, Codex
dsh-troubleshootpingfanfan/hello-dshSkill1071mo agoMITA61Claude Code, Codex
error-handlingpingfanfan/hello-dshSkill1071mo agoMITA51Claude Code, Codex
ask-good-questionspingfanfan/hello-dshSkill1071mo agoMITA61Claude Code, Codex
perf-optimizepingfanfan/hello-dshSkill1071mo agoMITA44Claude Code, Codex
debug-systematicallypingfanfan/hello-dshSkill1071mo agoMITA51Claude Code, Codex