# 如何编写新插件

## 编写新插件

可参考实现了  `sleep` 插件。在项目的 `plugin/executable/sleep/sleep.go`。内有详细注释。

编写好插件后，可在 `plugin/enabled_plugin.go` 匿名 import ，注册插件。

## 分享第三方插件

编写好插件后，如果想将插件分享，可以在 github 的 issue 或 discussion 分享。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://irine-sistiana.gitbook.io/mosdns-wiki/mosdns-v5/ru-he-bian-xie-xin-cha-jian.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
