How do you learn to build Discourse plugins?

Done in

https://github.com/discourse/discourse/commit/6c4ee9d5b52b55667264e2b39fe77f072306b9d1