find-plugins
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese找插件、装插件
Find and Install Plugins
把 GitHub 的 topic 当作插件身份,不把某个 owner 或组织当作目录。
仓库转移后以搜索结果返回的最新 和 为准。完成态只有一个:用户
选中的插件在他的 DSH 里可用。
dsh-pluginfullNameurlTreat the topic on GitHub as the plugin identifier, not a specific owner or organization as the directory. After a repository is transferred, the latest and returned by the search results shall prevail. The only completion state is: the plugin selected by the user is available in their DSH.
dsh-pluginfullNameurlStep 1:取候选池
Step 1: Get Candidate Pool
运行本 skill 自带的确定性检索脚本:
sh
node <本 skill 目录>/scripts/search-topic.mjs > <临时目录>/dsh-plugins.json脚本搜索所有公开、未归档、非 fork、带 topic 的仓库,并处理 GitHub
分页。它依次复用 / 、本机 登录令牌以提高限额;都
没有时使用公开 API。限流时运行 后重试,不要退回组织仓库列表。
dsh-pluginGITHUB_TOKENGH_TOKENghgh auth login完成点:JSON 中的 非空,每条都有当前 、、描述、
topics 和更新时间。按 去重,不根据旧 owner 猜地址。
repositoriesfullNameurlfullNameRun the deterministic retrieval script built into this skill:
sh
node <this skill directory>/scripts/search-topic.mjs > <temp directory>/dsh-plugins.jsonThe script searches all public, unarchived, non-fork repositories with the topic, and handles GitHub pagination. It reuses / and the local login token in sequence to increase rate limits; if none are available, it uses the public API. When rate-limited, run and retry, do not fall back to the organization repository list.
dsh-pluginGITHUB_TOKENGH_TOKENghgh auth loginCompletion criteria: The in the JSON is not empty, and each entry has the current , , description, topics and update time. Deduplicate by , do not guess the address based on the old owner.
repositoriesfullNameurlfullNameStep 2:筛选并确认装法
Step 2: Filter and Confirm Installation Method
先用用户需求对照 、、,按 优先查看较新的
命中项。只对语义最匹配的少量仓库读取 README、 和仓库文件树:
namedescriptiontopicspushedAtpackage.json- 声明
package.json:dsh.bundle.patch。bundle - 含一个或多个 ,且没有 bundle 声明:
SKILL.md。skill - README 明确要求写入 ,但没有 bundle 声明:
cordis.patch.yml。cordis - 只有 /
.dsh-plugin旧格式:标成「需迁移」,不能直接安装。repository - 仍无法判断:标成「需核对」,不要编造安装命令。
如果当前账号能读取 ,可以把其中的 、
、 当补充信息;只接受 与 topic 搜索结果当前 URL 完全匹配
的条目。Hub 缺失、私有或仍指向转移前地址都不影响发现结果,也不能覆盖仓库自身
的当前声明。
dsh-external/hub/catalog.jsonnotecategorymanagersurl产出最多 3 行候选表:名字、一句话用途、最近更新、装法。表后用一句话说明首选
理由。比如「整活 / 复古 / 好玩」可命中
dsh-ads;「把数据、流程和对比画出来」可命中
dsh-visualize。
一条都不匹配时直说 topic 目录里没有,并问是否转 现写一个。
make-dsh-pluginFirst, match user requirements against , , , and prioritize viewing newer hits by . Only read the README, and repository file tree for a small number of repositories with the most semantic matches:
namedescriptiontopicspushedAtpackage.json- declares
package.json:dsh.bundle.patch.bundle - Contains one or more files and no bundle declaration:
SKILL.md.skill - README explicitly requires writing to but no bundle declaration:
cordis.patch.yml.cordis - Only has the old /
.dsh-pluginformat: mark as "Need Migration", cannot be installed directly.repository - Still cannot be determined: mark as "Need Verification", do not fabricate installation commands.
If the current account can read , the , , in it can be used as supplementary information; only accept entries where the exactly matches the current URL from the topic search results. Missing hub, private hub, or hub still pointing to the pre-transfer address will not affect discovery results, nor can it override the current declaration of the repository itself.
dsh-external/hub/catalog.jsonnotecategorymanagersurlGenerate a candidate table with up to 3 rows: name, one-sentence usage, latest update, installation method. Add a sentence explaining the reason for the preferred choice after the table. For example, "Fun/Retro/Interesting" can hit dsh-ads; "Visualize data, processes, and comparisons" can hit dsh-visualize.
If no matches are found, directly state that there are none in the topic directory, and ask whether to redirect to to create one.
make-dsh-pluginStep 3:用户拍板
Step 3: User Confirmation
停下来等选择。用户已经点名某个插件时,从 Step 2 核对当前仓库和装法后直接进入
Step 4。
Pause and wait for user selection. If the user has specified a certain plugin, directly proceed to Step 4 after verifying the current repository and installation method from Step 2.
Step 4:安装
Step 4: Installation
按确认出的安装类型打开 references/install-methods.md
并照对应小节操作。多个方式并存时按该文件开头的优先级选一种。
动手前阅读仓库 README 的安装段落和 lifecycle scripts。Git / npm
依赖可执行 、、 或 。发现与插件功能无关
的额外下载、写 外路径或修改 shell 配置时,先把原文交给用户确认。
package.jsonpreinstallinstallpostinstallprepare$DSH_HOME完成点:配置写入、依赖装完、命令零报错。
Open references/install-methods.md according to the confirmed installation type and follow the corresponding section. If multiple methods exist, choose one according to the priority at the beginning of the file.
Read the installation section of the repository README and lifecycle scripts before proceeding. Git / npm dependencies may execute , , or . If additional downloads unrelated to the plugin function, writing to paths outside or modifying shell configurations are found, first present the original content to the user for confirmation.
package.jsonpreinstallinstallpostinstallprepare$DSH_HOMECompletion criteria: Configuration written, dependencies installed, no command errors.
Step 5:验证挂载
Step 5: Verify Mounting
web 等长驻 surface 监听 patch 文件改动后热载;一次性运行下次启动才生效。请用户
确认相应 UI、工具或技能条目出现。
没出现时依次排查:服务日志中的 、Git spec 是否仍用了
转移前 owner、ref / path 拼写、profile 目录的 是否成功。
hmr/config-update-failedpnpm install完成点:用户确认可用;或把具体报错和已排除的原因一并带回。
Long-running surfaces such as web monitor patch file changes and hot-reload; one-time runs take effect only after the next startup. Ask the user to confirm that the corresponding UI, tool or skill entry appears.
If it does not appear, troubleshoot in the following order: in service logs, whether the Git spec still uses the pre-transfer owner, ref / path spelling, and whether in the profile directory was successful.
hmr/config-update-failedpnpm installCompletion criteria: User confirms availability; or bring back the specific error and the reasons that have been ruled out.