codebam/hermes-skills/dsh-config
Claude Code and agent skill by codebam/hermes-skills
- community
- ext:[{"type":"config","description":"Configuration overrides"},{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
Use when changing dsh (DeepSeek Harness) config or keys.
Install
npx vskill@latest install codebam/hermes-skills/dsh-configSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as codebam/hermes-skills/dsh-config.
dsh (DeepSeek Harness) configuration — codebam/nixos
When to Use
- Adding, rotating, or re-pointing model API keys for dsh; changing which
subscription a route uses.
- Editing llm-pi-ai routes/providers, launchers, or profile patches.
- After a dsh version bump, when
~/.dshstate behaves unexpectedly
(a "vanished" settings file, profiles, plugins).
Where things live
home/agents.nixowns dsh: the settings YAML (dshSettings→ merged into
~/.dsh/settings.yaml at activation), the profile patch (dshProfilePatch → rendered into ~/.dsh/profiles/*/cordis.patch.yml), and the launchers.
- Launchers:
dshSandboxed(the desktopdsh), the wrapped dsh used on
laptop/steamdeck, dsh-host-access, and dsh-web-serve (dsh-web's ExecStart). EVERY launch path must source the dsh key loader — a path that sources bare loadKey still gets the first subscription but silently loses OPENCODE_API_KEY_2.
loadKeyis the shared agent env loader;loadDshKeychains it and adds
the dsh-specific extras (OPENCODE_API_KEY_2 from /run/secrets/opencode-go-api-key-2, exported only when the secret file is present). New dsh launch paths source loadDshKey, never bare loadKey.
- Secrets flow sops →
/run/secrets; settings reference env NAMES only —
never put key values in Nix strings or settings documents.
Credential seam rules (dsh-llm-pi-ai)
- A route names ONE credential reference (
apiKeyEnv: OPENCODE_API_KEY) — a
POSIX-identifier-shaped env var, resolved per operation. There is NO credential pool: no rotation, no failover between subscriptions. When a subscription is spent the route keeps using it until its reference changes; automatic switching would need a custom plugin — do not promise it.
- Resolution precedence: launch environment first, then a credential stored
through the credentials service, then project/harness-home .env files. Empty string counts as absent. Values supplied via launch env are read-only in the Models UI.
- Switching a route to the other subscription is a one-line change
(apiKeyEnv: OPENCODE_API_KEY_2). Both refs resolve once the launcher sources loadDshKey.
- The credential error text ("store it through the credentials service or
export it") is guidance, not a bug — it names the two supported fixes.
Route constraints
- Routes are keyed by provider: a route cannot borrow another provider's
model catalog (no aliasing); a mixed-protocol catalog dsh cannot hand-declare is served as dedicated single-model routes instead.
- Opencode-backed routes pair with the
dsh-opencode-sessionplugin in the
profile patch — inspect the profile's plugin list when opencode requests misbehave, before touching routes.
dsh --dump-configcomposes routes/plugins without booting the app — the
runtime verification hook for any config edit.
Settings & profiles (0.2.x)
- 0.2.x imports a legacy
~/.dsh/settings.yamlonce, into whichever
profile boots first while the file exists (the active profile), and renames it settings.yaml.imported; per-profile settings and routes then live in that profile's cordis.patch.yml. Repo activation rewrites the managed settings file, so a switch re-arms the import — a "disappeared" settings.yaml is the designed cycle, not data loss.
- The import writes into the ACTIVE profile's patch, so the target must be
writable: against a home-manager store symlink the write is dropped while the file is still renamed .imported, and the profile boots without the routes — a TUI whose model picker shows only the built-in DeepSeek provider is this symptom. Interactive profiles must get the llm-pi-ai routes rendered into the managed patch itself (recipe in references/credentials-and-routes.md), not only into settings.yaml.
Version bumps (core + TUI profile)
- Core is
pkgs/dsh.nix: bumpversion, thefetchziphash
(nix store prefetch-file --unpack --json <tgz>), and npmDeps (build once with lib.fakeHash, read got from the mismatch). Regenerate the vendored pkgs/dsh/package-lock.json from the new tarball: delete devDependencies from its package.json, then npm install --package-lock-only --omit=dev.
postInstallsubstitutes upstream strings with--replace-fail: the
node-addon-require-builtin hook in dsh-app-boot's lib/index.js and lib/worker/profile-resolution-bootstrap.js, dsh-terminal-bash's DEFAULT_BASH_SHELL, and the minimal preset's persona prefix in dsh-web-app. Fetch those packages at the new version and grep each anchor before building — a rename fails the build, and a silent miss would ship the broken default.
- The TUI is NOT in the
@deepseek-ai/dshtarball. It is the external
bundle @deepseek-harness-tui/dsh-tui, installed per-profile in ~/.dsh/profiles/dsh-tui (user state, not home-manager). A core bump alone breaks it: dsh logs skipping profile bundle … incompatible with dsh <version> and boots without the TUI. Bump it in the same step with dsh plugin --profile dsh-tui add '@deepseek-harness-tui/dsh-tui@^<ver>' (forwards to pnpm), choosing the release whose peerDependencies name the new core version. The profile is dsh-tui; dsh tui looks for a profile named tui and errors.
- Verify every touched profile composes:
dsh --profile <dsh-tui|web> --dump-config > /dev/null exits 0 and its stderr has no skipping profile bundle line. A patch: entry "tool-ralph" not found warning from the TUI bundle is benign — it disables core rows that 0.2.1 no longer ships.
- The bump is not verified until `nixos-rebuild build --flake
.#nixos-desktop passes; nix build .#dsh` alone covers neither the home-manager wrapper nor the rendered profile patches.
- A patch fix the user should see before the next switch can be applied
live, then proved: write the same bytes into the profile file and diff the built store file against it — byte-identical means the next activation only re-links it.
Verify and activate
- Evaluate the changed derivations on the host and read the
generated launcher scripts: confirm each sources the dsh loader and the guard exports OPENCODE_API_KEY_2 only when the secret exists.
- Host-side loader simulation: source the built loader with the real
/run/secrets present; assert both refs are non-empty and distinct — print lengths, never values.
- Run the repo lint gate before committing; commits are GPG-signed and push
to origin/master per repo convention.
- To prove what the TUI actually renders rather than what composes, run it
in a pty (terminal background + pty), submit /model, and read the pty log; Tab cycles provider tabs and the strip is clipped at terminal width, so count tabs only after cycling.
- Activation is the human's call:
nh os switchrestarts dsh-web (its
launcher changed) and the TUI picks up env on its next launch. Say this and stop.
Depth — the key-adding pattern, resolution details, route schema notes, and the settings-import mechanism — in references/credentials-and-routes.md.
Building or mounting a custom tool plugin (as opposed to routes/keys): see the dsh-tool-plugins skill.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/autonomous-ai-agents/dsh-config/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
configConfiguration overridespluginCustom plugin integration
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/codebam/hermes-skills/dsh-config)