Simply add a file cds-plugin.js next to the package.json of your package to have this detected and loaded automatically when bootstrapping CAP Node.js servers through cds serve, or other CLI commands.
Within such cds-plugin.js modules you can use the cds facade object, to register to lifecycle events or plugin to other parts of the framework. For example, they can react to lifecycle events, the very same way as in custom server.js modules:
In effect this automatically configures a required db service using the sql preset. This preset is configred below to use the sqlite preset in development. The sqlite preset is in turn configured below, to use the plugin package's main as implementation.