It is better to output as QZA/QZV so that provenance is stored in these files.
You should check out the developer documentation, there is a great tutorial that's been added here that describes this: https://dev.qiime2.org/latest/tutorials/
The best way to see how it's done is to look at how other visualizers are registered in existing plugins. Take a look at the adonis action in q2-diversity, it is a relatively simple example to use as a template:
that's right: this output_dir does not get exposed in any of the user interfaces. You need to register one or more outputs as separate arguments that do get exposed to the user (see the examples and documentation above for more details)
Release your plugin in its own github repository (or wherever you like), and document installation and usage instructions on the "library" to share it with the world: https://library.qiime2.org/