Quoting from the documentation:
Evan Miller has written the definitive guide to Nginx module development.
But some parts of it are a little out of date. You’ve been warned.A github search turned up the Nginx Development Kit. It seems to be
more up to date.
From my own personal experience, Evan Miller’s guide was of a great help. You must also have a deep understanding of how NGINX works. Agentzh’s tutorial can help you.
Reading the source code of his modules is always helpful too.
There is also a video tutorial that I haven’t check yet, but it seems nice.