I've created two pull requests at https://github.com/freebsd/pkg-plugins/pulls to update the examples for the current pkg(8) ABI/API for plugins. I feel this is still one of the first places people are looking at when learning how to write plugins.
Also, if you are looking for help to keep the examples up to date, I would be glad to volunteer. Just respond here or at https://github.com/freebsd/pkg-plugins/issues/4 .
Thanks for the report Markus
You did the right thing by creating a PR and issue upstream and I've pinged our pkg maintainer on those.
Would you mind if I close this issue as resolved on that basis?
No, I woudn't. Please go ahead.
Unfortunately there was no reaction from the package maintainer. Neither here nor upstream.
Please let me know how I can help to make this happen.
If there is no interest in having examples, please feel free to close this issue.