> For the complete documentation index, see [llms.txt](https://db.coolstone.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://db.coolstone.dev/2/plugins/create.md).

# Create

If you want to create a Plugin to publish on NPM, copy the code below and put the source in the exported method.

{% hint style="info" %}
Write your plugins in Commonjs to allow either Commonjs or ESM support!
{% endhint %}

{% code overflow="wrap" lineNumbers="true" %}

```javascript
module.exports = (database, record) => {
// database & record can be null, depending on how the user calls the plugin. Be sure to be able to handle that!
// Plugin source here
}
```

{% endcode %}
