dsh-skill-sync
开发工具 活跃维护

dsh-skill-sync

mi-lu-uncle/dsh-skill-sync

自动定时从远端Git仓库拉取更新,保持本地技能库镜像同步;支持/skills-sync命令手动触发,无需频繁干预,技能集始终处于最新可用状态。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
8 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:mi-lu-uncle/dsh-skill-sync
git clone https://github.com/mi-lu-uncle/dsh-skill-sync.git
git clone git@github.com:mi-lu-uncle/dsh-skill-sync.git
README.md main

dsh-skill-sync

English | 简体中文 | 日本語

Thin wrapper around the mattpocock skills sync script, exposed as a DSH command
and an opt-in periodic timer.

Why

DSH's filesystem skill provider hot-reloads skill directories after a git pull (its watcher follows symlinks by default), but nothing triggers the pull
or keeps the symlinks in sync. The sync script does both halves:

  1. git pull --ff-only the mirror, and
  2. reconcile symlinks in the skill root — link newly added skills, repair moved
    ones, and remove stale links for skills that were deleted or deprecated.

This plugin just runs that script:

  • a /skills-sync command for an immediate sync, and
  • an opt-in periodic timer (auto: true to enable; default off).

Usage

/skills-sync        # run the sync script now, show its report

Configuration

Set these on the skill-sync row in your profile patch (cordis.patch.yml):

- id: skill-sync
  config:
    script: /Users/you/.dsh/bin/mattpocock-skills-sync.sh  # default: ~/.dsh/bin/mattpocock-skills-sync.sh
    intervalMs: 1800000                                     # default: 30 minutes
    auto: false                                             # default: false (set true to opt in)

Install

dsh plugin --profile desktop add /absolute/path/to/dsh-skill-sync

Test

node test/smoke.mjs            # wrapper: registers command, relays script output
node test/sync-script.test.mjs # script: pull + symlink reconcile against a temp remote