Skills-Manager
其他 活跃维护

Skills-Manager

yixiuzhemu/Skills-Manager

支持技能分类、熟练度分级与学习进度记录,以简洁界面快速增删改查技能项,帮助开发者清晰掌握自身能力分布与成长路径,让技能管理变得轻量高效。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
None
开源协议
135 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:yixiuzhemu/Skills-Manager
git clone https://github.com/yixiuzhemu/Skills-Manager.git
git clone git@github.com:yixiuzhemu/Skills-Manager.git
README.md master

Skills-Manager

中文

Package: @dtranx/skills-manager
A dual-face Skills management plugin for DeepSeek Harness (DSH).

Skills-Manager unifies Agent Skills discovered from many sources behind one
management surface. It is a Cordis plugin split into
two independently built and loaded halves:

  • Host half (Node.js) — scans, imports, and manages skills from multiple
    sources; owns the skill registry, trash bin, repository browsing, company
    skill sources, and update/diff tooling. Registers a ctx.skills provider so
    every enabled skill becomes live for the harness.
  • Client half (browser) — renders a unified Skills panel inside the DSH
    settings area, with five tabs: Skills, Trash, Repositories, Company, Updates.

The two halves talk over webServer HTTP (/api/skills-manager): the client
calls typed routes with fetch and re-pulls a snapshot after every mutation.

Full architecture, data model, and design rationale live in
DESIGN.md.

Features

  • Multi-source discovery — DSH global, project, per-agent (Codex / Claude /
    Copilot), and extra user directories.
  • Import & authoring — import from a zip archive, a folder, or a single
    SKILL.md; or create a brand-new managed skill.
  • Enable / disable — toggle skills live against the harness catalog.
  • Trash with retention — soft delete, restore, permanent purge, empty, and
    automatic expiry cleanup (default 30 days).
  • Repository sources — browse GitHub repositories, list their skills, and
    install them.
  • Company sources — register api / git enterprise endpoints, sync, and
    install advertised skills.
  • Updates & diff — check upstream versions and review an inline unified diff
    before applying an update.
  • On-demand remote resolution — when another host plugin asks
    ctx.skillsManager.resolveSkillById(id) for a skill that is not installed
    locally, the manager can resolve it from a single configured endpoint,
    download the presigned archive, and install it. Disabled unless
    remoteSkillResolver.baseUrl is set; a miss never fans out to other servers.
  • Local persistence — JSON documents under ~/.dsh/skills-manager/ with
    revision tracking and file watching.

Architecture

Host half (Node.js)                         Client half (browser)
  src/index.ts                                src/client/index.ts
  SkillsManager service  ◄── HTTP fetch ──►   Settings panel (React)
  JsonFileStore (~/.dsh/skills-manager/)      re-pull snapshot after each change
  tsc → lib/index.js                          tsdown → client/client.js
  • Transport — one prefix route /api/skills-manager registered on
    ctx.webServer; every response is a { ok, data } / { ok, code, error }
    JSON envelope.
  • Security — requests must originate from a loopback host (or a
    same-origin / none sec-fetch-site); every mutating POST must carry the
    x-dsh-skills-manager marker header and an application/json content type;
    request bodies are capped at 4 MB.

Quick Start

Prerequisites

  • Node.js ^22.19.0 || >=24.0.0
  • pnpm 11.7.0 (declared as packageManager)

Install & build

pnpm install
pnpm build       # clean → tsc (host) → tsdown (client) → normalize banner

pnpm build produces the host bundle under lib/ and the browser bundle at
client/client.js.

Verify

pnpm typecheck   # host + client + test projects, --noEmit
pnpm test        # node:test runner over test/**/*.test.ts

Load into DSH

This package is a DSH bundle plugin. It declares:

  • dsh.bundle.patch → ./cordis.patch.yml (inserts the plugin into the profile
    layer stack as id: skills-manager),
  • dsh.client.inject → @deepseek-ai/dsh-client-ui-slots,
    @deepseek-ai/dsh-client-locale,
  • dsh.client.platform → web.

Once the package is installed into a DSH host that consumes these fields, the
host half registers the /api/skills-manager route and the ctx.skills
provider on load, and the client half contributes the panel to the
settings.section slot. Open the harness Settings → Skills Manager to use
it.

Development watch

pnpm watch       # tsdown --watch for the client half
pnpm test:watch  # re-run tests on change

Configuration

The host plugin reads the following config (all optional; zero-config defaults
resolve to a local setup):

Key Type Default Description
projectRoot string '' Project root scanned as the project source.
extraDirs string[] [] Extra directories scanned as the local source.
agentRoots.codex string '' Override for the Codex skills directory.
agentRoots.claude string '' Override for the Claude skills directory.
agentRoots.copilot string '' Override for the Copilot skills directory.
githubApiBase string https://api.github.com GitHub REST API base.
githubRawBase string https://raw.githubusercontent.com GitHub raw content base.
githubToken string '' Optional bearer token for authenticated requests.
trashRetentionDays number 30 Days a trashed skill is kept before auto-purge.
scanOnStart boolean true Whether to run a discovery scan at startup.
remoteSkillResolver.baseUrl string '' Resolver endpoint for on-demand remote skills; empty disables the feature.
remoteSkillResolver.token string '' Optional bearer token, sent to the resolver endpoint only (never to the download host).
remoteSkillResolver.timeoutMs number 30000 Per-request timeout for the resolve + download steps.

Scripts

Script Purpose
build clean → tsc -p tsconfig.json → tsdown → normalize-client-banner
build:client Bundle the client half only
typecheck --noEmit check across host, client, and test tsconfigs
test node --test "test/**/*.test.ts"
test:watch test in watch mode
bundle / watch tsdown bundle / watch
clean Run scripts/clean.mjs
prepack build + scripts/preflight.mjs guard

Project Structure

src/
  index.ts        Host plugin entry (config schema, inject, apply)
  service.ts      SkillsManager orchestration core
  http.ts         Host↔Client HTTP transport (/api/skills-manager)
  file-store.ts   JSON persistence (revision tracking + file watching)
  scanner.ts      Multi-source discovery
  importer.ts     zip / folder / file import + create
  diff.ts         LCS unified diff
  github.ts       GitHub repo & company source remotes
  remote-skill.ts On-demand remote skill resolution (by external id)
  skill-file.ts   SKILL.md parsing / serialization / id hashing
  types.ts        Shared wire vocabulary + Cordis event augmentation
  client/         Browser half (panel, api client, wire types, locales, styles)
test/             node:test suites (http + api + remote-skill)
DESIGN.md         Full design document

Tech Stack

  • Language — TypeScript
  • Frontend — React 18 (React.createElement, no JSX runtime), lightningcss
    for CSS Modules
  • Runtime deps — jszip, yaml
  • Build — tsc (host) + tsdown (client)
  • Tests — Node built-in node:test with native TypeScript type stripping

License

MIT