---
title: "让插件被收录"
url: "https://preview-docs.dshuniverse.com/zh/developers/get-listed/"
lang: "zh-CN"
updated: "2026-11-02"
license: "CC-BY-4.0"
licenseScope: "DSH Universe plugin data"
---

# 让插件被收录

DSH Universe 每 30 分钟自动同步一次 GitHub 和 npm。只要 GitHub 仓库带有 topic `dsh-plugin`，或 npm 包的 `keywords` 中包含 `dsh-plugin`，插件就会被收录，不需要提交表单。

## 方式一：GitHub topic

1. 打开仓库主页，点击 About 旁边的齿轮图标。
2. 在 Topics 中添加 `dsh-plugin`。
3. 保存。

仓库必须是公开的。归档（archived）的仓库仍会被收录，但会被标为「警示」。

## 方式二：npm 关键字

在 `package.json` 中加入关键字，然后发布一个新版本：

```json
{
  "name": "example-memory",
  "version": "1.4.2",
  "keywords": ["dsh-plugin"],
  "repository": {
    "type": "git",
    "url": "git+https://github.com/example/example-memory.git"
  }
}
```

```bash
npm publish
```

## 为什么要填写 repository 字段？

DSH Universe 用 `package.json` 的 `repository` 字段把 npm 包和 GitHub 仓库关联成同一个插件。不填写时，同一个插件可能出现两条记录：一条来自 npm，一条来自 GitHub。

## 插件 ID 是怎么生成的？

插件 ID 用于详情页地址 `https://dshuniverse.com/plugins/<插件 ID>`，生成后不再改变。

| 来源          | 规则                            | 例子                                    |
| ----------- | ----------------------------- | ------------------------------------- |
| npm 无 scope | 包名                            | `example-memory`                      |
| npm 有 scope | `@scope/name` → `scope--name` | `@acme/dsh-tools` → `acme--dsh-tools` |
| 只在 GitHub   | `gh--<owner>--<repo>`         | `gh--acme--dsh-tools`                 |

## 收录后多久能被扫描？

通常在同步后几分钟内完成扫描。扫描通过的版本变为「已扫描」，有风险项的变为「警示」。扫描检查的内容见[扫描规则](/zh/developers/scan-rules/)。

## 为什么我的插件没有出现？

按顺序检查：

1. 距离加 topic 或发布 npm 版本是否已超过 30 分钟。
2. GitHub 仓库是否公开；topic 是否拼写为 `dsh-plugin`。
3. npm 关键字是否在**已发布**的版本中（只改 `package.json` 不发布不会生效）。
4. 插件是否被下架过：在详情页地址中直接访问插件 ID，下架的插件会显示原因。

仍未解决，请在 [GitHub issues](https://github.com/qixinh1/dshuniverse/issues) 提出。
