How to define the slug for my custom plugin?

By default, it should be the folder of your plugin.

If you use wp cli, you can use

wp plugin list

to show all the plugin slugs.

error code: 523