See where Krita keeps its plugins and where community plugins are kept
Krita comes installed with a number of plugins. These were not just written to add functionality, but to also provide a great reference for people to study the python scripts for their own education. All the reference scripts included are plugins, so be sure to understand how plugins work. The first important thing to know is where to find all these plugins to learn from.
The plugins are all stored wherever you installed Krita. If you have a portable version of Krita, it will be in the portable folder that you are using of it. If you go into that directory, look in the Share > Krita > pykrita folder.
If you are wanting to add something to your plugin, take a look and see if any of the default plugins are doing something similar. Some plugins are simple with only one or two files. Other plugins are more complex with folders of files. Some of the plugin authors try to also write comments explaining more of the complex things they are doing.
Another good place to see what scripts and plugins people are making is on the resources section of docs.krita.org. This contains a collection of scripts and plugins that the community have created on the internet. While you don't want to just copy everything and claim it as your own code, taking a peek and learning how they do something isn't very harmful.
Head to the Krita artists where we have a dedicated area for plugin development and give any feedback you might have.