READMESource: main@53fbba83
dsh-skills-manager
A DeepSeek Harness (DSH) plugin that lets you search, browse, install, update, and uninstall Skills.sh skills directly inside the DSH WebUI Settings dialog — without modifying DSH source code.
Quick Install
Run this single command on DSH (0.2.2-rc.5 verified; compatible with 0.2.0–0.2.2+):
dsh plugin --profile web add github:AlphaOneKing/dsh-skills-manager
Then start DSH WebUI and open Settings → Skills.sh (设置 → Skills.sh 技能):
dsh web
To remove the plugin later:
dsh plugin --profile web remove dsh-skills-manager
Features
- Skills.sh Keyword Search: Search the Skills.sh catalog directly from DSH Settings (
GET https://www.skills.sh/api/search) with quick-search suggestions. - Rich Skill Cards: Displays skill name, description (parsed from Skills.sh JSON-LD /
<meta>with bounded concurrency and TTL caching), upstream Skill Source, install count, and clickable Skills.sh page link. - One-Click Install & Immediate DSH Discovery: Downloads snapshots exclusively from
https://www.skills.sh/api/download/<catalogId>, normalizesSKILL.mdYAML frontmatter when needed so@deepseek-ai/dsh-skill-filesystemalways discovers the skill, and tracks installed skills in$DSH_HOME/skills/.skills-manager/manifest.json. - Managed Skills View: Lists plugin-managed local skills with DSH discovery readiness badges, local folder name, source, upstream Content Hash, and Skills.sh links.
- Update Check & Atomic Update with Rollback: Checks single or all Managed Skills against upstream Skills.sh Content Hashes (
up-to-date,update-available,source-unavailable,check-failed). Updates stage and back up strictly inside$DSH_HOME/skills/.skills-manager/, rolling back automatically on any write failure. - Safe Confirmed Uninstall: Requires explicit user confirmation in both UI and server API (
confirmed: true), checks managed ownership, and refuses to delete anything outside$DSH_HOME/skills. - Resilient State Handling: Handles loading indicators, short queries (
< 2chars), empty search results, network errors with retry, duplicate/overwrite confirmation, update failures with rollback, and unavailable upstream sources (HTTP 404).
Architecture & Security Boundaries
DSH WebUI Settings (client/client.js — lazy-CJS __ModuleLoader__ bundle)
│ Registers `settings.section` + `settings.section.icon` + zh/en locales
│ HTTP JSON calls to /dsh-skills-manager/*
▼
DSH Host Plugin (lib/index.js — Cordis plugin)
├── Host Admission Gate (mirrors DSH connection.requestRejection / admit)
├── SkillsShClient (https://www.skills.sh/ ONLY — zero GitHub fallback)
│ ├── GET /api/search?q=<kw>&limit=<n>
│ ├── GET /<catalogId> (JSON-LD / meta description)
│ └── GET /api/download/<catalogId> ({ files, hash } snapshot)
└── SkillStore (strictly confined to $DSH_HOME/skills)
├── PathSafety: rejects .., /abs, \, \0, reserved names, symlink escapes
├── FrontmatterNormalizer: guarantees DSH kebab-case name + description
└── Atomic Swap & State: $DSH_HOME/skills/.skills-manager/{manifest.json,staging,backups}
Key Design Decisions
- Skills.sh-only data source (ADR-0001): All online calls assert
url.origin === 'https://www.skills.sh'and never fall back to GitHub APIs. - Strict Skill Directory confinement (ADR-0002): Every write, staging directory, backup, manifest update, and delete stays strictly inside
$DSH_HOME/skills, validated by lexical path checks, segment-by-segmentlstatsymlink rejection, and post-resolutionrealpathcontainment. - Guaranteed DSH discovery (ADR-0003): Invalid upstream
SKILL.mdfrontmatter is normalized on install while keeping the unmodified upstreamContent Hashfor accurate update detection. - Zero-config GitHub install (ADR-0004): Prebuilt
lib/andclient/client.jsare committed (verified by CI) with nopreparelifecycle script sodsh plugin addsucceeds immediately without manual pnpmallowBuildsexemptions.
Development & Verification Commands
npm install # Install dev & runtime dependencies
npm run typecheck # Strict TypeScript check (host, client, and tests)
npm run build # Compile host (tsc) + browser bundle (tsdown + lightningcss + envelope check)
npm test # Run Vitest suite (install, update/rollback, uninstall, path safety, UI)
npm run check # Run typecheck + build + test together
Engineering Workflow
This repository follows the Matt Pocock Skills workflow (setup-matt-pocock-skills → ask-matt → grill-with-docs → to-spec → to-tickets → TDD vertical slices → PRs):
- Domain vocabulary:
GLOSSARY.md - Architecture Decision Records:
docs/adr/ - Agent workflow configuration:
AGENTS.md,docs/agents/ - Spec & Vertical Slice Issues:
#1(Spec) and#2–#6(Slices 1–5), each delivered via dedicated branch + Pull Request.
No comments yet. Be the first to write one.