dshbase

插件目录 / Developer / dsh-skill-always-apply

dsh-skill-always-apply

已验证 · 实测可装 oThTJx

✓ 持续维护 基于 8 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
—语言
2026-08-19最近推送
跨平台平台

功能简介

DeepSeek Harness plugin: injects alwaysApply-marked skill bodies into sessions before the first model request — no skill tool load needed.

✅
我们的评价
可用 — 实测通过,早期项目

DeepSeek Harness plugin: injects alwaysApply-marked skill bodies into sessions before the first model request — no skill tool load needed. 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

@firefly0621/dsh-always-apply

English | 中文

Opt-in Cordis consumer that contributes skill bodies marked alwaysApply: true (Cursor-aligned frontmatter) to the system prompt of every model request, without requiring a skill tool load.

This package does not register a skill provider. Mount it beside dsh-skill / dsh-skill-filesystem (and usually dsh-tool-skill). It is not part of the default dsh-base composition; install with:

dsh plugin --profile web add @firefly0621/dsh-always-apply

Or insert the shipped cordis.patch.yml into a custom base.

The package also runs against upstream @deepseek-ai/dsh-skill releases that predate the typed alwaysApply field. When a catalog summary does not carry the field, this consumer loads the candidate and reads alwaysApply from the definition or the skill file's frontmatter, so no host-code change is required.

Skill frontmatter

In a local SKILL.md (or flat .md skill) parsed by @deepseek-ai/dsh-skill-filesystem:

---
name: my-standing-rules
description: Standing session rules
alwaysApply: true
---

Follow these rules for the whole session.

alwaysApply uses the same boolean spellings as disable-model-invocation / user-invocable. An invalid value is treated as not opted in, so this consumer skips injection while the skill stays in the discovery catalog.

Routing copy (description / whenToUse) stays on the skill provider that registers the skill; this consumer only selects and injects bodies. Mount skill providers that publish clear routing text so discovery and the model catalog stay useful.

The shipped @firefly0621/dsh-skill-karpathy-guidelines provider marks karpathy-guidelines with alwaysApply: true. Mount this consumer next to that provider to inject the Karpathy body without a skill tool load.

Behavior

On every system-prompt/assemble (the assembly that runs before each model step):

  1. Skip agentless assemblies and sessions whose session.header.origin === 'subagent' (default; skipSubagent: false overrides).
  2. snapshot() the viewing agent's skills. Incomplete observations reuse the last complete always-apply text for that agent (or inject nothing when none exists yet) and do not write the warm cache, so the next assembly retries.
  3. Select Config.names plus skills whose summary, loaded definition, or skill-file frontmatter carries alwaysApply: true, minus disabledNames. Candidate loads run concurrently; byte-budget skips still apply in name order.
  4. Honor section maxTotalBytes, and contribute one skill:always-apply system-prompt section that lists names and embeds each renderSkillContent block.

Rendering is memoized per agent and invalidated by skills/change, so membership and bodies refresh on the next assembly after a catalog change, and the prompt prefix stays byte-stable between changes for KV reuse.

Config

Field Default Meaning
names [] Force-inject these skill names even without frontmatter alwaysApply.
disabledNames [] Never inject these names, even when marked.
skipSubagent true Skip subagent-origin sessions.
maxTotalBytes 100000 UTF-8 length of the complete always-apply section text (reminder envelope + every rendered body). Skills that would push the complete text over the budget are skipped with a warning.

Always-apply injection is a host standing-instructions path: frontmatter alwaysApply: true and Config.names do not require modelInvocable. A skill with disable-model-invocation: true can still be injected here while staying out of the model-facing skill catalog.

Model Experience

Always-apply standing instructions

What the model sees

A skill:always-apply section at the front of the system prompt when at least one selected skill fits the complete-section budget: a short <system-reminder> naming the always-apply set, then each skill's canonical <skill_content> block. Because the section is part of the system prompt, every step receives it, compaction never shadows it, and a catalog change lands on the next complete assembly (incomplete rediscovery keeps the previous complete text until then).

Token effect

One section whose size is the reminder envelope plus every rendered skill body that fit under maxTotalBytes, re-sent in every request's system prompt.

KV Cache effect

The section text sits in the request prefix. While the always-apply set is unchanged the rendered text is byte-stable, so the warm prefix cache is reused; a skills/change refresh recomposes the section, invalidating reuse from that token forward.

Known Limitations and Deferred Work

  • Opt-in only — product defaults do not mount this plugin; operators add it explicitly.
  • Bodies must avoid {{...}} prompt-variable syntax — the section is interpolated by the prompt renderer; a body containing a complete {{...}} group is skipped with a warning (an unclosed {{ is kept as literal prose).
  • A complete persona replaces every section — an agent whose composition registers a complete persona (agent presets) suppresses all prompt sections, including this one, for that agent.
  • Catalog still lists model-invocable always-apply skills — those entries remain in the skill catalog; the reminder tells the model not to re-load them when the body is already present in the system prompt.
  • Bypasses model invocation policy — always-apply and Config.names inject regardless of modelInvocable; use disabledNames to exclude.

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-skill-always-apply」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:oThTJx/dsh-skill-always-apply

Headless(CLI)profile:

dsh plugin --profile headless add github:oThTJx/dsh-skill-always-apply

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7819 个插件 →