The documentation for creating Figma plugins is pretty good but lacks realistic examples. A number of popular plugins are open source. I find that they provide great inspiration as well as deep insight into the API.
This project contains a comprehensive list of plugins which have links to their respective repositories. Published Figma plugins are scanned daily and any new plugins are added to this list.